first commit

This commit is contained in:
CHIEFSOFT\ameye
2023-12-28 16:20:07 -05:00
commit b114fdf4fa
5377 changed files with 1850677 additions and 0 deletions
@@ -0,0 +1,296 @@
<?php
/**
* Init admin page actions : Welcome, help page
*
*/
if ( ! class_exists( 'HU_admin_page' ) ) :
class HU_admin_page {
static $instance;
public $support_url;
function __construct () {
self::$instance =& $this;
//build the support url
//build the support url
$this -> support_url = HU_IS_PRO ? esc_url( sprintf( '%ssupport' , 'presscustomizr.com/' ) ) : esc_url('wordpress.org/support/theme/hueman');
//fix #wpfooter absolute positioning in the welcome and about pages
add_action( 'admin_print_styles' , array( $this, 'hu_fix_wp_footer_link_style') );
//add welcome page in menu
add_action( 'admin_menu' , array( $this , 'hu_add_welcome_page' ));
}
/**
* Extract changelog of latest version from readme.txt file
*
*/
function hu_print_changelog() {
if( ! file_exists(HU_BASE."readme.txt") ) {
return;
}
if( ! is_readable(HU_BASE."readme.txt") ) {
echo '<p>The changelog in readme.txt is not readable.</p>';
return;
}
$html = '';
$stylelines = explode("\n", implode('', file(HU_BASE."readme.txt")));
$read = false;
$is_title = false;
foreach ($stylelines as $line) {
$is_title = 0 === strpos($line, '= ');
//we start reading after current version title
if ( 0 === strpos($line, '= '.HUEMAN_VER) ) {
$read = true;
}
if ( ! $read )
continue;
if ( $is_title ) {
$html .= sprintf( '<strong>%1$s</strong><br/>', esc_attr( $line ) );
} else {
$html .= sprintf( '<i>%1$s</i><br/>', esc_attr( $line ) );
}
}
?>
<div id="hueman-changelog" class="changelog">
<h3><?php printf( __( 'Changelog' , 'hueman' ) , HUEMAN_VER ); ?></h3>
<p><?php echo $html ?></p>
<p><strong><?php printf('<a href="%1$s" title="%2$s" target="_blank" rel="noopener noreferrer">%2$s %3$s</a>',
HU_WEBSITE . "/category/hueman-releases/",
__( "Read the latest release notes" , "hueman" ),
is_rtl() ? '&laquo;' : '&raquo;'
); ?></strong></p>
</div>
<?php
}
/*
* Inspired by Easy Digital Download plugin by Pippin Williamson
* @since 3.2.1
*/
function hu_config_infos() {
global $wpdb;
//get WP_Theme
$theme_data = wp_get_theme();
$theme = $theme_data->Name . ' ' . $theme_data->Version;
$parent_theme = $theme_data->Template;
if ( ! empty( $parent_theme ) ) {
$parent_theme_data = wp_get_theme( $parent_theme );
$parent_theme = $parent_theme_data->Name . ' ' . $parent_theme_data->Version;
}
?>
<div class="hu-config-info">
<h3><?php _e( 'System Information', 'hueman' ); ?></h3>
<h4 style="text-align: left"><?php _e( 'Please include the following information when posting support requests' , 'hueman' ) ?></h4>
<textarea readonly="readonly" onclick="this.focus();this.select()" id="system-info-textarea" name="tc-sysinfo" title="<?php _e( 'To copy the system infos, click below then press Ctrl + C (PC) or Cmd + C (Mac).', 'hueman' ); ?>" style="width: 100%;min-height: 800px;font-family: Menlo,Monaco,monospace;background: 0 0;white-space: pre;overflow: auto;display:block;">
<?php do_action( '__system_config_before' ); ?>
# SITE_URL: <?php echo site_url() . "\n"; ?>
# HOME_URL: <?php echo esc_url( home_url() ) . "\n"; ?>
# IS MULTISITE : <?php echo is_multisite() ? 'Yes' . "\n" : 'No' . "\n" ?>
# ACTIVE THEME : <?php echo $theme . "\n"; ?>
<?php if ( $parent_theme !== $theme ) : ?>
# PARENT THEME : <?php echo $parent_theme . "\n"; ?>
<?php endif; ?>
# WP VERSION : <?php echo get_bloginfo( 'version' ) . "\n"; ?>
# PERMALINK STRUCTURE : <?php echo get_option( 'permalink_structure' ) . "\n"; ?>
<?php
$plugins = get_plugins();
$active_plugins = get_option( 'active_plugins', array() );
?>
<?php if ( empty($active_plugins) ) : ?>
# NO ACTIVE PLUGINS
<?php else : ?>
# <?php echo count($active_plugins); ?> ACTIVE PLUGINS :
<?php
foreach ( $plugins as $plugin_path => $plugin ) {
// If the plugin isn't active, don't show it.
if ( ! in_array( $plugin_path, $active_plugins ) )
continue;
echo ' - ' . $plugin['Name'] . ' (version ' . $plugin['Version'] .')' ."\n";
}
?>
<?php endif;//end if active plugins not empty ?>
<?php
if ( is_multisite() ) :
?>
# NETWORK ACTIVE PLUGINS:
<?php
$plugins = wp_get_active_network_plugins();
$active_plugins = get_site_option( 'active_sitewide_plugins', array() );
foreach ( $plugins as $plugin_path ) {
$plugin_base = plugin_basename( $plugin_path );
// If the plugin isn't active, don't show it.
if ( ! array_key_exists( $plugin_base, $active_plugins ) )
continue;
$plugin = get_plugin_data( $plugin_path );
echo ' - ' . $plugin['Name'] . ' ( version ' . $plugin['Version'] .' )' ."\n";
}
endif;
//GET MYSQL VERSION
global $wpdb;
$mysql_ver = ( ! empty( $wpdb->use_mysqli ) && $wpdb->use_mysqli ) ? @mysqli_get_server_info( $wpdb->dbh ) : '';
?>
# PHP Version: <?php echo PHP_VERSION . "\n"; ?>
# MySQL Version: <?php echo $mysql_ver . "\n"; ?>
# Web Server Info: <?php echo $_SERVER['SERVER_SOFTWARE'] . "\n"; ?>
# WordPress Memory Limit: <?php echo ( $this -> hu_let_to_num( WP_MEMORY_LIMIT )/( 1024 ) )."MB"; ?><?php echo "\n"; ?>
# PHP Memory Limit: <?php echo ini_get( 'memory_limit' ) . "\n"; ?>
# PHP Upload Max Size: <?php echo ini_get( 'upload_max_filesize' ) . "\n"; ?>
# PHP Post Max Size: <?php echo ini_get( 'post_max_size' ) . "\n"; ?>
# PHP Upload Max Filesize:<?php echo ini_get( 'upload_max_filesize' ) . "\n"; ?>
# PHP Time Limit: <?php echo ini_get( 'max_execution_time' ) . "\n"; ?>
# PHP Max Input Vars: <?php echo ini_get( 'max_input_vars' ) . "\n"; ?>
# PHP Arg Separator: <?php echo ini_get( 'arg_separator.output' ) . "\n"; ?>
# PHP Allow URL File Open:<?php echo ini_get( 'allow_url_fopen' ) ? "Yes" : "No\n"; ?>
# WP_DEBUG: <?php echo defined( 'WP_DEBUG' ) ? WP_DEBUG ? 'Enabled' . "\n" : 'Disabled' . "\n" : 'Not set' . "\n" ?>
# Show On Front: <?php echo get_option( 'show_on_front' ) . "\n" ?>
# Page On Front: <?php $id = get_option( 'page_on_front' ); echo get_the_title( $id ) . '(#' . $id . ')' . "\n" ?>
# Page For Posts: <?php $id = get_option( 'page_for_posts' ); echo get_the_title( $id ) . '(#' . $id . ')' . "\n" ?>
<?php do_action( '__system_config_after' ); ?>
</textarea>
</div><?php // .wrap ?>
</div>
<?php
}//end of function
/**
* TC Let To Num
*
* Does Size Conversions
*
*
* @since 3.2.2
*/
function hu_let_to_num( $v ) {
$l = substr( $v, -1 );
$ret = substr( $v, 0, -1 );
switch ( strtoupper( $l ) ) {
case 'P': // fall-through
case 'T': // fall-through
case 'G': // fall-through
case 'M': // fall-through
case 'K': // fall-through
$ret *= 1024;
break;
default:
break;
}
return $ret;
}
/**
* hook : admin_print_styles
* fix the absolute positioning of the wp footer admin link in the welcome pages
* @return void
*/
function hu_fix_wp_footer_link_style() {
$screen = get_current_screen();
if ( ! is_object( $screen ) || 'appearance_page_welcome' != $screen-> id )
return;
?>
<style id="tc-fix-wp-footer-position">
.wp-admin #wpfooter {bottom: inherit;}
</style>
<?php
}
/**
* Add fallback admin page.
* @package Hueman
* @since Hueman 1.1
*/
function hu_add_welcome_page() {
$_name = __( 'About Hueman' , 'hueman' );
$_name = HU_IS_PRO ? sprintf( '%s Pro', $_name ) : $_name;
$theme_page = add_theme_page(
$_name, // Name of page
$_name, // Label in menu
'edit_theme_options' , // Capability required
'welcome.php' , // Menu slug, used to uniquely identify the page
array( $this , 'hu_welcome_panel' ) //function to be called to output the content of this page
);
}
/**
* Render welcome admin page.
* @package Hueman
* @since Hueman 3.0.4
*/
function hu_welcome_panel() {
$_theme_name = HU_IS_PRO ? 'Hueman Pro' : 'Hueman';
?>
<div class="hueman-admin-panel">
<div class="about-text tc-welcome">
<?php
$title = sprintf( '<h1 class="czr-welcome-title">%1$s %2$s %3$s :)</h1>',
__( "Thank you for using", "hueman" ),
$_theme_name,
HUEMAN_VER
);
echo convert_smilies( $title );
?>
<?php
if ( !HU_IS_PRO ) {
printf( '<h4>%1$s ❤️.</h4><h4>%2$s</h4><h4>%3$s 🙏</h4><h3 style="font-weight:bold">%4$s</h3>',
sprintf( __( "If you enjoy using the Hueman theme for your website, you will love %s", "hueman"),
sprintf( '<a style="color:#d87f00" href="%1$s" title="%2$s" target="_blank" rel="noopener noreferrer">%2$s</a>', 'https://presscustomizr.com/hueman-pro/', __("Hueman Pro", "hueman") )
),
__("With Hueman Pro, you get premium features like infinite scrolling, footer and header customization, font customizer and many more. In addition, our premium support will be there to help you resolve any issue you may have with the theme. When installing Hueman Pro, all your previous options used in Hueman free are kept.", 'hueman'),
__('And of course your support allows us to keep the theme at the highest level for your website. Thank you!', 'hueman'),
'Limited offer : get 25% off with code HELLO2022.' . ' <a class="hu-pro-link-in-dashboard" href="https://presscustomizr.com/hueman-pro/" rel="noopener noreferrer" title="Go Pro" target="_blank">Go Pro</a> <span style="color: #f07829;font-size: 26px;" class="dashicons dashicons-external"></span>'
);
}
?>
</div>
<?php echo $this->hu_print_changelog(); ?>
<div class="czr-col-50 first-col">
<h3 style="font-size:1.3em;"><?php _e( 'Knowledge base','hueman' ); ?></h3>
<p><?php _e( "We have prepared a complete online documentation of the theme.",'hueman' ) ?></br>
<a class="button-primary review-hueman" href="<?php echo 'https://docs.presscustomizr.com/' ?>" target="_blank"><?php _e('Hueman Documentation','hueman'); ?></a></p>
<!-- Place this tag where you want the widget to render. -->
</div>
<div class="czr-col-50">
<h3 style="font-size:1.3em;"><?php _e( 'Share your feedback','hueman' ); ?></h3>
<p><?php _e( 'If you are happy with the theme, say it on wordpress.org and give Hueman a nice review!','hueman' ) ?></br>
<a class="button-primary review-hueman" href="<?php echo esc_url('wordpress.org/support/view/theme-reviews/hueman') ?>" target="_blank"><?php _e('Share a review','hueman'); ?></a></p>
</div>
<?php echo $this->hu_config_infos() ?>
</div><!-- //#hueman-admin-panel -->
<?php
}
}//end of class
endif;
@@ -0,0 +1,184 @@
<?php
/**
* Update notifications system in WP admin
*/
if ( !class_exists( 'HU_admin_update_notification' ) ) :
class HU_admin_update_notification {
static $instance;
function __construct () {
self::$instance =& $this;
//UPDATE NOTICE
if( !defined( 'HU_SHOW_UPDATE_NOTIFICATION' ) ) { define( 'HU_SHOW_UPDATE_NOTIFICATION', HUEMAN_VER !== '3.7.3' ); }
add_action( 'admin_notices' , array( $this, 'hu_may_be_display_update_notice') );
//always add the ajax action
add_action( 'wp_ajax_dismiss_hueman_update_notice' , array( $this , 'hu_dismiss_update_notice_action' ) );
add_action( 'admin_footer' , array( $this , 'hu_write_ajax_dismis_script' ) );
/* beautify admin notice text using some defaults the_content filter callbacks */
foreach ( array( 'wptexturize', 'convert_smilies', 'wpautop') as $callback ) {
if ( function_exists( $callback ) )
add_filter( 'hu_update_notice', $callback );
}
}
/**********************************************************************************
* UPDATE NOTICE
* User gets notified when the version stores in the db option 'last_update_notice'
* is < current version of the theme (HUEMAN_VER)
* User can dismiss the notice and the option get updated by ajax to the current version
* The notice will be displayed a maximum of 5 times and will be automatically dismissed until the next update.
* => users won't be notified again until the next update.
**********************************************************************************/
/**
* hook : admin_notices
*/
function hu_may_be_display_update_notice() {
if ( !defined('HU_SHOW_UPDATE_NOTIFICATION') || !HU_SHOW_UPDATE_NOTIFICATION )
return;
$screen = get_current_screen();
if ( is_object($screen) && 'appearance_page_welcome' === $screen-> id )
return;
$opt_name = 'last_update_notice';
$last_update_notice_values = hu_get_option($opt_name);
$show_new_notice = false;
$display_ct = 10;
if ( !$last_update_notice_values || !is_array($last_update_notice_values) ) {
//first time user of the theme, the option does not exist
// 1) initialize it => set it to the current Hueman version, displayed 0 times.
// 2) update in db
$last_update_notice_values = array( "version" => HUEMAN_VER, "display_count" => 0 );
HU_utils::$inst->hu_set_option( $opt_name, $last_update_notice_values );
//already user of the theme ?
if ( hu_user_started_before_version( HUEMAN_VER ) )
$show_new_notice = true;
}
$_db_version = $last_update_notice_values["version"];
$_db_displayed_count = $last_update_notice_values["display_count"];
//user who just upgraded the theme will be notified until he/she clicks on the dismiss link
//or until the notice has been displayed n times.
if ( version_compare( HUEMAN_VER, $_db_version , '>' ) ) {
//CASE 1 : displayed less than n times
if ( $_db_displayed_count < $display_ct ) {
$show_new_notice = true;
//increments the counter
(int) $_db_displayed_count++;
$last_update_notice_values["display_count"] = $_db_displayed_count;
//updates the option val with the new count
HU_utils::$inst->hu_set_option( $opt_name, $last_update_notice_values );
}
//CASE 2 : displayed n times => automatic dismiss
else {
//reset option value with new version and counter to 0
$new_val = array( "version" => HUEMAN_VER, "display_count" => 0 );
HU_utils::$inst->hu_set_option( $opt_name, $new_val );
}//end else
}//end if
//always display in dev mode
$show_new_notice = ( defined('CZR_DEV') && CZR_DEV ) || $show_new_notice;
if ( !$show_new_notice )
return;
//prefixed HU_Plugin_Activation because of the possible issue : https://github.com/presscustomizr/customizr/issues/1603
if ( !hu_is_plugin_active('nimble-builder/nimble-builder.php') && class_exists('HU_Plugin_Activation') && !HU_Plugin_Activation::get_instance()->hu_is_notice_dismissed() )
return;
ob_start();
?>
<div class="notice notice-info czr-update-notice" style="position:relative;">
<?php
echo apply_filters(
'hu_update_notice',
sprintf('<h3>➡️ %1$s %2$s %3$s %4$s. <strong><a href="%5$s" title="%6$s">%6$s %7$s</a></strong></h3>',
__( "You have recently updated to", "hueman"),
HU_IS_PRO ? 'Hueman Pro' : 'Hueman',
__( "version", "hueman"),
HUEMAN_VER,
admin_url() .'themes.php?page=welcome.php',
__( "Make sure to read the changelog" , "hueman" ),
is_rtl() ? '&laquo;' : '&raquo;'
)
);
?>
<p style="text-align:right;position: absolute;font-size: 1.1em;<?php echo is_rtl()? 'left' : 'right';?>: 7px;bottom: -6px;">
<?php printf('<a href="#" title="%1$s" class="tc-dismiss-update-notice"> ( %1$s <strong>X</strong> ) </a>',
__('close' , 'hueman')
);
?>
</p>
</div>
<?php
$_html = ob_get_clean();
echo $_html;
}
/**
* hook : wp_ajax_dismiss_hueman_update_notice
* => sets the last_update_notice to the current Hueman version when user click on dismiss notice link
*/
function hu_dismiss_update_notice_action() {
check_ajax_referer( 'dismiss-update-notice-nonce', 'dismissUpdateNoticeNonce' );
//reset option value with new version and counter to 0
$new_val = array( "version" => HUEMAN_VER, "display_count" => 0 );
HU_utils::$inst->hu_set_option( 'last_update_notice', $new_val );
wp_die();
}
/**
* hook : admin_footer
*/
function hu_write_ajax_dismis_script() {
?>
<script id="tc-dismiss-update-notice">
( function($){
var _ajax_action = function( $_el ) {
var AjaxUrl = "<?php echo admin_url( 'admin-ajax.php' ); ?>",
_query = {
action : 'dismiss_hueman_update_notice',
dismissUpdateNoticeNonce : "<?php echo wp_create_nonce( 'dismiss-update-notice-nonce' ); ?>"
},
$ = jQuery,
request = $.post( AjaxUrl, _query );
request.fail( function ( response ) {
//console.log('response when failed : ', response);
});
request.done( function( response ) {
//console.log('RESPONSE DONE', $_el, response);
// Check if the user is logged out.
if ( '0' === response )
return;
// Check for cheaters.
if ( '-1' === response )
return;
});
};//end of fn
//on load
$( function($) {
$('.tc-dismiss-update-notice').on('click', function( e ) {
e.preventDefault();
$(this).closest('.czr-update-notice').slideToggle('fast');
_ajax_action( $(this) );
} );
} );
} )( jQuery );
</script>
<?php
}
}//end of class
endif;
@@ -0,0 +1,124 @@
<?php
//@return bool
function hu_rec_notice_is_dismissed( $notice_id = '' ) {
$notice_id = ( empty( $notice_id ) || !is_string( $notice_id ) ) ? REC_NOTICE_ID : $notice_id;
$dismissed = get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true );
$dismissed_array = array_filter( explode( ',', (string) $dismissed ) );
return ( defined('NIMBLE_RECOMMENDATION_OFF') && true === NIMBLE_RECOMMENDATION_OFF ) || in_array( $notice_id, $dismissed_array );
}
add_action( 'admin_notices', 'hu_maybe_render_rec_notice' );
function hu_maybe_render_rec_notice() {
$screen = get_current_screen();
if ( isset( $screen->parent_file ) && 'plugins.php' === $screen->parent_file && 'update' === $screen->id ) {
return;
}
if ( hu_rec_notice_is_dismissed( REC_NOTICE_ID ) )
return;
$plugin = 'nimble-builder/nimble-builder.php';
$installed_plugins = get_plugins();
$is_nimble_installed = isset( $installed_plugins[ $plugin ] );
if ( $is_nimble_installed ) {
if ( !current_user_can( 'activate_plugins' ) ) {
return;
}
$button_text = __( 'Activate Nimble Builder Now', 'hueman' );
$button_link = wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $plugin . '&amp;plugin_status=all&amp;paged=1&amp;s', 'activate-plugin_' . $plugin );
} else {
if ( !current_user_can( 'install_plugins' ) ) {
return;
}
$button_text = __( 'Install Nimble Builder Now', 'hueman' );
$button_link = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=nimble-builder' ), 'install-plugin_nimble-builder' );
}
if ( hu_rec_notice_is_dismissed( PREV_REC_NOTICE_ID ) ) {
hu_print_s_rec_notice( $button_text, $button_link );
} else {
hu_print_l_rec_notice( $button_text, $button_link );
}
}
function hu_print_l_rec_notice( $button_text, $button_link ) {
$heading = sprintf( __('Hueman theme recommends %1$s.', 'hueman' ),
sprintf('<a href="%1$s" class="thickbox" target="_blank">%2$s</a>',
wp_nonce_url( 'plugin-install.php?tab=plugin-information&amp;plugin=nimble-builder&amp;TB_iframe=true&amp;width=640&amp;height=500'),
__('Nimble Page Builder', 'hueman')
)
);
$message = sprintf( '<span style="font-weight:normal;">%1$s<br/> %2$s<br/>%3$s<br/>%4$s</span>',
__( 'Developers of the Hueman theme have created Nimble Builder, a free, powerful yet easy-to-use page builder already active on 50K+ WordPress websites.', 'hueman'),
__( 'It allows you to drag and drop mobile-ready sections on <i>really</i> any page of your site, including home, posts, pages, products, archives, 404, search pages, ...', 'hueman' ),
sprintf(
__( 'You can insert simple text zones, but also create %1$s, insert post grids, column structures, buttons, widget zones, maps, icons, and much more, or use pre-designed sections with professional %2$s.', 'hueman'),
sprintf('<a href="%1$s" target="_blank" title="%2$s">%2$s</a>', esc_url('nimblebuilder.com/mp4-video-background-with-delay/'), __('video backgrounds', 'hueman') ),
sprintf('<a href="%1$s" target="_blank" title="%2$s">%2$s</a>', esc_url('demo.presscustomizr.com/nimble-builder/'), __('parallax effect', 'hueman') )
),
__( "The plugin is lightweight and has been designed to integrate seamlessly with Hueman and any WordPress theme.", 'hueman')
);
$notice_id = REC_NOTICE_ID;
?>
<script>
jQuery( function( $ ) {
// .notice-dismiss button markup is added by WP
$( <?php echo wp_json_encode( "#$notice_id" ); ?> ).on( 'click', '.notice-dismiss', function() {
$(this).closest('.is-dismissible').slideUp('fast');//<= this line is not mandatory since WP has its own way to remove the is-dismissible block
$.post( ajaxurl, {
pointer: <?php echo wp_json_encode( $notice_id ); ?>,
action: 'dismiss-wp-pointer'
} );
} );
} );
</script>
<div class="notice updated is-dismissible czr-nimble-rec-notice" id="<?php echo esc_attr( $notice_id ); ?>">
<div class="czr-nimble-rec-notice-inner">
<div class="czr-rec-text-block">
<h3><span class="czr-nimble-rec-notice-icon"><img src="<?php echo esc_url( get_template_directory_uri() ) . '/assets/admin/img/nimble_icon.svg'; ?>" alt="Nimble Builder Logo" /></span><span class="czr-nimble-rec-notice-title"><?php echo $heading; ?></span></h3>
<p><?php echo $message; ?></p>
<span class="czr-rec-button"><a class="button button-primary button-hero activate-now" href="<?php echo esc_attr( $button_link ); ?>" data-name="Nimble Builder" data-slug="nimble-builder"><?php echo $button_text; ?></a></span>
</div>
<div class="czr-tgmpa-img-block"><img src="https://api.nimblebuilder.com/wp-content/uploads/2020/07/nimble_and_hueman_145.gif" alt="Nimble Builder" title="Nimble Builder" class="czr-nimble-img"></div>
</div>
</div>
<?php
}
function hu_print_s_rec_notice( $button_text, $button_link ) {
$heading = sprintf( __('Hueman theme recommends the simple and smart %1$s companion ( free 😍 ) to help you build pages %2$s.', 'hueman' ),
sprintf('<a href="%1$s" class="thickbox" target="_blank">%2$s</a>',
wp_nonce_url( 'plugin-install.php?tab=plugin-information&amp;plugin=nimble-builder&amp;TB_iframe=true&amp;width=640&amp;height=500'),
__('Nimble Builder', 'hueman')
),
sprintf('<a href="https://nimblebuilder.com/landing-page-one/" target="_blank" rel="noreferrer noopener">%1$s</a>',
__('like this', 'hueman')
)
);
$notice_id = REC_NOTICE_ID;
?>
<script>
jQuery( function( $ ) {
$( <?php echo wp_json_encode( "#$notice_id" ); ?> ).on( 'click', '.notice-dismiss', function() {
$.post( ajaxurl, {
pointer: <?php echo wp_json_encode( $notice_id ); ?>,
action: 'dismiss-wp-pointer'
} );
} );
} );
</script>
<div class="notice updated is-dismissible czr-nimble-rec-notice" id="<?php echo esc_attr( $notice_id ); ?>">
<div class="czr-nimble-rec-notice-inner">
<div class="">
<h3><span class="czr-nimble-rec-notice-icon"><img src="<?php echo esc_url( get_template_directory_uri() ) . '/assets/admin/img/nimble_icon.svg'; ?>" alt="Nimble Builder Logo" /></span><span class="czr-nimble-rec-notice-title"><?php echo $heading; ?></span>
<span class=""><a class="button button-primary activate-now" href="<?php echo esc_attr( $button_link ); ?>" data-name="Nimble Builder" data-slug="nimble-builder"><?php echo $button_text; ?></a></span>
</h3>
</div>
</div>
</div>
<?php
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,474 @@
<?php
/**
*
*
* @package Hueman
* @since 3.0.0
* @author Nicolas GUILLAUME <nicolas@presscustomizr.com>
* @copyright Copyright (c) 2016, Nicolas GUILLAUME
* @link http://presscustomizr.com/hueman
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
if ( !class_exists( 'HU_utils' ) ) :
class HU_utils {
//Access any method or var of the class with classname::$instance -> var or method():
static $inst;
public $default_options;
public $db_options;
public $options;//not used in customizer context only
public $is_customizing;
public $hu_options_prefixes;
public static $_theme_setting_list;
function __construct () {
self::$inst =& $this;
//init properties
//when is_admin, the after_setup_theme is fired too late
if ( is_admin() && !hu_is_customizing() ) {
$this -> hu_init_properties();
} else {
add_action( 'after_setup_theme' , array( $this , 'hu_init_properties') );
}
//IMPORTANT : this callback needs to be ran AFTER hu_init_properties.
add_action( 'after_setup_theme', array( $this, 'hu_cache_theme_setting_list' ), 100 );
//Various WP filters for
//content
//thumbnails => parses image if smartload enabled
//title
add_action( 'wp_head' , array( $this , 'hu_wp_filters') );
//refresh the theme options right after the _preview_filter when previewing
add_action( 'customize_preview_init' , array( $this , 'hu_customize_refresh_db_opt' ) );
}//construct
/***************************
* EARLY HOOKS
****************************/
/**
* Init class properties after_setup_theme
* Fixes the bbpress bug : Notice: bbp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init()
* hu_get_default_options uses is_user_logged_in() => was causing the bug
* hook : after_setup_theme
*
*/
function hu_init_properties() {
//all theme options start by "hu_" by convention
//$this -> hu_options_prefixes = apply_filters('hu_options_prefixes', array('hu_') );
$this -> is_customizing = hu_is_customizing();
$this -> db_options = false === get_option( HU_THEME_OPTIONS ) ? array() : (array)get_option( HU_THEME_OPTIONS );
$this -> default_options = $this -> hu_get_default_options();
$_trans = HU_IS_PRO ? 'started_using_hueman_pro' : 'started_using_hueman';
//What was the theme version when the user started to use Hueman?
//new install = no options yet
//very high duration transient, this transient could actually be an option but as per the wordpress.org themes guidelines, only one option is allowed for the theme settings
if ( !hu_isprevdem() ) {
if ( !get_transient( $_trans ) ) {
set_transient(
$_trans,
sprintf('%s|%s' , count( $this -> db_options ) >= 1 ? 'before' : 'with' , HUEMAN_VER ),
60*60*24*3650
);
}
// Commented since https://github.com/presscustomizr/hueman/issues/775
// was not used anyway since the removal of the welcome note
// if ( !get_transient( 'hu_start_date' ) && class_exists( 'DateTime' ) ) {
// set_transient(
// 'hu_start_date',
// new DateTime("now"),
// 60*60*24*3650
// );
// }
}
//the db updates for retro compat can be done now.
//=> @see functions/init-retro-compat.php
do_action('hu_init_options_done');
}
/* ------------------------------------------------------------------------- *
* CACHE THE LIST OF THEME SETTINGS ONLY
/* ------------------------------------------------------------------------- */
//Fired in __construct()
//Note : the 'sidebar-areas' setting is not listed in that list because registered specifically
function hu_cache_theme_setting_list() {
if ( is_array(self::$_theme_setting_list) && !empty( self::$_theme_setting_list ) )
return;
$_settings_map = HU_utils_settings_map::$instance -> hu_get_customizer_map( null, 'add_setting_control' );
$_settings = array();
foreach ( $_settings_map as $_id => $data ) {
$_settings[] = $_id;
}
//$default_options = HU_utils::$inst -> hu_get_default_options();
self::$_theme_setting_list = $_settings;
}
/***************************
* ON WP_HEAD
****************************/
/**
* hook : wp_head
*/
function hu_wp_filters() {
if ( apply_filters( 'hu_img_smart_load_enabled', !hu_is_ajax() && hu_is_checked('smart_load_img') ) ) {
add_filter( 'the_content' , array( $this , 'hu_parse_imgs' ), PHP_INT_MAX );
add_filter( 'hu_post_thumbnail_html' , array( $this , 'hu_parse_imgs' ) );
}
add_filter( 'wp_title' , array( $this , 'hu_wp_filter_title' ), 10, 2 );
}
/**
* hook : the_content
* Inspired from Unveil Lazy Load plugin : https://wordpress.org/plugins/unveil-lazy-load/ by @marubon
*
* @return string
*/
function hu_parse_imgs( $_html ) {
$_bool = is_feed() || is_preview() || ( wp_is_mobile() && apply_filters('hu_disable_img_smart_load_mobiles', false ) );
if ( apply_filters( 'hu_disable_img_smart_load', $_bool, current_filter() ) )
return $_html;
$allowed_image_extentions = apply_filters( 'hu_smartload_allowed_img_extensions', array(
'bmp',
'gif',
'jpeg',
'jpg',
'jpe',
'tif',
'tiff',
'ico',
'png',
'svg',
'svgz'
) );
if ( empty( $allowed_image_extentions ) || !is_array( $allowed_image_extentions ) ) {
return $_html;
}
$img_extensions_pattern = sprintf( "(?:%s)", implode( '|', $allowed_image_extentions ) );
$pattern = '#<img([^>]+?)src=[\'"]?([^\'"\s>]+\.'.$img_extensions_pattern.'[^\'"\s>]*)[\'"]?([^>]*)>#i';
return preg_replace_callback( $pattern, array( $this , 'hu_regex_callback' ) , $_html);
}
/**
* callback of preg_replace_callback in hu_parse_imgs
* Inspired from Unveil Lazy Load plugin : https://wordpress.org/plugins/unveil-lazy-load/ by @marubon
*
* @return string
*/
private function hu_regex_callback( $matches ) {
$_placeholder = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
if ( false !== strpos( $matches[0], 'data-src' ) || preg_match('/ data-smartload *= *"false" */', $matches[0]) ) {
return $matches[0];
} else {
return apply_filters( 'hu_img_smartloaded',
str_replace( array('srcset=', 'sizes='), array('data-srcset=', 'data-sizes='),
sprintf('<img %1$s src="%2$s" data-src="%3$s" %4$s>',
$matches[1],
$_placeholder,
$matches[2],
$matches[3]
)
)
);
}
}
/**
* Title element formating
* Hook : wp_title
*
*/
function hu_wp_filter_title( $title, $sep ) {
if ( function_exists( '_wp_render_title_tag' ) )
return $title;
global $paged, $page;
if ( is_feed() )
return $title;
// Add the site name.
$title .= get_bloginfo( 'name' );
// Add the site description for the home/front page.
$site_description = get_bloginfo( 'description' , 'display' );
if ( $site_description && hu_is_home() )
$title = "$title $sep $site_description";
// Add a page number if necessary.
if ( $paged >= 2 || $page >= 2 )
$title = "$title $sep " . sprintf( __( 'Page %s' , 'hueman' ), max( $paged, $page ) );
return $title;
}
/****************************************************************************
****************************** OPTIONS **************************************
*****************************************************************************/
/**
* Returns the default options array
*
* @package Hueman
* @since Hueman 3.0.0
*/
function hu_get_default_options() {
$_db_opts = empty($this -> db_options) ? $this -> hu_cache_db_options() : $this -> db_options;
$def_options = isset($_db_opts['defaults']) ? $_db_opts['defaults'] : array();
//Don't update if default options are not empty + customizing context
//customizing out ? => we can assume that the user has at least refresh the default once (because logged in, see conditions below) before accessing the customizer
//customizing => takes into account if user has set a filter or added a new customizer setting
if ( !empty($def_options) && $this -> is_customizing )
return apply_filters( 'hu_default_options', $def_options );
//Never update the defaults when wp_installing()
//prevent issue https://github.com/presscustomizr/hueman/issues/571
//Always update/generate the default option when (OR) :
// 1) current user can edit theme options
// 2) they are not defined
// 3) theme version not defined
// 4) versions are different
if ( !wp_installing() ) {
if ( current_user_can('edit_theme_options') || empty($def_options) || !isset($def_options['ver']) || 0 != version_compare( $def_options['ver'] , HUEMAN_VER ) ) {
$def_options = $this -> hu_generate_default_options( HU_utils_settings_map::$instance -> hu_get_customizer_map( $get_default_option = 'true' ) , HU_THEME_OPTIONS );
//Adds the version in default
$def_options['ver'] = HUEMAN_VER;
//writes the new value in db (merging raw options with the new defaults )
//=> will abort when wp_cache_get() returns false
// => prevent issue https://github.com/presscustomizr/hueman/issues/571
$this -> hu_set_option( 'defaults', $def_options, HU_THEME_OPTIONS );
}
}
return apply_filters( 'hu_default_options', $def_options );
}
/**
* Generates the default options array from a customizer map + add slider option
*
*/
function hu_generate_default_options( $map, $option_group = null ) {
//do we have to look in a specific group of option (plugin?)
$option_group = is_null($option_group) ? HU_THEME_OPTIONS : $option_group;
//initialize the default array with the sliders options
$defaults = array();
foreach ($map['add_setting_control'] as $key => $options) {
$option_name = $key;
//write default option in array
if( array_key_exists( 'default', $options ) ) {
// added check on 'nimblecheck' to fix https://github.com/presscustomizr/customizr/issues/1732
$defaults[$option_name] = in_array( $options['type'], array( 'checkbox', 'nimblecheck' ) ) ? (bool)$options['default'] : $options['default'];
} else {
$defaults[$option_name] = null;
}
}//end foreach
return $defaults;
}
/**
* Returns an option from the options array of the theme.
*
* @package Hueman
*/
function hu_opt( $option_name , $option_group = null, $use_default = true ) {
//do we have to look for a specific group of option (plugin?)
$option_group = is_null( $option_group ) ? HU_THEME_OPTIONS : $option_group;
//when customizing, the db_options property is refreshed each time the preview is refreshed in 'customize_preview_init'
$_db_options = empty($this -> db_options) ? $this -> hu_cache_db_options() : $this -> db_options;
//do we have to use the default ?
$__options = $_db_options;
$_default_val = false;
if ( $use_default ) {
$_defaults = $this -> default_options;
if ( is_array($_defaults) && isset($_defaults[$option_name]) )
$_default_val = $_defaults[$option_name];
$__options = wp_parse_args( $_db_options, $_defaults );
}
//assign false value if does not exist, just like WP does
$_single_opt = isset( $__options[$option_name] ) ? $__options[$option_name] : false;
//allow ctx filtering globally
$_single_opt = apply_filters( "hu_opt" , $_single_opt , $option_name , $option_group, $_default_val );
//allow single option filtering
return apply_filters( "hu_opt_{$option_name}" , $_single_opt , $option_name , $option_group, $_default_val );
}
/**
* Get the saved options in customizer Screen, merge them with the default theme options array and return the updated global options array
*
*/
function hu_get_theme_options ( $option_group = null ) {
//do we have to look in a specific group of option (plugin?)
$option_group = is_null($option_group) ? HU_THEME_OPTIONS : $option_group;
$saved = empty($this -> db_options) ? $this -> hu_cache_db_options() : $this -> db_options;
$defaults = $this -> default_options;
$__options = wp_parse_args( $saved, $defaults );
//$__options = array_intersect_key( $__options, $defaults );
return $__options;
}
/**
* Set an option value in the theme option group
* @param $option_name : string
* @param $option_value : sanitized option value, can be a string, a boolean or an array
* @param $option_group : string ( like hu_theme_options )
* @return void
*
*/
function hu_set_option( $option_name , $option_value, $option_group = null ) {
$option_group = is_null($option_group) ? HU_THEME_OPTIONS : $option_group;
//Get raw to :
//avoid filtering
//avoid merging with defaults
//Reminder : hu_get_raw_option( $opt_name = null, $opt_group = null, $from_cache = true, $report_error = false )
//get the raw option and enabled the wp error report
//=> prevent issue https://github.com/presscustomizr/hueman/issues/571
$_options = $this -> hu_get_unfiltered_theme_options( $option_group );
//Always make sure that getting raw options returns valid data
//For example, when opening wp-activate.php, wp_cache_get( 'alloptions', 'options' ); returns false
//=> which might lead to reset all previous user theme options when using update_option()
// => prevent issue https://github.com/presscustomizr/hueman/issues/571
if ( is_wp_error( $_options ) ) {
error_log( $_options -> get_error_code() );
return;
} else {
$_options[$option_name] = $option_value;
update_option( $option_group, $_options );
}
}
/**
* The purpose of this callback is to refresh and store the theme options in a property on each customize preview refresh
* => preview performance improvement
* 'customize_preview_init' is fired on wp_loaded, once WordPress is fully loaded ( after 'init', before 'wp') and right after the call to 'customize_register'
* This method is fired just after the theme option has been filtered for each settings by the WP_Customize_Setting::_preview_filter() callback
* => if this method is fired before this hook when customizing, the user changes won't be taken into account on preview refresh
*
* hook : customize_preview_init
* @return void
*
*/
function hu_customize_refresh_db_opt(){
$this -> db_options = false === get_option( HU_THEME_OPTIONS ) ? array() : (array)get_option( HU_THEME_OPTIONS );
}
/**
* In live context (not customizing || admin) cache the theme options
*
*/
function hu_cache_db_options($opt_group = null) {
$opt_group = is_null( $opt_group ) ? HU_THEME_OPTIONS : $opt_group;
$this -> db_options = false === get_option( $opt_group ) ? array() : (array)get_option( $opt_group );
return $this -> db_options;
}
//@return an array of options
//This is mostly a copy of the built-in get_option with the difference that
//1) by default retrieves only the theme options
//2) removes the "pre_option_{$name}", "default_option_{$name}", "option_{$name}" filters
//3) doesn't care about the special case when $option in array array('siteurl', 'home', 'category_base', 'tag_base'),
// as they are out of scope here
//
// The filter suppression is specially needed due to:
// a) avoid plugins (qtranslate, other lang plugins) filtering the theme options value, which might mess theme options when we update the options on front
// (e.g. to set the defaults, or to perform our retro compat options updates, or either to set the user started before option)
// b) speed up the theme option retrieval when we are sure we don't need the theme options to be filtered in any case
function hu_get_unfiltered_theme_options( $option = null, $default = array() ) {
$option = is_null($option) ? HU_THEME_OPTIONS : $option;
global $wpdb;
$option_group = trim( $option);
if ( empty( $option ) )
return false;
if ( defined( 'WP_SETUP_CONFIG' ) )
return false;
if ( !wp_installing() ) {
// prevent non-existent options from triggering multiple queries
$notoptions = wp_cache_get( 'notoptions', 'options' );
if ( isset( $notoptions[ $option ] ) ) {
return $default;
}
$alloptions = wp_load_alloptions();
if ( isset( $alloptions[$option] ) ) {
$value = $alloptions[$option];
} else {
$value = wp_cache_get( $option, 'options' );
if ( false === $value ) {
$row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", $option ) );
// Has to be get_row instead of get_var because of funkiness with 0, false, null values
if ( is_object( $row ) ) {
$value = $row->option_value;
wp_cache_add( $option, $value, 'options' );
} else { // option does not exist, so we must cache its non-existence
if ( !is_array( $notoptions ) ) {
$notoptions = array();
}
$notoptions[$option] = true;
wp_cache_set( 'notoptions', $notoptions, 'options' );
return $default;
}
}
}
} else {
$suppress = $wpdb->suppress_errors();
$row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", $option ) );
$wpdb->suppress_errors( $suppress );
if ( is_object( $row ) ) {
$value = $row->option_value;
} else {
return $default;
}
}
return maybe_unserialize( $value );
}
}//end of class
endif;
@@ -0,0 +1,22 @@
.czr-sub-set[data-input-type="content_picker"] .customize-control-title {
width: 100%;
}
.czr-sub-set[data-input-type="content_picker"] .czr-input {
width: 100%;
}
.content-item-bar {
line-height: 1.5em;
}
.czr-sub-set[data-input-type="content_picker"] span.item-title {
display: block;
float: left;
max-width: 80%;
}
.czr-sub-set[data-input-type="content_picker"] span.item-type {
display: inline-block;
padding: 0;
padding-right: 10px;
float: right;
}
@@ -0,0 +1 @@
.czr-sub-set[data-input-type=content_picker] .customize-control-title{width:100%}.czr-sub-set[data-input-type=content_picker] .czr-input{width:100%}.content-item-bar{line-height:1.5em}.czr-sub-set[data-input-type=content_picker] span.item-title{display:block;float:left;max-width:80%}.czr-sub-set[data-input-type=content_picker] span.item-type{display:inline-block;padding:0;padding-right:10px;float:right}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,37 @@
/* Rate link */
#customize-footer-actions .collapse-sidebar-label {
display: none;
}
.czr-rate-link {
position: absolute;
bottom: 0;
left: 40px;
right: 0;
padding: 4px 12px 4px 0;
font-size: 10px;
line-height: 14px;
text-align: right;
}
.rtl .tc-rate-link {
text-align: left;
left: auto;
right: 40px;
padding: 4px 0 4px 12px;
}
.wp-full-overlay.collapsed .czr-rate-link {
display: none;
}
.czr-rate-link .czr-stars {
color: #E6B800;
text-shadow: 0px 1px 0px rgba(0, 0, 0, 0.6);
}
@media screen and (min-width: 1025px) {
.wp-customizer .expanded #customize-footer-actions {
height: 85px;
background: inherit;
}
.wp-customizer #customize-controls .wp-full-overlay-sidebar-content {
bottom: 85px;
}
}
@@ -0,0 +1 @@
#customize-footer-actions .collapse-sidebar-label{display:none}.czr-rate-link{position:absolute;bottom:0;left:40px;right:0;padding:4px 12px 4px 0;font-size:10px;line-height:14px;text-align:right}.rtl .tc-rate-link{text-align:left;left:auto;right:40px;padding:4px 0 4px 12px}.wp-full-overlay.collapsed .czr-rate-link{display:none}.czr-rate-link .czr-stars{color:#e6b800;text-shadow:0 1px 0 rgba(0,0,0,.6)}@media screen and (min-width:1025px){.wp-customizer .expanded #customize-footer-actions{height:85px;background:inherit}.wp-customizer #customize-controls .wp-full-overlay-sidebar-content{bottom:85px}}
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

@@ -0,0 +1,482 @@
.czrSelect2-container {
box-sizing: border-box;
display: inline-block;
margin: 0;
position: relative;
vertical-align: middle; }
.czrSelect2-container .czrSelect2-selection--single {
box-sizing: border-box;
cursor: pointer;
display: block;
height: 28px;
user-select: none;
-webkit-user-select: none; }
.czrSelect2-container .czrSelect2-selection--single .czrSelect2-selection__rendered {
display: block;
padding-left: 8px;
padding-right: 20px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap; }
.czrSelect2-container .czrSelect2-selection--single .czrSelect2-selection__clear {
position: relative; }
.czrSelect2-container[dir="rtl"] .czrSelect2-selection--single .czrSelect2-selection__rendered {
padding-right: 8px;
padding-left: 20px; }
.czrSelect2-container .czrSelect2-selection--multiple {
box-sizing: border-box;
cursor: pointer;
display: block;
min-height: 32px;
user-select: none;
-webkit-user-select: none; }
.czrSelect2-container .czrSelect2-selection--multiple .czrSelect2-selection__rendered {
display: inline-block;
overflow: hidden;
padding-left: 8px;
text-overflow: ellipsis;
white-space: nowrap; }
.czrSelect2-container .czrSelect2-search--inline {
float: left; }
.czrSelect2-container .czrSelect2-search--inline .czrSelect2-search__field {
box-sizing: border-box;
border: none;
font-size: 100%;
margin-top: 5px;
padding: 0; }
.czrSelect2-container .czrSelect2-search--inline .czrSelect2-search__field::-webkit-search-cancel-button {
-webkit-appearance: none; }
.czrSelect2-dropdown {
background-color: white;
border: 1px solid #aaa;
border-radius: 4px;
box-sizing: border-box;
display: block;
position: absolute;
left: -100000px;
width: 100%;
z-index: 1051; }
.czrSelect2-results {
display: block; }
.czrSelect2-results__options {
list-style: none;
margin: 0;
padding: 0; }
.czrSelect2-results__option {
padding: 6px;
user-select: none;
-webkit-user-select: none; }
.czrSelect2-results__option[aria-selected] {
cursor: pointer; }
.czrSelect2-container--open .czrSelect2-dropdown {
left: 0; }
.czrSelect2-container--open .czrSelect2-dropdown--above {
border-bottom: none;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0; }
.czrSelect2-container--open .czrSelect2-dropdown--below {
border-top: none;
border-top-left-radius: 0;
border-top-right-radius: 0; }
.czrSelect2-search--dropdown {
display: block;
padding: 4px; }
.czrSelect2-search--dropdown .czrSelect2-search__field {
padding: 4px;
width: 100%;
box-sizing: border-box; }
.czrSelect2-search--dropdown .czrSelect2-search__field::-webkit-search-cancel-button {
-webkit-appearance: none; }
.czrSelect2-search--dropdown.czrSelect2-search--hide {
display: none; }
.czrSelect2-close-mask {
border: 0;
margin: 0;
padding: 0;
display: block;
position: fixed;
left: 0;
top: 0;
min-height: 100%;
min-width: 100%;
height: auto;
width: auto;
opacity: 0;
z-index: 99;
background-color: #fff;
filter: alpha(opacity=0); }
.czrSelect2-hidden-accessible {
border: 0 !important;
clip: rect(0 0 0 0) !important;
height: 1px !important;
margin: -1px !important;
overflow: hidden !important;
padding: 0 !important;
position: absolute !important;
width: 1px !important; }
.czrSelect2-container--default .czrSelect2-selection--single {
background-color: #fff;
border: 1px solid #aaa;
border-radius: 4px; }
.czrSelect2-container--default .czrSelect2-selection--single .czrSelect2-selection__rendered {
color: #444;
line-height: 28px; }
.czrSelect2-container--default .czrSelect2-selection--single .czrSelect2-selection__clear {
cursor: pointer;
float: right;
font-weight: bold; }
.czrSelect2-container--default .czrSelect2-selection--single .czrSelect2-selection__placeholder {
color: #999; }
.czrSelect2-container--default .czrSelect2-selection--single .czrSelect2-selection__arrow {
height: 26px;
position: absolute;
top: 1px;
right: 1px;
width: 20px; }
.czrSelect2-container--default .czrSelect2-selection--single .czrSelect2-selection__arrow b {
border-color: #888 transparent transparent transparent;
border-style: solid;
border-width: 5px 4px 0 4px;
height: 0;
left: 50%;
margin-left: -4px;
margin-top: -2px;
position: absolute;
top: 50%;
width: 0; }
.czrSelect2-container--default[dir="rtl"] .czrSelect2-selection--single .czrSelect2-selection__clear {
float: left; }
.czrSelect2-container--default[dir="rtl"] .czrSelect2-selection--single .czrSelect2-selection__arrow {
left: 1px;
right: auto; }
.czrSelect2-container--default.czrSelect2-container--disabled .czrSelect2-selection--single {
background-color: #eee;
cursor: default; }
.czrSelect2-container--default.czrSelect2-container--disabled .czrSelect2-selection--single .czrSelect2-selection__clear {
display: none; }
.czrSelect2-container--default.czrSelect2-container--open .czrSelect2-selection--single .czrSelect2-selection__arrow b {
border-color: transparent transparent #888 transparent;
border-width: 0 4px 5px 4px; }
.czrSelect2-container--default .czrSelect2-selection--multiple {
background-color: white;
border: 1px solid #aaa;
border-radius: 4px;
cursor: text; }
.czrSelect2-container--default .czrSelect2-selection--multiple .czrSelect2-selection__rendered {
box-sizing: border-box;
list-style: none;
margin: 0;
padding: 0 5px;
width: 100%; }
.czrSelect2-container--default .czrSelect2-selection--multiple .czrSelect2-selection__placeholder {
color: #999;
margin-top: 5px;
float: left; }
.czrSelect2-container--default .czrSelect2-selection--multiple .czrSelect2-selection__clear {
cursor: pointer;
float: right;
font-weight: bold;
margin-top: 5px;
margin-right: 10px; }
.czrSelect2-container--default .czrSelect2-selection--multiple .czrSelect2-selection__choice {
background-color: #e4e4e4;
border: 1px solid #aaa;
border-radius: 4px;
cursor: default;
float: left;
margin-right: 5px;
margin-top: 5px;
padding: 0 5px; }
.czrSelect2-container--default .czrSelect2-selection--multiple .czrSelect2-selection__choice__remove {
color: #999;
cursor: pointer;
display: inline-block;
font-weight: bold;
margin-right: 2px; }
.czrSelect2-container--default .czrSelect2-selection--multiple .czrSelect2-selection__choice__remove:hover {
color: #333; }
.czrSelect2-container--default[dir="rtl"] .czrSelect2-selection--multiple .czrSelect2-selection__choice, .czrSelect2-container--default[dir="rtl"] .czrSelect2-selection--multiple .czrSelect2-selection__placeholder, .czrSelect2-container--default[dir="rtl"] .czrSelect2-selection--multiple .czrSelect2-search--inline {
float: right; }
.czrSelect2-container--default[dir="rtl"] .czrSelect2-selection--multiple .czrSelect2-selection__choice {
margin-left: 5px;
margin-right: auto; }
.czrSelect2-container--default[dir="rtl"] .czrSelect2-selection--multiple .czrSelect2-selection__choice__remove {
margin-left: 2px;
margin-right: auto; }
.czrSelect2-container--default.czrSelect2-container--focus .czrSelect2-selection--multiple {
border: solid black 1px;
outline: 0; }
.czrSelect2-container--default.czrSelect2-container--disabled .czrSelect2-selection--multiple {
background-color: #eee;
cursor: default; }
.czrSelect2-container--default.czrSelect2-container--disabled .czrSelect2-selection__choice__remove {
display: none; }
.czrSelect2-container--default.czrSelect2-container--open.czrSelect2-container--above .czrSelect2-selection--single, .czrSelect2-container--default.czrSelect2-container--open.czrSelect2-container--above .czrSelect2-selection--multiple {
border-top-left-radius: 0;
border-top-right-radius: 0; }
.czrSelect2-container--default.czrSelect2-container--open.czrSelect2-container--below .czrSelect2-selection--single, .czrSelect2-container--default.czrSelect2-container--open.czrSelect2-container--below .czrSelect2-selection--multiple {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0; }
.czrSelect2-container--default .czrSelect2-search--dropdown .czrSelect2-search__field {
border: 1px solid #aaa; }
.czrSelect2-container--default .czrSelect2-search--inline .czrSelect2-search__field {
background: transparent;
border: none;
outline: 0;
box-shadow: none;
-webkit-appearance: textfield; }
.czrSelect2-container--default .czrSelect2-results > .czrSelect2-results__options {
max-height: 200px;
overflow-y: auto; }
.czrSelect2-container--default .czrSelect2-results__option[role=group] {
padding: 0; }
.czrSelect2-container--default .czrSelect2-results__option[aria-disabled=true] {
color: #999; }
.czrSelect2-container--default .czrSelect2-results__option[aria-selected=true] {
background-color: #ddd; }
.czrSelect2-container--default .czrSelect2-results__option .czrSelect2-results__option {
padding-left: 1em; }
.czrSelect2-container--default .czrSelect2-results__option .czrSelect2-results__option .czrSelect2-results__group {
padding-left: 0; }
.czrSelect2-container--default .czrSelect2-results__option .czrSelect2-results__option .czrSelect2-results__option {
margin-left: -1em;
padding-left: 2em; }
.czrSelect2-container--default .czrSelect2-results__option .czrSelect2-results__option .czrSelect2-results__option .czrSelect2-results__option {
margin-left: -2em;
padding-left: 3em; }
.czrSelect2-container--default .czrSelect2-results__option .czrSelect2-results__option .czrSelect2-results__option .czrSelect2-results__option .czrSelect2-results__option {
margin-left: -3em;
padding-left: 4em; }
.czrSelect2-container--default .czrSelect2-results__option .czrSelect2-results__option .czrSelect2-results__option .czrSelect2-results__option .czrSelect2-results__option .czrSelect2-results__option {
margin-left: -4em;
padding-left: 5em; }
.czrSelect2-container--default .czrSelect2-results__option .czrSelect2-results__option .czrSelect2-results__option .czrSelect2-results__option .czrSelect2-results__option .czrSelect2-results__option .czrSelect2-results__option {
margin-left: -5em;
padding-left: 6em; }
.czrSelect2-container--default .czrSelect2-results__option--highlighted[aria-selected] {
background-color: #5897fb;
color: white; }
.czrSelect2-container--default .czrSelect2-results__group {
cursor: default;
display: block;
padding: 6px; }
.czrSelect2-container--classic .czrSelect2-selection--single {
background-color: #f7f7f7;
border: 1px solid #aaa;
border-radius: 4px;
outline: 0;
background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
.czrSelect2-container--classic .czrSelect2-selection--single:focus {
border: 1px solid #5897fb; }
.czrSelect2-container--classic .czrSelect2-selection--single .czrSelect2-selection__rendered {
color: #444;
line-height: 28px; }
.czrSelect2-container--classic .czrSelect2-selection--single .czrSelect2-selection__clear {
cursor: pointer;
float: right;
font-weight: bold;
margin-right: 10px; }
.czrSelect2-container--classic .czrSelect2-selection--single .czrSelect2-selection__placeholder {
color: #999; }
.czrSelect2-container--classic .czrSelect2-selection--single .czrSelect2-selection__arrow {
background-color: #ddd;
border: none;
border-left: 1px solid #aaa;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
height: 26px;
position: absolute;
top: 1px;
right: 1px;
width: 20px;
background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
.czrSelect2-container--classic .czrSelect2-selection--single .czrSelect2-selection__arrow b {
border-color: #888 transparent transparent transparent;
border-style: solid;
border-width: 5px 4px 0 4px;
height: 0;
left: 50%;
margin-left: -4px;
margin-top: -2px;
position: absolute;
top: 50%;
width: 0; }
.czrSelect2-container--classic[dir="rtl"] .czrSelect2-selection--single .czrSelect2-selection__clear {
float: left; }
.czrSelect2-container--classic[dir="rtl"] .czrSelect2-selection--single .czrSelect2-selection__arrow {
border: none;
border-right: 1px solid #aaa;
border-radius: 0;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
left: 1px;
right: auto; }
.czrSelect2-container--classic.czrSelect2-container--open .czrSelect2-selection--single {
border: 1px solid #5897fb; }
.czrSelect2-container--classic.czrSelect2-container--open .czrSelect2-selection--single .czrSelect2-selection__arrow {
background: transparent;
border: none; }
.czrSelect2-container--classic.czrSelect2-container--open .czrSelect2-selection--single .czrSelect2-selection__arrow b {
border-color: transparent transparent #888 transparent;
border-width: 0 4px 5px 4px; }
.czrSelect2-container--classic.czrSelect2-container--open.czrSelect2-container--above .czrSelect2-selection--single {
border-top: none;
border-top-left-radius: 0;
border-top-right-radius: 0;
background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
.czrSelect2-container--classic.czrSelect2-container--open.czrSelect2-container--below .czrSelect2-selection--single {
border-bottom: none;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
.czrSelect2-container--classic .czrSelect2-selection--multiple {
background-color: white;
border: 1px solid #aaa;
border-radius: 4px;
cursor: text;
outline: 0; }
.czrSelect2-container--classic .czrSelect2-selection--multiple:focus {
border: 1px solid #5897fb; }
.czrSelect2-container--classic .czrSelect2-selection--multiple .czrSelect2-selection__rendered {
list-style: none;
margin: 0;
padding: 0 5px; }
.czrSelect2-container--classic .czrSelect2-selection--multiple .czrSelect2-selection__clear {
display: none; }
.czrSelect2-container--classic .czrSelect2-selection--multiple .czrSelect2-selection__choice {
background-color: #e4e4e4;
border: 1px solid #aaa;
border-radius: 4px;
cursor: default;
float: left;
margin-right: 5px;
margin-top: 5px;
padding: 0 5px; }
.czrSelect2-container--classic .czrSelect2-selection--multiple .czrSelect2-selection__choice__remove {
color: #888;
cursor: pointer;
display: inline-block;
font-weight: bold;
margin-right: 2px; }
.czrSelect2-container--classic .czrSelect2-selection--multiple .czrSelect2-selection__choice__remove:hover {
color: #555; }
.czrSelect2-container--classic[dir="rtl"] .czrSelect2-selection--multiple .czrSelect2-selection__choice {
float: right; }
.czrSelect2-container--classic[dir="rtl"] .czrSelect2-selection--multiple .czrSelect2-selection__choice {
margin-left: 5px;
margin-right: auto; }
.czrSelect2-container--classic[dir="rtl"] .czrSelect2-selection--multiple .czrSelect2-selection__choice__remove {
margin-left: 2px;
margin-right: auto; }
.czrSelect2-container--classic.czrSelect2-container--open .czrSelect2-selection--multiple {
border: 1px solid #5897fb; }
.czrSelect2-container--classic.czrSelect2-container--open.czrSelect2-container--above .czrSelect2-selection--multiple {
border-top: none;
border-top-left-radius: 0;
border-top-right-radius: 0; }
.czrSelect2-container--classic.czrSelect2-container--open.czrSelect2-container--below .czrSelect2-selection--multiple {
border-bottom: none;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0; }
.czrSelect2-container--classic .czrSelect2-search--dropdown .czrSelect2-search__field {
border: 1px solid #aaa;
outline: 0; }
.czrSelect2-container--classic .czrSelect2-search--inline .czrSelect2-search__field {
outline: 0;
box-shadow: none; }
.czrSelect2-container--classic .czrSelect2-dropdown {
background-color: white;
border: 1px solid transparent; }
.czrSelect2-container--classic .czrSelect2-dropdown--above {
border-bottom: none; }
.czrSelect2-container--classic .czrSelect2-dropdown--below {
border-top: none; }
.czrSelect2-container--classic .czrSelect2-results > .czrSelect2-results__options {
max-height: 200px;
overflow-y: auto; }
.czrSelect2-container--classic .czrSelect2-results__option[role=group] {
padding: 0; }
.czrSelect2-container--classic .czrSelect2-results__option[aria-disabled=true] {
color: grey; }
.czrSelect2-container--classic .czrSelect2-results__option--highlighted[aria-selected] {
background-color: #3875d7;
color: white; }
.czrSelect2-container--classic .czrSelect2-results__group {
cursor: default;
display: block;
padding: 6px; }
.czrSelect2-container--classic.czrSelect2-container--open .czrSelect2-dropdown {
border-color: #5897fb; }
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 730 KiB

@@ -0,0 +1,801 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
<metadata>
Created by FontForge 20200314 at Wed Jan 13 11:57:54 2021
By Robert Madole
Copyright (c) Font Awesome
</metadata>
<!-- Font Awesome Free 5.15.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><defs>
<font id="FontAwesome5Free-Regular" horiz-adv-x="512" >
<font-face
font-family="Font Awesome 5 Free Regular"
font-weight="400"
font-stretch="normal"
units-per-em="512"
panose-1="2 0 5 3 0 0 0 0 0 0"
ascent="448"
descent="-64"
bbox="-0.0663408 -64.0662 640.004 448.1"
underline-thickness="25"
underline-position="-50"
unicode-range="U+0020-F5C8"
/>
<missing-glyph />
<glyph glyph-name="heart" unicode="&#xf004;"
d="M458.4 383.7c75.2998 -63.4004 64.0996 -166.601 10.5996 -221.3l-175.4 -178.7c-10 -10.2002 -23.2998 -15.7998 -37.5996 -15.7998c-14.2002 0 -27.5996 5.69922 -37.5996 15.8994l-175.4 178.7c-53.5996 54.7002 -64.5996 157.9 10.5996 221.2
c57.8008 48.7002 147.101 41.2998 202.4 -15c55.2998 56.2998 144.6 63.5996 202.4 15zM434.8 196.2c36.2002 36.8994 43.7998 107.7 -7.2998 150.8c-38.7002 32.5996 -98.7002 27.9004 -136.5 -10.5996l-35 -35.7002l-35 35.7002
c-37.5996 38.2998 -97.5996 43.1992 -136.5 10.5c-51.2002 -43.1006 -43.7998 -113.5 -7.2998 -150.7l175.399 -178.7c2.40039 -2.40039 4.40039 -2.40039 6.80078 0z" />
<glyph glyph-name="star" unicode="&#xf005;" horiz-adv-x="576"
d="M528.1 276.5c26.2002 -3.7998 36.7002 -36.0996 17.7002 -54.5996l-105.7 -103l25 -145.5c4.5 -26.3008 -23.1992 -45.9004 -46.3994 -33.7002l-130.7 68.7002l-130.7 -68.7002c-23.2002 -12.2998 -50.8994 7.39941 -46.3994 33.7002l25 145.5l-105.7 103
c-19 18.5 -8.5 50.7998 17.7002 54.5996l146.1 21.2998l65.2998 132.4c11.7998 23.8994 45.7002 23.5996 57.4004 0l65.2998 -132.4zM388.6 135.7l100.601 98l-139 20.2002l-62.2002 126l-62.2002 -126l-139 -20.2002l100.601 -98l-23.7002 -138.4l124.3 65.2998
l124.3 -65.2998z" />
<glyph glyph-name="user" unicode="&#xf007;" horiz-adv-x="448"
d="M313.6 144c74.2002 0 134.4 -60.2002 134.4 -134.4v-25.5996c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v25.5996c0 74.2002 60.2002 134.4 134.4 134.4c28.7998 0 42.5 -16 89.5996 -16s60.9004 16 89.5996 16zM400 -16v25.5996
c0 47.6006 -38.7998 86.4004 -86.4004 86.4004c-14.6992 0 -37.8994 -16 -89.5996 -16c-51.2998 0 -75 16 -89.5996 16c-47.6006 0 -86.4004 -38.7998 -86.4004 -86.4004v-25.5996h352zM224 160c-79.5 0 -144 64.5 -144 144s64.5 144 144 144s144 -64.5 144 -144
s-64.5 -144 -144 -144zM224 400c-52.9004 0 -96 -43.0996 -96 -96s43.0996 -96 96 -96s96 43.0996 96 96s-43.0996 96 -96 96z" />
<glyph glyph-name="clock" unicode="&#xf017;"
d="M256 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM256 -8c110.5 0 200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200s89.5 -200 200 -200zM317.8 96.4004l-84.8994 61.6992
c-3.10059 2.30078 -4.90039 5.90039 -4.90039 9.7002v164.2c0 6.59961 5.40039 12 12 12h32c6.59961 0 12 -5.40039 12 -12v-141.7l66.7998 -48.5996c5.40039 -3.90039 6.5 -11.4004 2.60059 -16.7998l-18.8008 -25.9004c-3.89941 -5.2998 -11.3994 -6.5 -16.7998 -2.59961z
" />
<glyph glyph-name="list-alt" unicode="&#xf022;"
d="M464 416c26.5098 0 48 -21.4902 48 -48v-352c0 -26.5098 -21.4902 -48 -48 -48h-416c-26.5098 0 -48 21.4902 -48 48v352c0 26.5098 21.4902 48 48 48h416zM458 16c3.31152 0 6 2.68848 6 6v340c0 3.31152 -2.68848 6 -6 6h-404c-3.31152 0 -6 -2.68848 -6 -6v-340
c0 -3.31152 2.68848 -6 6 -6h404zM416 108v-24c0 -6.62695 -5.37305 -12 -12 -12h-200c-6.62695 0 -12 5.37305 -12 12v24c0 6.62695 5.37305 12 12 12h200c6.62695 0 12 -5.37305 12 -12zM416 204v-24c0 -6.62695 -5.37305 -12 -12 -12h-200c-6.62695 0 -12 5.37305 -12 12
v24c0 6.62695 5.37305 12 12 12h200c6.62695 0 12 -5.37305 12 -12zM416 300v-24c0 -6.62695 -5.37305 -12 -12 -12h-200c-6.62695 0 -12 5.37305 -12 12v24c0 6.62695 5.37305 12 12 12h200c6.62695 0 12 -5.37305 12 -12zM164 288c0 -19.8818 -16.1182 -36 -36 -36
s-36 16.1182 -36 36s16.1182 36 36 36s36 -16.1182 36 -36zM164 192c0 -19.8818 -16.1182 -36 -36 -36s-36 16.1182 -36 36s16.1182 36 36 36s36 -16.1182 36 -36zM164 96c0 -19.8818 -16.1182 -36 -36 -36s-36 16.1182 -36 36s16.1182 36 36 36s36 -16.1182 36 -36z" />
<glyph glyph-name="flag" unicode="&#xf024;"
d="M336.174 368c35.4668 0 73.0195 12.6914 108.922 28.1797c31.6406 13.6514 66.9043 -9.65723 66.9043 -44.1162v-239.919c0 -16.1953 -8.1543 -31.3057 -21.7129 -40.1631c-26.5762 -17.3643 -70.0693 -39.9814 -128.548 -39.9814c-68.6084 0 -112.781 32 -161.913 32
c-56.5674 0 -89.957 -11.2803 -127.826 -28.5566v-83.4434c0 -8.83691 -7.16309 -16 -16 -16h-16c-8.83691 0 -16 7.16309 -16 16v406.438c-14.3428 8.2998 -24 23.7979 -24 41.5615c0 27.5693 23.2422 49.71 51.2012 47.8965
c22.9658 -1.49023 41.8662 -19.4717 44.4805 -42.3379c0.213867 -1.83398 0.308594 -3.65918 0.308594 -5.5498c0 -5.30273 -0.860352 -10.4053 -2.4502 -15.1768c22.418 8.68555 49.4199 15.168 80.7207 15.168c68.6084 0 112.781 -32 161.913 -32zM464 112v240
c-31.5059 -14.6338 -84.5547 -32 -127.826 -32c-59.9111 0 -101.968 32 -161.913 32c-41.4365 0 -80.4766 -16.5879 -102.261 -32v-232c31.4473 14.5967 84.4648 24 127.826 24c59.9111 0 101.968 -32 161.913 -32c41.4365 0 80.4775 16.5879 102.261 32z" />
<glyph glyph-name="bookmark" unicode="&#xf02e;" horiz-adv-x="384"
d="M336 448c26.5098 0 48 -21.4902 48 -48v-464l-192 112l-192 -112v464c0 26.5098 21.4902 48 48 48h288zM336 19.5703v374.434c0 3.31348 -2.68555 5.99609 -6 5.99609h-276c-3.31152 0 -6 -2.68848 -6 -6v-374.43l144 84z" />
<glyph glyph-name="image" unicode="&#xf03e;"
d="M464 384c26.5098 0 48 -21.4902 48 -48v-288c0 -26.5098 -21.4902 -48 -48 -48h-416c-26.5098 0 -48 21.4902 -48 48v288c0 26.5098 21.4902 48 48 48h416zM458 48c3.31152 0 6 2.68848 6 6v276c0 3.31152 -2.68848 6 -6 6h-404c-3.31152 0 -6 -2.68848 -6 -6v-276
c0 -3.31152 2.68848 -6 6 -6h404zM128 296c22.0908 0 40 -17.9092 40 -40s-17.9092 -40 -40 -40s-40 17.9092 -40 40s17.9092 40 40 40zM96 96v48l39.5137 39.5146c4.6875 4.68652 12.2852 4.68652 16.9717 0l39.5146 -39.5146l119.514 119.515
c4.6875 4.68652 12.2852 4.68652 16.9717 0l87.5146 -87.5146v-80h-320z" />
<glyph glyph-name="edit" unicode="&#xf044;" horiz-adv-x="576"
d="M402.3 103.1l32 32c5 5 13.7002 1.5 13.7002 -5.69922v-145.4c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h273.5c7.09961 0 10.7002 -8.59961 5.7002 -13.7002l-32 -32c-1.5 -1.5 -3.5 -2.2998 -5.7002 -2.2998h-241.5v-352h352
v113.5c0 2.09961 0.799805 4.09961 2.2998 5.59961zM558.9 304.9l-262.601 -262.601l-90.3994 -10c-26.2002 -2.89941 -48.5 19.2002 -45.6006 45.6006l10 90.3994l262.601 262.601c22.8994 22.8994 59.8994 22.8994 82.6992 0l43.2002 -43.2002
c22.9004 -22.9004 22.9004 -60 0.100586 -82.7998zM460.1 274l-58.0996 58.0996l-185.8 -185.899l-7.2998 -65.2998l65.2998 7.2998zM524.9 353.7l-43.2002 43.2002c-4.10059 4.09961 -10.7998 4.09961 -14.7998 0l-30.9004 -30.9004l58.0996 -58.0996l30.9004 30.8994
c4 4.2002 4 10.7998 -0.0996094 14.9004z" />
<glyph glyph-name="times-circle" unicode="&#xf057;"
d="M256 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM256 -8c110.5 0 200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200s89.5 -200 200 -200zM357.8 254.2l-62.2002 -62.2002l62.2002 -62.2002
c4.7002 -4.7002 4.7002 -12.2998 0 -17l-22.5996 -22.5996c-4.7002 -4.7002 -12.2998 -4.7002 -17 0l-62.2002 62.2002l-62.2002 -62.2002c-4.7002 -4.7002 -12.2998 -4.7002 -17 0l-22.5996 22.5996c-4.7002 4.7002 -4.7002 12.2998 0 17l62.2002 62.2002l-62.2002 62.2002
c-4.7002 4.7002 -4.7002 12.2998 0 17l22.5996 22.5996c4.7002 4.7002 12.2998 4.7002 17 0l62.2002 -62.2002l62.2002 62.2002c4.7002 4.7002 12.2998 4.7002 17 0l22.5996 -22.5996c4.7002 -4.7002 4.7002 -12.2998 0 -17z" />
<glyph glyph-name="check-circle" unicode="&#xf058;"
d="M256 440c136.967 0 248 -111.033 248 -248s-111.033 -248 -248 -248s-248 111.033 -248 248s111.033 248 248 248zM256 392c-110.549 0 -200 -89.4678 -200 -200c0 -110.549 89.4678 -200 200 -200c110.549 0 200 89.4678 200 200c0 110.549 -89.4678 200 -200 200z
M396.204 261.733c4.66699 -4.70508 4.63672 -12.3037 -0.0673828 -16.9717l-172.589 -171.204c-4.70508 -4.66797 -12.3027 -4.63672 -16.9697 0.0683594l-90.7812 91.5156c-4.66797 4.70605 -4.63672 12.3047 0.0683594 16.9717l22.7188 22.5361
c4.70508 4.66699 12.3027 4.63574 16.9697 -0.0693359l59.792 -60.2773l141.353 140.216c4.70508 4.66797 12.3027 4.6377 16.9697 -0.0673828z" />
<glyph glyph-name="question-circle" unicode="&#xf059;"
d="M256 440c136.957 0 248 -111.083 248 -248c0 -136.997 -111.043 -248 -248 -248s-248 111.003 -248 248c0 136.917 111.043 248 248 248zM256 -8c110.569 0 200 89.4697 200 200c0 110.529 -89.5088 200 -200 200c-110.528 0 -200 -89.5049 -200 -200
c0 -110.569 89.4678 -200 200 -200zM363.244 247.2c0 -67.0518 -72.4209 -68.084 -72.4209 -92.8633v-6.33691c0 -6.62695 -5.37305 -12 -12 -12h-45.6475c-6.62695 0 -12 5.37305 -12 12v8.65918c0 35.7451 27.1006 50.0342 47.5791 61.5156
c17.5615 9.84473 28.3242 16.541 28.3242 29.5791c0 17.2461 -21.999 28.6934 -39.7842 28.6934c-23.1885 0 -33.8936 -10.9775 -48.9424 -29.9697c-4.05664 -5.11914 -11.46 -6.07031 -16.666 -2.12402l-27.8232 21.0986
c-5.10742 3.87207 -6.25098 11.0654 -2.64453 16.3633c23.627 34.6934 53.7217 54.1846 100.575 54.1846c49.0713 0 101.45 -38.3037 101.45 -88.7998zM298 80c0 -23.1592 -18.8408 -42 -42 -42s-42 18.8408 -42 42s18.8408 42 42 42s42 -18.8408 42 -42z" />
<glyph glyph-name="eye" unicode="&#xf06e;" horiz-adv-x="576"
d="M288 304c0.114258 0 0.240234 -0.0175781 0.354492 -0.0175781c61.6543 0 111.71 -50.0557 111.71 -111.71s-50.0557 -111.71 -111.71 -111.71s-111.71 50.0557 -111.71 111.71c0 10.7422 1.51953 21.1328 4.35547 30.9678
c7.95898 -4.52637 17.2129 -7.17188 27 -7.24023c30.9072 0 56 25.0928 56 56c-0.0683594 9.78711 -2.71387 19.041 -7.24023 27c9.88379 3.07617 20.3896 4.83008 31.2402 5zM572.52 206.6c2.21387 -4.37793 3.46094 -9.38965 3.46094 -14.626
c0 -5.2373 -1.24707 -10.1855 -3.46094 -14.5635c-54.1992 -105.771 -161.59 -177.41 -284.52 -177.41s-230.29 71.5898 -284.52 177.4c-2.21387 4.37793 -3.46094 9.38965 -3.46094 14.626c0 5.2373 1.24707 10.1855 3.46094 14.5635
c54.1992 105.771 161.59 177.41 284.52 177.41s230.29 -71.5898 284.52 -177.4zM288 48c98.6602 0 189.1 55 237.93 144c-48.8398 89 -139.27 144 -237.93 144s-189.09 -55 -237.93 -144c48.8398 -89 139.279 -144 237.93 -144z" />
<glyph glyph-name="eye-slash" unicode="&#xf070;" horiz-adv-x="640"
d="M634 -23c3.66895 -2.93262 6.00391 -7.45117 6.00391 -12.5088c0 -3.7832 -1.31543 -7.26074 -3.51367 -10.001l-10 -12.4902c-2.93359 -3.66309 -7.44824 -5.99414 -12.502 -5.99414c-3.77637 0 -7.25 1.31152 -9.98828 3.50391l-598 467.49
c-3.66895 2.93262 -6.00391 7.45117 -6.00391 12.5088c0 3.7832 1.31543 7.26074 3.51367 10.001l10 12.4902c2.93359 3.66309 7.44824 5.99414 12.502 5.99414c3.77637 0 7.25 -1.31152 9.98828 -3.50391zM296.79 301.53c7.51172 1.60254 15.2266 2.45508 23.21 2.46973
c60.4805 0 109.36 -47.9102 111.58 -107.85zM343.21 82.46c-7.51367 -1.59375 -15.2285 -2.44336 -23.21 -2.45996c-60.4697 0 -109.35 47.9102 -111.58 107.84zM320 336c-19.8799 0 -39.2803 -2.7998 -58.2197 -7.09961l-46.4102 36.29
c32.9199 11.8096 67.9297 18.8096 104.63 18.8096c122.93 0 230.29 -71.5898 284.57 -177.4c2.21289 -4.37793 3.45996 -9.38965 3.45996 -14.626c0 -5.2373 -1.24707 -10.1855 -3.45996 -14.5635c-14.1924 -27.5625 -31.9229 -52.6689 -52.9004 -75.1104l-37.7402 29.5
c17.2305 18.0527 31.9385 38.1318 44 60.2002c-48.8398 89 -139.279 144 -237.93 144zM320 48c19.8896 0 39.2803 2.7998 58.2197 7.08984l46.4102 -36.2803c-32.9199 -11.7598 -67.9297 -18.8096 -104.63 -18.8096c-122.92 0 -230.28 71.5898 -284.51 177.4
c-2.21387 4.37793 -3.46094 9.38965 -3.46094 14.626c0 5.2373 1.24707 10.1855 3.46094 14.5635c14.1885 27.5586 31.916 52.6621 52.8896 75.1006l37.7402 -29.5c-17.249 -18.0469 -31.9727 -38.1221 -44.0498 -60.1904c48.8496 -89 139.279 -144 237.93 -144z" />
<glyph glyph-name="calendar-alt" unicode="&#xf073;" horiz-adv-x="448"
d="M148 160h-40c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12zM256 172c0 -6.59961 -5.40039 -12 -12 -12h-40c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40
c6.59961 0 12 -5.40039 12 -12v-40zM352 172c0 -6.59961 -5.40039 -12 -12 -12h-40c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40zM256 76c0 -6.59961 -5.40039 -12 -12 -12h-40c-6.59961 0 -12 5.40039 -12 12v40
c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40zM160 76c0 -6.59961 -5.40039 -12 -12 -12h-40c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40zM352 76c0 -6.59961 -5.40039 -12 -12 -12h-40
c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40zM448 336v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h48v52c0 6.59961 5.40039 12 12 12h40
c6.59961 0 12 -5.40039 12 -12v-52h128v52c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-52h48c26.5 0 48 -21.5 48 -48zM400 -10v298h-352v-298c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="comment" unicode="&#xf075;"
d="M256 416c141.4 0 256 -93.0996 256 -208s-114.6 -208 -256 -208c-32.7998 0 -64 5.2002 -92.9004 14.2998c-29.0996 -20.5996 -77.5996 -46.2998 -139.1 -46.2998c-9.59961 0 -18.2998 5.7002 -22.0996 14.5c-3.80078 8.7998 -2 19 4.59961 26
c0.5 0.400391 31.5 33.7998 46.4004 73.2002c-33 35.0996 -52.9004 78.7002 -52.9004 126.3c0 114.9 114.6 208 256 208zM256 48c114.7 0 208 71.7998 208 160s-93.2998 160 -208 160s-208 -71.7998 -208 -160c0 -42.2002 21.7002 -74.0996 39.7998 -93.4004
l20.6006 -21.7998l-10.6006 -28.0996c-5.5 -14.5 -12.5996 -28.1006 -19.8994 -40.2002c23.5996 7.59961 43.1992 18.9004 57.5 29l19.5 13.7998l22.6992 -7.2002c25.3008 -8 51.7002 -12.0996 78.4004 -12.0996z" />
<glyph glyph-name="folder" unicode="&#xf07b;"
d="M464 320c26.5098 0 48 -21.4902 48 -48v-224c0 -26.5098 -21.4902 -48 -48 -48h-416c-26.5098 0 -48 21.4902 -48 48v288c0 26.5098 21.4902 48 48 48h146.74c8.49023 0 16.6299 -3.37012 22.6299 -9.37012l54.6299 -54.6299h192zM464 48v224h-198.62
c-8.49023 0 -16.6299 3.37012 -22.6299 9.37012l-54.6299 54.6299h-140.12v-288h416z" />
<glyph glyph-name="folder-open" unicode="&#xf07c;" horiz-adv-x="576"
d="M527.9 224c37.6992 0 60.6992 -41.5 40.6992 -73.4004l-79.8994 -128c-8.7998 -14.0996 -24.2002 -22.5996 -40.7002 -22.5996h-400c-26.5 0 -48 21.5 -48 48v288c0 26.5 21.5 48 48 48h160l64 -64h160c26.5 0 48 -21.5 48 -48v-48h47.9004zM48 330v-233.4l62.9004 104.2
c8.69922 14.4004 24.2998 23.2002 41.0996 23.2002h280v42c0 3.2998 -2.7002 6 -6 6h-173.9l-64 64h-134.1c-3.2998 0 -6 -2.7002 -6 -6zM448 48l80 128h-378.8l-77.2002 -128h376z" />
<glyph glyph-name="chart-bar" unicode="&#xf080;"
d="M396.8 96c-6.39941 0 -12.7998 6.40039 -12.7998 12.7998v230.4c0 6.39941 6.40039 12.7998 12.7998 12.7998h22.4004c6.39941 0 12.7998 -6.40039 12.7998 -12.7998v-230.4c0 -6.39941 -6.40039 -12.7998 -12.7998 -12.7998h-22.4004zM204.8 96
c-6.39941 0 -12.7998 6.40039 -12.7998 12.7998v198.4c0 6.39941 6.40039 12.7998 12.7998 12.7998h22.4004c6.39941 0 12.7998 -6.40039 12.7998 -12.7998v-198.4c0 -6.39941 -6.40039 -12.7998 -12.7998 -12.7998h-22.4004zM300.8 96
c-6.39941 0 -12.7998 6.40039 -12.7998 12.7998v134.4c0 6.39941 6.40039 12.7998 12.7998 12.7998h22.4004c6.39941 0 12.7998 -6.40039 12.7998 -12.7998v-134.4c0 -6.39941 -6.40039 -12.7998 -12.7998 -12.7998h-22.4004zM496 48c8.83984 0 16 -7.16016 16 -16v-16
c0 -8.83984 -7.16016 -16 -16 -16h-464c-17.6699 0 -32 14.3301 -32 32v336c0 8.83984 7.16016 16 16 16h16c8.83984 0 16 -7.16016 16 -16v-320h448zM108.8 96c-6.39941 0 -12.7998 6.40039 -12.7998 12.7998v70.4004c0 6.39941 6.40039 12.7998 12.7998 12.7998h22.4004
c6.39941 0 12.7998 -6.40039 12.7998 -12.7998v-70.4004c0 -6.39941 -6.40039 -12.7998 -12.7998 -12.7998h-22.4004z" />
<glyph glyph-name="comments" unicode="&#xf086;" horiz-adv-x="576"
d="M532 61.7998c15.2998 -30.7002 37.4004 -54.5 37.7998 -54.7998c6.2998 -6.7002 8 -16.5 4.40039 -25c-3.7002 -8.5 -12 -14 -21.2002 -14c-53.5996 0 -96.7002 20.2998 -125.2 38.7998c-19 -4.39941 -39 -6.7998 -59.7998 -6.7998
c-86.2002 0 -159.9 40.4004 -191.3 97.7998c-9.7002 1.2002 -19.2002 2.7998 -28.4004 4.90039c-28.5 -18.6006 -71.7002 -38.7998 -125.2 -38.7998c-9.19922 0 -17.5996 5.5 -21.1992 14c-3.7002 8.5 -1.90039 18.2998 4.39941 25
c0.400391 0.399414 22.4004 24.1992 37.7002 54.8994c-27.5 27.2002 -44 61.2002 -44 98.2002c0 88.4004 93.0996 160 208 160c86.2998 0 160.3 -40.5 191.8 -98.0996c99.7002 -11.8008 176.2 -77.9004 176.2 -157.9c0 -37.0996 -16.5 -71.0996 -44 -98.2002zM139.2 154.1
l19.7998 -4.5c16 -3.69922 32.5 -5.59961 49 -5.59961c86.7002 0 160 51.2998 160 112s-73.2998 112 -160 112s-160 -51.2998 -160 -112c0 -28.7002 16.2002 -50.5996 29.7002 -64l24.7998 -24.5l-15.5 -31.0996c-2.59961 -5.10059 -5.2998 -10.1006 -8 -14.8008
c14.5996 5.10059 29 12.3008 43.0996 21.4004zM498.3 96c13.5 13.4004 29.7002 35.2998 29.7002 64c0 49.2002 -48.2998 91.5 -112.7 106c0.299805 -3.2998 0.700195 -6.59961 0.700195 -10c0 -80.9004 -78 -147.5 -179.3 -158.3
c29.0996 -29.6006 77.2998 -49.7002 131.3 -49.7002c16.5 0 33 1.90039 49 5.59961l19.9004 4.60059l17.0996 -11.1006c14.0996 -9.09961 28.5 -16.2998 43.0996 -21.3994c-2.69922 4.7002 -5.39941 9.7002 -8 14.7998l-15.5 31.0996z" />
<glyph glyph-name="star-half" unicode="&#xf089;" horiz-adv-x="576"
d="M288 62.7002v-54.2998l-130.7 -68.6006c-23.3994 -12.2998 -50.8994 7.60059 -46.3994 33.7002l25 145.5l-105.7 103c-19 18.5 -8.5 50.7998 17.7002 54.5996l146.1 21.2002l65.2998 132.4c5.90039 11.8994 17.2998 17.7998 28.7002 17.7998v-68.0996l-62.2002 -126
l-139 -20.2002l100.601 -98l-23.7002 -138.4z" />
<glyph glyph-name="lemon" unicode="&#xf094;"
d="M484.112 420.111c28.1221 -28.123 35.9434 -68.0039 19.0215 -97.0547c-23.0576 -39.584 50.1436 -163.384 -82.3311 -295.86c-132.301 -132.298 -256.435 -59.3594 -295.857 -82.3291c-29.0459 -16.917 -68.9219 -9.11426 -97.0576 19.0205
c-28.1221 28.1221 -35.9434 68.0029 -19.0215 97.0547c23.0566 39.5859 -50.1436 163.386 82.3301 295.86c132.308 132.309 256.407 59.3496 295.862 82.332c29.0498 16.9219 68.9307 9.09863 97.0537 -19.0234zM461.707 347.217
c13.5166 23.2031 -27.7578 63.7314 -50.4883 50.4912c-66.6025 -38.7939 -165.646 45.5898 -286.081 -74.8457c-120.444 -120.445 -36.0449 -219.472 -74.8447 -286.08c-13.542 -23.2471 27.8145 -63.6953 50.4932 -50.4883
c66.6006 38.7949 165.636 -45.5996 286.076 74.8428c120.444 120.445 36.0449 219.472 74.8447 286.08zM291.846 338.481c1.37012 -10.96 -6.40332 -20.957 -17.3643 -22.3271c-54.8467 -6.85547 -135.779 -87.7871 -142.636 -142.636
c-1.37305 -10.9883 -11.3984 -18.7334 -22.3262 -17.3643c-10.9609 1.37012 -18.7344 11.3652 -17.3643 22.3262c9.16211 73.2852 104.167 168.215 177.364 177.364c10.9531 1.36816 20.9561 -6.40234 22.3262 -17.3633z" />
<glyph glyph-name="credit-card" unicode="&#xf09d;" horiz-adv-x="576"
d="M527.9 416c26.5996 0 48.0996 -21.5 48.0996 -48v-352c0 -26.5 -21.5 -48 -48.0996 -48h-479.801c-26.5996 0 -48.0996 21.5 -48.0996 48v352c0 26.5 21.5 48 48.0996 48h479.801zM54.0996 368c-3.2998 0 -6 -2.7002 -6 -6v-42h479.801v42c0 3.2998 -2.7002 6 -6 6
h-467.801zM521.9 16c3.2998 0 6 2.7002 6 6v170h-479.801v-170c0 -3.2998 2.7002 -6 6 -6h467.801zM192 116v-40c0 -6.59961 -5.40039 -12 -12 -12h-72c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h72c6.59961 0 12 -5.40039 12 -12zM384 116v-40
c0 -6.59961 -5.40039 -12 -12 -12h-136c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h136c6.59961 0 12 -5.40039 12 -12z" />
<glyph glyph-name="hdd" unicode="&#xf0a0;" horiz-adv-x="576"
d="M567.403 212.358c5.59668 -8.04688 8.59668 -17.6113 8.59668 -27.4121v-136.946c0 -26.5098 -21.4902 -48 -48 -48h-480c-26.5098 0 -48 21.4902 -48 48v136.946c0 10.167 3.19531 19.6465 8.59668 27.4121l105.08 151.053
c8.67383 12.4678 23.0791 20.5889 39.4043 20.5889h269.838c16.3252 0 30.7305 -8.12109 39.4043 -20.5889zM153.081 336l-77.9131 -112h425.664l-77.9131 112h-269.838zM528 48v128h-480v-128h480zM496 112c0 -17.6729 -14.3271 -32 -32 -32s-32 14.3271 -32 32
s14.3271 32 32 32s32 -14.3271 32 -32zM400 112c0 -17.6729 -14.3271 -32 -32 -32s-32 14.3271 -32 32s14.3271 32 32 32s32 -14.3271 32 -32z" />
<glyph glyph-name="hand-point-right" unicode="&#xf0a4;"
d="M428.8 310.4c45.0996 0 83.2002 -38.1016 83.2002 -83.2002c0 -45.6162 -37.7646 -83.2002 -83.2002 -83.2002h-35.6475c-1.71387 -7.70605 -4.43555 -15.2051 -7.92969 -22.0645c2.50586 -22.0059 -3.50293 -44.9775 -15.9844 -62.791
c-1.14062 -52.4863 -37.3984 -91.1445 -99.9404 -91.1445h-21.2988c-60.0635 0 -98.5117 40 -127.2 40h-2.67871c-5.74707 -4.95215 -13.5361 -8 -22.1201 -8h-64c-17.6729 0 -32 12.8936 -32 28.7998v230.4c0 15.9062 14.3271 28.7998 32 28.7998h64.001
c8.58398 0 16.373 -3.04785 22.1201 -8h2.67871c6.96387 0 14.8623 6.19336 30.1816 23.6689l0.128906 0.148438l0.130859 0.145508c8.85645 9.93652 18.1162 20.8398 25.8506 33.2529c18.7051 30.2471 30.3936 78.7842 75.707 78.7842c56.9277 0 92 -35.2861 92 -83.2002
c0 -0.0283203 0 0.0361328 0 0.0078125c0 -7.66602 -0.748047 -15.1582 -2.17578 -22.4072h86.1768zM428.8 192c18.9756 0 35.2002 16.2246 35.2002 35.2002c0 18.7002 -16.7754 35.2002 -35.2002 35.2002h-158.399c0 17.3242 26.3994 35.1992 26.3994 70.3994
c0 26.4004 -20.625 35.2002 -44 35.2002c-8.79395 0 -20.4443 -32.7119 -34.9258 -56.0996c-9.07422 -14.5752 -19.5244 -27.2256 -30.7988 -39.875c-16.1094 -18.374 -33.8359 -36.6328 -59.0752 -39.5967v-176.753c42.79 -3.7627 74.5088 -39.6758 120 -39.6758h21.2988
c40.5244 0 57.124 22.1973 50.6006 61.3252c14.6113 8.00098 24.1514 33.9785 12.9248 53.625c19.3652 18.2246 17.7871 46.3809 4.9502 61.0498h91.0254zM88 64c0 13.2549 -10.7451 24 -24 24s-24 -10.7451 -24 -24s10.7451 -24 24 -24s24 10.7451 24 24z" />
<glyph glyph-name="hand-point-left" unicode="&#xf0a5;"
d="M0 227.2c0 45.0986 38.1006 83.2002 83.2002 83.2002h86.1758c-1.3623 6.91016 -2.17578 14.374 -2.17578 22.3994c0 47.9141 35.0723 83.2002 92 83.2002c45.3135 0 57.002 -48.5371 75.7061 -78.7852c7.73438 -12.4121 16.9951 -23.3154 25.8506 -33.2529
l0.130859 -0.145508l0.128906 -0.148438c15.3213 -17.4746 23.2197 -23.668 30.1836 -23.668h2.67871c5.74707 4.95215 13.5361 8 22.1201 8h64c17.6729 0 32 -12.8936 32 -28.7998v-230.4c0 -15.9062 -14.3271 -28.7998 -32 -28.7998h-64
c-8.58398 0 -16.373 3.04785 -22.1201 8h-2.67871c-28.6885 0 -67.1367 -40 -127.2 -40h-21.2988c-62.542 0 -98.8008 38.6582 -99.9404 91.1445c-12.4814 17.8135 -18.4922 40.7852 -15.9844 62.791c-3.49414 6.85938 -6.21582 14.3584 -7.92969 22.0645h-35.6465
c-45.4355 0 -83.2002 37.584 -83.2002 83.2002zM48 227.2c0 -18.9756 16.2246 -35.2002 35.2002 -35.2002h91.0244c-12.8369 -14.6689 -14.415 -42.8252 4.9502 -61.0498c-11.2256 -19.6465 -1.68652 -45.624 12.9248 -53.625
c-6.52246 -39.1279 10.0771 -61.3252 50.6016 -61.3252h21.2988c45.4912 0 77.21 35.9131 120 39.6768v176.752c-25.2393 2.96289 -42.9658 21.2227 -59.0752 39.5967c-11.2744 12.6494 -21.7246 25.2998 -30.7988 39.875
c-14.4814 23.3877 -26.1318 56.0996 -34.9258 56.0996c-23.375 0 -44 -8.7998 -44 -35.2002c0 -35.2002 26.3994 -53.0752 26.3994 -70.3994h-158.399c-18.4248 0 -35.2002 -16.5 -35.2002 -35.2002zM448 88c-13.2549 0 -24 -10.7451 -24 -24s10.7451 -24 24 -24
s24 10.7451 24 24s-10.7451 24 -24 24z" />
<glyph glyph-name="hand-point-up" unicode="&#xf0a6;" horiz-adv-x="448"
d="M105.6 364.8c0 45.0996 38.1016 83.2002 83.2002 83.2002c45.6162 0 83.2002 -37.7646 83.2002 -83.2002v-35.6465c7.70605 -1.71387 15.2051 -4.43555 22.0645 -7.92969c22.0059 2.50684 44.9775 -3.50293 62.791 -15.9844
c52.4863 -1.14062 91.1445 -37.3984 91.1445 -99.9404v-21.2988c0 -60.0635 -40 -98.5117 -40 -127.2v-2.67871c4.95215 -5.74707 8 -13.5361 8 -22.1201v-64c0 -17.6729 -12.8936 -32 -28.7998 -32h-230.4c-15.9062 0 -28.7998 14.3271 -28.7998 32v64
c0 8.58398 3.04785 16.373 8 22.1201v2.67871c0 6.96387 -6.19336 14.8623 -23.6689 30.1816l-0.148438 0.128906l-0.145508 0.130859c-9.93652 8.85645 -20.8398 18.1162 -33.2529 25.8506c-30.2471 18.7051 -78.7842 30.3936 -78.7842 75.707
c0 56.9277 35.2861 92 83.2002 92c0.0283203 0 -0.0361328 0 -0.0078125 0c7.66602 0 15.1582 -0.748047 22.4072 -2.17578v86.1768zM224 364.8c0 18.9756 -16.2246 35.2002 -35.2002 35.2002c-18.7002 0 -35.2002 -16.7754 -35.2002 -35.2002v-158.399
c-17.3242 0 -35.1992 26.3994 -70.3994 26.3994c-26.4004 0 -35.2002 -20.625 -35.2002 -44c0 -8.79395 32.7119 -20.4443 56.0996 -34.9258c14.5752 -9.07422 27.2256 -19.5244 39.875 -30.7988c18.374 -16.1094 36.6328 -33.8359 39.5967 -59.0752h176.753
c3.7627 42.79 39.6758 74.5088 39.6758 120v21.2988c0 40.5244 -22.1973 57.124 -61.3252 50.6006c-8.00098 14.6113 -33.9785 24.1514 -53.625 12.9248c-18.2246 19.3652 -46.3809 17.7871 -61.0498 4.9502v91.0254zM352 24c-13.2549 0 -24 -10.7451 -24 -24
s10.7451 -24 24 -24s24 10.7451 24 24s-10.7451 24 -24 24z" />
<glyph glyph-name="hand-point-down" unicode="&#xf0a7;" horiz-adv-x="448"
d="M188.8 -64c-45.0986 0 -83.2002 38.1006 -83.2002 83.2002v86.1758c-6.91016 -1.3623 -14.374 -2.17578 -22.3994 -2.17578c-47.9141 0 -83.2002 35.0723 -83.2002 92c0 45.3135 48.5371 57.002 78.7852 75.707c12.4121 7.73438 23.3154 16.9951 33.2529 25.8506
l0.145508 0.130859l0.148438 0.128906c17.4746 15.3213 23.668 23.2197 23.668 30.1836v2.67871c-4.95215 5.74707 -8 13.5361 -8 22.1201v64c0 17.6729 12.8936 32 28.7998 32h230.4c15.9062 0 28.7998 -14.3271 28.7998 -32v-64.001
c0 -8.58398 -3.04785 -16.373 -8 -22.1201v-2.67871c0 -28.6885 40 -67.1367 40 -127.2v-21.2988c0 -62.542 -38.6582 -98.8008 -91.1445 -99.9404c-17.8135 -12.4814 -40.7852 -18.4922 -62.791 -15.9844c-6.85938 -3.49414 -14.3584 -6.21582 -22.0645 -7.92969v-35.6465
c0 -45.4355 -37.584 -83.2002 -83.2002 -83.2002zM188.8 -16c18.9756 0 35.2002 16.2246 35.2002 35.2002v91.0244c14.6689 -12.8369 42.8252 -14.415 61.0498 4.9502c19.6465 -11.2256 45.624 -1.68652 53.625 12.9248c39.1279 -6.52246 61.3252 10.0771 61.3252 50.6016
v21.2988c0 45.4912 -35.9131 77.21 -39.6768 120h-176.752c-2.96289 -25.2393 -21.2227 -42.9658 -39.5967 -59.0752c-12.6494 -11.2744 -25.2998 -21.7246 -39.875 -30.7988c-23.3877 -14.4814 -56.0996 -26.1318 -56.0996 -34.9258c0 -23.375 8.7998 -44 35.2002 -44
c35.2002 0 53.0752 26.3994 70.3994 26.3994v-158.399c0 -18.4248 16.5 -35.2002 35.2002 -35.2002zM328 384c0 -13.2549 10.7451 -24 24 -24s24 10.7451 24 24s-10.7451 24 -24 24s-24 -10.7451 -24 -24z" />
<glyph glyph-name="copy" unicode="&#xf0c5;" horiz-adv-x="448"
d="M433.941 382.059c8.68848 -8.68848 14.0586 -20.6943 14.0586 -33.9404v-268.118c0 -26.5098 -21.4902 -48 -48 -48h-80v-48c0 -26.5098 -21.4902 -48 -48 -48h-224c-26.5098 0 -48 21.4902 -48 48v320c0 26.5098 21.4902 48 48 48h80v48c0 26.5098 21.4902 48 48 48
h172.118c13.2461 0 25.252 -5.37012 33.9404 -14.0586zM266 -16c3.31152 0 6 2.68848 6 6v42h-96c-26.5098 0 -48 21.4902 -48 48v224h-74c-3.31152 0 -6 -2.68848 -6 -6v-308c0 -3.31152 2.68848 -6 6 -6h212zM394 80c3.31152 0 6 2.68848 6 6v202h-88
c-13.2549 0 -24 10.7451 -24 24v88h-106c-3.31152 0 -6 -2.68848 -6 -6v-308c0 -3.31152 2.68848 -6 6 -6h212zM400 336v9.63184c0 1.65527 -0.670898 3.15723 -1.75684 4.24316l-48.3682 48.3682c-1.12598 1.125 -2.65234 1.75684 -4.24316 1.75684h-9.63184v-64h64z" />
<glyph glyph-name="save" unicode="&#xf0c7;" horiz-adv-x="448"
d="M433.941 318.059c8.68848 -8.68848 14.0586 -20.6943 14.0586 -33.9404v-268.118c0 -26.5098 -21.4902 -48 -48 -48h-352c-26.5098 0 -48 21.4902 -48 48v352c0 26.5098 21.4902 48 48 48h268.118c13.2461 0 25.252 -5.37012 33.9404 -14.0586zM272 368h-128v-80h128v80z
M394 16c3.31152 0 6 2.68848 6 6v259.632c0 1.65527 -0.670898 3.15723 -1.75684 4.24316l-78.2432 78.2432v-100.118c0 -13.2549 -10.7451 -24 -24 -24h-176c-13.2549 0 -24 10.7451 -24 24v104h-42c-3.31152 0 -6 -2.68848 -6 -6v-340c0 -3.31152 2.68848 -6 6 -6h340z
M224 216c48.5234 0 88 -39.4766 88 -88s-39.4766 -88 -88 -88s-88 39.4766 -88 88s39.4766 88 88 88zM224 88c22.0557 0 40 17.9443 40 40s-17.9443 40 -40 40s-40 -17.9443 -40 -40s17.9443 -40 40 -40z" />
<glyph glyph-name="square" unicode="&#xf0c8;" horiz-adv-x="448"
d="M400 416c26.5 0 48 -21.5 48 -48v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h352zM394 16c3.2998 0 6 2.7002 6 6v340c0 3.2998 -2.7002 6 -6 6h-340c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h340z" />
<glyph glyph-name="envelope" unicode="&#xf0e0;"
d="M464 384c26.5098 0 48 -21.4902 48 -48v-288c0 -26.5098 -21.4902 -48 -48 -48h-416c-26.5098 0 -48 21.4902 -48 48v288c0 26.5098 21.4902 48 48 48h416zM464 336h-416v-40.8047c22.4248 -18.2627 58.1797 -46.6602 134.587 -106.49
c16.834 -13.2422 50.2051 -45.0762 73.4131 -44.7012c23.2119 -0.371094 56.5723 31.4541 73.4131 44.7012c76.4189 59.8389 112.165 88.2305 134.587 106.49v40.8047zM48 48h416v185.601c-22.915 -18.252 -55.4189 -43.8691 -104.947 -82.6523
c-22.5439 -17.748 -60.3359 -55.1787 -103.053 -54.9473c-42.9277 -0.231445 -81.2051 37.75 -103.062 54.9551c-49.5293 38.7842 -82.0244 64.3945 -104.938 82.6455v-185.602z" />
<glyph glyph-name="lightbulb" unicode="&#xf0eb;" horiz-adv-x="352"
d="M176 368c8.83984 0 16 -7.16016 16 -16s-7.16016 -16 -16 -16c-35.2803 0 -64 -28.7002 -64 -64c0 -8.83984 -7.16016 -16 -16 -16s-16 7.16016 -16 16c0 52.9404 43.0596 96 96 96zM96.0596 -11.1699l-0.0400391 43.1797h159.961l-0.0507812 -43.1797
c-0.00976562 -3.13965 -0.939453 -6.21973 -2.67969 -8.83984l-24.5098 -36.8398c-2.95996 -4.45996 -7.95996 -7.14062 -13.3203 -7.14062h-78.8496c-5.35059 0 -10.3506 2.68066 -13.3203 7.14062l-24.5098 36.8398c-1.75 2.62012 -2.68066 5.68945 -2.68066 8.83984z
M176 448c97.2002 0 176 -78.7998 176 -176c0 -44.3701 -16.4502 -84.8496 -43.5498 -115.79c-16.6406 -18.9795 -42.7402 -58.79 -52.4199 -92.1602v-0.0498047h-48v0.0996094c0.00488281 4.98145 0.790039 9.78809 2.21973 14.3008
c5.67969 17.9893 22.9902 64.8496 62.0996 109.46c20.4102 23.29 31.6504 53.1699 31.6504 84.1396c0 70.5801 -57.4199 128 -128 128c-68.2803 0 -128.15 -54.3604 -127.95 -128c0.0898438 -30.9902 11.0703 -60.71 31.6104 -84.1396
c39.3496 -44.9004 56.5801 -91.8604 62.1699 -109.67c1.42969 -4.56055 2.13965 -9.30078 2.15039 -14.0703v-0.120117h-48v0.0595703c-9.68066 33.3604 -35.7803 73.1709 -52.4209 92.1602c-27.1094 30.9307 -43.5596 71.4102 -43.5596 115.78
c0 93.0303 73.7197 176 176 176z" />
<glyph glyph-name="bell" unicode="&#xf0f3;" horiz-adv-x="448"
d="M439.39 85.71c6 -6.44043 8.66016 -14.1602 8.61035 -21.71c-0.0996094 -16.4004 -12.9805 -32 -32.0996 -32h-383.801c-19.1191 0 -31.9893 15.5996 -32.0996 32c-0.0498047 7.5498 2.61035 15.2598 8.61035 21.71c19.3193 20.7598 55.4697 51.9902 55.4697 154.29
c0 77.7002 54.4795 139.9 127.939 155.16v20.8398c0 17.6699 14.3203 32 31.9805 32s31.9805 -14.3301 31.9805 -32v-20.8398c73.46 -15.2598 127.939 -77.46 127.939 -155.16c0 -102.3 36.1504 -133.53 55.4697 -154.29zM67.5303 80h312.939
c-21.2197 27.96 -44.4199 74.3203 -44.5293 159.42c0 0.200195 0.0595703 0.379883 0.0595703 0.580078c0 61.8604 -50.1396 112 -112 112s-112 -50.1396 -112 -112c0 -0.200195 0.0595703 -0.379883 0.0595703 -0.580078
c-0.109375 -85.0898 -23.3096 -131.45 -44.5293 -159.42zM224 -64c-35.3203 0 -63.9697 28.6504 -63.9697 64h127.939c0 -35.3496 -28.6494 -64 -63.9697 -64z" />
<glyph glyph-name="hospital" unicode="&#xf0f8;" horiz-adv-x="448"
d="M128 204v40c0 6.62695 5.37305 12 12 12h40c6.62695 0 12 -5.37305 12 -12v-40c0 -6.62695 -5.37305 -12 -12 -12h-40c-6.62695 0 -12 5.37305 -12 12zM268 192c-6.62695 0 -12 5.37305 -12 12v40c0 6.62695 5.37305 12 12 12h40c6.62695 0 12 -5.37305 12 -12v-40
c0 -6.62695 -5.37305 -12 -12 -12h-40zM192 108c0 -6.62695 -5.37305 -12 -12 -12h-40c-6.62695 0 -12 5.37305 -12 12v40c0 6.62695 5.37305 12 12 12h40c6.62695 0 12 -5.37305 12 -12v-40zM268 96c-6.62695 0 -12 5.37305 -12 12v40c0 6.62695 5.37305 12 12 12h40
c6.62695 0 12 -5.37305 12 -12v-40c0 -6.62695 -5.37305 -12 -12 -12h-40zM448 -28v-36h-448v36c0 6.62695 5.37305 12 12 12h19.5v378.965c0 11.6172 10.7451 21.0352 24 21.0352h88.5v40c0 13.2549 10.7451 24 24 24h112c13.2549 0 24 -10.7451 24 -24v-40h88.5
c13.2549 0 24 -9.41797 24 -21.0352v-378.965h19.5c6.62695 0 12 -5.37305 12 -12zM79.5 -15h112.5v67c0 6.62695 5.37305 12 12 12h40c6.62695 0 12 -5.37305 12 -12v-67h112.5v351h-64.5v-24c0 -13.2549 -10.7451 -24 -24 -24h-112c-13.2549 0 -24 10.7451 -24 24v24
h-64.5v-351zM266 384h-26v26c0 3.31152 -2.68848 6 -6 6h-20c-3.31152 0 -6 -2.68848 -6 -6v-26h-26c-3.31152 0 -6 -2.68848 -6 -6v-20c0 -3.31152 2.68848 -6 6 -6h26v-26c0 -3.31152 2.68848 -6 6 -6h20c3.31152 0 6 2.68848 6 6v26h26c3.31152 0 6 2.68848 6 6v20
c0 3.31152 -2.68848 6 -6 6z" />
<glyph glyph-name="plus-square" unicode="&#xf0fe;" horiz-adv-x="448"
d="M352 208v-32c0 -6.59961 -5.40039 -12 -12 -12h-88v-88c0 -6.59961 -5.40039 -12 -12 -12h-32c-6.59961 0 -12 5.40039 -12 12v88h-88c-6.59961 0 -12 5.40039 -12 12v32c0 6.59961 5.40039 12 12 12h88v88c0 6.59961 5.40039 12 12 12h32c6.59961 0 12 -5.40039 12 -12
v-88h88c6.59961 0 12 -5.40039 12 -12zM448 368v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h352c26.5 0 48 -21.5 48 -48zM400 22v340c0 3.2998 -2.7002 6 -6 6h-340c-3.2998 0 -6 -2.7002 -6 -6v-340
c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="circle" unicode="&#xf111;"
d="M256 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM256 -8c110.5 0 200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200s89.5 -200 200 -200z" />
<glyph glyph-name="smile" unicode="&#xf118;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM168 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32
s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM328 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM332 135.4c8.5 10.1992 23.7002 11.5 33.7998 3.09961c10.2002 -8.5 11.6006 -23.5996 3.10059 -33.7998
c-30 -36 -74.1006 -56.6006 -120.9 -56.6006s-90.9004 20.6006 -120.9 56.6006c-8.39941 10.2002 -7.09961 25.2998 3.10059 33.7998c10.0996 8.40039 25.2998 7.09961 33.7998 -3.09961c20.7998 -25.1006 51.5 -39.4004 84 -39.4004s63.2002 14.4004 84 39.4004z" />
<glyph glyph-name="frown" unicode="&#xf119;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM168 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32
s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32zM248 144c40.2002 0 78 -17.7002 103.8 -48.5996c8.40039 -10.2002 7.10059 -25.3008 -3.09961 -33.8008
c-10.7002 -8.7998 -25.7002 -6.59961 -33.7998 3.10059c-16.6006 20 -41 31.3994 -66.9004 31.3994s-50.2998 -11.5 -66.9004 -31.3994c-8.5 -10.2002 -23.5996 -11.5 -33.7998 -3.10059c-10.2002 8.5 -11.5996 23.6006 -3.09961 33.8008
c25.7998 30.8994 63.5996 48.5996 103.8 48.5996z" />
<glyph glyph-name="meh" unicode="&#xf11a;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM168 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32
s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32zM336 128c13.2002 0 24 -10.7998 24 -24s-10.7998 -24 -24 -24h-176c-13.2002 0 -24 10.7998 -24 24s10.7998 24 24 24h176z
" />
<glyph glyph-name="keyboard" unicode="&#xf11c;" horiz-adv-x="576"
d="M528 384c26.5098 0 48 -21.4902 48 -48v-288c0 -26.5098 -21.4902 -48 -48 -48h-480c-26.5098 0 -48 21.4902 -48 48v288c0 26.5098 21.4902 48 48 48h480zM536 48v288c0 4.41113 -3.58887 8 -8 8h-480c-4.41113 0 -8 -3.58887 -8 -8v-288c0 -4.41113 3.58887 -8 8 -8
h480c4.41113 0 8 3.58887 8 8zM170 178c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM266 178c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28
c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM362 178c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM458 178c0 -6.62695 -5.37305 -12 -12 -12h-28
c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM122 96c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM506 96
c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM122 260c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28
c6.62695 0 12 -5.37305 12 -12v-28zM218 260c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM314 260c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28
c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM410 260c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM506 260c0 -6.62695 -5.37305 -12 -12 -12h-28
c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM408 102c0 -6.62695 -5.37305 -12 -12 -12h-216c-6.62695 0 -12 5.37305 -12 12v16c0 6.62695 5.37305 12 12 12h216c6.62695 0 12 -5.37305 12 -12v-16z" />
<glyph glyph-name="calendar" unicode="&#xf133;" horiz-adv-x="448"
d="M400 384c26.5 0 48 -21.5 48 -48v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h48v52c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-52h128v52c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12
v-52h48zM394 -16c3.2998 0 6 2.7002 6 6v298h-352v-298c0 -3.2998 2.7002 -6 6 -6h340z" />
<glyph glyph-name="play-circle" unicode="&#xf144;"
d="M371.7 210c16.3994 -9.2002 16.3994 -32.9004 0 -42l-176 -101c-15.9004 -8.7998 -35.7002 2.59961 -35.7002 21v208c0 18.5 19.9004 29.7998 35.7002 21zM504 192c0 -137 -111 -248 -248 -248s-248 111 -248 248s111 248 248 248s248 -111 248 -248zM56 192
c0 -110.5 89.5 -200 200 -200s200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200z" />
<glyph glyph-name="minus-square" unicode="&#xf146;" horiz-adv-x="448"
d="M108 164c-6.59961 0 -12 5.40039 -12 12v32c0 6.59961 5.40039 12 12 12h232c6.59961 0 12 -5.40039 12 -12v-32c0 -6.59961 -5.40039 -12 -12 -12h-232zM448 368v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h352
c26.5 0 48 -21.5 48 -48zM400 22v340c0 3.2998 -2.7002 6 -6 6h-340c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="check-square" unicode="&#xf14a;" horiz-adv-x="448"
d="M400 416c26.5098 0 48 -21.4902 48 -48v-352c0 -26.5098 -21.4902 -48 -48 -48h-352c-26.5098 0 -48 21.4902 -48 48v352c0 26.5098 21.4902 48 48 48h352zM400 16v352h-352v-352h352zM364.136 257.724l-172.589 -171.204
c-4.70508 -4.66699 -12.3027 -4.63672 -16.9697 0.0683594l-90.7812 91.5156c-4.66699 4.70508 -4.63672 12.3037 0.0693359 16.9717l22.7188 22.5361c4.70508 4.66699 12.3027 4.63672 16.9697 -0.0693359l59.792 -60.2773l141.353 140.217
c4.70508 4.66699 12.3027 4.63672 16.9697 -0.0683594l22.5361 -22.7178c4.66699 -4.70605 4.63672 -12.3047 -0.0683594 -16.9717z" />
<glyph glyph-name="share-square" unicode="&#xf14d;" horiz-adv-x="576"
d="M561.938 289.94c18.75 -18.7402 18.75 -49.1406 0 -67.8809l-143.998 -144c-29.9727 -29.9727 -81.9404 -9.05273 -81.9404 33.9404v53.7998c-101.266 -7.83691 -99.625 -31.6406 -84.1104 -78.7598c14.2285 -43.0889 -33.4736 -79.248 -71.0195 -55.7402
c-51.6924 32.3057 -84.8701 83.0635 -84.8701 144.76c0 39.3408 12.2197 72.7402 36.3301 99.3008c19.8398 21.8398 47.7402 38.4697 82.9102 49.4199c36.7295 11.4395 78.3096 16.1094 120.76 17.9893v57.1982c0 42.9355 51.9258 63.9541 81.9404 33.9404zM384 112l144 144
l-144 144v-104.09c-110.86 -0.90332 -240 -10.5166 -240 -119.851c0 -52.1396 32.79 -85.6094 62.3096 -104.06c-39.8174 120.65 48.999 141.918 177.69 143.84v-103.84zM408.74 27.5068c7.4375 2.125 14.5508 5.30566 20.9736 9.30273
c7.97656 4.95215 18.2861 -0.825195 18.2861 -10.2139v-42.5957c0 -26.5098 -21.4902 -48 -48 -48h-352c-26.5098 0 -48 21.4902 -48 48v352c0 26.5098 21.4902 48 48 48h132c6.62695 0 12 -5.37305 12 -12v-4.48633c0 -4.91699 -2.9873 -9.36914 -7.56934 -11.1514
c-13.7021 -5.33105 -26.3955 -11.5371 -38.0498 -18.585c-1.82715 -1.11523 -3.98633 -1.76953 -6.28027 -1.77734h-86.1006c-3.31152 0 -6 -2.68848 -6 -6v-340c0 -3.31152 2.68848 -6 6 -6h340c3.31152 0 6 2.68848 6 6v25.9658c0 5.37012 3.5791 10.0596 8.74023 11.541z
" />
<glyph glyph-name="compass" unicode="&#xf14e;" horiz-adv-x="496"
d="M347.94 318.14c16.6592 7.61035 33.8096 -9.54004 26.1992 -26.1992l-65.9697 -144.341c-3.19238 -6.9834 -8.78613 -12.5771 -15.7695 -15.7695l-144.341 -65.9697c-16.6592 -7.61035 -33.8096 9.5498 -26.1992 26.1992l65.9697 144.341
c3.19238 6.9834 8.78613 12.5771 15.7695 15.7695zM270.58 169.42c12.4697 12.4697 12.4697 32.6904 0 45.1602s-32.6904 12.4697 -45.1602 0s-12.4697 -32.6904 0 -45.1602s32.6904 -12.4697 45.1602 0zM248 440c136.97 0 248 -111.03 248 -248s-111.03 -248 -248 -248
s-248 111.03 -248 248s111.03 248 248 248zM248 -8c110.28 0 200 89.7197 200 200s-89.7197 200 -200 200s-200 -89.7197 -200 -200s89.7197 -200 200 -200z" />
<glyph glyph-name="caret-square-down" unicode="&#xf150;" horiz-adv-x="448"
d="M125.1 240h197.801c10.6992 0 16.0996 -13 8.5 -20.5l-98.9004 -98.2998c-4.7002 -4.7002 -12.2002 -4.7002 -16.9004 0l-98.8994 98.2998c-7.7002 7.5 -2.2998 20.5 8.39941 20.5zM448 368v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352
c0 26.5 21.5 48 48 48h352c26.5 0 48 -21.5 48 -48zM400 22v340c0 3.2998 -2.7002 6 -6 6h-340c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="caret-square-up" unicode="&#xf151;" horiz-adv-x="448"
d="M322.9 144h-197.801c-10.6992 0 -16.0996 13 -8.5 20.5l98.9004 98.2998c4.7002 4.7002 12.2002 4.7002 16.9004 0l98.8994 -98.2998c7.7002 -7.5 2.2998 -20.5 -8.39941 -20.5zM448 368v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352
c0 26.5 21.5 48 48 48h352c26.5 0 48 -21.5 48 -48zM400 22v340c0 3.2998 -2.7002 6 -6 6h-340c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="caret-square-right" unicode="&#xf152;" horiz-adv-x="448"
d="M176 93.0996v197.801c0 10.6992 13 16.0996 20.5 8.5l98.2998 -98.9004c4.7002 -4.7002 4.7002 -12.2002 0 -16.9004l-98.2998 -98.8994c-7.5 -7.7002 -20.5 -2.2998 -20.5 8.39941zM448 368v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352
c0 26.5 21.5 48 48 48h352c26.5 0 48 -21.5 48 -48zM400 22v340c0 3.2998 -2.7002 6 -6 6h-340c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="file" unicode="&#xf15b;" horiz-adv-x="384"
d="M369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM332.1 320l-76.0996 76.0996v-76.0996h76.0996zM48 -16h288v288
h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416z" />
<glyph glyph-name="file-alt" unicode="&#xf15c;" horiz-adv-x="384"
d="M288 200v-28c0 -6.59961 -5.40039 -12 -12 -12h-168c-6.59961 0 -12 5.40039 -12 12v28c0 6.59961 5.40039 12 12 12h168c6.59961 0 12 -5.40039 12 -12zM276 128c6.59961 0 12 -5.40039 12 -12v-28c0 -6.59961 -5.40039 -12 -12 -12h-168c-6.59961 0 -12 5.40039 -12 12
v28c0 6.59961 5.40039 12 12 12h168zM384 316.1v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996l83.9004 -83.9004c9 -8.90039 14.0996 -21.2002 14.0996 -33.9004z
M256 396.1v-76.0996h76.0996zM336 -16v288h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416h288z" />
<glyph glyph-name="thumbs-up" unicode="&#xf164;"
d="M466.27 161.31c4.6748 -22.6465 0.864258 -44.5371 -8.98926 -62.9893c2.95898 -23.8682 -4.02148 -48.5654 -17.3398 -66.9902c-0.954102 -55.9072 -35.8232 -95.3301 -112.94 -95.3301c-7 0 -15 0.00976562 -22.2197 0.00976562
c-102.742 0 -133.293 38.9395 -177.803 39.9404c-3.56934 -13.7764 -16.085 -23.9502 -30.9775 -23.9502h-64c-17.6729 0 -32 14.3271 -32 32v240c0 17.6729 14.3271 32 32 32h98.7598c19.1455 16.9531 46.0137 60.6533 68.7598 83.4004
c13.667 13.667 10.1533 108.6 71.7607 108.6c57.5801 0 95.2695 -31.9355 95.2695 -104.73c0 -18.4092 -3.92969 -33.7295 -8.84961 -46.5391h36.4795c48.6025 0 85.8203 -41.5654 85.8203 -85.5801c0 -19.1504 -4.95996 -34.9902 -13.7305 -49.8408zM404.52 107.48
c21.5811 20.3838 18.6992 51.0645 5.21094 65.6191c9.44922 0 22.3594 18.9102 22.2695 37.8105c-0.0898438 18.9102 -16.71 37.8203 -37.8203 37.8203h-103.989c0 37.8193 28.3594 55.3691 28.3594 94.5391c0 23.75 0 56.7305 -47.2695 56.7305
c-18.9102 -18.9102 -9.45996 -66.1797 -37.8203 -94.54c-26.5596 -26.5703 -66.1797 -97.46 -94.54 -97.46h-10.9199v-186.17c53.6113 0 100.001 -37.8203 171.64 -37.8203h37.8203c35.5117 0 60.8203 17.1201 53.1201 65.9004
c15.2002 8.16016 26.5 36.4395 13.9395 57.5703zM88 16c0 13.2549 -10.7451 24 -24 24s-24 -10.7451 -24 -24s10.7451 -24 24 -24s24 10.7451 24 24z" />
<glyph glyph-name="thumbs-down" unicode="&#xf165;"
d="M466.27 222.69c8.77051 -14.8506 13.7305 -30.6904 13.7305 -49.8408c0 -44.0146 -37.2178 -85.5801 -85.8203 -85.5801h-36.4795c4.91992 -12.8096 8.84961 -28.1299 8.84961 -46.5391c0 -72.7949 -37.6895 -104.73 -95.2695 -104.73
c-61.6074 0 -58.0938 94.9326 -71.7607 108.6c-22.7461 22.7471 -49.6133 66.4473 -68.7598 83.4004h-7.05176c-5.5332 -9.56152 -15.8662 -16 -27.708 -16h-64c-17.6729 0 -32 14.3271 -32 32v240c0 17.6729 14.3271 32 32 32h64c8.11328 0 15.5146 -3.02539 21.1553 -8
h10.8447c40.9971 0 73.1953 39.9902 176.78 39.9902c7.21973 0 15.2197 0.00976562 22.2197 0.00976562c77.1172 0 111.986 -39.4229 112.94 -95.3301c13.3184 -18.4248 20.2979 -43.1221 17.3398 -66.9902c9.85352 -18.4521 13.6641 -40.3428 8.98926 -62.9893zM64 152
c13.2549 0 24 10.7451 24 24s-10.7451 24 -24 24s-24 -10.7451 -24 -24s10.7451 -24 24 -24zM394.18 135.27c21.1104 0 37.7305 18.9102 37.8203 37.8203c0.0898438 18.9004 -12.8203 37.8105 -22.2695 37.8105c13.4883 14.5547 16.3701 45.2354 -5.21094 65.6191
c12.5605 21.1309 1.26074 49.4102 -13.9395 57.5703c7.7002 48.7803 -17.6084 65.9004 -53.1201 65.9004h-37.8203c-71.6387 0 -118.028 -37.8203 -171.64 -37.8203v-186.17h10.9199c28.3604 0 67.9805 -70.8896 94.54 -97.46
c28.3604 -28.3604 18.9102 -75.6299 37.8203 -94.54c47.2695 0 47.2695 32.9805 47.2695 56.7305c0 39.1699 -28.3594 56.7197 -28.3594 94.5391h103.989z" />
<glyph glyph-name="sun" unicode="&#xf185;"
d="M494.2 226.1c11.2002 -7.59961 17.7998 -20.0996 17.8994 -33.6992c0 -13.4004 -6.69922 -26 -17.7998 -33.5l-59.7998 -40.5l13.7002 -71c2.5 -13.2002 -1.60059 -26.8008 -11.1006 -36.3008s-22.8994 -13.7998 -36.2998 -11.0996l-70.8994 13.7002l-40.4004 -59.9004
c-7.5 -11.0996 -20.0996 -17.7998 -33.5 -17.7998s-26 6.7002 -33.5 17.9004l-40.4004 59.8994l-70.7998 -13.7002c-13.3994 -2.59961 -26.7998 1.60059 -36.2998 11.1006s-13.7002 23.0996 -11.0996 36.2998l13.6992 71l-59.7998 40.5
c-11.0996 7.5 -17.7998 20 -17.7998 33.5s6.59961 26 17.7998 33.5996l59.7998 40.5l-13.6992 71c-2.60059 13.2002 1.59961 26.7002 11.0996 36.3008c9.5 9.59961 23 13.6992 36.2998 11.1992l70.7998 -13.6992l40.4004 59.8994c15.0996 22.2998 51.9004 22.2998 67 0
l40.4004 -59.8994l70.8994 13.6992c13 2.60059 26.6006 -1.59961 36.2002 -11.0996c9.5 -9.59961 13.7002 -23.2002 11.0996 -36.4004l-13.6992 -71zM381.3 140.5l76.7998 52.0996l-76.7998 52l17.6006 91.1006l-91 -17.6006l-51.9004 76.9004l-51.7998 -76.7998
l-91 17.5996l17.5996 -91.2002l-76.7998 -52l76.7998 -52l-17.5996 -91.1992l90.8994 17.5996l51.9004 -77l51.9004 76.9004l91 -17.6006zM256 296c57.2998 0 104 -46.7002 104 -104s-46.7002 -104 -104 -104s-104 46.7002 -104 104s46.7002 104 104 104zM256 136
c30.9004 0 56 25.0996 56 56s-25.0996 56 -56 56s-56 -25.0996 -56 -56s25.0996 -56 56 -56z" />
<glyph glyph-name="moon" unicode="&#xf186;"
d="M279.135 -64c-141.424 0 -256 114.64 -256 256c0 141.425 114.641 256 256 256c16.0342 -0.00292969 31.5078 -1.46875 46.7354 -4.27734c44.0205 -8.13086 53.7666 -66.8691 15.0215 -88.9189c-41.374 -23.5439 -67.4336 -67.4121 -67.4336 -115.836
c0 -83.5234 75.9238 -146.475 158.272 -130.792c43.6904 8.32129 74.5186 -42.5693 46.248 -77.4004c-47.8613 -58.9717 -120.088 -94.7754 -198.844 -94.7754zM279.135 400c-114.875 0 -208 -93.125 -208 -208s93.125 -208 208 -208
c65.2314 0 123.439 30.0361 161.575 77.0244c-111.611 -21.2568 -215.252 64.0957 -215.252 177.943c0 67.5127 36.9326 126.392 91.6934 157.555c-12.3271 2.27637 -25.0312 3.47754 -38.0166 3.47754z" />
<glyph glyph-name="caret-square-left" unicode="&#xf191;" horiz-adv-x="448"
d="M272 290.9v-197.801c0 -10.6992 -13 -16.0996 -20.5 -8.5l-98.2998 98.9004c-4.7002 4.7002 -4.7002 12.2002 0 16.9004l98.2998 98.8994c7.5 7.7002 20.5 2.2998 20.5 -8.39941zM448 368v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352
c0 26.5 21.5 48 48 48h352c26.5 0 48 -21.5 48 -48zM400 22v340c0 3.2998 -2.7002 6 -6 6h-340c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="dot-circle" unicode="&#xf192;"
d="M256 392c-110.549 0 -200 -89.4678 -200 -200c0 -110.549 89.4678 -200 200 -200c110.549 0 200 89.4678 200 200c0 110.549 -89.4678 200 -200 200zM256 440c136.967 0 248 -111.033 248 -248s-111.033 -248 -248 -248s-248 111.033 -248 248s111.033 248 248 248z
M256 272c44.1826 0 80 -35.8174 80 -80s-35.8174 -80 -80 -80s-80 35.8174 -80 80s35.8174 80 80 80z" />
<glyph glyph-name="building" unicode="&#xf1ad;" horiz-adv-x="448"
d="M128 300v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12h-40c-6.59961 0 -12 5.40039 -12 12zM268 288c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40
c0 -6.59961 -5.40039 -12 -12 -12h-40zM140 192c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12h-40zM268 192c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40
c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12h-40zM192 108c0 -6.59961 -5.40039 -12 -12 -12h-40c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40zM268 96c-6.59961 0 -12 5.40039 -12 12v40
c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12h-40zM448 -28v-36h-448v36c0 6.59961 5.40039 12 12 12h19.5v440c0 13.2998 10.7002 24 24 24h337c13.2998 0 24 -10.7002 24 -24v-440h19.5
c6.59961 0 12 -5.40039 12 -12zM79.5 -15h112.5v67c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-67h112.5v414l-288.5 1z" />
<glyph glyph-name="file-pdf" unicode="&#xf1c1;" horiz-adv-x="384"
d="M369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM332.1 320l-76.0996 76.0996v-76.0996h76.0996zM48 -16h288v288
h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416zM298.2 127.7c10.5 -10.5 8 -38.7002 -17.5 -38.7002c-14.7998 0 -36.9004 6.7998 -55.7998 17c-21.6006 -3.59961 -46 -12.7002 -68.4004 -20.0996c-50.0996 -86.4004 -79.4004 -47 -76.0996 -31.2002
c4 20 31 35.8994 51 46.2002c10.5 18.3994 25.3994 50.5 35.3994 74.3994c-7.39941 28.6006 -11.3994 51 -7 67.1006c4.7998 17.6992 38.4004 20.2998 42.6006 -5.90039c4.69922 -15.4004 -1.5 -39.9004 -5.40039 -56c8.09961 -21.2998 19.5996 -35.7998 36.7998 -46.2998
c17.4004 2.2002 52.2002 5.5 64.4004 -6.5zM100.1 49.9004c0 -0.700195 11.4004 4.69922 30.4004 35c-5.90039 -5.5 -25.2998 -21.3008 -30.4004 -35zM181.7 240.5c-2.5 0 -2.60059 -26.9004 1.7998 -40.7998c4.90039 8.7002 5.59961 40.7998 -1.7998 40.7998zM157.3 103.9
c15.9004 6.09961 34 14.8994 54.7998 19.1992c-11.1992 8.30078 -21.7998 20.4004 -30.0996 35.5c-6.7002 -17.6992 -15 -37.7998 -24.7002 -54.6992zM288.9 108.9c3.59961 2.39941 -2.2002 10.3994 -37.3008 7.7998c32.3008 -13.7998 37.3008 -7.7998 37.3008 -7.7998z" />
<glyph glyph-name="file-word" unicode="&#xf1c2;" horiz-adv-x="384"
d="M369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM332.1 320l-76.0996 76.0996v-76.0996h76.0996zM48 -16h288v288
h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416zM268.1 192v0.200195h15.8008c7.7998 0 13.5 -7.2998 11.5996 -14.9004c-4.2998 -17 -13.7002 -54.0996 -34.5 -136c-1.2998 -5.39941 -6.09961 -9.09961 -11.5996 -9.09961h-24.7002
c-5.5 0 -10.2998 3.7998 -11.6006 9.09961c-5.2998 20.9004 -17.7998 71 -17.8994 71.4004l-2.90039 17.2998c-0.5 -5.2998 -1.5 -11.0996 -3 -17.2998l-17.8994 -71.4004c-1.30078 -5.39941 -6.10059 -9.09961 -11.6006 -9.09961h-25.2002
c-5.59961 0 -10.3994 3.7002 -11.6992 9.09961c-6.5 26.5 -25.2002 103.4 -33.2002 136c-1.7998 7.5 3.89941 14.7998 11.7002 14.7998h16.7998c5.7998 0 10.7002 -4.09961 11.7998 -9.69922c5 -25.7002 18.4004 -93.8008 19.0996 -99
c0.300781 -1.7002 0.400391 -3.10059 0.5 -4.2002c0.800781 7.5 0.400391 4.7002 24.8008 103.7c1.39941 5.2998 6.19922 9.09961 11.6992 9.09961h13.3008c5.59961 0 10.3994 -3.7998 11.6992 -9.2002c23.9004 -99.7002 22.8008 -94.3994 23.6006 -99.5
c0.299805 -1.7002 0.5 -3.09961 0.700195 -4.2998c0.599609 8.09961 0.399414 5.7998 21 103.5c1.09961 5.5 6 9.5 11.6992 9.5z" />
<glyph glyph-name="file-excel" unicode="&#xf1c3;" horiz-adv-x="384"
d="M369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM332.1 320l-76.0996 76.0996v-76.0996h76.0996zM48 -16h288v288
h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416zM260 224c9.2002 0 15 -10 10.2998 -18c-16 -27.5 -45.5996 -76.9004 -46.2998 -78l46.4004 -78c4.59961 -8 -1.10059 -18 -10.4004 -18h-28.7998c-4.40039 0 -8.5 2.40039 -10.6006 6.2998
c-22.6992 41.7998 -13.6992 27.5 -28.5996 57.7002c-5.59961 -12.7002 -6.90039 -17.7002 -28.5996 -57.7002c-2.10059 -3.89941 -6.10059 -6.2998 -10.5 -6.2998h-28.9004c-9.2998 0 -15.0996 10 -10.4004 18l46.3008 78l-46.3008 78c-4.59961 8 1.10059 18 10.4004 18
h28.9004c4.39941 0 8.5 -2.40039 10.5996 -6.2998c21.7002 -40.4004 14.7002 -28.6006 28.5996 -57.7002c6.40039 15.2998 10.6006 24.5996 28.6006 57.7002c2.09961 3.89941 6.09961 6.2998 10.5 6.2998h28.7998z" />
<glyph glyph-name="file-powerpoint" unicode="&#xf1c4;" horiz-adv-x="384"
d="M369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM332.1 320l-76.0996 76.0996v-76.0996h76.0996zM48 -16h288v288
h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416zM120 44v168c0 6.59961 5.40039 12 12 12h69.2002c36.7002 0 62.7998 -27 62.7998 -66.2998c0 -74.2998 -68.7002 -66.5 -95.5 -66.5v-47.2002c0 -6.59961 -5.40039 -12 -12 -12h-24.5c-6.59961 0 -12 5.40039 -12 12z
M168.5 131.4h23c7.90039 0 13.9004 2.39941 18.0996 7.19922c8.5 9.80078 8.40039 28.5 0.100586 37.8008c-4.10059 4.59961 -9.90039 7 -17.4004 7h-23.8994v-52h0.0996094z" />
<glyph glyph-name="file-image" unicode="&#xf1c5;" horiz-adv-x="384"
d="M369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM332.1 320l-76.0996 76.0996v-76.0996h76.0996zM48 -16h288v288
h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416zM80 32v64l39.5 39.5c4.7002 4.7002 12.2998 4.7002 17 0l39.5 -39.5l87.5 87.5c4.7002 4.7002 12.2998 4.7002 17 0l23.5 -23.5v-128h-224zM128 272c26.5 0 48 -21.5 48 -48s-21.5 -48 -48 -48s-48 21.5 -48 48
s21.5 48 48 48z" />
<glyph glyph-name="file-archive" unicode="&#xf1c6;" horiz-adv-x="384"
d="M128.3 288h32v-32h-32v32zM192.3 384v-32h-32v32h32zM128.3 352h32v-32h-32v32zM192.3 320v-32h-32v32h32zM369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1
c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM256 396.1v-76.0996h76.0996zM336 -16v288h-104c-13.2998 0 -24 10.7002 -24 24v104h-48.2998v-16h-32v16h-79.7002v-416h288zM194.2 182.3l17.2998 -87.7002c6.40039 -32.3994 -18.4004 -62.5996 -51.5 -62.5996
c-33.2002 0 -58 30.4004 -51.4004 62.9004l19.7002 97.0996v32h32v-32h22.1006c5.7998 0 10.6992 -4.09961 11.7998 -9.7002zM160.3 57.9004c17.9004 0 32.4004 12.0996 32.4004 27c0 14.8994 -14.5 27 -32.4004 27c-17.8994 0 -32.3994 -12.1006 -32.3994 -27
c0 -14.9004 14.5 -27 32.3994 -27zM192.3 256v-32h-32v32h32z" />
<glyph glyph-name="file-audio" unicode="&#xf1c7;" horiz-adv-x="384"
d="M369.941 350.059c8.68848 -8.68848 14.0586 -20.6943 14.0586 -33.9404v-332.118c0 -26.5098 -21.4902 -48 -48 -48h-288c-26.5098 0 -48 21.4902 -48 48v416c0 26.5098 21.4902 48 48 48h204.118c13.2461 0 25.252 -5.37012 33.9404 -14.0586zM332.118 320
l-76.1182 76.1182v-76.1182h76.1182zM48 -16h288v288h-104c-13.2549 0 -24 10.7451 -24 24v104h-160v-416zM192 60.0244c0 -10.6914 -12.9258 -16.0459 -20.4854 -8.48535l-35.5146 35.9746h-28c-6.62695 0 -12 5.37305 -12 12v56c0 6.62695 5.37305 12 12 12h28
l35.5146 36.9473c7.56055 7.56055 20.4854 2.20605 20.4854 -8.48535v-135.951zM233.201 107.154c9.05078 9.29688 9.05957 24.1328 0.000976562 33.4385c-22.1494 22.752 12.2344 56.2461 34.3945 33.4814c27.1982 -27.9404 27.2119 -72.4443 0.000976562 -100.401
c-21.793 -22.3857 -56.9463 10.3154 -34.3965 33.4814z" />
<glyph glyph-name="file-video" unicode="&#xf1c8;" horiz-adv-x="384"
d="M369.941 350.059c8.68848 -8.68848 14.0586 -20.6943 14.0586 -33.9404v-332.118c0 -26.5098 -21.4902 -48 -48 -48h-288c-26.5098 0 -48 21.4902 -48 48v416c0 26.5098 21.4902 48 48 48h204.118c13.2461 0 25.252 -5.37012 33.9404 -14.0586zM332.118 320
l-76.1182 76.1182v-76.1182h76.1182zM48 -16h288v288h-104c-13.2549 0 -24 10.7451 -24 24v104h-160v-416zM276.687 195.303c10.0049 10.0049 27.3135 2.99707 27.3135 -11.3135v-111.976c0 -14.2939 -17.2959 -21.332 -27.3135 -11.3135l-52.6865 52.6738v-37.374
c0 -11.0459 -8.9541 -20 -20 -20h-104c-11.0459 0 -20 8.9541 -20 20v104c0 11.0459 8.9541 20 20 20h104c11.0459 0 20 -8.9541 20 -20v-37.374z" />
<glyph glyph-name="file-code" unicode="&#xf1c9;" horiz-adv-x="384"
d="M149.9 98.9004c3.5 -3.30078 3.69922 -8.90039 0.399414 -12.4004l-17.3994 -18.5996c-1.60059 -1.80078 -4 -2.80078 -6.40039 -2.80078c-2.2002 0 -4.40039 0.900391 -6 2.40039l-57.7002 54.0996c-3.7002 3.40039 -3.7002 9.30078 0 12.8008l57.7002 54.0996
c3.40039 3.2998 9 3.2002 12.4004 -0.400391l17.3994 -18.5996l0.200195 -0.200195c3.2002 -3.59961 2.7998 -9.2002 -0.799805 -12.3994l-32.7998 -28.9004l32.7998 -28.9004zM369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288
c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM256 396.1v-76.0996h76.0996zM336 -16v288h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416h288zM209.6 234l24.4004 -7
c4.7002 -1.2998 7.40039 -6.2002 6 -10.9004l-54.7002 -188.199c-1.2998 -4.60059 -6.2002 -7.40039 -10.8994 -6l-24.4004 7.09961c-4.7002 1.2998 -7.40039 6.2002 -6 10.9004l54.7002 188.1c1.39941 4.7002 6.2002 7.40039 10.8994 6zM234.1 157.1
c-3.5 3.30078 -3.69922 8.90039 -0.399414 12.4004l17.3994 18.5996c3.30078 3.60059 8.90039 3.7002 12.4004 0.400391l57.7002 -54.0996c3.7002 -3.40039 3.7002 -9.30078 0 -12.8008l-57.7002 -54.0996c-3.5 -3.2998 -9.09961 -3.09961 -12.4004 0.400391
l-17.3994 18.5996l-0.200195 0.200195c-3.2002 3.59961 -2.7998 9.2002 0.799805 12.3994l32.7998 28.9004l-32.7998 28.9004z" />
<glyph glyph-name="life-ring" unicode="&#xf1cd;"
d="M256 -56c-136.967 0 -248 111.033 -248 248s111.033 248 248 248s248 -111.033 248 -248s-111.033 -248 -248 -248zM152.602 20.7197c63.2178 -38.3184 143.579 -38.3184 206.797 0l-53.4111 53.4111c-31.8467 -13.5215 -68.168 -13.5059 -99.9746 0zM336 192
c0 44.1123 -35.8877 80 -80 80s-80 -35.8877 -80 -80s35.8877 -80 80 -80s80 35.8877 80 80zM427.28 88.6016c38.3184 63.2178 38.3184 143.579 0 206.797l-53.4111 -53.4111c13.5215 -31.8467 13.5049 -68.168 0 -99.9746zM359.397 363.28
c-63.2168 38.3184 -143.578 38.3184 -206.796 0l53.4111 -53.4111c31.8457 13.5215 68.167 13.5049 99.9736 0zM84.7197 295.398c-38.3184 -63.2178 -38.3184 -143.579 0 -206.797l53.4111 53.4111c-13.5215 31.8467 -13.5059 68.168 0 99.9746z" />
<glyph glyph-name="paper-plane" unicode="&#xf1d8;"
d="M440 441.5c34.5996 19.9004 77.5996 -8.7998 71.5 -48.9004l-59.4004 -387.199c-2.2998 -14.5 -11.0996 -27.3008 -23.8994 -34.5c-7.2998 -4.10059 -15.4004 -6.2002 -23.6006 -6.2002c-6.19922 0 -12.3994 1.2002 -18.2998 3.59961l-111.899 46.2002l-43.8008 -59.0996
c-27.3994 -36.9004 -86.5996 -17.8008 -86.5996 28.5996v84.4004l-114.3 47.2998c-36.7998 15.0996 -40.1006 66 -5.7002 85.8994zM192 -16l36.5996 49.5l-36.5996 15.0996v-64.5996zM404.6 12.7002l59.4004 387.3l-416 -240l107.8 -44.5996l211.5 184.3
c14.2002 12.2998 34.4004 -5.7002 23.7002 -21.2002l-140.2 -202.3z" />
<glyph glyph-name="futbol" unicode="&#xf1e3;" horiz-adv-x="496"
d="M483.8 268.6c42.2998 -130.199 -29 -270.1 -159.2 -312.399c-25.5 -8.2998 -51.2998 -12.2002 -76.6992 -12.2002c-104.5 0 -201.7 66.5996 -235.7 171.4c-42.2998 130.199 29 270.1 159.2 312.399c25.5 8.2998 51.2998 12.2002 76.6992 12.2002
c104.5 0 201.7 -66.5996 235.7 -171.4zM409.3 74.9004c6.10059 8.39941 12.1006 16.8994 16.7998 26.1992c14.3008 28.1006 21.5 58.5 21.7002 89.2002l-38.8994 36.4004l-71.1006 -22.1006l-24.3994 -75.1992l43.6992 -60.9004zM409.3 310.3
c-24.5 33.4004 -58.7002 58.4004 -97.8994 71.4004l-47.4004 -26.2002v-73.7998l64.2002 -46.5l70.7002 22zM184.9 381.6c-39.9004 -13.2998 -73.5 -38.5 -97.8008 -71.8994l10.1006 -52.5l70.5996 -22l64.2002 46.5v73.7998zM139 68.5l43.5 61.7002l-24.2998 74.2998
l-71.1006 22.2002l-39 -36.4004c0.5 -55.7002 23.4004 -95.2002 37.8008 -115.3zM187.2 1.5c64.0996 -20.4004 115.5 -1.7998 121.7 0l22.3994 48.0996l-44.2998 61.7002h-78.5996l-43.6006 -61.7002z" />
<glyph glyph-name="newspaper" unicode="&#xf1ea;" horiz-adv-x="576"
d="M552 384c13.2549 0 24 -10.7451 24 -24v-336c0 -13.2549 -10.7451 -24 -24 -24h-496c-30.9277 0 -56 25.0723 -56 56v272c0 13.2549 10.7451 24 24 24h42.752c6.60547 18.623 24.3896 32 45.248 32h440zM48 56c0 -4.41113 3.58887 -8 8 -8s8 3.58887 8 8v248h-16v-248z
M528 48v288h-416v-280c0 -2.7168 -0.204102 -5.38574 -0.578125 -8h416.578zM172 168c-6.62695 0 -12 5.37305 -12 12v96c0 6.62695 5.37305 12 12 12h136c6.62695 0 12 -5.37305 12 -12v-96c0 -6.62695 -5.37305 -12 -12 -12h-136zM200 248v-40h80v40h-80zM160 108v24
c0 6.62695 5.37305 12 12 12h136c6.62695 0 12 -5.37305 12 -12v-24c0 -6.62695 -5.37305 -12 -12 -12h-136c-6.62695 0 -12 5.37305 -12 12zM352 108v24c0 6.62695 5.37305 12 12 12h104c6.62695 0 12 -5.37305 12 -12v-24c0 -6.62695 -5.37305 -12 -12 -12h-104
c-6.62695 0 -12 5.37305 -12 12zM352 252v24c0 6.62695 5.37305 12 12 12h104c6.62695 0 12 -5.37305 12 -12v-24c0 -6.62695 -5.37305 -12 -12 -12h-104c-6.62695 0 -12 5.37305 -12 12zM352 180v24c0 6.62695 5.37305 12 12 12h104c6.62695 0 12 -5.37305 12 -12v-24
c0 -6.62695 -5.37305 -12 -12 -12h-104c-6.62695 0 -12 5.37305 -12 12z" />
<glyph glyph-name="bell-slash" unicode="&#xf1f6;" horiz-adv-x="640"
d="M633.99 -23.0195c6.91016 -5.52051 8.01953 -15.5908 2.5 -22.4902l-10 -12.4902c-5.53027 -6.88965 -15.5898 -8.00977 -22.4902 -2.49023l-598 467.51c-6.90039 5.52051 -8.01953 15.5908 -2.49023 22.4902l10 12.4902
c5.52051 6.90039 15.5898 8.00977 22.4902 2.49023zM163.53 80h182.84l61.3994 -48h-279.659c-19.1201 0 -31.9902 15.5996 -32.1006 32c-0.0498047 7.5498 2.61035 15.2598 8.61035 21.71c18.3701 19.7402 51.5703 49.6904 54.8398 140.42l45.4697 -35.5498
c-6.91992 -54.7803 -24.6895 -88.5498 -41.3994 -110.58zM320 352c-23.3496 0 -45 -7.17969 -62.9404 -19.4004l-38.1699 29.8408c19.6807 15.7793 43.1104 27.3096 69.1299 32.7197v20.8398c0 17.6699 14.3203 32 31.9805 32s31.9805 -14.3301 31.9805 -32v-20.8398
c73.46 -15.2598 127.939 -77.46 127.939 -155.16c0 -41.3604 6.03027 -70.7197 14.3398 -92.8496l-59.5293 46.54c-1.63086 13.96 -2.77051 28.8896 -2.79004 45.7295c0 0.200195 0.0595703 0.379883 0.0595703 0.580078c0 61.8604 -50.1396 112 -112 112zM320 -64
c-35.3203 0 -63.9697 28.6504 -63.9697 64h127.939c0 -35.3496 -28.6494 -64 -63.9697 -64z" />
<glyph glyph-name="copyright" unicode="&#xf1f9;"
d="M256 440c136.967 0 248 -111.033 248 -248s-111.033 -248 -248 -248s-248 111.033 -248 248s111.033 248 248 248zM256 -8c110.549 0 200 89.4678 200 200c0 110.549 -89.4678 200 -200 200c-110.549 0 -200 -89.4688 -200 -200c0 -110.549 89.4678 -200 200 -200z
M363.351 93.0645c-9.61328 -9.71289 -45.5293 -41.3965 -104.064 -41.3965c-82.4297 0 -140.484 61.4248 -140.484 141.567c0 79.1514 60.2754 139.4 139.763 139.4c55.5303 0 88.7373 -26.6201 97.5928 -34.7783c2.37793 -2.1875 3.86914 -5.3252 3.86914 -8.80762
c0 -2.39746 -0.717773 -4.64258 -1.93359 -6.51465l-18.1543 -28.1133c-3.8418 -5.9502 -11.9668 -7.28223 -17.499 -2.9209c-8.5957 6.77637 -31.8145 22.5381 -61.708 22.5381c-48.3037 0 -77.916 -35.3301 -77.916 -80.082c0 -41.5889 26.8877 -83.6924 78.2764 -83.6924
c32.6572 0 56.8428 19.0391 65.7266 27.2256c5.26953 4.85645 13.5957 4.03906 17.8193 -1.73828l19.8652 -27.1699c1.45996 -1.98145 2.32422 -4.42969 2.32422 -7.07715c0 -3.28809 -1.32422 -6.2793 -3.47656 -8.44043z" />
<glyph glyph-name="closed-captioning" unicode="&#xf20a;"
d="M464 384c26.5 0 48 -21.5 48 -48v-288c0 -26.5 -21.5 -48 -48 -48h-416c-26.5 0 -48 21.5 -48 48v288c0 26.5 21.5 48 48 48h416zM458 48c3.2998 0 6 2.7002 6 6v276c0 3.2998 -2.7002 6 -6 6h-404c-3.2998 0 -6 -2.7002 -6 -6v-276c0 -3.2998 2.7002 -6 6 -6h404z
M246.9 133.7c1.69922 -2.40039 1.5 -5.60059 -0.5 -7.7002c-53.6006 -56.7998 -172.801 -32.0996 -172.801 67.9004c0 97.2998 121.7 119.5 172.5 70.0996c2.10059 -2 2.5 -3.2002 1 -5.7002l-17.5 -30.5c-1.89941 -3.09961 -6.19922 -4 -9.09961 -1.7002
c-40.7998 32 -94.5996 14.9004 -94.5996 -31.1992c0 -48 51 -70.5 92.1992 -32.6006c2.80078 2.5 7.10059 2.10059 9.2002 -0.899414zM437.3 133.7c1.7002 -2.40039 1.5 -5.60059 -0.5 -7.7002c-53.5996 -56.9004 -172.8 -32.0996 -172.8 67.9004
c0 97.2998 121.7 119.5 172.5 70.0996c2.09961 -2 2.5 -3.2002 1 -5.7002l-17.5 -30.5c-1.90039 -3.09961 -6.2002 -4 -9.09961 -1.7002c-40.8008 32 -94.6006 14.9004 -94.6006 -31.1992c0 -48 51 -70.5 92.2002 -32.6006c2.7998 2.5 7.09961 2.10059 9.2002 -0.899414z
" />
<glyph glyph-name="object-group" unicode="&#xf247;"
d="M500 320h-12v-256h12c6.62695 0 12 -5.37305 12 -12v-72c0 -6.62695 -5.37305 -12 -12 -12h-72c-6.62695 0 -12 5.37305 -12 12v12h-320v-12c0 -6.62695 -5.37305 -12 -12 -12h-72c-6.62695 0 -12 5.37305 -12 12v72c0 6.62695 5.37305 12 12 12h12v256h-12
c-6.62695 0 -12 5.37305 -12 12v72c0 6.62695 5.37305 12 12 12h72c6.62695 0 12 -5.37305 12 -12v-12h320v12c0 6.62695 5.37305 12 12 12h72c6.62695 0 12 -5.37305 12 -12v-72c0 -6.62695 -5.37305 -12 -12 -12zM448 384v-32h32v32h-32zM32 384v-32h32v32h-32zM64 0v32
h-32v-32h32zM480 0v32h-32v-32h32zM440 64v256h-12c-6.62695 0 -12 5.37305 -12 12v12h-320v-12c0 -6.62695 -5.37305 -12 -12 -12h-12v-256h12c6.62695 0 12 -5.37305 12 -12v-12h320v12c0 6.62695 5.37305 12 12 12h12zM404 256c6.62695 0 12 -5.37207 12 -12v-168
c0 -6.62793 -5.37305 -12 -12 -12h-200c-6.62695 0 -12 5.37207 -12 12v52h-84c-6.62695 0 -12 5.37207 -12 12v168c0 6.62793 5.37305 12 12 12h200c6.62695 0 12 -5.37207 12 -12v-52h84zM136 280v-112h144v112h-144zM376 104v112h-56v-76
c0 -6.62793 -5.37305 -12 -12 -12h-76v-24h144z" />
<glyph glyph-name="object-ungroup" unicode="&#xf248;" horiz-adv-x="576"
d="M564 224h-12v-160h12c6.62695 0 12 -5.37305 12 -12v-72c0 -6.62695 -5.37305 -12 -12 -12h-72c-6.62695 0 -12 5.37305 -12 12v12h-224v-12c0 -6.62695 -5.37305 -12 -12 -12h-72c-6.62695 0 -12 5.37305 -12 12v72c0 6.62695 5.37305 12 12 12h12v24h-88v-12
c0 -6.62695 -5.37305 -12 -12 -12h-72c-6.62695 0 -12 5.37305 -12 12v72c0 6.62695 5.37305 12 12 12h12v160h-12c-6.62695 0 -12 5.37305 -12 12v72c0 6.62695 5.37305 12 12 12h72c6.62695 0 12 -5.37305 12 -12v-12h224v12c0 6.62695 5.37305 12 12 12h72
c6.62695 0 12 -5.37305 12 -12v-72c0 -6.62695 -5.37305 -12 -12 -12h-12v-24h88v12c0 6.62695 5.37305 12 12 12h72c6.62695 0 12 -5.37305 12 -12v-72c0 -6.62695 -5.37305 -12 -12 -12zM352 384v-32h32v32h-32zM352 128v-32h32v32h-32zM64 96v32h-32v-32h32zM64 352v32
h-32v-32h32zM96 136h224v12c0 6.62695 5.37305 12 12 12h12v160h-12c-6.62695 0 -12 5.37305 -12 12v12h-224v-12c0 -6.62695 -5.37305 -12 -12 -12h-12v-160h12c6.62695 0 12 -5.37305 12 -12v-12zM224 0v32h-32v-32h32zM504 64v160h-12c-6.62695 0 -12 5.37305 -12 12v12
h-88v-88h12c6.62695 0 12 -5.37305 12 -12v-72c0 -6.62695 -5.37305 -12 -12 -12h-72c-6.62695 0 -12 5.37305 -12 12v12h-88v-24h12c6.62695 0 12 -5.37305 12 -12v-12h224v12c0 6.62695 5.37305 12 12 12h12zM544 0v32h-32v-32h32zM544 256v32h-32v-32h32z" />
<glyph glyph-name="sticky-note" unicode="&#xf249;" horiz-adv-x="448"
d="M448 99.8936c0 -13.2451 -5.37012 -25.252 -14.0586 -33.9404l-83.8828 -83.8818c-8.68848 -8.68848 -20.6943 -14.0596 -33.9404 -14.0596h-268.118c-26.5098 0 -48 21.4902 -48 48v351.988c0 26.5098 21.4902 48 48 48h352c26.5098 0 48 -21.4902 48 -48v-268.106z
M320 19.8936l76.1182 76.1182h-76.1182v-76.1182zM400 368h-352v-351.988h224v104c0 13.2549 10.7451 24 24 24h104v223.988z" />
<glyph glyph-name="clone" unicode="&#xf24d;"
d="M464 448c26.5098 0 48 -21.4902 48 -48v-320c0 -26.5098 -21.4902 -48 -48 -48h-48v-48c0 -26.5098 -21.4902 -48 -48 -48h-320c-26.5098 0 -48 21.4902 -48 48v320c0 26.5098 21.4902 48 48 48h48v48c0 26.5098 21.4902 48 48 48h320zM362 -16c3.31152 0 6 2.68848 6 6
v42h-224c-26.5098 0 -48 21.4902 -48 48v224h-42c-3.31152 0 -6 -2.68848 -6 -6v-308c0 -3.31152 2.68848 -6 6 -6h308zM458 80c3.31152 0 6 2.68848 6 6v308c0 3.31152 -2.68848 6 -6 6h-308c-3.31152 0 -6 -2.68848 -6 -6v-308c0 -3.31152 2.68848 -6 6 -6h308z" />
<glyph glyph-name="hourglass" unicode="&#xf254;" horiz-adv-x="384"
d="M368 400c0 -80.0996 -31.8984 -165.619 -97.1797 -208c64.9912 -42.1934 97.1797 -127.436 97.1797 -208h4c6.62695 0 12 -5.37305 12 -12v-24c0 -6.62695 -5.37305 -12 -12 -12h-360c-6.62695 0 -12 5.37305 -12 12v24c0 6.62695 5.37305 12 12 12h4
c0 80.0996 31.8994 165.619 97.1797 208c-64.9912 42.1934 -97.1797 127.436 -97.1797 208h-4c-6.62695 0 -12 5.37305 -12 12v24c0 6.62695 5.37305 12 12 12h360c6.62695 0 12 -5.37305 12 -12v-24c0 -6.62695 -5.37305 -12 -12 -12h-4zM64 400
c0 -101.621 57.3066 -184 128 -184s128 82.3799 128 184h-256zM320 -16c0 101.62 -57.3076 184 -128 184s-128 -82.3799 -128 -184h256z" />
<glyph glyph-name="hand-rock" unicode="&#xf255;"
d="M408.864 368.948c48.8213 20.751 103.136 -15.0723 103.136 -67.9111v-114.443c0 -15.3955 -3.08887 -30.3906 -9.18262 -44.5674l-42.835 -99.6562c-4.99707 -11.625 -3.98242 -18.8574 -3.98242 -42.3701c0 -17.6729 -14.3271 -32 -32 -32h-252
c-17.6729 0 -32 14.3271 -32 32c0 27.3301 1.1416 29.2012 -3.11035 32.9033l-97.71 85.0811c-24.8994 21.6797 -39.1797 52.8926 -39.1797 85.6338v56.9531c0 47.4277 44.8457 82.0215 91.0459 71.1807c1.96094 55.751 63.5107 87.8262 110.671 60.8057
c29.1895 31.0713 78.8604 31.4473 108.334 -0.0214844c32.7051 18.6846 76.4121 10.3096 98.8135 -23.5879zM464 186.594v114.445c0 34.29 -52 33.8232 -52 0.676758c0 -8.83594 -7.16309 -16 -16 -16h-7c-8.83691 0 -16 7.16406 -16 16v26.751
c0 34.457 -52 33.707 -52 0.676758v-27.4287c0 -8.83594 -7.16309 -16 -16 -16h-7c-8.83691 0 -16 7.16406 -16 16v40.4658c0 34.3525 -52 33.8115 -52 0.677734v-41.1436c0 -8.83594 -7.16406 -16 -16 -16h-7c-8.83594 0 -16 7.16406 -16 16v26.751
c0 34.4023 -52 33.7744 -52 0.676758v-116.571c0 -8.83105 -7.17773 -15.9961 -16.0078 -15.9961c-4.0166 0 -7.68848 1.48242 -10.499 3.92969l-7 6.09473c-3.37012 2.93457 -5.49316 7.25293 -5.49316 12.0674v41.2275c0 34.2148 -52 33.8857 -52 0.677734v-56.9531
c0 -18.8555 8.27441 -36.874 22.7002 -49.4365l97.71 -85.0801c12.4502 -10.8398 19.5898 -26.4463 19.5898 -42.8164v-10.2861h220v7.07617c0 13.21 2.65332 26.0791 7.88281 38.25l42.835 99.6553c3.37891 7.82715 5.28223 16.501 5.28223 25.5625v0.0498047z" />
<glyph glyph-name="hand-paper" unicode="&#xf256;" horiz-adv-x="448"
d="M372.57 335.359c39.9062 5.63281 75.4297 -25.7393 75.4297 -66.3594v-131.564c-0.00292969 -15.7393 -1.80566 -30.9482 -5.19531 -45.666l-30.1836 -130.958c-3.34668 -14.5234 -16.2783 -24.8125 -31.1816 -24.8125h-222.897
c-10.7539 0 -20.2588 5.28613 -26.0615 13.4316l-119.97 168.415c-21.2441 29.8203 -14.8047 71.3574 14.5498 93.1533c18.7754 13.9395 42.1309 16.2979 62.083 8.87109v126.13c0 44.0547 41.125 75.5439 82.4053 64.9834c23.8926 48.1963 92.3535 50.2471 117.982 0.74707
c42.5186 11.1445 83.0391 -21.9346 83.0391 -65.5469v-10.8242zM399.997 137.437l-0.00195312 131.563c0 24.9492 -36.5703 25.5508 -36.5703 -0.691406v-76.3086c0 -8.83691 -7.16309 -16 -16 -16h-6.85645c-8.83691 0 -16 7.16309 -16 16v154.184
c0 25.501 -36.5703 26.3633 -36.5703 0.691406v-154.875c0 -8.83691 -7.16309 -16 -16 -16h-6.85645c-8.83691 0 -16 7.16309 -16 16v188.309c0 25.501 -36.5703 26.3545 -36.5703 0.691406v-189c0 -8.83691 -7.16309 -16 -16 -16h-6.85645c-8.83691 0 -16 7.16309 -16 16
v153.309c0 25.501 -36.5713 26.3359 -36.5713 0.691406v-206.494c0 -15.5703 -20.0352 -21.9092 -29.0303 -9.2832l-27.1279 38.0791c-14.3711 20.1709 -43.833 -2.33496 -29.3945 -22.6045l115.196 -161.697h201.92l27.3252 118.551
c2.63086 11.417 3.96484 23.1553 3.96484 34.8857z" />
<glyph glyph-name="hand-scissors" unicode="&#xf257;"
d="M256 -32c-44.9561 0 -77.3428 43.2627 -64.0244 85.8535c-21.6484 13.71 -34.0156 38.7617 -30.3408 65.0068h-87.6348c-40.8037 0 -74 32.8105 -74 73.1406c0 40.3291 33.1963 73.1396 74 73.1396l94 -9.14062l-78.8496 18.6787
c-38.3076 14.7422 -57.04 57.4707 -41.9424 95.1123c15.0303 37.4736 57.7549 55.7803 95.6416 41.2012l144.929 -55.7568c24.9551 30.5566 57.8086 43.9932 92.2178 24.7324l97.999 -54.8525c20.9746 -11.7393 34.0049 -33.8457 34.0049 -57.6904v-205.702
c0 -30.7422 -21.4404 -57.5576 -51.7979 -64.5537l-118.999 -27.4268c-4.97168 -1.14648 -10.0889 -1.72949 -15.2031 -1.72949zM256 16.0127l70 -0.000976562c1.52441 0 2.99707 0.174805 4.42285 0.501953l119.001 27.4277
c8.58203 1.97754 14.5762 9.29102 14.5762 17.7812v205.701c0 6.4873 -3.62109 12.542 -9.44922 15.8047l-98 54.8545c-8.13965 4.55566 -18.668 2.61914 -24.4873 -4.50781l-21.7646 -26.6475c-2.93457 -3.59375 -7.40332 -5.87305 -12.4004 -5.87305
c-2.02246 0 -3.95703 0.375977 -5.73828 1.06152l-166.549 64.0908c-32.6543 12.5664 -50.7744 -34.5771 -19.2227 -46.7168l155.357 -59.7852c6 -2.30859 10.2539 -8.12402 10.2539 -14.9326v-11.6328c0 -8.83691 -7.16309 -16 -16 -16h-182
c-34.375 0 -34.4297 -50.2803 0 -50.2803h182c8.83691 0 16 -7.16309 16 -16v-6.85645c0 -8.83691 -7.16309 -16 -16 -16h-28c-25.1221 0 -25.1592 -36.5674 0 -36.5674h28c8.83691 0 16 -7.16211 16 -16v-6.85547c0 -8.83691 -7.16309 -16 -16 -16
c-25.1201 0 -25.1602 -36.5674 0 -36.5674z" />
<glyph glyph-name="hand-lizard" unicode="&#xf258;" horiz-adv-x="576"
d="M556.686 157.458c12.6357 -19.4863 19.3145 -42.0615 19.3145 -65.2871v-124.171h-224v71.582l-99.751 38.7871c-2.7832 1.08203 -5.70996 1.63086 -8.69727 1.63086h-131.552c-30.8789 0 -56 25.1211 -56 56c0 48.5234 39.4766 88 88 88h113.709l18.333 48h-196.042
c-44.1123 0 -80 35.8877 -80 80v8c0 30.8779 25.1211 56 56 56h293.917c24.5 0 47.084 -12.2725 60.4111 -32.8291zM528 16v76.1709c0 0.0166016 -0.0439453 0.106445 -0.0439453 0.12207c0 14.3945 -4.24219 27.8057 -11.5439 39.0498l-146.358 225.715
c-4.44336 6.85254 -11.9707 10.9424 -20.1367 10.9424h-293.917c-4.41113 0 -8 -3.58887 -8 -8v-8c0 -17.6445 14.3555 -32 32 -32h213.471c25.2021 0 42.626 -25.293 33.6299 -48.8457l-24.5518 -64.2812c-7.05371 -18.4658 -25.0732 -30.873 -44.8398 -30.873h-113.709
c-22.0557 0 -40 -17.9443 -40 -40c0 -4.41113 3.58887 -8 8 -8h131.552c0.0175781 0 0.0712891 -0.0273438 0.0888672 -0.0273438c9.16992 0 17.9404 -1.72461 26.0039 -4.86621l99.752 -38.7881c18.5898 -7.22852 30.6035 -24.7881 30.6035 -44.7363v-23.582h128z" />
<glyph glyph-name="hand-spock" unicode="&#xf259;"
d="M501.03 331.824c6.92773 -11.1826 10.9697 -24.4053 10.9697 -38.5146c0 -5.92676 -0.706055 -11.6885 -2.03809 -17.208l-57.623 -241.963c-13.2236 -56.1904 -63.707 -98.1387 -123.908 -98.1387h-0.352539h-107.455
c-0.0761719 0 -0.193359 0.00195312 -0.270508 0.00195312c-40.9248 0 -78.1475 15.9814 -105.761 42.0391l-91.3652 85.9766c-14.3076 13.4434 -23.2246 32.5547 -23.2246 53.7168c0 19.5254 7.61035 37.2861 20.0254 50.4766
c5.31836 5.66406 29.875 29.3926 68.1152 21.8477l-24.3594 82.1973c-1.97363 6.64844 -2.97656 13.6836 -2.97656 20.9688c0 38.6953 29.8926 70.4639 67.8262 73.4531c-0.246094 2.45117 -0.34082 4.85547 -0.34082 7.37207c0 34.4199 23.585 63.376 55.4619 71.5752
c43.248 10.9785 80.5645 -17.7012 89.6602 -53.0723l13.6836 -53.207l4.64648 22.6602c6.99023 33.5186 36.6826 58.8037 72.2373 58.916c8.73438 0 56.625 -3.26953 70.7383 -54.0801c15.0664 0.710938 46.9199 -3.50977 66.3105 -35.0176zM463.271 287.219
c7.86914 32.9844 -42.1211 45.2695 -50.0859 11.9219l-24.8008 -104.146c-4.38867 -18.4141 -31.7783 -11.8926 -28.0557 6.2168l28.5479 139.166c7.39844 36.0703 -43.3076 45.0703 -50.1182 11.9629l-31.791 -154.971
c-3.54883 -17.3086 -28.2832 -18.0469 -32.7109 -0.804688l-47.3262 184.035c-8.43359 32.8105 -58.3691 20.2676 -49.8652 -12.8359l42.4414 -165.039c4.81641 -18.7207 -23.3711 -26.9121 -28.9648 -8.00781l-31.3438 105.779
c-9.6875 32.6465 -59.1191 18.2578 -49.3867 -14.625l36.0137 -121.539c6.59375 -22.2441 10.1777 -45.7803 10.1777 -70.1523c0 -6.54297 -8.05664 -10.9355 -13.4824 -5.82617l-51.123 48.1074c-24.7852 23.4082 -60.0527 -14.1875 -35.2793 -37.4902l91.3691 -85.9805
c19.0469 -17.9736 44.75 -28.998 72.9795 -28.998h0.157227h107.455c0.0732422 0 0.138672 0.0429688 0.212891 0.0429688c37.5791 0 69.1016 26.1416 77.3564 61.2168z" />
<glyph glyph-name="hand-pointer" unicode="&#xf25a;" horiz-adv-x="448"
d="M358.182 268.639c43.1934 16.6348 89.8184 -15.7949 89.8184 -62.6387v-84c-0.000976562 -5.24023 -0.600586 -10.3037 -1.72754 -15.2041l-27.4297 -118.999c-6.98242 -30.2969 -33.7549 -51.7969 -64.5566 -51.7969h-178.286
c-21.2588 0 -41.3682 10.4102 -53.791 27.8457l-109.699 154.001c-21.2432 29.8193 -14.8047 71.3574 14.5498 93.1523c18.8115 13.9658 42.1748 16.2822 62.083 8.87207v161.129c0 36.9443 29.7363 67 66.2861 67s66.2861 -30.0557 66.2861 -67v-73.6338
c20.4131 2.85742 41.4678 -3.94238 56.5947 -19.6289c27.1934 12.8467 60.3799 5.66992 79.8721 -19.0986zM80.9854 168.303c-14.4004 20.2119 -43.8008 -2.38281 -29.3945 -22.6055l109.712 -154c3.43457 -4.81934 8.92871 -7.69727 14.6973 -7.69727h178.285
c8.49219 0 15.8037 5.99414 17.7822 14.5762l27.4297 119.001c0.333008 1.44629 0.501953 2.93457 0.501953 4.42285v84c0 25.1602 -36.5713 25.1211 -36.5713 0c0 -8.83594 -7.16309 -16 -16 -16h-6.85645c-8.83691 0 -16 7.16406 -16 16v21
c0 25.1602 -36.5713 25.1201 -36.5713 0v-21c0 -8.83594 -7.16309 -16 -16 -16h-6.85938c-8.83691 0 -16 7.16406 -16 16v35c0 25.1602 -36.5703 25.1201 -36.5703 0v-35c0 -8.83594 -7.16309 -16 -16 -16h-6.85742c-8.83691 0 -16 7.16406 -16 16v175
c0 25.1602 -36.5713 25.1201 -36.5713 0v-241.493c0 -15.5703 -20.0352 -21.9092 -29.0303 -9.2832zM176.143 48v96c0 8.83691 6.26855 16 14 16h6c7.73242 0 14 -7.16309 14 -16v-96c0 -8.83691 -6.26758 -16 -14 -16h-6c-7.73242 0 -14 7.16309 -14 16zM251.571 48v96
c0 8.83691 6.26758 16 14 16h6c7.73145 0 14 -7.16309 14 -16v-96c0 -8.83691 -6.26855 -16 -14 -16h-6c-7.73242 0 -14 7.16309 -14 16zM327 48v96c0 8.83691 6.26758 16 14 16h6c7.73242 0 14 -7.16309 14 -16v-96c0 -8.83691 -6.26758 -16 -14 -16h-6
c-7.73242 0 -14 7.16309 -14 16z" />
<glyph glyph-name="hand-peace" unicode="&#xf25b;" horiz-adv-x="448"
d="M362.146 256.024c42.5908 13.3184 85.8535 -19.0684 85.8535 -64.0244l-0.0117188 -70.001c-0.000976562 -5.24023 -0.600586 -10.3027 -1.72949 -15.2031l-27.4268 -118.999c-6.99707 -30.3564 -33.8105 -51.7969 -64.5547 -51.7969h-205.702
c-23.8447 0 -45.9502 13.0303 -57.6904 34.0059l-54.8525 97.999c-19.2607 34.4092 -5.82422 67.2617 24.7324 92.2178l-55.7568 144.928c-14.5791 37.8867 3.72754 80.6113 41.2012 95.6416c37.6406 15.0977 80.3691 -3.63477 95.1123 -41.9424l18.6787 -78.8496
l-9.14062 94c0 40.8037 32.8096 74 73.1396 74s73.1406 -33.1963 73.1406 -74v-87.6348c26.2451 3.6748 51.2959 -8.69238 65.0068 -30.3408zM399.987 122l-0.000976562 70c0 25.1602 -36.5674 25.1201 -36.5674 0c0 -8.83691 -7.16309 -16 -16 -16h-6.85547
c-8.83789 0 -16 7.16309 -16 16v28c0 25.1592 -36.5674 25.1221 -36.5674 0v-28c0 -8.83691 -7.16309 -16 -16 -16h-6.85645c-8.83691 0 -16 7.16309 -16 16v182c0 34.4297 -50.2803 34.375 -50.2803 0v-182c0 -8.83691 -7.16309 -16 -16 -16h-11.6328
c-6.80859 0 -12.624 4.25391 -14.9326 10.2539l-59.7842 155.357c-12.1396 31.5518 -59.2842 13.4326 -46.7168 -19.2227l64.0898 -166.549c0.685547 -1.78125 1.07812 -3.71875 1.07812 -5.74121c0 -4.99707 -2.2959 -9.46289 -5.88965 -12.3975l-26.6475 -21.7646
c-7.12695 -5.81934 -9.06445 -16.3467 -4.50781 -24.4873l54.8535 -98c3.26367 -5.82812 9.31934 -9.44922 15.8057 -9.44922h205.701c8.49121 0 15.8037 5.99414 17.7812 14.5762l27.4277 119.001c0.333008 1.44629 0.501953 2.93457 0.501953 4.42285z" />
<glyph glyph-name="registered" unicode="&#xf25d;"
d="M256 440c136.967 0 248 -111.033 248 -248s-111.033 -248 -248 -248s-248 111.033 -248 248s111.033 248 248 248zM256 -8c110.549 0 200 89.4678 200 200c0 110.549 -89.4678 200 -200 200c-110.549 0 -200 -89.4688 -200 -200c0 -110.549 89.4678 -200 200 -200z
M366.442 73.791c4.40332 -7.99219 -1.37012 -17.791 -10.5107 -17.791h-42.8096c-0.00488281 0 -0.000976562 -0.0126953 -0.00585938 -0.0126953c-4.58594 0 -8.57422 2.58301 -10.5869 6.37305l-47.5156 89.3027h-31.958v-83.6631c0 -6.61719 -5.38281 -12 -12 -12
h-38.5674c-6.61719 0 -12 5.38281 -12 12v248.304c0 6.61719 5.38281 12 12 12h78.667c71.251 0 101.498 -32.749 101.498 -85.252c0 -31.6123 -15.2148 -59.2969 -39.4824 -73.1758c3.02148 -4.61719 0.225586 0.199219 53.2715 -96.085zM256.933 208.094
c20.9131 0 32.4307 11.5186 32.4316 32.4316c0 19.5752 -6.5127 31.709 -38.9297 31.709h-27.377v-64.1406h33.875z" />
<glyph glyph-name="calendar-plus" unicode="&#xf271;" horiz-adv-x="448"
d="M336 156v-24c0 -6.59961 -5.40039 -12 -12 -12h-76v-76c0 -6.59961 -5.40039 -12 -12 -12h-24c-6.59961 0 -12 5.40039 -12 12v76h-76c-6.59961 0 -12 5.40039 -12 12v24c0 6.59961 5.40039 12 12 12h76v76c0 6.59961 5.40039 12 12 12h24c6.59961 0 12 -5.40039 12 -12
v-76h76c6.59961 0 12 -5.40039 12 -12zM448 336v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h48v52c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-52h128v52c0 6.59961 5.40039 12 12 12h40
c6.59961 0 12 -5.40039 12 -12v-52h48c26.5 0 48 -21.5 48 -48zM400 -10v298h-352v-298c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="calendar-minus" unicode="&#xf272;" horiz-adv-x="448"
d="M124 120c-6.59961 0 -12 5.40039 -12 12v24c0 6.59961 5.40039 12 12 12h200c6.59961 0 12 -5.40039 12 -12v-24c0 -6.59961 -5.40039 -12 -12 -12h-200zM448 336v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h48v52
c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-52h128v52c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-52h48c26.5 0 48 -21.5 48 -48zM400 -10v298h-352v-298c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="calendar-times" unicode="&#xf273;" horiz-adv-x="448"
d="M311.7 73.2998l-17 -17c-4.7002 -4.7002 -12.2998 -4.7002 -17 0l-53.7002 53.7998l-53.7002 -53.6992c-4.7002 -4.7002 -12.2998 -4.7002 -17 0l-17 17c-4.7002 4.69922 -4.7002 12.2998 0 17l53.7002 53.6992l-53.7002 53.7002c-4.7002 4.7002 -4.7002 12.2998 0 17
l17 17c4.7002 4.7002 12.2998 4.7002 17 0l53.7002 -53.7002l53.7002 53.7002c4.7002 4.7002 12.2998 4.7002 17 0l17 -17c4.7002 -4.7002 4.7002 -12.2998 0 -17l-53.7998 -53.7998l53.6992 -53.7002c4.80078 -4.7002 4.80078 -12.2998 0.100586 -17zM448 336v-352
c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h48v52c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-52h128v52c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-52h48c26.5 0 48 -21.5 48 -48zM400 -10
v298h-352v-298c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="calendar-check" unicode="&#xf274;" horiz-adv-x="448"
d="M400 384c26.5098 0 48 -21.4902 48 -48v-352c0 -26.5098 -21.4902 -48 -48 -48h-352c-26.5098 0 -48 21.4902 -48 48v352c0 26.5098 21.4902 48 48 48h48v52c0 6.62695 5.37305 12 12 12h40c6.62695 0 12 -5.37305 12 -12v-52h128v52c0 6.62695 5.37305 12 12 12h40
c6.62695 0 12 -5.37305 12 -12v-52h48zM394 -16c3.31152 0 6 2.68848 6 6v298h-352v-298c0 -3.31152 2.68848 -6 6 -6h340zM341.151 184.65l-142.31 -141.169c-4.70508 -4.66699 -12.3027 -4.6377 -16.9707 0.0673828l-75.0908 75.6992
c-4.66699 4.70508 -4.6377 12.3027 0.0673828 16.9707l22.7197 22.5361c4.70508 4.66699 12.3027 4.63672 16.9697 -0.0693359l44.1035 -44.4609l111.072 110.182c4.70508 4.66699 12.3027 4.63672 16.9707 -0.0683594l22.5361 -22.7178
c4.66699 -4.70508 4.63672 -12.3027 -0.0683594 -16.9697z" />
<glyph glyph-name="map" unicode="&#xf279;" horiz-adv-x="576"
d="M560.02 416c8.4502 0 15.9805 -6.83008 15.9805 -16.0195v-346.32c0 -13.4707 -8.32422 -24.9951 -20.1201 -29.71l-151.83 -52.8105c-6.23242 -2.02832 -12.9023 -3.12305 -19.8076 -3.12305c-7.07324 0 -13.8799 1.15039 -20.2422 3.27344l-172 60.71l-170.05 -62.8398
c-1.99023 -0.790039 -4 -1.16016 -5.95996 -1.16016c-8.45996 0 -15.9902 6.83008 -15.9902 16.0195v346.32c0.00292969 13.4697 8.32617 24.9932 20.1201 29.71l151.83 52.8105c6.43945 2.08984 13.1201 3.13965 19.8096 3.13965
c7.06641 -0.00292969 13.8789 -1.16602 20.2402 -3.28027l172 -60.7197h0.00976562l170.05 62.8398c1.98047 0.790039 4 1.16016 5.95996 1.16016zM224 357.58v-285.97l128 -45.1904v285.97zM48 29.9502l127.36 47.0801l0.639648 0.229492v286.2l-128 -44.5303v-288.979z
M528 65.0801v288.97l-127.36 -47.0693l-0.639648 -0.240234v-286.19z" />
<glyph glyph-name="comment-alt" unicode="&#xf27a;"
d="M448 448c35.2998 0 64 -28.7002 64 -64v-288c0 -35.2998 -28.7002 -64 -64 -64h-144l-124.9 -93.5996c-2.19922 -1.7002 -4.69922 -2.40039 -7.09961 -2.40039c-6.2002 0 -12 4.90039 -12 12v84h-96c-35.2998 0 -64 28.7002 -64 64v288c0 35.2998 28.7002 64 64 64h384z
M464 96v288c0 8.7998 -7.2002 16 -16 16h-384c-8.7998 0 -16 -7.2002 -16 -16v-288c0 -8.7998 7.2002 -16 16 -16h144v-60l67.2002 50.4004l12.7998 9.59961h160c8.7998 0 16 7.2002 16 16z" />
<glyph glyph-name="pause-circle" unicode="&#xf28b;"
d="M256 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM256 -8c110.5 0 200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200s89.5 -200 200 -200zM352 272v-160c0 -8.7998 -7.2002 -16 -16 -16h-48
c-8.7998 0 -16 7.2002 -16 16v160c0 8.7998 7.2002 16 16 16h48c8.7998 0 16 -7.2002 16 -16zM240 272v-160c0 -8.7998 -7.2002 -16 -16 -16h-48c-8.7998 0 -16 7.2002 -16 16v160c0 8.7998 7.2002 16 16 16h48c8.7998 0 16 -7.2002 16 -16z" />
<glyph glyph-name="stop-circle" unicode="&#xf28d;"
d="M504 192c0 -137 -111 -248 -248 -248s-248 111 -248 248s111 248 248 248s248 -111 248 -248zM56 192c0 -110.5 89.5 -200 200 -200s200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200zM352 272v-160c0 -8.7998 -7.2002 -16 -16 -16h-160
c-8.7998 0 -16 7.2002 -16 16v160c0 8.7998 7.2002 16 16 16h160c8.7998 0 16 -7.2002 16 -16z" />
<glyph glyph-name="handshake" unicode="&#xf2b5;" horiz-adv-x="640"
d="M519.2 320.1h120.8v-255.699h-64c-17.5 0 -31.7998 14.1992 -31.9004 31.6992h-57.8994c-1.7998 -8.19922 -5.2998 -16.0996 -10.9004 -23l-26.2002 -32.2998c-15.7998 -19.3994 -41.8994 -25.5 -64 -16.7998c-13.5 -16.5996 -30.5996 -24 -48.7998 -24
c-15.0996 0 -28.5996 5.09961 -41.0996 15.9004c-31.7998 -21.9004 -74.7002 -21.3008 -105.601 3.7998l-84.5996 76.3994h-9.09961c-0.100586 -17.5 -14.3008 -31.6992 -31.9004 -31.6992h-64v255.699h118l47.5996 47.6006c10.5 10.3994 24.8008 16.2998 39.6006 16.2998
h226.8c15.4326 0 29.4326 -6.22168 39.5996 -16.2998zM48 96.4004c8.7998 0 16 7.09961 16 16c0 8.7998 -7.2002 16 -16 16s-16 -7.2002 -16 -16c0 -8.80078 7.2002 -16 16 -16zM438 103.3c2.7002 3.40039 2.2002 8.5 -1.2002 11.2998l-108.2 87.8008l-8.19922 -7.5
c-40.3008 -36.8008 -86.7002 -11.8008 -101.5 4.39941c-26.7002 29 -25 74.4004 4.39941 101.3l38.7002 35.5h-56.7002c-2 -0.799805 -3.7002 -1.5 -5.7002 -2.2998l-61.6992 -61.5996h-41.9004v-128.101h27.7002l97.2998 -88
c16.0996 -13.0996 41.4004 -10.5 55.2998 6.60059l15.6006 19.2002l36.7998 -31.5c3 -2.40039 12 -4.90039 18 2.39941l30 36.5l23.8994 -19.3994c3.5 -2.80078 8.5 -2.2002 11.3008 1.19922zM544 144.1v128h-44.7002l-61.7002 61.6006
c-1.39941 1.5 -3.39941 2.2998 -5.5 2.2998l-83.6992 -0.200195c-10 0 -19.6006 -3.7002 -27 -10.5l-65.6006 -60.0996c-9.7002 -8.7998 -10.5 -24 -1.2002 -33.9004c8.90039 -9.39941 25.1006 -8.7002 34.6006 0l55.2002 50.6006c6.5 5.89941 16.5996 5.5 22.5996 -1
l10.9004 -11.7002c6 -6.5 5.5 -16.6006 -1 -22.6006l-12.5 -11.3994l102.699 -83.4004c2.80078 -2.2998 5.40039 -4.89941 7.7002 -7.7002h69.2002zM592 96.4004c8.7998 0 16 7.09961 16 16c0 8.7998 -7.2002 16 -16 16s-16 -7.2002 -16 -16c0 -8.80078 7.2002 -16 16 -16z
" />
<glyph glyph-name="envelope-open" unicode="&#xf2b6;"
d="M494.586 283.484c10.6523 -8.80762 17.4141 -22.1064 17.4141 -36.9932v-262.491c0 -26.5098 -21.4902 -48 -48 -48h-416c-26.5098 0 -48 21.4902 -48 48v262.515c0 14.9355 6.80469 28.2705 17.5146 37.0771c4.08008 3.35449 110.688 89.0996 135.15 108.549
c22.6992 18.1426 60.1299 55.8594 103.335 55.8594c43.4365 0 81.2314 -38.1914 103.335 -55.8594c23.5283 -18.707 130.554 -104.773 135.251 -108.656zM464 -10v253.632c0 0.00195312 0.00390625 0.000976562 0.00390625 0.00292969
c0 1.88184 -0.869141 3.56152 -2.22754 4.66016c-15.8633 12.8232 -108.793 87.5752 -132.366 106.316c-17.5527 14.0195 -49.7168 45.3887 -73.4102 45.3887c-23.6016 0 -55.2451 -30.8799 -73.4102 -45.3887c-23.5713 -18.7393 -116.494 -93.4795 -132.364 -106.293
c-1.40918 -1.13965 -2.22559 -2.85254 -2.22559 -4.66504v-253.653c0 -3.31152 2.68848 -6 6 -6h404c3.31152 0 6 2.68848 6 6zM432.009 177.704c4.24902 -5.15918 3.46484 -12.7949 -1.74512 -16.9814c-28.9746 -23.2822 -59.2734 -47.5967 -70.9287 -56.8623
c-22.6992 -18.1436 -60.1299 -55.8604 -103.335 -55.8604c-43.4521 0 -81.2871 38.2373 -103.335 55.8604c-11.2793 8.9668 -41.7441 33.4131 -70.9268 56.8643c-5.20996 4.1875 -5.99316 11.8223 -1.74512 16.9814l15.2578 18.5283
c4.17773 5.07227 11.6572 5.84277 16.7793 1.72559c28.6182 -23.001 58.5654 -47.0352 70.5596 -56.5713c17.5527 -14.0195 49.7168 -45.3887 73.4102 -45.3887c23.6016 0 55.2461 30.8799 73.4102 45.3887c11.9941 9.53516 41.9434 33.5703 70.5625 56.5684
c5.12207 4.11621 12.6016 3.3457 16.7783 -1.72656z" />
<glyph glyph-name="address-book" unicode="&#xf2b9;" horiz-adv-x="448"
d="M436 288h-20v-64h20c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12h-20v-64h20c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12h-20v-48c0 -26.5 -21.5 -48 -48 -48h-320c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48
h320c26.5 0 48 -21.5 48 -48v-48h20c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12zM368 -16v416h-320v-416h320zM208 192c-35.2998 0 -64 28.7002 -64 64s28.7002 64 64 64s64 -28.7002 64 -64s-28.7002 -64 -64 -64zM118.4 64
c-12.4004 0 -22.4004 8.59961 -22.4004 19.2002v19.2002c0 31.7998 30.0996 57.5996 67.2002 57.5996c11.3994 0 17.8994 -8 44.7998 -8c26.0996 0 34 8 44.7998 8c37.1006 0 67.2002 -25.7998 67.2002 -57.5996v-19.2002c0 -10.6006 -10 -19.2002 -22.4004 -19.2002
h-179.199z" />
<glyph glyph-name="address-card" unicode="&#xf2bb;" horiz-adv-x="576"
d="M528 416c26.5 0 48 -21.5 48 -48v-352c0 -26.5 -21.5 -48 -48 -48h-480c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h480zM528 16v352h-480v-352h480zM208 192c-35.2998 0 -64 28.7002 -64 64s28.7002 64 64 64s64 -28.7002 64 -64s-28.7002 -64 -64 -64z
M118.4 64c-12.4004 0 -22.4004 8.59961 -22.4004 19.2002v19.2002c0 31.7998 30.0996 57.5996 67.2002 57.5996c11.3994 0 17.8994 -8 44.7998 -8c26.0996 0 34 8 44.7998 8c37.1006 0 67.2002 -25.7998 67.2002 -57.5996v-19.2002
c0 -10.6006 -10 -19.2002 -22.4004 -19.2002h-179.199zM360 128c-4.40039 0 -8 3.59961 -8 8v16c0 4.40039 3.59961 8 8 8h112c4.40039 0 8 -3.59961 8 -8v-16c0 -4.40039 -3.59961 -8 -8 -8h-112zM360 192c-4.40039 0 -8 3.59961 -8 8v16c0 4.40039 3.59961 8 8 8h112
c4.40039 0 8 -3.59961 8 -8v-16c0 -4.40039 -3.59961 -8 -8 -8h-112zM360 256c-4.40039 0 -8 3.59961 -8 8v16c0 4.40039 3.59961 8 8 8h112c4.40039 0 8 -3.59961 8 -8v-16c0 -4.40039 -3.59961 -8 -8 -8h-112z" />
<glyph glyph-name="user-circle" unicode="&#xf2bd;" horiz-adv-x="496"
d="M248 344c53 0 96 -43 96 -96s-43 -96 -96 -96s-96 43 -96 96s43 96 96 96zM248 200c26.5 0 48 21.5 48 48s-21.5 48 -48 48s-48 -21.5 -48 -48s21.5 -48 48 -48zM248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8
c49.7002 0 95.0996 18.2998 130.1 48.4004c-14.8994 23 -40.3994 38.5 -69.5996 39.5c-20.7998 -6.5 -40.5996 -9.60059 -60.5 -9.60059s-39.7002 3.2002 -60.5 9.60059c-29.2002 -0.900391 -54.7002 -16.5 -69.5996 -39.5c35 -30.1006 80.3994 -48.4004 130.1 -48.4004z
M410.7 76.0996c23.3994 32.7002 37.2998 72.7002 37.2998 115.9c0 110.3 -89.7002 200 -200 200s-200 -89.7002 -200 -200c0 -43.2002 13.9004 -83.2002 37.2998 -115.9c24.5 31.4004 62.2002 51.9004 105.101 51.9004c10.1992 0 26.0996 -9.59961 57.5996 -9.59961
c31.5996 0 47.4004 9.59961 57.5996 9.59961c43 0 80.7002 -20.5 105.101 -51.9004z" />
<glyph glyph-name="id-badge" unicode="&#xf2c1;" horiz-adv-x="384"
d="M336 448c26.5 0 48 -21.5 48 -48v-416c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48h288zM336 -16v416h-288v-416h288zM144 336c-8.7998 0 -16 7.2002 -16 16s7.2002 16 16 16h96c8.7998 0 16 -7.2002 16 -16s-7.2002 -16 -16 -16
h-96zM192 160c-35.2998 0 -64 28.7002 -64 64s28.7002 64 64 64s64 -28.7002 64 -64s-28.7002 -64 -64 -64zM102.4 32c-12.4004 0 -22.4004 8.59961 -22.4004 19.2002v19.2002c0 31.7998 30.0996 57.5996 67.2002 57.5996c11.3994 0 17.8994 -8 44.7998 -8
c26.0996 0 34 8 44.7998 8c37.1006 0 67.2002 -25.7998 67.2002 -57.5996v-19.2002c0 -10.6006 -10 -19.2002 -22.4004 -19.2002h-179.199z" />
<glyph glyph-name="id-card" unicode="&#xf2c2;" horiz-adv-x="576"
d="M528 416c26.5 0 48 -21.5 48 -48v-352c0 -26.5 -21.5 -48 -48 -48h-480c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h480zM528 16v288h-480v-288h32.7998c-1 4.5 -0.799805 -3.59961 -0.799805 22.4004c0 31.7998 30.0996 57.5996 67.2002 57.5996
c11.3994 0 17.8994 -8 44.7998 -8c26.0996 0 34 8 44.7998 8c37.1006 0 67.2002 -25.7998 67.2002 -57.5996c0 -26 0.0996094 -17.9004 -0.799805 -22.4004h224.8zM360 96c-4.40039 0 -8 3.59961 -8 8v16c0 4.40039 3.59961 8 8 8h112c4.40039 0 8 -3.59961 8 -8v-16
c0 -4.40039 -3.59961 -8 -8 -8h-112zM360 160c-4.40039 0 -8 3.59961 -8 8v16c0 4.40039 3.59961 8 8 8h112c4.40039 0 8 -3.59961 8 -8v-16c0 -4.40039 -3.59961 -8 -8 -8h-112zM360 224c-4.40039 0 -8 3.59961 -8 8v16c0 4.40039 3.59961 8 8 8h112
c4.40039 0 8 -3.59961 8 -8v-16c0 -4.40039 -3.59961 -8 -8 -8h-112zM192 128c-35.2998 0 -64 28.7002 -64 64s28.7002 64 64 64s64 -28.7002 64 -64s-28.7002 -64 -64 -64z" />
<glyph glyph-name="window-maximize" unicode="&#xf2d0;"
d="M464 416c26.5 0 48 -21.5 48 -48v-352c0 -26.5 -21.5 -48 -48 -48h-416c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h416zM464 22v234h-416v-234c0 -3.2998 2.7002 -6 6 -6h404c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="window-minimize" unicode="&#xf2d1;"
d="M480 -32h-448c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32h448c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32z" />
<glyph glyph-name="window-restore" unicode="&#xf2d2;"
d="M464 448c26.5 0 48 -21.5 48 -48v-320c0 -26.5 -21.5 -48 -48 -48h-48v-48c0 -26.5 -21.5 -48 -48 -48h-320c-26.5 0 -48 21.5 -48 48v320c0 26.5 21.5 48 48 48h48v48c0 26.5 21.5 48 48 48h320zM368 -16v208h-320v-208h320zM464 80v320h-320v-48h224
c26.5 0 48 -21.5 48 -48v-224h48z" />
<glyph glyph-name="snowflake" unicode="&#xf2dc;" horiz-adv-x="448"
d="M440.1 92.7998c7.60059 -4.39941 10.1006 -14.2002 5.5 -21.7002l-7.89941 -13.8994c-4.40039 -7.7002 -14 -10.2998 -21.5 -5.90039l-39.2002 23l9.09961 -34.7002c2.30078 -8.5 -2.69922 -17.2998 -11.0996 -19.5996l-15.2002 -4.09961
c-8.39941 -2.30078 -17.0996 2.7998 -19.2998 11.2998l-21.2998 81l-71.9004 42.2002v-84.5l58.2998 -59.3008c6.10059 -6.19922 6.10059 -16.3994 0 -22.5996l-11.0996 -11.2998c-6.09961 -6.2002 -16.0996 -6.2002 -22.2002 0l-24.8994 25.3994v-46.0996
c0 -8.7998 -7 -16 -15.7002 -16h-15.7002c-8.7002 0 -15.7002 7.2002 -15.7002 16v45.9004l-24.8994 -25.4004c-6.10059 -6.2002 -16.1006 -6.2002 -22.2002 0l-11.1006 11.2998c-6.09961 6.2002 -6.09961 16.4004 0 22.6006l58.3008 59.2998v84.5l-71.9004 -42.2002
l-21.2998 -81c-2.2998 -8.5 -10.9004 -13.5996 -19.2998 -11.2998l-15.2002 4.09961c-8.40039 2.2998 -13.2998 11.1006 -11.1006 19.6006l9.10059 34.6992l-39.2002 -23c-7.5 -4.39941 -17.2002 -1.7998 -21.5 5.90039l-7.90039 13.9004
c-4.2998 7.69922 -1.69922 17.5 5.80078 21.8994l39.1992 23l-34.0996 9.2998c-8.40039 2.30078 -13.2998 11.1006 -11.0996 19.6006l4.09961 15.5c2.2998 8.5 10.9004 13.5996 19.2998 11.2998l79.7002 -21.7002l71.9004 42.2002l-71.9004 42.2002l-79.7002 -21.7002
c-8.39941 -2.2998 -17.0996 2.7998 -19.2998 11.2998l-4.09961 15.5c-2.30078 8.5 2.69922 17.2998 11.0996 19.6006l34.0996 9.09961l-39.1992 23c-7.60059 4.5 -10.1006 14.2002 -5.80078 21.9004l7.90039 13.8994c4.40039 7.7002 14 10.2998 21.5 5.90039l39.2002 -23
l-9.10059 34.7002c-2.2998 8.5 2.7002 17.2998 11.1006 19.5996l15.2002 4.09961c8.39941 2.30078 17.0996 -2.7998 19.2998 -11.2998l21.2998 -81l71.9004 -42.2002v84.5l-58.3008 59.3008c-6.09961 6.19922 -6.09961 16.3994 0 22.5996l11.5 11.2998
c6.10059 6.2002 16.1006 6.2002 22.2002 0l24.9004 -25.3994v46.0996c0 8.7998 7 16 15.7002 16h15.6992c8.7002 0 15.7002 -7.2002 15.7002 -16v-45.9004l24.9004 25.4004c6.09961 6.2002 16.0996 6.2002 22.2002 0l11.0996 -11.2998
c6.09961 -6.2002 6.09961 -16.4004 0 -22.6006l-58.2998 -59.2998v-84.5l71.8994 42.2002l21.3008 81c2.2998 8.5 10.8994 13.5996 19.2998 11.2998l15.2002 -4.09961c8.39941 -2.2998 13.2998 -11.1006 11.0996 -19.6006l-9.09961 -34.6992l39.1992 23
c7.5 4.39941 17.2002 1.7998 21.5 -5.90039l7.90039 -13.9004c4.2998 -7.69922 1.7002 -17.5 -5.7998 -21.8994l-39.2002 -23l34.0996 -9.2998c8.40039 -2.30078 13.3008 -11.1006 11.1006 -19.6006l-4.10059 -15.5c-2.2998 -8.5 -10.8994 -13.5996 -19.2998 -11.2998
l-79.7002 21.7002l-71.8994 -42.2002l71.7998 -42.2002l79.7002 21.7002c8.39941 2.2998 17.0996 -2.7998 19.2998 -11.2998l4.09961 -15.5c2.30078 -8.5 -2.69922 -17.2998 -11.0996 -19.6006l-34.0996 -9.2998z" />
<glyph glyph-name="trash-alt" unicode="&#xf2ed;" horiz-adv-x="448"
d="M268 32c-6.62305 0 -12 5.37695 -12 12v216c0 6.62305 5.37695 12 12 12h24c6.62305 0 12 -5.37695 12 -12v-216c0 -6.62305 -5.37695 -12 -12 -12h-24zM432 368c8.83105 0 16 -7.16895 16 -16v-16c0 -8.83105 -7.16895 -16 -16 -16h-16v-336
c0 -26.4922 -21.5078 -48 -48 -48h-288c-26.4922 0 -48 21.5078 -48 48v336h-16c-8.83105 0 -16 7.16895 -16 16v16c0 8.83105 7.16895 16 16 16h82.4102l34.0195 56.7002c8.39258 13.9844 23.6777 23.2998 41.1602 23.2998h100.82
c0.0078125 0 -0.015625 0.0517578 -0.0078125 0.0517578c17.4824 0 32.7949 -9.36719 41.1875 -23.3516l34 -56.7002h82.4102zM171.84 397.09l-17.4502 -29.0898h139.221l-17.46 29.0898c-1.0498 1.74707 -2.95898 2.91016 -5.14355 2.91016h-0.00683594h-94
c-0.00585938 0 -0.00683594 0.00683594 -0.0126953 0.00683594c-2.18457 0 -4.09766 -1.16992 -5.14746 -2.91699zM368 -16v336h-288v-336h288zM156 32c-6.62305 0 -12 5.37695 -12 12v216c0 6.62305 5.37695 12 12 12h24c6.62305 0 12 -5.37695 12 -12v-216
c0 -6.62305 -5.37695 -12 -12 -12h-24z" />
<glyph glyph-name="images" unicode="&#xf302;" horiz-adv-x="576"
d="M480 32v-16c0 -26.5098 -21.4902 -48 -48 -48h-384c-26.5098 0 -48 21.4902 -48 48v256c0 26.5098 21.4902 48 48 48h16v-48h-10c-3.31152 0 -6 -2.68848 -6 -6v-244c0 -3.31152 2.68848 -6 6 -6h372c3.31152 0 6 2.68848 6 6v10h48zM522 368h-372
c-3.31152 0 -6 -2.68848 -6 -6v-244c0 -3.31152 2.68848 -6 6 -6h372c3.31152 0 6 2.68848 6 6v244c0 3.31152 -2.68848 6 -6 6zM528 416c26.5098 0 48 -21.4902 48 -48v-256c0 -26.5098 -21.4902 -48 -48 -48h-384c-26.5098 0 -48 21.4902 -48 48v256
c0 26.5098 21.4902 48 48 48h384zM264 304c0 -22.0908 -17.9092 -40 -40 -40s-40 17.9092 -40 40s17.9092 40 40 40s40 -17.9092 40 -40zM192 208l39.5146 39.5146c4.68652 4.68652 12.2842 4.68652 16.9717 0l39.5137 -39.5146l103.515 103.515
c4.68652 4.68652 12.2842 4.68652 16.9717 0l71.5137 -71.5146v-80h-288v48z" />
<glyph glyph-name="clipboard" unicode="&#xf328;" horiz-adv-x="384"
d="M336 384c26.5 0 48 -21.5 48 -48v-352c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h80c0 35.2998 28.7002 64 64 64s64 -28.7002 64 -64h80zM192 408c-13.2998 0 -24 -10.7002 -24 -24s10.7002 -24 24 -24s24 10.7002 24 24
s-10.7002 24 -24 24zM336 -10v340c0 3.2998 -2.7002 6 -6 6h-42v-36c0 -6.59961 -5.40039 -12 -12 -12h-168c-6.59961 0 -12 5.40039 -12 12v36h-42c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h276c3.2998 0 6 2.7002 6 6z" />
<glyph glyph-name="arrow-alt-circle-down" unicode="&#xf358;"
d="M256 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM256 -8c110.5 0 200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200s89.5 -200 200 -200zM224 308c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-116
h67c10.7002 0 16.0996 -12.9004 8.5 -20.5l-99 -99c-4.7002 -4.7002 -12.2998 -4.7002 -17 0l-99 99c-7.5 7.59961 -2.2002 20.5 8.5 20.5h67v116z" />
<glyph glyph-name="arrow-alt-circle-left" unicode="&#xf359;"
d="M8 192c0 137 111 248 248 248s248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248zM456 192c0 110.5 -89.5 200 -200 200s-200 -89.5 -200 -200s89.5 -200 200 -200s200 89.5 200 200zM384 212v-40c0 -6.59961 -5.40039 -12 -12 -12h-116v-67
c0 -10.7002 -12.9004 -16 -20.5 -8.5l-99 99c-4.7002 4.7002 -4.7002 12.2998 0 17l99 99c7.59961 7.59961 20.5 2.2002 20.5 -8.5v-67h116c6.59961 0 12 -5.40039 12 -12z" />
<glyph glyph-name="arrow-alt-circle-right" unicode="&#xf35a;"
d="M504 192c0 -137 -111 -248 -248 -248s-248 111 -248 248s111 248 248 248s248 -111 248 -248zM56 192c0 -110.5 89.5 -200 200 -200s200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200zM128 172v40c0 6.59961 5.40039 12 12 12h116v67
c0 10.7002 12.9004 16 20.5 8.5l99 -99c4.7002 -4.7002 4.7002 -12.2998 0 -17l-99 -99c-7.59961 -7.59961 -20.5 -2.2002 -20.5 8.5v67h-116c-6.59961 0 -12 5.40039 -12 12z" />
<glyph glyph-name="arrow-alt-circle-up" unicode="&#xf35b;"
d="M256 -56c-137 0 -248 111 -248 248s111 248 248 248s248 -111 248 -248s-111 -248 -248 -248zM256 392c-110.5 0 -200 -89.5 -200 -200s89.5 -200 200 -200s200 89.5 200 200s-89.5 200 -200 200zM276 64h-40c-6.59961 0 -12 5.40039 -12 12v116h-67
c-10.7002 0 -16 12.9004 -8.5 20.5l99 99c4.7002 4.7002 12.2998 4.7002 17 0l99 -99c7.59961 -7.59961 2.2002 -20.5 -8.5 -20.5h-67v-116c0 -6.59961 -5.40039 -12 -12 -12z" />
<glyph glyph-name="gem" unicode="&#xf3a5;" horiz-adv-x="576"
d="M464 448c4.09961 0 7.7998 -2 10.0996 -5.40039l99.9004 -147.199c2.90039 -4.40039 2.59961 -10.1006 -0.700195 -14.2002l-276 -340.8c-4.7998 -5.90039 -13.7998 -5.90039 -18.5996 0l-276 340.8c-3.2998 4 -3.60059 9.7998 -0.700195 14.2002l100 147.199
c2.2002 3.40039 6 5.40039 10 5.40039h352zM444.7 400h-56.7998l51.6992 -96h68.4004zM242.6 400l-51.5996 -96h194l-51.7002 96h-90.7002zM131.3 400l-63.2998 -96h68.4004l51.6992 96h-56.7998zM88.2998 256l119.7 -160l-68.2998 160h-51.4004zM191.2 256l96.7998 -243.3
l96.7998 243.3h-193.6zM368 96l119.6 160h-51.3994z" />
<glyph glyph-name="money-bill-alt" unicode="&#xf3d1;" horiz-adv-x="640"
d="M320 304c53.0195 0 96 -50.1396 96 -112c0 -61.8701 -43 -112 -96 -112c-53.0195 0 -96 50.1504 -96 112c0 61.8604 42.9805 112 96 112zM360 136v16c0 4.41992 -3.58008 8 -8 8h-16v88c0 4.41992 -3.58008 8 -8 8h-13.5801
c-4.91113 0 -9.50586 -1.49316 -13.3096 -4.03027l-15.3301 -10.2197c-2.15332 -1.43262 -3.55957 -3.88379 -3.55957 -6.66113c0 -1.6377 0.493164 -3.16113 1.33887 -4.42871l8.88086 -13.3105c1.43164 -2.15234 3.88379 -3.55957 6.66113 -3.55957
c1.6377 0 3.16016 0.494141 4.42871 1.33984l0.469727 0.310547v-55.4404h-16c-4.41992 0 -8 -3.58008 -8 -8v-16c0 -4.41992 3.58008 -8 8 -8h64c4.41992 0 8 3.58008 8 8zM608 384c17.6699 0 32 -14.3301 32 -32v-320c0 -17.6699 -14.3301 -32 -32 -32h-576
c-17.6699 0 -32 14.3301 -32 32v320c0 17.6699 14.3301 32 32 32h576zM592 112v160c-35.3496 0 -64 28.6504 -64 64h-416c0 -35.3496 -28.6504 -64 -64 -64v-160c35.3496 0 64 -28.6504 64 -64h416c0 35.3496 28.6504 64 64 64z" />
<glyph glyph-name="window-close" unicode="&#xf410;"
d="M464 416c26.5 0 48 -21.5 48 -48v-352c0 -26.5 -21.5 -48 -48 -48h-416c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h416zM464 22v340c0 3.2998 -2.7002 6 -6 6h-404c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h404c3.2998 0 6 2.7002 6 6z
M356.5 253.4l-61.4004 -61.4004l61.4004 -61.4004c4.59961 -4.59961 4.59961 -12.0996 0 -16.7998l-22.2998 -22.2998c-4.60059 -4.59961 -12.1006 -4.59961 -16.7998 0l-61.4004 61.4004l-61.4004 -61.4004c-4.59961 -4.59961 -12.0996 -4.59961 -16.7998 0
l-22.2998 22.2998c-4.59961 4.60059 -4.59961 12.1006 0 16.7998l61.4004 61.4004l-61.4004 61.4004c-4.59961 4.59961 -4.59961 12.0996 0 16.7998l22.2998 22.2998c4.60059 4.59961 12.1006 4.59961 16.7998 0l61.4004 -61.4004l61.4004 61.4004
c4.59961 4.59961 12.0996 4.59961 16.7998 0l22.2998 -22.2998c4.7002 -4.60059 4.7002 -12.1006 0 -16.7998z" />
<glyph glyph-name="comment-dots" unicode="&#xf4ad;"
d="M144 240c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32zM256 240c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32zM368 240c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32
s-32 14.2998 -32 32s14.2998 32 32 32zM256 416c141.4 0 256 -93.0996 256 -208s-114.6 -208 -256 -208c-32.7998 0 -64 5.2002 -92.9004 14.2998c-29.0996 -20.5996 -77.5996 -46.2998 -139.1 -46.2998c-9.59961 0 -18.2998 5.7002 -22.0996 14.5
c-3.80078 8.7998 -2 19 4.59961 26c0.5 0.400391 31.5 33.7998 46.4004 73.2002c-33 35.0996 -52.9004 78.7002 -52.9004 126.3c0 114.9 114.6 208 256 208zM256 48c114.7 0 208 71.7998 208 160s-93.2998 160 -208 160s-208 -71.7998 -208 -160
c0 -42.2002 21.7002 -74.0996 39.7998 -93.4004l20.6006 -21.7998l-10.6006 -28.0996c-5.5 -14.5 -12.5996 -28.1006 -19.8994 -40.2002c23.5996 7.59961 43.1992 18.9004 57.5 29l19.5 13.7998l22.6992 -7.2002c25.3008 -8 51.7002 -12.0996 78.4004 -12.0996z" />
<glyph glyph-name="smile-wink" unicode="&#xf4da;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM365.8 138.4c10.2002 -8.5 11.6006 -23.6006 3.10059 -33.8008
c-30 -36 -74.1006 -56.5996 -120.9 -56.5996s-90.9004 20.5996 -120.9 56.5996c-8.39941 10.2002 -7.09961 25.3008 3.10059 33.8008c10.0996 8.39941 25.2998 7.09961 33.7998 -3.10059c20.7998 -25.0996 51.5 -39.3994 84 -39.3994s63.2002 14.3994 84 39.3994
c8.5 10.2002 23.5996 11.6006 33.7998 3.10059zM168 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM328 268c25.7002 0 55.9004 -16.9004 59.7002 -42.0996c1.7998 -11.1006 -11.2998 -18.2002 -19.7998 -10.8008l-9.5 8.5
c-14.8008 13.2002 -46.2002 13.2002 -61 0l-9.5 -8.5c-8.30078 -7.39941 -21.5 -0.399414 -19.8008 10.8008c4 25.1992 34.2002 42.0996 59.9004 42.0996z" />
<glyph glyph-name="angry" unicode="&#xf556;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM248 136c33.5996 0 65.2002 -14.7998 86.7998 -40.5996
c8.40039 -10.2002 7.10059 -25.3008 -3.09961 -33.8008c-10.6006 -8.89941 -25.7002 -6.69922 -33.7998 3c-24.8008 29.7002 -75 29.7002 -99.8008 0c-8.5 -10.1992 -23.5996 -11.5 -33.7998 -3s-11.5996 23.6006 -3.09961 33.8008
c21.5996 25.7998 53.2002 40.5996 86.7998 40.5996zM200 208c0 -17.7002 -14.2998 -32.0996 -32 -32.0996s-32 14.2998 -32 32c0 6.19922 2.2002 11.6992 5.2998 16.5996l-28.2002 8.5c-12.6992 3.7998 -19.8994 17.2002 -16.0996 29.9004
c3.7998 12.6992 17.0996 20 29.9004 16.0996l80 -24c12.6992 -3.7998 19.8994 -17.2002 16.0996 -29.9004c-3.09961 -10.3994 -12.7002 -17.0996 -23 -17.0996zM399 262.9c3.7998 -12.7002 -3.40039 -26.1006 -16.0996 -29.8008l-28.2002 -8.5
c3.09961 -4.89941 5.2998 -10.3994 5.2998 -16.5996c0 -17.7002 -14.2998 -32 -32 -32s-32 14.2998 -32 32c-10.2998 0 -19.9004 6.7002 -23 17.0996c-3.7998 12.7002 3.40039 26.1006 16.0996 29.9004l80 24c12.8008 3.7998 26.1006 -3.40039 29.9004 -16.0996z" />
<glyph glyph-name="dizzy" unicode="&#xf567;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM214.2 209.9
c-7.90039 -7.90039 -20.5 -7.90039 -28.4004 -0.200195l-17.7998 17.7998l-17.7998 -17.7998c-7.7998 -7.7998 -20.5 -7.7998 -28.2998 0c-7.80078 7.7998 -7.80078 20.5 0 28.2998l17.8994 17.9004l-17.8994 17.8994c-7.80078 7.7998 -7.80078 20.5 0 28.2998
c7.7998 7.80078 20.5 7.80078 28.2998 0l17.7998 -17.7998l17.9004 17.9004c7.7998 7.7998 20.5 7.7998 28.2998 0s7.7998 -20.5 0 -28.2998l-17.9004 -17.9004l17.9004 -17.7998c7.7998 -7.7998 7.7998 -20.5 0 -28.2998zM374.2 302.1
c7.7002 -7.7998 7.7002 -20.3994 0 -28.1992l-17.9004 -17.9004l17.7998 -18c7.80078 -7.7998 7.80078 -20.5 0 -28.2998c-7.7998 -7.7998 -20.5 -7.7998 -28.2998 0l-17.7998 17.7998l-17.7998 -17.7998c-7.7998 -7.7998 -20.5 -7.7998 -28.2998 0
c-7.80078 7.7998 -7.80078 20.5 0 28.2998l17.8994 17.9004l-17.8994 17.8994c-7.80078 7.7998 -7.80078 20.5 0 28.2998c7.7998 7.80078 20.5 7.80078 28.2998 0l17.7998 -17.7998l17.9004 17.7998c7.7998 7.80078 20.5 7.80078 28.2998 0zM248 176
c35.2998 0 64 -28.7002 64 -64s-28.7002 -64 -64 -64s-64 28.7002 -64 64s28.7002 64 64 64z" />
<glyph glyph-name="flushed" unicode="&#xf579;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM344 304c44.2002 0 80 -35.7998 80 -80s-35.7998 -80 -80 -80
s-80 35.7998 -80 80s35.7998 80 80 80zM344 176c26.5 0 48 21.5 48 48s-21.5 48 -48 48s-48 -21.5 -48 -48s21.5 -48 48 -48zM344 248c13.2998 0 24 -10.7002 24 -24s-10.7002 -24 -24 -24s-24 10.7002 -24 24s10.7002 24 24 24zM232 224c0 -44.2002 -35.7998 -80 -80 -80
s-80 35.7998 -80 80s35.7998 80 80 80s80 -35.7998 80 -80zM152 176c26.5 0 48 21.5 48 48s-21.5 48 -48 48s-48 -21.5 -48 -48s21.5 -48 48 -48zM152 248c13.2998 0 24 -10.7002 24 -24s-10.7002 -24 -24 -24s-24 10.7002 -24 24s10.7002 24 24 24zM312 104
c13.2002 0 24 -10.7998 24 -24s-10.7998 -24 -24 -24h-128c-13.2002 0 -24 10.7998 -24 24s10.7998 24 24 24h128z" />
<glyph glyph-name="frown-open" unicode="&#xf57a;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM200 240c0 -17.7002 -14.2998 -32 -32 -32s-32 14.2998 -32 32
s14.2998 32 32 32s32 -14.2998 32 -32zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32zM248 160c35.5996 0 88.7998 -21.2998 95.7998 -61.2002c2 -11.7998 -9.09961 -21.5996 -20.5 -18.0996
c-31.2002 9.59961 -59.3994 15.2998 -75.2998 15.2998s-44.0996 -5.7002 -75.2998 -15.2998c-11.5 -3.40039 -22.5 6.2998 -20.5 18.0996c7 39.9004 60.2002 61.2002 95.7998 61.2002z" />
<glyph glyph-name="grimace" unicode="&#xf57f;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM168 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32
s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM328 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM344 192c26.5 0 48 -21.5 48 -48v-32c0 -26.5 -21.5 -48 -48 -48h-192c-26.5 0 -48 21.5 -48 48v32c0 26.5 21.5 48 48 48
h192zM176 96v24h-40v-8c0 -8.7998 7.2002 -16 16 -16h24zM176 136v24h-24c-8.7998 0 -16 -7.2002 -16 -16v-8h40zM240 96v24h-48v-24h48zM240 136v24h-48v-24h48zM304 96v24h-48v-24h48zM304 136v24h-48v-24h48zM360 112v8h-40v-24h24c8.7998 0 16 7.2002 16 16zM360 136v8
c0 8.7998 -7.2002 16 -16 16h-24v-24h40z" />
<glyph glyph-name="grin" unicode="&#xf580;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM353.6 143.4c10 3.09961 19.3008 -5.5 17.7002 -15.3008
c-8 -47.0996 -71.2998 -80 -123.3 -80s-115.4 32.9004 -123.3 80c-1.7002 9.90039 7.7998 18.4004 17.7002 15.3008c26 -8.30078 64.3994 -13.1006 105.6 -13.1006s79.7002 4.7998 105.6 13.1006zM168 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32
s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM328 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32z" />
<glyph glyph-name="grin-alt" unicode="&#xf581;" horiz-adv-x="496"
d="M200.3 200c-7.5 -11.4004 -24.5996 -12 -32.7002 0c-12.3994 18.7002 -15.1992 37.2998 -15.6992 56c0.599609 18.7002 3.2998 37.2998 15.6992 56c7.60059 11.4004 24.7002 12 32.7002 0c12.4004 -18.7002 15.2002 -37.2998 15.7002 -56
c-0.599609 -18.7002 -3.2998 -37.2998 -15.7002 -56zM328.3 200c-7.5 -11.4004 -24.5996 -12 -32.7002 0c-12.3994 18.7002 -15.1992 37.2998 -15.6992 56c0.599609 18.7002 3.2998 37.2998 15.6992 56c7.60059 11.4004 24.7002 12 32.7002 0
c12.4004 -18.7002 15.2002 -37.2998 15.7002 -56c-0.599609 -18.7002 -3.2998 -37.2998 -15.7002 -56zM248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200
s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM353.6 143.4c10 3.09961 19.3008 -5.5 17.7002 -15.3008c-8 -47.0996 -71.2998 -80 -123.3 -80s-115.4 32.8008 -123.3 80c-1.7002 10 7.7998 18.4004 17.7002 15.3008c26 -8.30078 64.3994 -13.1006 105.6 -13.1006
s79.7002 4.7998 105.6 13.1006z" />
<glyph glyph-name="grin-beam" unicode="&#xf582;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM353.6 143.4c10 3.09961 19.3008 -5.5 17.7002 -15.3008
c-8 -47.0996 -71.2998 -80 -123.3 -80s-115.4 32.9004 -123.3 80c-1.7002 10 7.89941 18.4004 17.7002 15.3008c26 -8.30078 64.3994 -13.1006 105.6 -13.1006s79.7002 4.7998 105.6 13.1006zM117.7 216.3c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998
c3.2998 42.1006 32.2002 71.4004 56 71.4004s52.7002 -29.2998 56 -71.4004c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998c-3.09961 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996s-23.7998 -7.89941 -31.5 -21.5996
l-9.5 -17c-1.90039 -3.2002 -5.7998 -4.7998 -9.2998 -3.7002zM277.7 216.3c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998c3.2998 42.1006 32.2002 71.4004 56 71.4004s52.7002 -29.2998 56 -71.4004c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998
c-3.09961 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996s-23.7998 -7.89941 -31.5 -21.5996l-9.5 -17c-1.90039 -3.2002 -5.7998 -4.7998 -9.2998 -3.7002z" />
<glyph glyph-name="grin-beam-sweat" unicode="&#xf583;" horiz-adv-x="496"
d="M440 288c-29.5 0 -53.2998 26.2998 -53.2998 58.7002c0 25 31.7002 75.5 46.2002 97.2998c3.5 5.2998 10.5996 5.2998 14.1992 0c14.5 -21.7998 46.2002 -72.2998 46.2002 -97.2998c0 -32.4004 -23.7998 -58.7002 -53.2998 -58.7002zM248 48
c-51.9004 0 -115.3 32.9004 -123.3 80c-1.7002 10 7.89941 18.4004 17.7002 15.2998c26 -8.2998 64.3994 -13.0996 105.6 -13.0996s79.7002 4.7998 105.6 13.0996c10 3.2002 19.4004 -5.39941 17.7002 -15.2998c-8 -47.0996 -71.3994 -80 -123.3 -80zM378.3 216.3
c-3.09961 -0.899414 -7.2002 0.100586 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996s-23.7998 -7.89941 -31.5 -21.5996l-9.5 -17c-1.90039 -3.2002 -5.7998 -4.7998 -9.2998 -3.7002c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998
c3.2998 42.1006 32.2002 71.4004 56 71.4004s52.7002 -29.2998 56 -71.4004c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998zM483.6 269.2c8 -24.2998 12.4004 -50.2002 12.4004 -77.2002c0 -137 -111 -248 -248 -248s-248 111 -248 248s111 248 248 248
c45.7002 0 88.4004 -12.5996 125.2 -34.2002c-10.9004 -21.5996 -15.5 -36.2002 -17.2002 -45.7002c-31.2002 20.1006 -68.2002 31.9004 -108 31.9004c-110.3 0 -200 -89.7002 -200 -200s89.7002 -200 200 -200s200 89.7002 200 200
c0 22.5 -3.90039 44.0996 -10.7998 64.2998c0.399414 0 21.7998 -2.7998 46.3994 12.9004zM168 258.6c-12.2998 0 -23.7998 -7.7998 -31.5 -21.5996l-9.5 -17c-1.90039 -3.2002 -5.7998 -4.7998 -9.2998 -3.7002c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998
c3.2998 42.1006 32.2002 71.4004 56 71.4004s52.7002 -29.2998 56 -71.4004c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998c-3.09961 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996z" />
<glyph glyph-name="grin-hearts" unicode="&#xf584;" horiz-adv-x="496"
d="M353.6 143.4c10 3.09961 19.3008 -5.5 17.7002 -15.3008c-8 -47.0996 -71.2998 -80 -123.3 -80s-115.4 32.8008 -123.3 80c-1.7002 10 7.89941 18.4004 17.7002 15.3008c26 -8.30078 64.3994 -13.1006 105.6 -13.1006s79.7002 4.7998 105.6 13.1006zM200.8 192.3
l-70.2002 18.1006c-20.3994 5.2998 -31.8994 27 -24.1992 47.1992c6.69922 17.7002 26.6992 26.7002 44.8994 22l7.10059 -1.89941l2 7.09961c5.09961 18.1006 22.8994 30.9004 41.5 27.9004c21.3994 -3.40039 34.3994 -24.2002 28.7998 -44.5l-19.4004 -69.9004
c-1.2998 -4.5 -6 -7.2002 -10.5 -6zM389.6 257.6c7.7002 -20.1992 -3.7998 -41.7998 -24.1992 -47.0996l-70.2002 -18.2002c-4.60059 -1.2002 -9.2998 1.5 -10.5 6l-19.4004 69.9004c-5.59961 20.2998 7.40039 41.0996 28.7998 44.5c18.7002 3 36.5 -9.7998 41.5 -27.9004
l2 -7.09961l7.10059 1.89941c18.2002 4.7002 38.2002 -4.39941 44.8994 -22zM248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200
s89.7002 -200 200 -200z" />
<glyph glyph-name="grin-squint" unicode="&#xf585;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM353.6 143.4c10 3.09961 19.3008 -5.5 17.7002 -15.3008
c-8 -47.0996 -71.2998 -80 -123.3 -80s-115.4 32.9004 -123.3 80c-1.7002 9.90039 7.7998 18.4004 17.7002 15.3008c26 -8.30078 64.3994 -13.1006 105.6 -13.1006s79.7002 4.7998 105.6 13.1006zM118.9 184.2c-3.80078 4.39941 -3.90039 11 -0.100586 15.5l33.6006 40.2998
l-33.6006 40.2998c-3.7002 4.5 -3.7002 11 0.100586 15.5c3.89941 4.40039 10.1992 5.5 15.2998 2.5l80 -48c3.59961 -2.2002 5.7998 -6.09961 5.7998 -10.2998s-2.2002 -8.09961 -5.7998 -10.2998l-80 -48c-5.40039 -3.2002 -11.7002 -1.7002 -15.2998 2.5zM361.8 181.7
l-80 48c-3.59961 2.2002 -5.7998 6.09961 -5.7998 10.2998s2.2002 8.09961 5.7998 10.2998l80 48c5.10059 2.90039 11.5 1.90039 15.2998 -2.5c3.80078 -4.5 3.90039 -11 0.100586 -15.5l-33.6006 -40.2998l33.6006 -40.2998c3.7002 -4.5 3.7002 -11 -0.100586 -15.5
c-3.59961 -4.2002 -9.89941 -5.7002 -15.2998 -2.5z" />
<glyph glyph-name="grin-squint-tears" unicode="&#xf586;"
d="M117.1 63.9004c6.30078 0.899414 11.7002 -4.5 10.9004 -10.9004c-3.7002 -25.7998 -13.7002 -84 -30.5996 -100.9c-22 -21.8994 -57.9004 -21.5 -80.3008 0.900391c-22.3994 22.4004 -22.7998 58.4004 -0.899414 80.2998
c16.8994 16.9004 75.0996 26.9004 100.899 30.6006zM75.9004 105.6c-19.6006 -3.89941 -35.1006 -8.09961 -47.3008 -12.1992c-39.2998 90.5996 -22.0996 199.899 52 274c48.5 48.3994 111.9 72.5996 175.4 72.5996c38.9004 0 77.7998 -9.2002 113.2 -27.4004
c-4 -12.1992 -8.2002 -28 -12 -48.2998c-30.4004 17.9004 -65 27.7002 -101.2 27.7002c-53.4004 0 -103.6 -20.7998 -141.4 -58.5996c-61.5996 -61.5 -74.2998 -153.4 -38.6992 -227.801zM428.2 293.2c20.2998 3.89941 36.2002 8 48.5 12
c47.8994 -93.2002 32.8994 -210.5 -45.2002 -288.601c-48.5 -48.3994 -111.9 -72.5996 -175.4 -72.5996c-33.6992 0 -67.2998 7 -98.6992 20.5996c4.19922 12.2002 8.2998 27.7002 12.1992 47.2002c26.6006 -12.7998 55.9004 -19.7998 86.4004 -19.7998
c53.4004 0 103.6 20.7998 141.4 58.5996c65.6992 65.7002 75.7998 166 30.7998 242.601zM394.9 320.1c-6.30078 -0.899414 -11.7002 4.5 -10.9004 10.9004c3.7002 25.7998 13.7002 84 30.5996 100.9c22 21.8994 57.9004 21.5 80.3008 -0.900391
c22.3994 -22.4004 22.7998 -58.4004 0.899414 -80.2998c-16.8994 -16.9004 -75.0996 -26.9004 -100.899 -30.6006zM207.9 211.8c3 -3 4.19922 -7.2998 3.19922 -11.5l-22.5996 -90.5c-1.40039 -5.39941 -6.2002 -9.09961 -11.7002 -9.09961h-0.899414
c-5.80078 0.5 -10.5 5.09961 -11 10.8994l-4.80078 52.3008l-52.2998 4.7998c-5.7998 0.5 -10.3994 5.2002 -10.8994 11c-0.400391 5.89941 3.39941 11.2002 9.09961 12.5996l90.5 22.7002c4.2002 1 8.40039 -0.200195 11.4004 -3.2002zM247.6 236.9
c-0.0996094 0 -6.39941 -1.80078 -11.3994 3.19922c-3 3 -4.2002 7.30078 -3.2002 11.4004l22.5996 90.5c1.40039 5.7002 7 9.2002 12.6006 9.09961c5.7998 -0.5 10.5 -5.09961 11 -10.8994l4.7998 -52.2998l52.2998 -4.80078c5.7998 -0.5 10.4004 -5.19922 10.9004 -11
c0.399414 -5.89941 -3.40039 -11.1992 -9.10059 -12.5996zM299.6 148.4c29.1006 29.0996 53 59.5996 65.3008 83.7998c4.89941 9.2998 17.5996 9.89941 23.3994 1.7002c27.7002 -38.9004 6.10059 -106.9 -30.5996 -143.7s-104.8 -58.2998 -143.7 -30.6006
c-8.2998 5.90039 -7.5 18.6006 1.7002 23.4004c24.2002 12.5 54.7998 36.2998 83.8994 65.4004z" />
<glyph glyph-name="grin-stars" unicode="&#xf587;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM353.6 143.4c10 3.09961 19.3008 -5.5 17.7002 -15.3008
c-8 -47.0996 -71.2998 -80 -123.3 -80s-115.4 32.8008 -123.3 80c-1.7002 10 7.89941 18.4004 17.7002 15.3008c26 -8.30078 64.3994 -13.1006 105.6 -13.1006s79.7002 4.7998 105.6 13.1006zM125.7 200.9l6.09961 34.8994l-25.3994 24.6006
c-4.60059 4.59961 -1.90039 12.2998 4.2998 13.1992l34.8994 5l15.5 31.6006c2.90039 5.7998 11 5.7998 13.9004 0l15.5 -31.6006l34.9004 -5c6.19922 -1 8.7998 -8.69922 4.2998 -13.1992l-25.4004 -24.6006l6 -34.8994c1 -6.2002 -5.39941 -11 -11 -7.90039
l-31.2998 16.2998l-31.2998 -16.2998c-5.60059 -3.09961 -12 1.7002 -11 7.90039zM385.4 273.6c6.19922 -1 8.89941 -8.59961 4.39941 -13.1992l-25.3994 -24.6006l6 -34.8994c1 -6.2002 -5.40039 -11 -11 -7.90039l-31.3008 16.2998l-31.2998 -16.2998
c-5.59961 -3.09961 -12 1.7002 -11 7.90039l6 34.8994l-25.3994 24.6006c-4.60059 4.59961 -1.90039 12.2998 4.2998 13.1992l34.8994 5l15.5 31.6006c2.90039 5.7998 11 5.7998 13.9004 0l15.5 -31.6006z" />
<glyph glyph-name="grin-tears" unicode="&#xf588;" horiz-adv-x="640"
d="M117.1 191.9c6.30078 0.899414 11.7002 -4.5 10.9004 -10.9004c-3.7002 -25.7998 -13.7002 -84 -30.5996 -100.9c-22 -21.8994 -57.9004 -21.5 -80.3008 0.900391c-22.3994 22.4004 -22.7998 58.4004 -0.899414 80.2998c16.8994 16.9004 75.0996 26.9004 100.899 30.6006
zM623.8 161.3c21.9004 -21.8994 21.5 -57.8994 -0.799805 -80.2002c-22.4004 -22.3994 -58.4004 -22.7998 -80.2998 -0.899414c-16.9004 16.8994 -26.9004 75.0996 -30.6006 100.899c-0.899414 6.30078 4.5 11.7002 10.8008 10.8008
c25.7998 -3.7002 84 -13.7002 100.899 -30.6006zM497.2 99.5996c12.3994 -37.2998 25.0996 -43.7998 28.2998 -46.5c-44.5996 -65.7998 -120 -109.1 -205.5 -109.1s-160.9 43.2998 -205.5 109.1c3.09961 2.60059 15.7998 9.10059 28.2998 46.5
c33.4004 -63.8994 100.3 -107.6 177.2 -107.6s143.8 43.7002 177.2 107.6zM122.7 223.5c-2.40039 0.299805 -5 2.5 -49.5 -6.90039c12.3994 125.4 118.1 223.4 246.8 223.4s234.4 -98 246.8 -223.5c-44.2998 9.40039 -47.3994 7.2002 -49.5 7
c-15.2002 95.2998 -97.7998 168.5 -197.3 168.5s-182.1 -73.2002 -197.3 -168.5zM320 48c-51.9004 0 -115.3 32.9004 -123.3 80c-1.7002 10 7.89941 18.4004 17.7002 15.2998c26 -8.2998 64.3994 -13.0996 105.6 -13.0996s79.7002 4.7998 105.6 13.0996
c10 3.2002 19.4004 -5.39941 17.7002 -15.2998c-8 -47.0996 -71.3994 -80 -123.3 -80zM450.3 216.3c-3.09961 -0.899414 -7.2002 0.100586 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996s-23.7998 -7.89941 -31.5 -21.5996l-9.5 -17
c-1.90039 -3.2002 -5.7998 -4.7998 -9.2998 -3.7002c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998c3.2998 42.1006 32.2002 71.4004 56 71.4004s52.7002 -29.2998 56 -71.4004c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998zM240 258.6
c-12.2998 0 -23.7998 -7.7998 -31.5 -21.5996l-9.5 -17c-1.90039 -3.2002 -5.7998 -4.7998 -9.2998 -3.7002c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998c3.2998 42.1006 32.2002 71.4004 56 71.4004s52.7002 -29.2998 56 -71.4004
c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998c-3.09961 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996z" />
<glyph glyph-name="grin-tongue" unicode="&#xf589;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM312 40h0.0996094v43.7998l-17.6992 8.7998c-15.1006 7.60059 -31.5 -1.69922 -34.9004 -16.5l-2.7998 -12.0996c-2.10059 -9.2002 -15.2002 -9.2002 -17.2998 0
l-2.80078 12.0996c-3.39941 14.8008 -19.8994 24 -34.8994 16.5l-17.7002 -8.7998v-42.7998c0 -35.2002 28 -64.5 63.0996 -65c35.8008 -0.5 64.9004 28.4004 64.9004 64zM340.2 14.7002c64 33.3994 107.8 100.3 107.8 177.3c0 110.3 -89.7002 200 -200 200
s-200 -89.7002 -200 -200c0 -77 43.7998 -143.9 107.8 -177.3c-2.2002 8.09961 -3.7998 16.5 -3.7998 25.2998v43.5c-14.2002 12.4004 -24.4004 27.5 -27.2998 44.5c-1.7002 10 7.7998 18.4004 17.7002 15.2998c26 -8.2998 64.3994 -13.0996 105.6 -13.0996
s79.7002 4.7998 105.6 13.0996c10 3.2002 19.4004 -5.39941 17.7002 -15.2998c-2.89941 -17 -13.0996 -32.0996 -27.2998 -44.5v-43.5c0 -8.7998 -1.59961 -17.2002 -3.7998 -25.2998zM168 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32
s14.2998 32 32 32zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32z" />
<glyph glyph-name="grin-tongue-squint" unicode="&#xf58a;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM312 40h0.0996094v43.7998l-17.6992 8.7998c-15.1006 7.60059 -31.5 -1.69922 -34.9004 -16.5l-2.7998 -12.0996c-2.10059 -9.2002 -15.2002 -9.2002 -17.2998 0
l-2.80078 12.0996c-3.39941 14.8008 -19.8994 24 -34.8994 16.5l-17.7002 -8.7998v-42.7998c0 -35.2002 28 -64.5 63.0996 -65c35.8008 -0.5 64.9004 28.4004 64.9004 64zM340.2 14.7002c64 33.3994 107.8 100.3 107.8 177.3c0 110.3 -89.7002 200 -200 200
s-200 -89.7002 -200 -200c0 -77 43.7998 -143.9 107.8 -177.3c-2.2002 8.09961 -3.7998 16.5 -3.7998 25.2998v43.5c-14.2002 12.4004 -24.4004 27.5 -27.2998 44.5c-1.7002 10 7.7998 18.4004 17.7002 15.2998c26 -8.2998 64.3994 -13.0996 105.6 -13.0996
s79.7002 4.7998 105.6 13.0996c10 3.2002 19.4004 -5.39941 17.7002 -15.2998c-2.89941 -17 -13.0996 -32.0996 -27.2998 -44.5v-43.5c0 -8.7998 -1.59961 -17.2002 -3.7998 -25.2998zM377.1 295.8c3.80078 -4.39941 3.90039 -11 0.100586 -15.5l-33.6006 -40.2998
l33.6006 -40.2998c3.7002 -4.5 3.7002 -11 -0.100586 -15.5c-3.59961 -4.2002 -9.89941 -5.7002 -15.2998 -2.5l-80 48c-3.59961 2.2002 -5.7998 6.09961 -5.7998 10.2998s2.2002 8.09961 5.7998 10.2998l80 48c5 3 11.5 1.90039 15.2998 -2.5zM214.2 250.3
c3.59961 -2.2002 5.7998 -6.09961 5.7998 -10.2998s-2.2002 -8.09961 -5.7998 -10.2998l-80 -48c-5.40039 -3.2002 -11.7002 -1.7002 -15.2998 2.5c-3.80078 4.5 -3.90039 11 -0.100586 15.5l33.6006 40.2998l-33.6006 40.2998c-3.7002 4.5 -3.7002 11 0.100586 15.5
c3.89941 4.5 10.2998 5.5 15.2998 2.5z" />
<glyph glyph-name="grin-tongue-wink" unicode="&#xf58b;" horiz-adv-x="496"
d="M152 268c25.7002 0 55.9004 -16.9004 59.7998 -42.0996c0.799805 -5 -1.7002 -10 -6.09961 -12.4004c-5.7002 -3.09961 -11.2002 -0.599609 -13.7002 1.59961l-9.5 8.5c-14.7998 13.2002 -46.2002 13.2002 -61 0l-9.5 -8.5
c-3.7998 -3.39941 -9.2998 -4 -13.7002 -1.59961c-4.39941 2.40039 -6.89941 7.40039 -6.09961 12.4004c3.89941 25.1992 34.0996 42.0996 59.7998 42.0996zM328 320c44.2002 0 80 -35.7998 80 -80s-35.7998 -80 -80 -80s-80 35.7998 -80 80s35.7998 80 80 80zM328 192
c26.5 0 48 21.5 48 48s-21.5 48 -48 48s-48 -21.5 -48 -48s21.5 -48 48 -48zM328 264c13.2998 0 24 -10.7002 24 -24s-10.7002 -24 -24 -24s-24 10.7002 -24 24s10.7002 24 24 24zM248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248z
M312 40h0.0996094v43.7998l-17.6992 8.7998c-15.1006 7.60059 -31.5 -1.69922 -34.9004 -16.5l-2.7998 -12.0996c-2.10059 -9.2002 -15.2002 -9.2002 -17.2998 0l-2.80078 12.0996c-3.39941 14.8008 -19.8994 24 -34.8994 16.5l-17.7002 -8.7998v-42.7998
c0 -35.2002 28 -64.5 63.0996 -65c35.8008 -0.5 64.9004 28.4004 64.9004 64zM340.2 14.7002c64 33.3994 107.8 100.3 107.8 177.3c0 110.3 -89.7002 200 -200 200s-200 -89.7002 -200 -200c0 -77 43.7998 -143.9 107.8 -177.3
c-2.2002 8.09961 -3.7998 16.5 -3.7998 25.2998v43.5c-14.2002 12.4004 -24.4004 27.5 -27.2998 44.5c-1.7002 10 7.7998 18.4004 17.7002 15.2998c26 -8.2998 64.3994 -13.0996 105.6 -13.0996s79.7002 4.7998 105.6 13.0996c10 3.2002 19.4004 -5.39941 17.7002 -15.2998
c-2.89941 -17 -13.0996 -32.0996 -27.2998 -44.5v-43.5c0 -8.7998 -1.59961 -17.2002 -3.7998 -25.2998z" />
<glyph glyph-name="grin-wink" unicode="&#xf58c;" horiz-adv-x="496"
d="M328 268c25.6904 0 55.8799 -16.9199 59.8701 -42.1201c1.72949 -11.0898 -11.3506 -18.2695 -19.8301 -10.8398l-9.5498 8.47949c-14.8105 13.1904 -46.1602 13.1904 -60.9707 0l-9.5498 -8.47949c-8.33008 -7.40039 -21.5801 -0.379883 -19.8301 10.8398
c3.98047 25.2002 34.1699 42.1201 59.8604 42.1201zM168 208c-17.6699 0 -32 14.3301 -32 32s14.3301 32 32 32s32 -14.3301 32 -32s-14.3301 -32 -32 -32zM353.55 143.36c10.04 3.13965 19.3906 -5.4502 17.71 -15.3408
c-7.92969 -47.1494 -71.3193 -80.0195 -123.26 -80.0195s-115.33 32.8701 -123.26 80.0195c-1.69043 9.9707 7.76953 18.4707 17.71 15.3408c25.9297 -8.31055 64.3994 -13.0605 105.55 -13.0605s79.6201 4.75977 105.55 13.0605zM248 440c136.97 0 248 -111.03 248 -248
s-111.03 -248 -248 -248s-248 111.03 -248 248s111.03 248 248 248zM248 -8c110.28 0 200 89.7197 200 200s-89.7197 200 -200 200s-200 -89.7197 -200 -200s89.7197 -200 200 -200z" />
<glyph glyph-name="kiss" unicode="&#xf596;" horiz-adv-x="496"
d="M168 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32zM304 140c0 -13 -13.4004 -27.2998 -35.0996 -36.4004c21.7998 -8.69922 35.1992 -23 35.1992 -36c0 -19.1992 -28.6992 -41.5 -71.5 -44h-0.5
c-3.69922 0 -7 2.60059 -7.7998 6.2002c-0.899414 3.7998 1.10059 7.7002 4.7002 9.2002l17 7.2002c12.9004 5.5 20.7002 13.5 20.7002 21.5s-7.7998 16 -20.7998 21.5l-16.9004 7.2002c-6 2.59961 -5.7002 12.3994 0 14.7998l17 7.2002
c12.9004 5.5 20.7002 13.5 20.7002 21.5s-7.7998 16 -20.7998 21.5l-16.9004 7.19922c-3.59961 1.5 -5.59961 5.40039 -4.7002 9.2002c0.799805 3.7998 4.40039 6.60059 8.2002 6.2002c42.7002 -2.5 71.5 -24.7998 71.5 -44zM248 440c137 0 248 -111 248 -248
s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32z
" />
<glyph glyph-name="kiss-beam" unicode="&#xf597;" horiz-adv-x="496"
d="M168 296c23.7998 0 52.7002 -29.2998 55.7998 -71.4004c0.299805 -3.7998 -2 -7.19922 -5.59961 -8.2998c-3.10059 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996c-12.3008 0 -23.8008 -7.89941 -31.5 -21.5996l-9.5 -17
c-1.80078 -3.2002 -5.80078 -4.7002 -9.30078 -3.7002c-3.59961 1.10059 -5.89941 4.60059 -5.59961 8.2998c3.2998 42.1006 32.2002 71.4004 56 71.4004zM248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8
c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM304 140c0 -13 -13.4004 -27.2998 -35.0996 -36.4004c21.7998 -8.69922 35.1992 -23 35.1992 -36c0 -19.1992 -28.6992 -41.5 -71.5 -44h-0.5
c-3.69922 0 -7 2.60059 -7.7998 6.2002c-0.899414 3.7998 1.10059 7.7002 4.7002 9.2002l17 7.2002c12.9004 5.5 20.7002 13.5 20.7002 21.5s-7.7998 16 -20.7998 21.5l-16.9004 7.2002c-6 2.59961 -5.7002 12.3994 0 14.7998l17 7.2002
c12.9004 5.5 20.7002 13.5 20.7002 21.5s-7.7998 16 -20.7998 21.5l-16.9004 7.19922c-3.59961 1.5 -5.59961 5.40039 -4.7002 9.2002c0.799805 3.7998 4.40039 6.60059 8.2002 6.2002c42.7002 -2.5 71.5 -24.7998 71.5 -44zM328 296
c23.7998 0 52.7002 -29.2998 55.7998 -71.4004c0.299805 -3.7998 -2 -7.19922 -5.59961 -8.2998c-3.10059 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996c-12.3008 0 -23.8008 -7.89941 -31.5 -21.5996l-9.5 -17
c-1.80078 -3.2002 -5.80078 -4.7002 -9.30078 -3.7002c-3.59961 1.10059 -5.89941 4.60059 -5.59961 8.2998c3.2998 42.1006 32.2002 71.4004 56 71.4004z" />
<glyph glyph-name="kiss-wink-heart" unicode="&#xf598;" horiz-adv-x="504"
d="M304 139.5c0 -13 -13.4004 -27.2998 -35.0996 -36.4004c21.7998 -8.69922 35.1992 -23 35.1992 -36c0 -19.1992 -28.6992 -41.5 -71.5 -44h-0.5c-3.69922 0 -7 2.60059 -7.7998 6.2002c-0.899414 3.7998 1.10059 7.7002 4.7002 9.2002l17 7.2002
c12.9004 5.5 20.7002 13.5 20.7002 21.5s-7.7998 16 -20.7998 21.5l-16.9004 7.2002c-6 2.59961 -5.7002 12.3994 0 14.7998l17 7.2002c12.9004 5.5 20.7002 13.5 20.7002 21.5s-7.7998 16 -20.7998 21.5l-16.9004 7.19922c-3.59961 1.5 -5.59961 5.40039 -4.7002 9.2002
c0.799805 3.7998 4.40039 6.60059 8.2002 6.2002c42.7002 -2.5 71.5 -24.7998 71.5 -44zM374.5 223c-14.7998 13.2002 -46.2002 13.2002 -61 0l-9.5 -8.5c-2.5 -2.2998 -7.90039 -4.7002 -13.7002 -1.59961c-4.39941 2.39941 -6.89941 7.39941 -6.09961 12.3994
c3.89941 25.2002 34.2002 42.1006 59.7998 42.1006s55.7998 -16.9004 59.7998 -42.1006c0.799805 -5 -1.7002 -10 -6.09961 -12.3994c-4.40039 -2.40039 -9.90039 -1.7002 -13.7002 1.59961zM136 239.5c0 17.7002 14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32
s-32 14.2998 -32 32zM501.1 45.5c9.2002 -23.9004 -4.39941 -49.4004 -28.5 -55.7002l-83 -21.5c-5.39941 -1.39941 -10.8994 1.7998 -12.3994 7.10059l-22.9004 82.5996c-6.59961 24 8.7998 48.5996 34 52.5996c22 3.5 43.1006 -11.5996 49 -33l2.2998 -8.39941
l8.40039 2.2002c21.5996 5.59961 45.0996 -5.10059 53.0996 -25.9004zM334 11.7002c17.7002 -64 10.9004 -39.5 13.4004 -46.7998c-30.5 -13.4004 -64 -20.9004 -99.4004 -20.9004c-137 0 -248 111 -248 248s111 248 248 248s248 -111 247.9 -248
c0 -31.7998 -6.2002 -62.0996 -17.1006 -90c-6 1.5 -12.2002 2.7998 -18.5996 2.90039c-5.60059 9.69922 -13.6006 17.5 -22.6006 23.8994c6.7002 19.9004 10.4004 41.1006 10.4004 63.2002c0 110.3 -89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200
c30.7998 0 59.9004 7.2002 86 19.7002z" />
<glyph glyph-name="laugh" unicode="&#xf599;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM389.4 50.5996c37.7998 37.8008 58.5996 88 58.5996 141.4s-20.7998 103.6 -58.5996 141.4c-37.8008 37.7998 -88 58.5996 -141.4 58.5996s-103.6 -20.7998 -141.4 -58.5996
c-37.7998 -37.8008 -58.5996 -88 -58.5996 -141.4s20.7998 -103.6 58.5996 -141.4c37.8008 -37.7998 88 -58.5996 141.4 -58.5996s103.6 20.7998 141.4 58.5996zM328 224c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM168 224
c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM362.4 160c8.19922 0 14.5 -7 13.5 -15c-7.5 -59.2002 -58.9004 -105 -121.101 -105h-13.5996c-62.2002 0 -113.601 45.7998 -121.101 105c-1 8 5.30078 15 13.5 15h228.801z" />
<glyph glyph-name="laugh-beam" unicode="&#xf59a;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM389.4 50.5996c37.7998 37.8008 58.5996 88 58.5996 141.4s-20.7998 103.6 -58.5996 141.4c-37.8008 37.7998 -88 58.5996 -141.4 58.5996s-103.6 -20.7998 -141.4 -58.5996
c-37.7998 -37.8008 -58.5996 -88 -58.5996 -141.4s20.7998 -103.6 58.5996 -141.4c37.8008 -37.7998 88 -58.5996 141.4 -58.5996s103.6 20.7998 141.4 58.5996zM328 296c23.7998 0 52.7002 -29.2998 55.7998 -71.4004c0.700195 -8.5 -10.7998 -11.8994 -14.8994 -4.5
l-9.5 17c-7.7002 13.7002 -19.2002 21.6006 -31.5 21.6006c-12.3008 0 -23.8008 -7.90039 -31.5 -21.6006l-9.5 -17c-4.10059 -7.39941 -15.6006 -4.09961 -14.9004 4.5c3.2998 42.1006 32.2002 71.4004 56 71.4004zM127 220.1c-4.2002 -7.39941 -15.7002 -4 -15.0996 4.5
c3.2998 42.1006 32.1992 71.4004 56 71.4004c23.7998 0 52.6992 -29.2998 56 -71.4004c0.699219 -8.5 -10.8008 -11.8994 -14.9004 -4.5l-9.5 17c-7.7002 13.7002 -19.2002 21.6006 -31.5 21.6006s-23.7998 -7.90039 -31.5 -21.6006zM362.4 160c8.19922 0 14.5 -7 13.5 -15
c-7.5 -59.2002 -58.9004 -105 -121.101 -105h-13.5996c-62.2002 0 -113.601 45.7998 -121.101 105c-1 8 5.30078 15 13.5 15h228.801z" />
<glyph glyph-name="laugh-squint" unicode="&#xf59b;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM389.4 50.5996c37.7998 37.8008 58.5996 88 58.5996 141.4s-20.7998 103.6 -58.5996 141.4c-37.8008 37.7998 -88 58.5996 -141.4 58.5996s-103.6 -20.7998 -141.4 -58.5996
c-37.7998 -37.8008 -58.5996 -88 -58.5996 -141.4s20.7998 -103.6 58.5996 -141.4c37.8008 -37.7998 88 -58.5996 141.4 -58.5996s103.6 20.7998 141.4 58.5996zM343.6 252l33.6006 -40.2998c8.59961 -10.4004 -3.90039 -24.7998 -15.4004 -18l-80 48
c-7.7998 4.7002 -7.7998 15.8994 0 20.5996l80 48c11.6006 6.7998 24 -7.7002 15.4004 -18zM134.2 193.7c-11.6006 -6.7998 -24.1006 7.59961 -15.4004 18l33.6006 40.2998l-33.6006 40.2998c-8.59961 10.2998 3.7998 24.9004 15.4004 18l80 -48
c7.7998 -4.7002 7.7998 -15.8994 0 -20.5996zM362.4 160c8.19922 0 14.5 -7 13.5 -15c-7.5 -59.2002 -58.9004 -105 -121.101 -105h-13.5996c-62.2002 0 -113.601 45.7998 -121.101 105c-1 8 5.30078 15 13.5 15h228.801z" />
<glyph glyph-name="laugh-wink" unicode="&#xf59c;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM389.4 50.5996c37.7998 37.8008 58.5996 88 58.5996 141.4s-20.7998 103.6 -58.5996 141.4c-37.8008 37.7998 -88 58.5996 -141.4 58.5996s-103.6 -20.7998 -141.4 -58.5996
c-37.7998 -37.8008 -58.5996 -88 -58.5996 -141.4s20.7998 -103.6 58.5996 -141.4c37.8008 -37.7998 88 -58.5996 141.4 -58.5996s103.6 20.7998 141.4 58.5996zM328 284c25.7002 0 55.9004 -16.9004 59.7002 -42.0996c1.7998 -11.1006 -11.2998 -18.2002 -19.7998 -10.8008
l-9.5 8.5c-14.8008 13.2002 -46.2002 13.2002 -61 0l-9.5 -8.5c-8.30078 -7.39941 -21.5 -0.399414 -19.8008 10.8008c4 25.1992 34.2002 42.0996 59.9004 42.0996zM168 224c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32z
M362.4 160c8.19922 0 14.5 -7 13.5 -15c-7.5 -59.2002 -58.9004 -105 -121.101 -105h-13.5996c-62.2002 0 -113.601 45.7998 -121.101 105c-1 8 5.30078 15 13.5 15h228.801z" />
<glyph glyph-name="meh-blank" unicode="&#xf5a4;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM168 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32
s-32 14.2998 -32 32s14.2998 32 32 32zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32z" />
<glyph glyph-name="meh-rolling-eyes" unicode="&#xf5a5;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM336 296c39.7998 0 72 -32.2002 72 -72s-32.2002 -72 -72 -72
s-72 32.2002 -72 72s32.2002 72 72 72zM336 184c22.0996 0 40 17.9004 40 40c0 13.5996 -7.2998 25.0996 -17.7002 32.2998c1 -2.59961 1.7002 -5.39941 1.7002 -8.2998c0 -13.2998 -10.7002 -24 -24 -24s-24 10.7002 -24 24c0 3 0.700195 5.7002 1.7002 8.2998
c-10.4004 -7.2002 -17.7002 -18.7002 -17.7002 -32.2998c0 -22.0996 17.9004 -40 40 -40zM232 224c0 -39.7998 -32.2002 -72 -72 -72s-72 32.2002 -72 72s32.2002 72 72 72s72 -32.2002 72 -72zM120 224c0 -22.0996 17.9004 -40 40 -40s40 17.9004 40 40
c0 13.5996 -7.2998 25.0996 -17.7002 32.2998c1 -2.59961 1.7002 -5.39941 1.7002 -8.2998c0 -13.2998 -10.7002 -24 -24 -24s-24 10.7002 -24 24c0 3 0.700195 5.7002 1.7002 8.2998c-10.4004 -7.2002 -17.7002 -18.7002 -17.7002 -32.2998zM312 96
c13.2002 0 24 -10.7998 24 -24s-10.7998 -24 -24 -24h-128c-13.2002 0 -24 10.7998 -24 24s10.7998 24 24 24h128z" />
<glyph glyph-name="sad-cry" unicode="&#xf5b3;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM392 53.5996c34.5996 35.9004 56 84.7002 56 138.4c0 110.3 -89.7002 200 -200 200s-200 -89.7002 -200 -200c0 -53.7002 21.4004 -102.4 56 -138.4v114.4
c0 13.2002 10.7998 24 24 24s24 -10.7998 24 -24v-151.4c28.5 -15.5996 61.2002 -24.5996 96 -24.5996s67.5 9 96 24.5996v151.4c0 13.2002 10.7998 24 24 24s24 -10.7998 24 -24v-114.4zM205.8 213.5c-5.7998 -3.2002 -11.2002 -0.700195 -13.7002 1.59961l-9.5 8.5
c-14.7998 13.2002 -46.1992 13.2002 -61 0l-9.5 -8.5c-3.7998 -3.39941 -9.2998 -4 -13.6992 -1.59961c-4.40039 2.40039 -6.90039 7.40039 -6.10059 12.4004c3.90039 25.1992 34.2002 42.0996 59.7998 42.0996c25.6006 0 55.8008 -16.9004 59.8008 -42.0996
c0.799805 -5 -1.7002 -10 -6.10059 -12.4004zM344 268c25.7002 0 55.9004 -16.9004 59.7998 -42.0996c0.799805 -5 -1.7002 -10 -6.09961 -12.4004c-5.7002 -3.09961 -11.2002 -0.599609 -13.7002 1.59961l-9.5 8.5c-14.7998 13.2002 -46.2002 13.2002 -61 0l-9.5 -8.5
c-3.7998 -3.39941 -9.2002 -4 -13.7002 -1.59961c-4.39941 2.40039 -6.89941 7.40039 -6.09961 12.4004c3.89941 25.1992 34.0996 42.0996 59.7998 42.0996zM248 176c30.9004 0 56 -28.7002 56 -64s-25.0996 -64 -56 -64s-56 28.7002 -56 64s25.0996 64 56 64z" />
<glyph glyph-name="sad-tear" unicode="&#xf5b4;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM256 144c38.0996 0 74 -16.7998 98.5 -46.0996
c8.5 -10.2002 7.09961 -25.3008 -3.09961 -33.8008c-10.6006 -8.7998 -25.7002 -6.69922 -33.8008 3.10059c-15.2998 18.2998 -37.7998 28.7998 -61.5996 28.7998c-13.2002 0 -24 10.7998 -24 24s10.7998 24 24 24zM168 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32
s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32zM162.4 173.2c2.7998 3.7002 8.39941 3.7002 11.1992 0c11.4004 -15.2998 36.4004 -50.6006 36.4004 -68.1006
c0 -22.6992 -18.7998 -41.0996 -42 -41.0996s-42 18.4004 -42 41.0996c0 17.5 25 52.8008 36.4004 68.1006z" />
<glyph glyph-name="smile-beam" unicode="&#xf5b8;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM332 135.4c8.5 10.1992 23.5996 11.5 33.7998 3.09961
c10.2002 -8.5 11.6006 -23.5996 3.10059 -33.7998c-30 -36 -74.1006 -56.6006 -120.9 -56.6006s-90.9004 20.6006 -120.9 56.6006c-8.39941 10.2002 -7.09961 25.2998 3.10059 33.7998c10.2002 8.40039 25.2998 7.09961 33.7998 -3.09961
c20.7998 -25.1006 51.5 -39.4004 84 -39.4004s63.2002 14.4004 84 39.4004zM136.5 237l-9.5 -17c-1.90039 -3.2002 -5.90039 -4.7998 -9.2998 -3.7002c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998c3.2998 42.1006 32.2002 71.4004 56 71.4004s52.7002 -29.2998 56 -71.4004
c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998c-3.09961 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996s-23.7998 -7.89941 -31.5 -21.5996zM328 296c23.7998 0 52.7002 -29.2998 56 -71.4004
c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998c-3.09961 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996s-23.7998 -7.89941 -31.5 -21.5996l-9.5 -17c-1.90039 -3.2002 -5.7998 -4.7998 -9.2998 -3.7002
c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998c3.2998 42.1006 32.2002 71.4004 56 71.4004z" />
<glyph glyph-name="surprise" unicode="&#xf5c2;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM248 168c35.2998 0 64 -28.7002 64 -64s-28.7002 -64 -64 -64
s-64 28.7002 -64 64s28.7002 64 64 64zM200 240c0 -17.7002 -14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32z" />
<glyph glyph-name="tired" unicode="&#xf5c8;" horiz-adv-x="496"
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM377.1 295.8c3.80078 -4.39941 3.90039 -11 0.100586 -15.5
l-33.6006 -40.2998l33.6006 -40.2998c3.7998 -4.5 3.7002 -11 -0.100586 -15.5c-3.5 -4.10059 -9.89941 -5.7002 -15.2998 -2.5l-80 48c-3.59961 2.2002 -5.7998 6.09961 -5.7998 10.2998s2.2002 8.09961 5.7998 10.2998l80 48c5 2.90039 11.5 1.90039 15.2998 -2.5z
M220 240c0 -4.2002 -2.2002 -8.09961 -5.7998 -10.2998l-80 -48c-5.40039 -3.2002 -11.7998 -1.60059 -15.2998 2.5c-3.80078 4.5 -3.90039 11 -0.100586 15.5l33.6006 40.2998l-33.6006 40.2998c-3.7998 4.5 -3.7002 11 0.100586 15.5
c3.7998 4.40039 10.2998 5.5 15.2998 2.5l80 -48c3.59961 -2.2002 5.7998 -6.09961 5.7998 -10.2998zM248 176c45.4004 0 100.9 -38.2998 107.8 -93.2998c1.5 -11.9004 -7 -21.6006 -15.5 -17.9004c-22.7002 9.7002 -56.2998 15.2002 -92.2998 15.2002
s-69.5996 -5.5 -92.2998 -15.2002c-8.60059 -3.7002 -17 6.10059 -15.5 17.9004c6.89941 55 62.3994 93.2998 107.8 93.2998z" />
</font>
</defs></svg>

After

Width:  |  Height:  |  Size: 141 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 896 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,148 @@
( function( api, $, _ ) {
wp.customize.bind( 'preview-ready', function() {
});// 'preview-ready'
if ( serverPreviewParams && ! serverPreviewParams.preview_ready_event_exists ) {
try { api.czr_preview = new api.CZR_preview(); } catch( _er_ ) {
console.log( "new api.CZR_preview() => error => ", _er_ );
}
}
else {
api.bind( 'preview-ready', function(){
api.preview.bind( 'active', function() {
try { api.czr_preview = new api.CZR_preview(); } catch( _er_ ) {
console.log( "new api.CZR_preview() => error => ", _er_ );
}
});
});
}
var czrPreviewConstructor = {
setting_cbs : {},
subsetting_cbs : {},//nested sub settings
input_cbs : {},
initialize: function() {
var self = this;
this.pre_setting_cbs = _.extend( self.pre_setting_cbs, self.getPreSettingCbs() );
this.setting_cbs = _.extend( self.setting_cbs, self.getSettingCbs() );
this.subsetting_cbs = _.extend( self.subsetting_cbs, self.getSubSettingCbs() );
this.input_cbs = _.extend( self.input_cbs, self.getInputCbs() );
this.syncData();
this.addCbs();
$( 'body' ).removeClass( 'wp-customizer-unloading' );
},
getPreSettingCbs : function() { return {}; },
getSettingCbs : function() { return {}; },
getSubSettingCbs : function() { return {}; },
getInputCbs : function() { return {}; },
syncData : function() {
api.preview.send( 'czr-query-data-ready', api.settings.czr_wpQueryInfos );
api.preview.send(
'czr-partial-refresh-data',
typeof( undefined ) === typeof( _customizePartialRefreshExports ) ? {} : _customizePartialRefreshExports.partials
);
},
addCbs : function() {
var self = this;
api.preview.bind( 'pre_setting', function( args ) {
args = args || {};
var _setId = args.set_id;
if ( ! api.has( self._build_setId( _setId ) ) )
return;
var _opt_name = self._get_option_name( args.set_id );
if ( ! _.has( self.pre_setting_cbs, _opt_name ) || ! _.isFunction( self.pre_setting_cbs[ _opt_name ] ) )
return;
self.pre_setting_cbs[ _opt_name ]( args );
});
_.each( self.setting_cbs, function( _cb, _setId ) {
if ( ! api.has( self._build_setId( _setId ) ) )
return;
if ( _.isFunction( self.setting_cbs[ _setId ] ) ) {
api( self._build_setId(_setId) ).bind( self.setting_cbs[ _setId ] );
}
} );
api.preview.bind( 'sub_setting', function( args ) {
var _opt_name = self._get_option_name( args.set_id );
if ( ! _.has(self.subsetting_cbs, _opt_name) )
return;
if ( ! _.has( self.subsetting_cbs[ _opt_name ], args.changed_prop ) )
return;
self.subsetting_cbs[ _opt_name ][ args.changed_prop ]( args );
});
api.preview.bind( 'czr_input', function( args ) {
var _defaults = {
set_id : '',
module_id : '',
item_id : '',
input_id : '',
value : null
};
args = _.extend ( _defaults, args );
var _opt_name = self._get_option_name( args.set_id );
if ( ! _.has( self.input_cbs, _opt_name ) )
return;
if ( ! _.has( self.input_cbs[ _opt_name ], args.input_id ) )
return;
self.input_cbs[ _opt_name ][ args.input_id ]( args );
});
api.selectiveRefresh.bind( 'partial-content-rendered', function( params ) {
if ( ! _.has( params, 'partial' ) || ! _.has( params.partial, 'id' ) )
return;
var _shortOptName = params.partial.id;
api.preview.send( 'czr-partial-refresh-done', { set_id : self._build_setId( params.partial.id ) } );
});
},
_build_setId : function ( name ) {
var self = this;
if ( _.isEmpty( window.themeServerPreviewParams ) )
return name;
if ( ! _.isArray( themeServerPreviewParams.wpBuiltinSettings ) || _.contains( themeServerPreviewParams.wpBuiltinSettings, name ) )
return name;
var themeOptionsPrefix = themeServerPreviewParams.themeOptionsPrefix;
if ( _.isEmpty( themeOptionsPrefix ) )
return name;
return -1 == name.indexOf( themeOptionsPrefix ) ? [ themeOptionsPrefix + '[' , name , ']' ].join('') : name;
},
_get_option_name : function( name ) {
if ( _.isEmpty( window.themeServerPreviewParams ) )
return name;
var themeOptionsPrefix = themeServerPreviewParams.themeOptionsPrefix;
if ( _.isEmpty( themeOptionsPrefix ) )
return name;
var self = this;
return name.replace(/\[|\]/g, '').replace( themeOptionsPrefix, '');
},
_is_external : function( _href ) {
if ( 'string' !== typeof(_href) )
return false;
var _thisHref = _href.trim(),
_main_domain = (location.host).split('.').slice(-2).join('.'),
_reg = new RegExp( _main_domain );
if ( _thisHref !== '' && _thisHref != '#' && _isValidURL( _thisHref ) )
return !_reg.test( _thisHref );
return false;
},
_isValidURL : function(_url){
var _pattern = /(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
return _pattern.test( _url );
}
};//czrPreviewConstructor
api.CZR_preview = api.Class.extend( czrPreviewConstructor );
} )( wp.customize, jQuery, _ );
@@ -0,0 +1 @@
!function(r,t,s){if(wp.customize.bind("preview-ready",function(){}),serverPreviewParams&&!serverPreviewParams.preview_ready_event_exists)try{r.czr_preview=new r.CZR_preview}catch(e){console.log("new api.CZR_preview() => error => ",e)}else r.bind("preview-ready",function(){r.preview.bind("active",function(){try{r.czr_preview=new r.CZR_preview}catch(e){console.log("new api.CZR_preview() => error => ",e)}})});var e={setting_cbs:{},subsetting_cbs:{},input_cbs:{},initialize:function(){var e=this;this.pre_setting_cbs=s.extend(e.pre_setting_cbs,e.getPreSettingCbs()),this.setting_cbs=s.extend(e.setting_cbs,e.getSettingCbs()),this.subsetting_cbs=s.extend(e.subsetting_cbs,e.getSubSettingCbs()),this.input_cbs=s.extend(e.input_cbs,e.getInputCbs()),this.syncData(),this.addCbs(),t("body").removeClass("wp-customizer-unloading")},getPreSettingCbs:function(){return{}},getSettingCbs:function(){return{}},getSubSettingCbs:function(){return{}},getInputCbs:function(){return{}},syncData:function(){r.preview.send("czr-query-data-ready",r.settings.czr_wpQueryInfos),r.preview.send("czr-partial-refresh-data","undefined"==typeof _customizePartialRefreshExports?{}:_customizePartialRefreshExports.partials)},addCbs:function(){var n=this;r.preview.bind("pre_setting",function(e){var t=(e=e||{}).set_id;if(r.has(n._build_setId(t))){var i=n._get_option_name(e.set_id);s.has(n.pre_setting_cbs,i)&&s.isFunction(n.pre_setting_cbs[i])&&n.pre_setting_cbs[i](e)}}),s.each(n.setting_cbs,function(e,t){r.has(n._build_setId(t))&&s.isFunction(n.setting_cbs[t])&&r(n._build_setId(t)).bind(n.setting_cbs[t])}),r.preview.bind("sub_setting",function(e){var t=n._get_option_name(e.set_id);s.has(n.subsetting_cbs,t)&&s.has(n.subsetting_cbs[t],e.changed_prop)&&n.subsetting_cbs[t][e.changed_prop](e)}),r.preview.bind("czr_input",function(e){e=s.extend({set_id:"",module_id:"",item_id:"",input_id:"",value:null},e);var t=n._get_option_name(e.set_id);s.has(n.input_cbs,t)&&s.has(n.input_cbs[t],e.input_id)&&n.input_cbs[t][e.input_id](e)}),r.selectiveRefresh.bind("partial-content-rendered",function(e){if(s.has(e,"partial")&&s.has(e.partial,"id")){e.partial.id;r.preview.send("czr-partial-refresh-done",{set_id:n._build_setId(e.partial.id)})}})},_build_setId:function(e){if(s.isEmpty(window.themeServerPreviewParams))return e;if(!s.isArray(themeServerPreviewParams.wpBuiltinSettings)||s.contains(themeServerPreviewParams.wpBuiltinSettings,e))return e;var t=themeServerPreviewParams.themeOptionsPrefix;return s.isEmpty(t)?e:-1==e.indexOf(t)?[t+"[",e,"]"].join(""):e},_get_option_name:function(e){if(s.isEmpty(window.themeServerPreviewParams))return e;var t=themeServerPreviewParams.themeOptionsPrefix;if(s.isEmpty(t))return e;return e.replace(/\[|\]/g,"").replace(t,"")},_is_external:function(e){if("string"!=typeof e)return!1;var t=e.trim(),i=location.host.split(".").slice(-2).join("."),n=new RegExp(i);return!(""===t||"#"==t||!_isValidURL(t))&&!n.test(t)},_isValidURL:function(e){return/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(e)}};r.CZR_preview=r.Class.extend(e)}(wp.customize,jQuery,_);
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,123 @@
//extends api.CZRModule
var BodyBGConstructor = BodyBGConstructor || {};
( function ( api, $, _ ) {
$.extend( BodyBGConstructor, {
initialize: function( id, options ) {
var module = this;
//extend the module with new template Selectors
// $.extend( module, {
// itemInputList : 'czr-module-bodybg-item-content'
// } );
//EXTEND THE DEFAULT CONSTRUCTORS FOR INPUT
module.inputConstructor = api.CZRInput.extend( module.CZRBodyBgInputMths || {} );
//EXTEND THE DEFAULT CONSTRUCTORS FOR MONOMODEL
module.itemConstructor = api.CZRItem.extend( module.CZBodyBgItemMths || {} );
//run the parent initialize
api.CZRModule.prototype.initialize.call( module, id, options );
},//initialize
CZRBodyBgInputMths : {
//////////////////////////////////////////////////
///SETUP SELECTS
//////////////////////////////////////////////////
//setup select on view_rendered|item_content_event_map
setupSelect : function() {
var input = this,
_id_param_map = {
'background-repeat' : 'bg_repeat_options',
'background-attachment' : 'bg_attachment_options',
'background-position' : 'bg_position_options'
},
item = input.input_parent,
serverParams = bodyBGModuleLocalized,
options = {},
module = input.module;
if ( ! _.has( _id_param_map, input.id ) )
return;
if ( _.isUndefined( serverParams ) || _.isUndefined( serverParams[ _id_param_map[input.id] ] ) )
return;
options = serverParams[ _id_param_map[input.id] ];
if ( _.isEmpty(options) )
return;
//generates the options
_.each( options, function( title, key ) {
var _attributes = {
value : key,
html: title
};
if ( key == input() || _.contains( input(), key ) )
$.extend( _attributes, { selected : "selected" } );
$( 'select[data-czrtype]', input.container ).append( $('<option>', _attributes) );
});
//fire czrSelect2
$( 'select[data-czrtype]', input.container ).czrSelect2();
}
},
CZBodyBgItemMths : {
//Fired if the item has been instantiated
//The item.callbacks are declared.
ready : function() {
var item = this;
item.inputCollection.bind( function( _col_ ) {
if ( ! _.isEmpty( _col_ ) && item.czr_Input && item.czr_Input.has( 'background-image' ) ) {
item.czr_Input('background-image').isReady.done( function( input_instance ) {
var set_visibilities = function( bg_val ) {
var is_bg_img_set = ! _.isEmpty( bg_val ) ||_.isNumber( bg_val);
_.each( ['background-repeat', 'background-attachment', 'background-position', 'background-size'], function( dep ) {
item.czr_Input(dep).container.toggle( is_bg_img_set || false );
});
};
set_visibilities( input_instance() );
//update the item model on 'background-image' change
item.bind('background-image:changed', function(){
set_visibilities( item.czr_Input('background-image')() );
});
});
}
});
api.CZRItem.prototype.ready.call( item );
},
}
});//$.extend
//provides a description of each module
//=> will determine :
//1) how to initialize the module model. If not crud, then the initial item(s) model shall be provided
//2) which js template(s) to use : if crud, the module template shall include the add new and pre-item elements.
// , if crud, the item shall be removable
//3) how to render : if multi item, the item content is rendered when user click on edit button.
// If not multi item, the single item content is rendered as soon as the item wrapper is rendered.
//4) some DOM behaviour. For example, a multi item shall be sortable.
api.czrModuleMap = api.czrModuleMap || {};
$.extend( api.czrModuleMap, {
czr_background : {
mthds : BodyBGConstructor,
crud : false,
multi_item : false,
name : 'Body Background',
has_mod_opt : false,
ready_on_section_expanded : true,
defaultItemModel : {
'background-color' : '#eaeaea',
'background-image' : '',
'background-repeat' : 'no-repeat',
'background-attachment' : 'fixed',
'background-position' : 'center center',
'background-size' : 'cover'
}
}
});
})( wp.customize , jQuery, _ );
@@ -0,0 +1,143 @@
<?php
function hu_register_body_bg_module( $args ) {
$defaults = array(
'setting_id' => '',
'base_url_path' => '',//PC_AC_BASE_URL/inc/czr-modules/social-links/
'version' => '',
'option_value' => array(), //<= will be used for the dynamic registration
'setting' => array(),
'control' => array(),
'section' => array(), //array( 'id' => '', 'label' => '' ),
'sanitize_callback' => '',
'validate_callback' => ''
);
$args = wp_parse_args( $args, $defaults );
if ( ! isset( $GLOBALS['czr_base_fmk_namespace'] ) ) {
error_log( __FUNCTION__ . ' => global czr_base_fmk not set' );
return;
}
$czrnamespace = $GLOBALS['czr_base_fmk_namespace'];
//czr_fn\czr_register_dynamic_module
$CZR_Fmk_Base_fn = $czrnamespace . 'CZR_Fmk_Base';
if ( ! function_exists( $CZR_Fmk_Base_fn) ) {
error_log( __FUNCTION__ . ' => Namespace problem => ' . $CZR_Fmk_Base_fn );
return;
}
$CZR_Fmk_Base_fn() -> czr_pre_register_dynamic_setting( array(
'setting_id' => $args['setting_id'],
'module_type' => 'czr_background',
'option_value' => ! is_array( $args['option_value'] ) ? array() : $args['option_value'],
'setting' => $args['setting'],
'section' => $args['section'],
'control' => $args['control']
));
// czr_fn\czr_register_dynamic_module()
$CZR_Fmk_Base_fn() -> czr_pre_register_dynamic_module( array(
'dynamic_registration' => true,
'module_type' => 'czr_background',
// 'sanitize_callback' => 'hu_sanitize_callback__czr_social_module',
// 'validate_callback' => 'hu_validate_callback__czr_social_module',
'customizer_assets' => array(
'control_js' => array(
// handle + params for wp_enqueue_script()
// @see https://developer.wordpress.org/reference/functions/wp_enqueue_script/
'czr-body-bg-module' => array(
'src' => sprintf(
'%1$s/assets/js/%2$s',
$args['base_url_path'],
'_3_2_body_background_module.js'
),
'deps' => array('customize-controls' , 'jquery', 'underscore'),
'ver' => ( defined('WP_DEBUG') && true === WP_DEBUG ) ? time() : $args['version'],
'in_footer' => true
)
),
'localized_control_js' => array(
'deps' => 'czr-customizer-fmk',
'global_var_name' => 'bodyBGModuleLocalized',
'params' => array(
//background repeat select options
'bg_repeat_options' => array(
'no-repeat' => __( 'No Repeat', 'hueman' ),
'repeat' => __( 'Repeat All', 'hueman' ),
'repeat-x' => __( 'Repeat Horizontally', 'hueman' ),
'repeat-y' => __( 'Repeat Vertically', 'hueman' ),
'inherit' => __( 'Inherit', 'hueman' ),
),
//background attachment select options
'bg_attachment_options' => array(
'fixed' => __( 'Fixed', 'hueman' ),
'scroll' => __( 'Scroll', 'hueman' ),
'inherit' => __( 'Inherit', 'hueman' ),
),
//background position select options
'bg_position_options' => array(
'left top' => __( 'Left Top', 'hueman' ),
'left center' => __( 'Left Center', 'hueman' ),
'left bottom' => __( 'Left Bottom', 'hueman' ),
'center top' => __( 'Center Top', 'hueman' ),
'center center' => __( 'Center Center', 'hueman' ),
'center bottom' => __( 'Center Bottom', 'hueman' ),
'right top' => __( 'Right Top', 'hueman' ),
'right center' => __( 'Right Center', 'hueman' ),
'right bottom' => __( 'Right Bottom', 'hueman' ),
)
)
)
),
'tmpl' => array(
'item-inputs' => array(
'background-color' => array(
'input_type' => 'wp_color_alpha',
'title' => __('Color', 'hueman'),
'default' => '#eaeaea',
'width-100' => true
),//"#000000",
'background-image' => array(
'input_type' => 'upload',
'title' => __('Background Image', 'hueman'),
),
'background-repeat' => array(
'input_type' => 'select',
'title' => __('Repeat', 'hueman'),
),
'background-attachment' => array(
'input_type' => 'select',
'title' => __('Background attachment', 'hueman'),
),
'background-position' => array(
'input_type' => 'select',
'title' => __('Background position', 'hueman'),
),
'background-size' => array(
'input_type' => 'text',
'title' => __('Background size', 'hueman'),
'notice_after' => sprintf( '%1$s %2$s',
__('The background-size CSS property specifies the size of the background images. The size of the image can be fully constrained or only partially in order to preserve its intrinsic ratio.', 'hueman'),
sprintf(' %1$s %2$s.',
__('Learn more', 'hueman'),
sprintf('<a href="%1$s" target="_blank">%2$s</a>', esc_url('developer.mozilla.org/en-US/docs/Web/CSS/background-size'), __('here', 'hueman') )
)
)
)
)
)//tmpl
));
}//hu_register_body_bg_module()
@@ -0,0 +1,499 @@
//extends api.CZRDynModule
var CZRSocialModuleMths = CZRSocialModuleMths || {};
( function ( api, $, _ ) {
$.extend( CZRSocialModuleMths, {
initialize: function( id, options ) {
if ( _.isUndefined( window.socialModuleLocalized ) ) {
api.errorLog( 'social module => Missing localized js params socialModuleLocalized');
}
var module = this;
//run the parent initialize
api.CZRDynModule.prototype.initialize.call( module, id, options );
//extend the module with new template Selectors
$.extend( module, {
itemPreAddEl : '',/// 'czr-module-social-pre-add-view-content',
itemInputList : '',// 'czr-module-social-item-content',
modOptInputList : ''//czr-module-social-mod-opt'
} );
this.social_icons = [
'500px',
'adn',
'amazon',
'android',
'angellist',
'apple',
'behance',
'behance-square',
'bitbucket',
//'bitbucket-square', //<- removed in fa5
'black-tie',
'btc',
'buysellads',
'chrome',
'codepen',
'codiepie',
'connectdevelop',
'contao',
'dashcube',
'delicious',
'deviantart',
'digg',
'discord',
'dribbble',
'dropbox',
'drupal',
'edge',
'empire',
'envelope',
'envelope-o', //<- go with far envelope
'envelope-square',
'expeditedssl',
'facebook',
'facebook-f (alias)',
//'facebook-official', //<- removed in fa5
'facebook-square',
'firefox',
'flickr',
'flipboard',
'fonticons',
'fort-awesome',
'forumbee',
'foursquare',
'get-pocket',
'gg',
'gg-circle',
'git',
'github',
'github-alt',
'github-square',
'gitlab',
'git-square',
'google',
'google-plus',
//'google-plus-circle', //<- removed in fa5
//'google-plus-official', //<- removed in fa5
'google-plus-g', //<- added in fa5
'google-plus-square',
'google-wallet',
'gratipay',
'hacker-news',
'houzz',
'imdb',
'instagram',
'internet-explorer',
'ioxhost',
'joomla',
'jsfiddle',
'lastfm',
'lastfm-square',
'leanpub',
'line',
'linkedin',
//'linkedin-square', //<- removed in fa5
'linkedin-in', //<- added in fa5
'linux',
'mastodon',
'maxcdn',
//'meanpath', <- removed in fa5
'meetup',
'medium',
'mixcloud',
'map-marker',
'mobile',
'mobile-alt',//<- added in fa5
'modx',
'odnoklassniki',
'odnoklassniki-square',
'opencart',
'openid',
'opera',
'optin-monster',
'pagelines',
'patreon',
'paypal',
'phone',
'phone-square',
'pied-piper',
'pied-piper-alt',
'pinterest',
'pinterest-p',
'pinterest-square',
'product-hunt',
'qq',
'rebel',
'reddit',
'reddit-alien',
'reddit-square',
'renren',
'rss',
'rss-square',
'safari',
'scribd',
'sellsy',
'share-alt',
'share-alt-square',
'shirtsinbulk',
'simplybuilt',
'skyatlas',
'skype',
'slack',
'slideshare',
'sms',
'snapchat',
'soundcloud',
'spotify',
'stack-exchange',
'stack-overflow',
'steam',
'steam-square',
'stumbleupon',
'stumbleupon-circle',
'strava',
'telegram',
'tencent-weibo',
'tiktok',
'trello',
'tripadvisor',
'tumblr',
'tumblr-square',
'twitch',
'twitter',
'twitter-square',
'usb',
'viacoin',
'viber',
'vimeo',
'vimeo-square',
'vine',
'vk',
'weibo',
'weixin',
'whatsapp',
'wikipedia-w',
'windows',
'wordpress',
'xing',
'xing-square',
'yahoo',
'y-combinator',
'yelp',
'youtube',
//'youtube-play', //<- removed in fa5
'youtube-square'
];
//FA5 backward compatibility with FA4
//see https://github.com/presscustomizr/customizr/issues/1364
this.fa_solid_icons = [
'fa-envelope',
'fa-envelope-square',
'fa-map-marker',
'fa-mobile',
'fa-mobile-alt',
'fa-phone',
'fa-phone-square',
'fa-rss',
'fa-rss-square',
'fa-share-alt',
'fa-share-alt-square',
'fa-sms'
];
this.fa_icons_replacement = {
'fa-bitbucket-square' : 'fa-bitbucket',
'fa-facebook-official' : 'fa-facebook-f',
'fa-google-plus-circle' : 'fa-google-plus',
'fa-google-plus-official' : 'fa-google-plus',
'fa-linkedin-square' : 'fa-linkedin',
'fa-youtube-play' : 'fa-youtube'
};
this.defaultSocialColor = socialModuleLocalized.defaultSocialColor ? socialModuleLocalized.defaultSocialColor : 'rgb(90,90,90)';
this.defaultSocialSize = socialModuleLocalized.defaultSocialSize ? socialModuleLocalized.defaultSocialSize : 14;
//EXTEND THE DEFAULT CONSTRUCTORS FOR INPUT
module.inputConstructor = api.CZRInput.extend( module.CZRSocialsInputMths || {} );
//EXTEND THE DEFAULT CONSTRUCTORS FOR MONOMODEL
module.itemConstructor = api.CZRItem.extend( module.CZRSocialsItem || {} );
//declares a default ModOpt model
this.defaultModOptModel = {
is_mod_opt : true,
module_id : module.id,
'social-size' : module.defaultSocialSize
};
//declares a default model
this.defaultItemModel = {
id : '',
title : '' ,
'social-icon' : '',
'social-link' : '',
'social-color' : module.defaultSocialColor,
'social-target' : 1
};
//overrides the default success message
this.itemAddedMessage = socialModuleLocalized.i18n['New Social Link created ! Scroll down to edit it.'];
//fired ready :
//1) on section expansion
//2) or in the case of a module embedded in a regular control, if the module section is already opened => typically when skope is enabled
if ( _.has( api, 'czr_activeSectionId' ) && module.control.section() == api.czr_activeSectionId() && 'resolved' != module.isReady.state() ) {
module.ready();
}
api.section( module.control.section() ).expanded.bind(function(to) {
//set module ready on section expansion
if ( 'resolved' != module.isReady.state() ) {
module.ready();
}
});
module.isReady.then( function() {
if ( _.isUndefined( module.preItem ) )
return;
//specific update for the item preModel on social-icon change
module.preItem.bind( function( to, from ) {
if ( ! _.has(to, 'social-icon') )
return;
if ( _.isEqual( to['social-icon'], from['social-icon'] ) )
return;
module.updateItemModel( module.preItem, true );
});
});
},//initialize
//ACTIONS ON ICON CHANGE
//Fired on 'social-icon:changed'
//Don't fire in pre item case
//@item_instance an be the preItem or an already created item
updateItemModel : function( item_instance, is_preItem ) {
var item = item_instance,
module = this;
is_preItem = is_preItem || false;
//check if we are in the pre Item case => if so, the social-icon might be empty
if ( ! _.has( item(), 'social-icon') || _.isEmpty( item()['social-icon'] ) )
return;
var _new_model, _new_title, _new_color;
_new_model = $.extend( true, {}, item() );//always safer to deep clone ( alternative to _.clone() ) => we don't know how nested this object might be in the future
_new_title = this.getTitleFromIcon( _new_model['social-icon'] );
_new_color = module.defaultSocialColor;
if ( ! is_preItem && item.czr_Input.has( 'social-color' ) )
_new_color = item.czr_Input('social-color')();
//add text follow us... to the title
_new_title = [ socialModuleLocalized.i18n['Follow us on'], _new_title].join(' ');
if ( is_preItem ) {
_new_model = $.extend( _new_model, { title : _new_title, 'social-color' : _new_color } );
item.set( _new_model );
} else {
item.czr_Input('title').set( _new_title );
//item.czr_Input('social-link').set( '' );
if ( item.czr_Input('social-color') ) { //optional
item.czr_Input('social-color').set( _new_color );
}
}
},
/* Helpers */
getTitleFromIcon : function( icon ) {
return api.CZR_Helpers.capitalize( icon.replace('fa-', '').replace('envelope', 'email') );
},
getIconFromTitle : function( title ) {
return 'fa-' . title.toLowerCase().replace('envelope', 'email');
},
//from : https://stackoverflow.com/a/34560648
_strReplace : function( $f, $r, $s ) {
return $s.replace(new RegExp("(" + (typeof($f) == "string" ? $f.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&") : $f.map(function(i){return i.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&")}).join("|")) + ")", "g"), typeof($r) == "string" ? $r : typeof($f) == "string" ? $r[0] : function(i){ return $r[$f.indexOf(i)]});
},
buildFaIcon : function( value ) {
//FA5 backward compatibility with FA4
//see https://github.com/presscustomizr/customizr/issues/1364
//by default they're brands
var _fa_group = 'fab', //<- brand group by default
_icon_class = value.toLowerCase(),
solidIcons = this.fa_solid_icons,
iconsReplacement = this.fa_icons_replacement;
_icon_class = this._strReplace( _.keys( iconsReplacement ), _.values( iconsReplacement ),_icon_class);
//former -o icons => now part of the far (Regular) group
if ( _icon_class.match(/-o$/) ) {
_fa_group = 'far';
_icon_class = _icon_class.replace(/-o$/,'');
}
//solid icons
else if ( _.contains( solidIcons, _icon_class ) ) {
_fa_group = 'fas';
}
return _fa_group + ' ' +_icon_class;
},
CZRSocialsInputMths : {
setupSelect : function() {
var input = this,
item = input.input_parent,
module = input.module,
socialList = module.social_icons,
solidIcons = module.fa_solid_icons,
iconsReplacement = module.fa_icons_eplacement,
_model = item(),
//check if we are in the pre Item case => if so, the id is empty
is_preItem = _.isEmpty( _model.id );
//=> add the select text in the pre Item case
if ( is_preItem ) {
socialList = _.union( [ socialModuleLocalized.i18n['Select a social icon'] || 'Select a social icon' ], socialList );
}
//generates the options
_.each( socialList , function( icon_name, k ) {
icon_name = _.isEmpty( icon_name ) ? '' : icon_name;
// in the pre Item case the first select element is the notice "Select a social icon"
// doesn't need the fa-* class
var _value = ( is_preItem && 0 === k ) ? '' : 'fa-' + icon_name.toLowerCase(),
_attributes = {
value : _value,
html: module.getTitleFromIcon( icon_name )
};
if ( _value == _model['social-icon'] )
$.extend( _attributes, { selected : "selected" } );
$( 'select[data-czrtype="social-icon"]', input.container ).append( $('<option>', _attributes) );
});
function addIcon( state ) {
if (! state.id) { return state.text; }
//two spans here because we cannot wrap the social text into the social icon span as the solid FA5 font-weight is bold
var $state = $(
'<span class="' + module.buildFaIcon( state.element.value.toLowerCase() ) + '"></span><span class="social-name">&nbsp;&nbsp;' + state.text + '</span>'
);
return $state;
}
//fire select2
$( 'select[data-czrtype="social-icon"]', input.container ).czrSelect2( {
templateResult: addIcon,
templateSelection: addIcon
});
},
setupColorPicker : function( obj ) {
var input = this,
item = input.input_parent,
module = input.module,
$el = $( 'input[data-czrtype="social-color"]', input.container );
$el.iris( {
palettes: true,
hide:false,
defaultColor : module.defaultSocialColor || 'rgba(255,255,255,0.7)',
change : function( e, o ) {
//if the input val is not updated here, it's not detected right away.
//weird
//is there a "change complete" kind of event for iris ?
//hack to reset the color to default...@todo => use another color picker.
if ( _.has( o, 'color') && 16777215 == o.color._color )
$(this).val( module.defaultSocialColor || 'rgba(255,255,255,0.7)' );
else
$(this).val( o.color.toString() );
$(this).trigger('colorpickerchange').trigger('change');
}
});
//when the picker opens, it might be below the visible viewport.
//No built-in event available to react on this in the wpColorPicker unfortunately
$el.closest('div').on('click keydown', function() {
module._adjustScrollExpandedBlock( input.container );
});
}
},//CZRSocialsInputMths
CZRSocialsItem : {
//Fired if the item has been instantiated
//The item.callbacks are declared.
ready : function() {
var item = this;
api.CZRItem.prototype.ready.call( item );
//update the item model on social-icon change
item.bind('social-icon:changed', function(){
item.module.updateItemModel( item );
});
},
_buildTitle : function( title, icon, color ) {
var item = this,
module = item.module;
title = title || ( 'string' === typeof(icon) ? api.CZR_Helpers.capitalize( icon.replace( 'fa-', '') ) : '' );
title = api.CZR_Helpers.truncate(title, 20);
icon = icon || 'fa-' + module.social_icons[0];
color = color || module.defaultSocialColor;
return '<div><span class="' + module.buildFaIcon( icon ) + '" style="color:' + color + '"></span> ' + title + '</div>';
},
//overrides the default parent method by a custom one
//at this stage, the model passed in the obj is up to date
writeItemViewTitle : function( model ) {
var item = this,
module = item.module,
_model = model || item(),
_title = module.getTitleFromIcon( _model['social-icon'] );
$( '.' + module.control.css_attr.item_title , item.container ).html(
item._buildTitle( _title, _model['social-icon'], _model['social-color'] )
);
}
},//CZRSocialsItem
});//$.extend
})( wp.customize , jQuery, _ );
(function ( api, $ ) {
//provides a description of each module
//=> will determine :
//1) how to initialize the module model. If not crud, then the initial item(s) model shall be provided
//2) which js template(s) to use : if crud, the module template shall include the add new and pre-item elements.
// , if crud, the item shall be removable
//3) how to render : if multi item, the item content is rendered when user click on edit button.
// If not multi item, the single item content is rendered as soon as the item wrapper is rendered.
//4) some DOM behaviour. For example, a multi item shall be sortable.
api.czrModuleMap = api.czrModuleMap || {};
$.extend( api.czrModuleMap, {
czr_social_module : {
mthds : CZRSocialModuleMths,
crud : true,
name : 'Social Icons',
has_mod_opt : true
},
});
})( wp.customize, jQuery );
@@ -0,0 +1,219 @@
<?php
function hu_register_social_links_module( $args ) {
$defaults = array(
'setting_id' => '',
'base_url_path' => '',//PC_AC_BASE_URL/inc/czr-modules/social-links/
'version' => '',
'option_value' => array(), //<= will be used for the dynamic registration
'setting' => array(),
'control' => array(),
'section' => array(), //array( 'id' => '', 'label' => '' ),
'sanitize_callback' => '',
'validate_callback' => ''
);
$args = wp_parse_args( $args, $defaults );
if ( ! isset( $GLOBALS['czr_base_fmk_namespace'] ) ) {
error_log( __FUNCTION__ . ' => global czr_base_fmk not set' );
return;
}
$czrnamespace = $GLOBALS['czr_base_fmk_namespace'];
//czr_fn\czr_register_dynamic_module
$CZR_Fmk_Base_fn = $czrnamespace . 'CZR_Fmk_Base';
if ( ! function_exists( $CZR_Fmk_Base_fn) ) {
error_log( __FUNCTION__ . ' => Namespace problem => ' . $CZR_Fmk_Base_fn );
return;
}
$CZR_Fmk_Base_fn() -> czr_pre_register_dynamic_setting( array(
'setting_id' => $args['setting_id'],
'module_type' => 'czr_social_module',
'option_value' => ! is_array( $args['option_value'] ) ? array() : $args['option_value'],
'setting' => $args['setting'],
'section' => $args['section'],
'control' => $args['control']
));
// czr_fn\czr_register_dynamic_module()
$CZR_Fmk_Base_fn() -> czr_pre_register_dynamic_module( array(
'dynamic_registration' => true,
'module_type' => 'czr_social_module',
'sanitize_callback' => 'hu_sanitize_callback__czr_social_module',
//'validate_callback' => 'hu_validate_callback__czr_social_module',
'customizer_assets' => array(
'control_js' => array(
// handle + params for wp_enqueue_script()
// @see https://developer.wordpress.org/reference/functions/wp_enqueue_script/
'czr-social-links-module' => array(
'src' => sprintf(
'%1$s/assets/js/%2$s',
$args['base_url_path'],
'_2_7_socials_module.js'
),
'deps' => array('customize-controls' , 'jquery', 'underscore'),
'ver' => ( defined('WP_DEBUG') && true === WP_DEBUG ) ? time() : $args['version'],
'in_footer' => true
)
),
'localized_control_js' => array(
'deps' => 'czr-customizer-fmk',
'global_var_name' => 'socialModuleLocalized',
'params' => array(
//Social Module
'defaultSocialColor' => 'rgb(90,90,90)',
'defaultSocialSize' => 14,
'i18n' => array(
'Rss' => __('Rss', 'hueman'),
'Select a social icon' => __('Select a social icon', 'hueman'),
'Follow us on' => __('Follow us on', 'hueman'),
'Done !' => __('Done !', 'hueman'),
'New Social Link created ! Scroll down to edit it.' => __('New Social Link created ! Scroll down to edit it.', 'hueman'),
)
//option value for dynamic registration
)
)
),
'tmpl' => array(
'pre-item' => array(
'social-icon' => array(
'input_type' => 'select',
'title' => __('Select an icon', 'hueman')
),
'social-link' => array(
'input_type' => 'text',
'title' => __('Social link url', 'hueman'),
'notice_after' => __('Enter the full url of your social profile (must be valid url).', 'hueman'),
'placeholder' => __('http://...,mailto:...,...', 'hueman')
)
),
'mod-opt' => array(
'social-size' => array(
'input_type' => 'number',
'title' => __('Size in px', 'hueman'),
'step' => 1,
'min' => 5,
'transport' => 'postMessage'
)
),
'item-inputs' => array(
'social-icon' => array(
'input_type' => 'select',
'title' => __('Social icon', 'hueman')
),
'social-link' => array(
'input_type' => 'text',
'title' => __('Social link', 'hueman'),
'notice_after' => __('Enter the full url of your social profile (must be valid url).', 'hueman'),
'placeholder' => __('http://...,mailto:...,...', 'hueman')
),
'title' => array(
'input_type' => 'text',
'title' => __('Title', 'hueman'),
'notice_after' => __('This is the text displayed on mouse over.', 'hueman'),
),
'social-color' => array(
'input_type' => 'color',
'title' => sprintf( '%1$s <i>%2$s %3$s</i>', __('Icon color', 'hueman'), __('default:', 'hueman'), 'rgba(255,255,255,0.7)' ),
'notice_after' => __('Set a unique color for your icon.', 'hueman'),
'transport' => 'postMessage'
),
'social-target' => array(
'input_type' => 'nimblecheck',
'title' => __('Link target', 'hueman'),
'notice_after' => __('Check this option to open the link in a another tab of the browser.', 'hueman'),
'title_width' => 'width-80',
'input_width' => 'width-20',
)
)
)
));
}//ac_register_social_links_module()
/////////////////////////////////////////////////////////////////
// SANITIZATION
/***
* Social Module sanitization/validation
**/
function hu_sanitize_callback__czr_social_module( $socials ) {
// error_log( 'IN SANITIZATION CALLBACK' );
// error_log( print_r( $socials, true ));
if ( empty( $socials ) )
return array();
//sanitize urls and titles for the db
foreach ( $socials as $index => &$social ) {
if ( ! is_array( $social ) || ! array_key_exists( 'title', $social) )
continue;
$social['title'] = esc_attr( $social['title'] );
}
return $socials;
}
function hu_validate_callback__czr_social_module( $validity, $socials ) {
// error_log( 'IN VALIDATION CALLBACK' );
// error_log( print_r( $socials, true ));
$ids_malformed_url = array();
$malformed_message = __( 'An error occurred: malformed social links', 'hueman');
if ( empty( $socials ) )
return array();
//(
// [0] => Array
// (
// [is_mod_opt] => 1
// [module_id] => tc_social_links_czr_module
// [social-size] => 15
// )
// [1] => Array
// (
// [id] => czr_social_module_0
// [title] => Follow us on Renren
// [social-icon] => fa-renren
// [social-link] => http://customizr-dev.dev/feed/rss/
// [social-color] => #6d4c8e
// [social-target] => 1
// )
// )
//validate urls
foreach ( $socials as $index => $item_or_modopt ) {
if ( ! is_array( $item_or_modopt ) )
return new WP_Error( 'required', $malformed_message );
//should be an item or a mod opt
if ( ! array_key_exists( 'is_mod_opt', $item_or_modopt ) && ! array_key_exists( 'id', $item_or_modopt ) )
return new WP_Error( 'required', $malformed_message );
//if modopt case, skip
if ( array_key_exists( 'is_mod_opt', $item_or_modopt ) )
continue;
if ( $item_or_modopt['social-link'] != esc_url_raw( $item_or_modopt['social-link'] ) )
array_push( $ids_malformed_url, $item_or_modopt[ 'id' ] );
}
if ( empty( $ids_malformed_url) )
return null;
return new WP_Error( 'required', __( 'Please fill the social link inputs with a valid URLs', 'hueman' ), $ids_malformed_url );
}
@@ -0,0 +1,973 @@
//extends api.CZRDynModule
//globals widgetModuleLocalized, themeServerControlParams
var WidgetAreaConstructor = WidgetAreaConstructor || {};
( function ( api, $, _ ) {
$.extend( WidgetAreaConstructor, {
initialize: function( id, constructorOptions ) {
var module = this;
api.CZRDynModule.prototype.initialize.call( this, id, constructorOptions );
//extend the module with new template Selectors
$.extend( module, {
itemPreAddEl : 'czr-module-widgets-pre-add-view-content',
itemInputList : 'czr-module-widgets-item-input-list',
ruItemPart : 'czr-module-widgets-ru-item-part'
} );
//EXTEND THE DEFAULT CONSTRUCTORS FOR INPUT
module.inputConstructor = api.CZRInput.extend( module.CZRWZonesInputMths || {} );
//EXTEND THE DEFAULT CONSTRUCTORS FOR MONOMODEL
module.itemConstructor = api.CZRItem.extend( module.CZRWZonesItemConstructor || {} );
module.serverParams = widgetModuleLocalized || {};
//add a shortcut to the server side json properties
module.contexts = _.has( module.serverParams , 'sidebar_contexts') ? module.serverParams.sidebar_contexts : {};
//context match map
module.context_match_map = {
is_404 : '404',
is_category : 'archive-category',
is_home : 'home',
is_page : 'page',
is_search : 'search',
is_single : 'single'
};
module.locations = _.has( module.serverParams , 'sidebar_locations') ? module.serverParams.sidebar_locations : {};
//declares a default model
module.defaultItemModel = {
id : '',
title : widgetModuleLocalized.i18n.widgetZone,
contexts : _.without( _.keys(module.contexts), '_all_' ),//the server list of contexts is an object, we only need the keys, whitout _all_
locations : [ module.serverParams.defaultWidgetLocation ],
description : ''
};
//overrides the default success message
this.itemAddedMessage = widgetModuleLocalized.i18n.widgetZoneAdded;
//Observe and react to sidebar insights from the preview frame
// SIDEBAR INSIGHTS => stores and observes the sidebars and widgets settings sent by the preview */
if ( ! _.has( api, 'sidebar_insights' ) ) {
api.sidebar_insights = new api.Values();
api.sidebar_insights.create('candidates');//will store the sidebar candidates on preview refresh
api.sidebar_insights.create('actives');//will record the refreshed active list of active sidebars sent from the preview
api.sidebar_insights.create('inactives');
api.sidebar_insights.create('registered');
api.sidebar_insights.create('available_locations');
}
this.listenToSidebarInsights();
//React on 'houston-widget-settings'
//actives : data.renderedSidebars,
// inactives : _inactives,
// registered : _registered,
// candidates : _candidates,
// available_locations : data.availableWidgetLocations//built server side
api.czr_widgetZoneSettings = api.czr_widgetZoneSettings || new api.Value();
api.czr_widgetZoneSettings.bind( function( updated_data_sent_from_preview , from ) {
//console.log('REACT ON czr_widgetZoneSettings', updated_data_sent_from_preview , from );
module.isReady.then( function() {
_.each( updated_data_sent_from_preview, function( _data, _key ) {
api.sidebar_insights( _key ).set( _data );
});
});
});
//AVAILABLE LOCATIONS FOR THE PRE MODEL
//1) add an observable value to module.preItem to handle the alert visibility
module.preItem_location_alert_view_state = new api.Value( 'closed');
//2) add state listeners
module.preItem_location_alert_view_state.callbacks.add( function( to, from ) {
module._toggleLocationAlertExpansion( module.container, to );
});
//REACT ON ADD / REMOVE ITEMS
module.bind( 'item-added', function( model ) {
module.addWidgetSidebar( model );
});
module.bind( 'pre_item_api_remove' , function(model) {
module.removeWidgetSidebar( model );
});
//records the top margin value of the widgets panel on each expansion
var fixTopMargin = new api.Values();
fixTopMargin.create('fixed_for_current_session');
fixTopMargin.create('value');
api.section(module.serverParams.dynWidgetSection).fixTopMargin = fixTopMargin;
api.section(module.serverParams.dynWidgetSection).fixTopMargin('fixed_for_current_session').set(false);
//setup reactions on widget section expansion
//change the expanded behaviour for the widget zone section
//api.section(module.serverParams.dynWidgetSection).expanded.callbacks.add( function() { return module.widgetSectionReact.apply(module, arguments ); } );
//bind actions on widget panel expansion and widget zone section expansion
//Fire the module
api.panel('widgets').expanded.callbacks.add( function(to, from) {
module.widgetPanelReact();//setup some visual adjustments, must be ran each time panel is closed or expanded
//Fire the module if not done already
if ( 'resolved' == module.isReady.state() )
return;
module.ready();
});
},//initialize
//When the control is embedded on the page, this method is fired in api.CZRBaseModuleControl:ready()
//=> right after the module is instantiated.
//VERIFIED
ready : function() {
var module = this;
api.CZRDynModule.prototype.ready.call( module );
//add state listener on pre Item view
module.preItemExpanded.callbacks.add( function( to, from ) {
if ( ! to )
return;
//refresh the location list
module.preItem.czr_Input( 'locations' )._setupLocationSelect( true );//true for refresh
//refresh the location alert message
module.preItem.czr_Input( 'locations' ).mayBeDisplayModelAlert();
});
},
//overrides parent method
//adds the default widget zones in the items
//VERIFIED
initializeModuleModel : function( constructorOptions ) {
var module = this, dfd = $.Deferred();
constructorOptions.items = _.union( _.has( module.serverParams, 'default_zones' ) ? module.serverParams.default_zones : [], constructorOptions.items );
return dfd.resolve( constructorOptions ).promise();
},
});//$.extend()
})( wp.customize , jQuery, _ );//extends api.CZRDynModule
//globals widgetModuleLocalized, themeServerControlParams
var WidgetAreaConstructor = WidgetAreaConstructor || {};
( function ( api, $, _ ) {
$.extend( WidgetAreaConstructor, {
CZRWZonesInputMths : {
ready : function() {
var input = this;
input.bind('locations:changed', function(){
input.mayBeDisplayModelAlert();
});
api.CZRInput.prototype.ready.call( input);
},
//////////////////////////////////////////////////
///SETUP SELECTS
//////////////////////////////////////////////////
//setup select on view_rendered|item_content_event_map
setupSelect : function() {
var input = this;
if ( 'locations' == this.id )
this._setupLocationSelect();
if ( 'contexts' == this.id )
this._setupContextSelect();
},
//helper
_setupContextSelect : function() {
var input = this,
input_contexts = input(),
item = input.input_parent,
module = input.module;
//generates the contexts options
_.each( module.contexts, function( title, key ) {
var _attributes = {
value : key,
html: title
};
if ( key == input_contexts || _.contains( input_contexts, key ) )
$.extend( _attributes, { selected : "selected" } );
$( 'select[data-czrtype="contexts"]', input.container ).append( $('<option>', _attributes) );
});
//fire czrSelect2
$( 'select[data-czrtype="contexts"]', input.container ).czrSelect2();
},
//helper
//the refresh param is a bool
_setupLocationSelect : function(refresh ) {
var input = this,
input_locations = input(),
item = input.input_parent,
module = input.module,
available_locs = api.sidebar_insights('available_locations')();
//console.log('_setupLocationSelect', input(), module.locations );
//generates the locations options
//append them if not set yet
if ( ! $( 'select[data-czrtype="locations"]', input.container ).children().length ) {
_.each( module.locations, function( title, key ) {
var _attributes = {
value : key,
html: title
};
if ( key == input_locations || _.contains( input_locations, key ) )
$.extend( _attributes, { selected : "selected" } );
$( 'select[data-czrtype="locations"]', input.container ).append( $('<option>', _attributes) );
});
}//if
function setAvailability( state ) {
if (! state.id) { return state.text; }
if ( _.contains(available_locs, state.element.value) ) { return state.text; }
var $state = $(
'<span class="czr-unavailable-location fas fa-ban" title="' + widgetModuleLocalized.i18n.unavailableLocation + '">&nbsp;&nbsp;' + state.text + '</span>'
);
return $state;
}
if ( refresh ) {
$( 'select[data-czrtype="locations"]', input.container ).czrSelect2( 'destroy' );
}
//fire czrSelect2
$( 'select[data-czrtype="locations"]', input.container ).czrSelect2( {
templateResult: setAvailability,
templateSelection: setAvailability
});
},
//fired on view event map : 'locations:changed'
//@param obj { dom_el: $() , model : {} )
mayBeDisplayModelAlert : function() {
var input = this,
item = input.input_parent,
module = input.module;
//check if we are in the pre Item case => if so, the locations might be empty
if ( ! _.has( item(), 'locations') || _.isEmpty( item().locations ) )
return;
var _selected_locations = $('select[data-czrtype="locations"]', input.container ).val(),
available_locs = api.sidebar_insights('available_locations')(),
_unavailable = _.filter( _selected_locations, function( loc ) {
return ! _.contains(available_locs, loc);
});
//check if we are in the pre Item case => if so, the id is empty
if ( ! _.has( item(), 'id' ) || _.isEmpty( item().id ) ) {
module.preItem_location_alert_view_state.set( ! _.isEmpty( _unavailable ) ? 'expanded' : 'closed' );
} else {
item.czr_itemLocationAlert.set( ! _.isEmpty( _unavailable ) ? 'expanded' : 'closed' );
}
}
},//CZRWZonesInputMths
});//$.extend()
})( wp.customize , jQuery, _ );//extends api.CZRDynModule
//globals widgetModuleLocalized, themeServerControlParams
var WidgetAreaConstructor = WidgetAreaConstructor || {};
( function ( api, $, _ ) {
$.extend( WidgetAreaConstructor, {
CZRWZonesItemConstructor : {
initialize : function( id, options ) {
var item = this,
module = item.module;
//Add some observable values for this item
item.czr_itemLocationAlert = new api.Value();
api.CZRItem.prototype.initialize.call( item, null, options );
// filter the params of the ajax query used to get the item wrapper template
// because we need a ru ( not a read update delete ) template for builtins widget zones
// requestParams = {
// tmpl : 'rud-item-part',
// module_type: 'all_modules',
// nonce: api.settings.nonce.save//<= do we need to set a specific nonce to fetch the tmpls ?
// };
// this has been introduced in March 2018, after the introduction of the tmpl ajax fetching
// it does the same job that the overriden getTemplateEl() was doing.
// This filter is declared in item::renderItemWrapper()
item.bind( 'item-wrapper-tmpl-params-before-fetching', function( requestParams ) {
//force view-content type to ru-item-part if the model is a built-in (primary, secondary, footer-1, ...)
//=> user can't delete a built-in model.
requestParams.tmpl = ( _.has( item(), 'is_builtin' ) && item().is_builtin ) ? 'ruItemPart' : requestParams.tmpl;
return requestParams;
});
},
//extend parent setupview
itemWrapperViewSetup : function() {
var item = this,
module = item.module;
api.CZRItem.prototype.itemWrapperViewSetup.call(item);
/// ALERT FOR NOT AVAILABLE LOCATION
item.czr_itemLocationAlert.set('closed');
//add a state listener on expansion change
item.czr_itemLocationAlert.callbacks.add( function( to, from ) {
module._toggleLocationAlertExpansion( item.container , to );
});
//update item title
item.writeSubtitleInfos(item());
//this is fired just after the itemWrapperViewSetupApiListeners
//=> add a callback to refresh the availability status of the locations in the select location picker
//add a state listener on expansion change
item.viewState.callbacks.add( function( to, from ) {
if ( -1 == to.indexOf('expanded') )//can take the expanded_noscroll value !
return;
//don't try to invoke the input instances before the content is actually rendered
//=> there might be cases when the content rendering is debounced...
item.bind('contentRendered', function() {
//refresh the location list
item.czr_Input('locations')._setupLocationSelect( true );//true for refresh
//refresh the location alert message
item.czr_Input('locations').mayBeDisplayModelAlert();
});
});
},
//extend parent listener
itemReact : function(to, from) {
var item = this;
api.CZRItem.prototype.itemReact.call(item, to, from);
item.writeSubtitleInfos(to);
item.updateSectionTitle(to).setModelUpdateTimer();
},
//Fired in setupItemListeners. Reacts to model change.
//Write html informations under the title : location(s) and context(s)
writeSubtitleInfos : function(model) {
var item = this,
module = item.module,
_model = _.clone( model || item() ),
_locations = [],
_contexts = [],
_html = '';
if ( ! item.container.length )
return this;
//generate the locations and the contexts text from the json data if exists
_model.locations =_.isString(_model.locations) ? [_model.locations] : _model.locations;
_.each( _model.locations, function( loc ) {
if ( _.has( module.locations , loc ) )
_locations.push(module.locations[loc]);
else
_locations.push(loc);
}
);
//build the context list
_model.contexts =_.isString(_model.contexts) ? [_model.contexts] : _model.contexts;
//all contexts cases ?
if ( item._hasModelAllContexts( model ) ) {
_contexts.push(module.contexts._all_);
} else {
_.each( _model.contexts, function( con ) {
if ( _.has( module.contexts , con ) )
_contexts.push(module.contexts[con]);
else
_contexts.push(con);
}
);
}
//Translated strings
var _locationText = widgetModuleLocalized.i18n.locations,
_contextText = widgetModuleLocalized.i18n.contexts,
_notsetText = widgetModuleLocalized.i18n.notset;
_locations = _.isEmpty( _locations ) ? '<span style="font-weight: bold;">' + _notsetText + '</span>' : _locations.join(', ');
_contexts = _.isEmpty( _contexts ) ? '<span style="font-weight: bold;">' + _notsetText + '</span>' : _contexts.join(', ');
//write the description if builtin
//else, write the dynamic location
// if ( _.has(_model, 'description') && _.has(_model, 'is_builtin') )
// _html = _model.description + ' <strong>|</strong> <u>Contexts</u> : ' + _contexts;
// else
_html = '<u>' + _locationText + '</u> : ' + _locations + ' <strong>|</strong> <u>' + _contextText + '</u> : ' + _contexts;
if ( ! $('.czr-zone-infos', item.container ).length ) {
var $_zone_infos = $('<div/>', {
class : [ 'czr-zone-infos' , module.control.css_attr.item_sort_handle ].join(' '),
html : _html
});
$( '.' + module.control.css_attr.item_btns, item.container ).after($_zone_infos);
} else {
$('.czr-zone-infos', item.container ).html(_html);
}
return this;
},//writeSubtitleInfos
////Fired in setupItemListeners
updateSectionTitle : function(model) {
var _sidebar_id = 'sidebar-widgets-' + model.id,
_new_title = model.title;
//does this section exists ?
if ( ! api.section.has(_sidebar_id) )
return this;
//update the section title
$('.accordion-section-title', api.section(_sidebar_id).container ).text(_new_title);
//update the top title ( visible when inside the expanded section )
$('.customize-section-title h3', api.section(_sidebar_id).container ).html(
'<span class="customize-action">' + api.section(_sidebar_id).params.customizeAction + '</span>' + _new_title
);
// $('.customize-section-title h3', api.section(_sidebar_id).container )
// .append('<span>', {
// class: 'customize-section-back',
// html: api.section(_sidebar_id).params.customizeAction
// } )
// .append(_new_title);
//remove and re-instanciate
//=> works for the section but the controls are not activated anymore.
//Should be easy to fix but useless to go further here. Jquery does the job.
// var _params = _.clone( api.section(_sidebar_id).params );
// _params.title = _new_title;
// api.section(_sidebar_id).container.remove();
// api.section.remove(_sidebar_id);
// api.section.add( _sidebar_id, new api.sectionConstructor[_params.type]( _params.id ,{ params : _params } ) );
return this;
},
//fired on model_update
//Don't hammer the preview with too many refreshs
//2 seconds delay
setModelUpdateTimer : function() {
var item = this,
module = item.module;
clearTimeout( $.data(this, 'modelUpdateTimer') );
$.data(
this,
'modelUpdateTimer',
_.delay( function() {
//refresh preview
api.previewer.refresh();
} , 1000)
);//$.data
},
//@return bool
//takes the model unique id
_hasModelAllContexts : function( model ) {
var item = this,
module = item.module,
moduleContexts = _.keys(module.contexts);
model = model || this();
if ( ! _.has(model, 'contexts') )
return;
if ( _.contains( model.contexts, '_all_') )
return true;
//case when model does not have _all_ but all the others
return _.isEmpty( _.difference( _.without(moduleContexts, '_all_') , model.contexts ) );
},
//@param contexts = array of contexts
//api.czr_wpQueryInfos is refreshed on each preview refresh
_getMatchingContexts : function( defaults ) {
var module = this,
_current = api.czr_wpQueryInfos().conditional_tags || {},
_matched = _.filter( module.context_match_map, function( hu, wp ) { return true === _current[wp]; } );
return _.isEmpty( _matched ) ? defaults : _matched;
}
},//CZRWZonesItemConstructor
});//$.extend()
})( wp.customize , jQuery, _ );//extends api.CZRDynModule
//globals widgetModuleLocalized, themeServerControlParams
var WidgetAreaConstructor = WidgetAreaConstructor || {};
( function ( api, $, _ ) {
$.extend( WidgetAreaConstructor, {
/////////////////////////////////////////
/// ADD / REMOVE WIDGET ZONES
////////////////////////////////////////
//fired on model_added_by_user
//
//can also be called statically when a dynamic sidebar is added in the preview
//in this case the parameter are the sidebar data with id and name
addWidgetSidebar : function( model, sidebar_data ) {
if ( ! _.isObject(model) && _.isEmpty(sidebar_data) ) {
throw new Error('No valid input were provided to add a new Widget Zone.');
}
//ADD the new sidebar to the existing collection
//Clone the serverControlParams.defaultWidgetSidebar sidebar
var module = this,
_model = ! _.isEmpty(model) ? _.clone(model) : sidebar_data,
_new_sidebar = _.isEmpty(model) ? sidebar_data : $.extend(
_.clone( _.findWhere( api.Widgets.data.registeredSidebars, { id: module.serverParams.defaultWidgetSidebar } ) ),
{
name : _model.title,
id : _model.id
}
);
//Add it to the backbone collection
api.Widgets.registeredSidebars.add( _new_sidebar );
//test if added:
//api.Widgets.registeredSidebars('czr_sidebars_8');
//ADD the sidebar section
var _params = $.extend(
_.clone( api.section( "sidebar-widgets-" + module.serverParams.defaultWidgetSidebar ).params ),
{
id : "sidebar-widgets-" + _model.id,
instanceNumber: _.max(api.settings.sections, function(sec){ return sec.instanceNumber; }).instanceNumber + 1,
sidebarId: _new_sidebar.id,
title: _new_sidebar.name,
description : 'undefined' != typeof(sidebar_data) ? sidebar_data.description : api.section( "sidebar-widgets-" + module.serverParams.defaultWidgetSidebar ).params.description,
//always set the new priority to the maximum + 1 ( module.serverParams.dynWidgetSection is excluded from this calculation because it must always be at the bottom )
priority: _.max( _.omit( api.settings.sections, module.serverParams.dynWidgetSection), function(sec){ return sec.instanceNumber; }).priority + 1,
}
);
api.section.add( _params.id, new api.sectionConstructor[ _params.type ]( _params.id ,{ params : _params } ) );
//add it to the static collection of settings
api.settings.sections[ _params.id ] = _params.id;
//ADD A SETTING
//Clone the module.serverParams.defaultWidgetSidebar sidebar widget area setting
var _new_set_id = 'sidebars_widgets['+_model.id+']',
_new_set = $.extend(
_.clone( api.settings.settings['sidebars_widgets[' + module.serverParams.defaultWidgetSidebar + ']'] ),
{
value:[]
}
);
//add it to the static collection of settings
api.settings.settings[ _new_set_id ] = _new_set;
//instanciate it
api.create( _new_set_id, _new_set_id, _new_set.value, {
transport: _new_set.transport,
previewer: api.previewer,
dirty: false
} );
//ADD A CONTROL
var _cloned_control = $.extend(
_.clone( api.settings.controls['sidebars_widgets[' + module.serverParams.defaultWidgetSidebar + ']'] ),
{
settings : { default : _new_set_id }
}),
_new_control = {};
//replace serverControlParams.defaultWidgetSidebar by the new sidebar id
_.each( _cloned_control, function( param, key ) {
if ( 'string' == typeof(param) ) {
param = param.replace( module.serverParams.defaultWidgetSidebar , _model.id );
}
_new_control[key] = param;
});
//set the instance number (no sure if needed)
_new_control.instanceNumber = _.max(api.settings.controls, function(con){ return con.instanceNumber; }).instanceNumber + 1;
//add it to the static collection of controls
api.settings.controls[_new_set_id] = _new_control;
//instanciate it
api.control.add( _new_set_id, new api.controlConstructor[ _new_control.type ]( _new_set_id, {
params: _new_control,
previewer: api.previewer
} ) );
//say it to the control container
//only if we are in an instanciated object => because this method can be accessed statically
if ( _.has(this, 'container') )
this.container.trigger( 'widget_zone_created', { model : _model, section_id : "sidebar-widgets-" + _model.id , setting_id : _new_set_id });
},//addWidgetSidebar
//fired on "after_modelRemoved"
removeWidgetSidebar : function( model ) {
var module = this;
if ( ! _.isObject(model) || _.isEmpty(model) ) {
throw new Error('No valid data were provided to remove a Widget Zone.');
}
//Remove this sidebar from the backbone collection
api.Widgets.registeredSidebars.remove( model.id );
//remove the section from the api values and the DOM if exists
if ( api.section.has("sidebar-widgets-" + model.id) ) {
//Remove the section container from the DOM
api.section("sidebar-widgets-" + model.id).container.remove();
//Remove the sidebar section from the api
api.section.remove( "sidebar-widgets-" + model.id );
//Remove this section from the static collection
delete api.settings.sections[ "sidebar-widgets-" + model.id ];
}
//remove the setting from the api if exists
if ( api.has('sidebars_widgets['+model.id+']') ) {
//Remove this setting from the api
api.remove( 'sidebars_widgets['+model.id+']' );
//Remove this setting from the static collection
delete api.settings.settings['sidebars_widgets['+model.id+']'];
}
//remove the widget control of this sidebar from the api and the DOM if exists
if ( api.control.has('sidebars_widgets['+model.id+']') ) {
//Remove the control container from the DOM
api.control( 'sidebars_widgets['+model.id+']' ).container.remove();
//Remove this control from the api
api.control.remove( 'sidebars_widgets['+model.id+']' );
//Remove it to the static collection of controls
delete api.settings.controls['sidebars_widgets['+model.id+']'];
}
//refresh
var _refresh = function() {
api.previewer.refresh();
};
_refresh = _.debounce( _refresh, 500 );
$.when( _refresh() ).done( function() {
//say it
module.trigger( 'widget_zone_removed',
{
model : model,
section_id : "sidebar-widgets-" + model.id ,
setting_id : 'sidebars_widgets['+model.id+']'
}
);
});
},
});//$.extend()
})( wp.customize , jQuery, _ );
//extends api.CZRDynModule
//globals widgetModuleLocalized, themeServerControlParams
var WidgetAreaConstructor = WidgetAreaConstructor || {};
( function ( api, $, _ ) {
$.extend( WidgetAreaConstructor, {
/////////////////////////////////////////
/// SET EXPANSION CALLBACKS FOR WIDGET PANEL AND WIDGET ZONE CREATION SECTION
////////////////////////////////////////
//cb of : api.panel('widgets').expanded.callbacks.add
widgetPanelReact : function() {
var module = this;
//will be used for adjustments
var _top_margin = api.panel('widgets').container.find( '.control-panel-content' ).css('margin-top');
api.section(module.serverParams.dynWidgetSection).fixTopMargin('value').set( _top_margin );
var _section_content = api.section(module.serverParams.dynWidgetSection).container.find( '.accordion-section-content' ),
_panel_content = api.panel('widgets').container.find( '.control-panel-content' ),
_set_margins = function() {
_section_content.css( 'margin-top', '' );
_panel_content.css('margin-top', api.section(module.serverParams.dynWidgetSection).fixTopMargin('value')() );
};
// Fix the top margin after reflow.
api.bind( 'pane-contents-reflowed', _.debounce( function() {
_set_margins();
}, 150 ) );
//Close all views on widget panel expansion/clos
module.closeAllItems().closeRemoveDialogs();
//Close preItem dialog box if exists
if ( _.has( module, 'preItemExpanded' ) )
module.preItemExpanded.set(false);
},//widgetPanelReact()
//cb of api.section(module.serverParams.dynWidgetSection).expanded.callbacks
widgetSectionReact : function( to, from ) {
var module = this,
section = api.section(module.serverParams.dynWidgetSection),
container = section.container.closest( '.wp-full-overlay-sidebar-content' ),
content = section.container.find( '.accordion-section-content' ),
overlay = section.container.closest( '.wp-full-overlay' ),
backBtn = section.container.find( '.customize-section-back' ),
sectionTitle = section.container.find( '.accordion-section-title' ).first(),
headerActionsHeight = $( '#customize-header-actions' ).height(),
resizeContentHeight, expand, position, scroll;
if ( to ) {
overlay.removeClass( 'section-open' );
content.css( 'height', 'auto' );
//section.container.removeClass( 'open' );
sectionTitle.attr( 'tabindex', '0' );
content.css( 'margin-top', '' );
container.scrollTop( 0 );
}
module.closeAllItems().closeRemoveDialogs();
content.slideToggle();
}
});//$.extend()
})( wp.customize , jQuery, _ );
//extends api.CZRDynModule
//globals widgetModuleLocalized, themeServerControlParams
var WidgetAreaConstructor = WidgetAreaConstructor || {};
( function ( api, $, _ ) {
$.extend( WidgetAreaConstructor, {
/////////////////////////////////////////
/// LISTEN TO SIDEBAR INSIGHTS FROM THE PREVIEW FRAME
/// REACT TO THEM
////////////////////////////////////////
listenToSidebarInsights : function() {
var module = this;
//VISIBILITY BASED ON THE SIDEBAR INSIGHTS
api.sidebar_insights('registered').callbacks.add( function( _registered_zones ) {
var _current_collection = _.clone( module.itemCollection() );
_.each( _current_collection, function( _model ) {
if ( ! module.getViewEl(_model.id).length )
return;
module.getViewEl(_model.id).css('display' , _.contains( _registered_zones, _model.id ) ? 'block' : 'none' );
});
});
//OPACITY SIDEBAR INSIGHTS BASED
api.sidebar_insights('inactives').callbacks.add( function( _inactives_zones ) {
var _current_collection = _.clone( module.itemCollection() );
_.each( _current_collection, function( _model ) {
if ( ! module.getViewEl(_model.id).length )
return;
if ( _.contains( _inactives_zones, _model.id ) ) {
module.getViewEl( _model.id ).addClass('inactive');
if ( ! module.getViewEl( _model.id ).find('.czr-inactive-alert').length ) {
module.getViewEl( _model.id ).find('.czr-item-title').append(
$('<span/>', {class : "czr-inactive-alert", html : " [ " + widgetModuleLocalized.i18n.inactiveWidgetZone + " ]" })
);
}
}
else {
module.getViewEl( _model.id ).removeClass('inactive');
if ( module.getViewEl( _model.id ).find('.czr-inactive-alert').length )
module.getViewEl( _model.id ).find('.czr-inactive-alert').remove();
}
});
});
//WIDGET SIDEBAR CREATION BASED ON SIDEBAR INSIGHTS
//react to a new register candidate(s) on preview refresh
api.sidebar_insights('candidates').callbacks.add( function(_candidates) {
if ( ! _.isArray(_candidates) )
return;
_.each( _candidates, function( _sidebar ) {
if ( ! _.isObject(_sidebar) )
return;
//add this widget sidebar and the related setting and control.
//Only if not added already
if ( api.section.has("sidebar-widgets-" +_sidebar.id ) )
return;
//access the registration method statically
module.addWidgetSidebar( {}, _sidebar );
//activate it if so
if ( _.has( api.sidebar_insights('actives')(), _sidebar.id ) && api.section.has("sidebar-widgets-" +_sidebar.id ) )
api.section( "sidebar-widgets-" +_sidebar.id ).activate();
});
});
}//listenToSidebarInsights()
});//$.extend()
})( wp.customize , jQuery, _ );
//extends api.CZRDynModule
//globals widgetModuleLocalized, themeServerControlParams
var WidgetAreaConstructor = WidgetAreaConstructor || {};
( function ( api, $, _ ) {
$.extend( WidgetAreaConstructor, {
/////////////////////////////////////////
/// OVERRIDEN METHODS
////////////////////////////////////////
//fired in toggleItemExpansion()
//has to be overridden for the widget zones control because this control is embedded directly in a panel and not in a section
//therefore the module to animate the scrollTop is not the section container but $('.wp-full-overlay-sidebar-content')
_adjustScrollExpandedBlock : function( $_block_el, adjust ) {
if ( ! $_block_el.length )
return;
var module = this,
_currentScrollTopVal = $('.wp-full-overlay-sidebar-content').scrollTop(),
_scrollDownVal,
_adjust = adjust || 90;
setTimeout( function() {
if ( ( $_block_el.offset().top + $_block_el.height() + _adjust ) > $(window.top).height() ) {
_scrollDownVal = $_block_el.offset().top + $_block_el.height() + _adjust - $(window.top).height();
$('.wp-full-overlay-sidebar-content').animate({
scrollTop: _currentScrollTopVal + _scrollDownVal
}, 600);
}
}, 50);
},
//overrides the parent class default model getter
//=> add a dynamic title
getDefaultItemModel : function( id ) {
var module = this,
_current_collection = module.itemCollection(),
_default = _.clone( module.defaultItemModel ),
_default_contexts = _default.contexts;
return $.extend( _default, {
title : 'Widget Zone ' + ( _.size(_current_collection)*1 + 1 )
//contexts : module._getMatchingContexts( _default_contexts )
});
},
_toggleLocationAlertExpansion : function( $view, to ) {
var $_alert_el = $view.find('.czr-location-alert');
if ( ! $_alert_el.length ) {
var _html = [
'<span>' + widgetModuleLocalized.i18n.locationWarning + '</span>',
api.CZR_Helpers.getDocSearchLink( widgetModuleLocalized.i18n.locationWarning ),
].join('');
$_alert_el = $('<div/>', {
class:'czr-location-alert',
html:_html,
style:"display:none"
});
$('select[data-czrtype="locations"]', $view ).closest('div').after($_alert_el);
}
$_alert_el.toggle( 'expanded' == to);
}
});//$.extend()
})( wp.customize , jQuery, _ );
//globals widgetModuleLocalized, themeServerControlParams
/*****************************************************************************
* CAPTURE PREVIEW INFORMATIONS ON REFRESH + REACT TO THEM
*****************************************************************************/
(function (api, $, _) {
//Data are sent by the preview frame when the panel has sent the 'sync' or even better 'active' event
api.bind( 'ready', function() {
//observe widget settings changes
api.previewer.bind('houston-widget-settings', function(data) {
//console.log('control panel => ALORS ON HOUSTON- SETTINGS ? => ', data );
//get the difference
var _candidates = _.filter( data.registeredSidebars, function( sb ) {
return ! _.findWhere( _wpCustomizeWidgetsSettings.registeredSidebars, { id: sb.id } );
});
var _inactives = _.filter( data.registeredSidebars, function( sb ) {
return ! _.has( data.renderedSidebars, sb.id );
});
_inactives = _.map( _inactives, function(obj) {
return obj.id;
});
var _registered = _.map( data.registeredSidebars, function(obj) {
return obj.id;
});
//stores and update the widget zone settings
api.czr_widgetZoneSettings = api.czr_widgetZoneSettings || new api.Value();//will store all widget zones data sent by preview as an observable object
api.czr_widgetZoneSettings.set( {
actives : data.renderedSidebars,
inactives : _inactives,
registered : _registered,
candidates : _candidates,
available_locations : data.availableWidgetLocations//built server side
} );
});
});//api.bind('ready')
})( wp.customize , jQuery, _ );//extends api.CZRDynModule
//globals widgetModuleLocalized, themeServerControlParams
var WidgetAreaConstructor = WidgetAreaConstructor || {};
( function ( api, $, _ ) {
//provides a description of each module
//=> will determine :
//1) how to initialize the module model. If not crud, then the initial item(s) model shall be provided
//2) which js template(s) to use : if crud, the module template shall include the add new and pre-item elements.
// , if crud, the item shall be removable
//3) how to render : if multi item, the item content is rendered when user click on edit button.
// If not multi item, the single item content is rendered as soon as the item wrapper is rendered.
//4) some DOM behaviour. For example, a multi item shall be sortable.
api.czrModuleMap = api.czrModuleMap || {};
$.extend( api.czrModuleMap, {
czr_widget_areas_module : {
mthds : WidgetAreaConstructor,
crud : true,
multi_item : false,
name : 'Widget Areas',
has_mod_opt : false,
ready_on_section_expanded : true,
//defaultItemModel : {}
}
});
})( wp.customize , jQuery, _ );
@@ -0,0 +1,165 @@
//extends api.CZRDynModule
//globals widgetModuleLocalized, themeServerControlParams
var WidgetAreaConstructor = WidgetAreaConstructor || {};
( function ( api, $, _ ) {
$.extend( WidgetAreaConstructor, {
initialize: function( id, constructorOptions ) {
var module = this;
api.CZRDynModule.prototype.initialize.call( this, id, constructorOptions );
//extend the module with new template Selectors
$.extend( module, {
itemPreAddEl : 'czr-module-widgets-pre-add-view-content',
itemInputList : 'czr-module-widgets-item-input-list',
ruItemPart : 'czr-module-widgets-ru-item-part'
} );
//EXTEND THE DEFAULT CONSTRUCTORS FOR INPUT
module.inputConstructor = api.CZRInput.extend( module.CZRWZonesInputMths || {} );
//EXTEND THE DEFAULT CONSTRUCTORS FOR MONOMODEL
module.itemConstructor = api.CZRItem.extend( module.CZRWZonesItemConstructor || {} );
module.serverParams = widgetModuleLocalized || {};
//add a shortcut to the server side json properties
module.contexts = _.has( module.serverParams , 'sidebar_contexts') ? module.serverParams.sidebar_contexts : {};
//context match map
module.context_match_map = {
is_404 : '404',
is_category : 'archive-category',
is_home : 'home',
is_page : 'page',
is_search : 'search',
is_single : 'single'
};
module.locations = _.has( module.serverParams , 'sidebar_locations') ? module.serverParams.sidebar_locations : {};
//declares a default model
module.defaultItemModel = {
id : '',
title : widgetModuleLocalized.i18n.widgetZone,
contexts : _.without( _.keys(module.contexts), '_all_' ),//the server list of contexts is an object, we only need the keys, whitout _all_
locations : [ module.serverParams.defaultWidgetLocation ],
description : ''
};
//overrides the default success message
this.itemAddedMessage = widgetModuleLocalized.i18n.widgetZoneAdded;
//Observe and react to sidebar insights from the preview frame
// SIDEBAR INSIGHTS => stores and observes the sidebars and widgets settings sent by the preview */
if ( ! _.has( api, 'sidebar_insights' ) ) {
api.sidebar_insights = new api.Values();
api.sidebar_insights.create('candidates');//will store the sidebar candidates on preview refresh
api.sidebar_insights.create('actives');//will record the refreshed active list of active sidebars sent from the preview
api.sidebar_insights.create('inactives');
api.sidebar_insights.create('registered');
api.sidebar_insights.create('available_locations');
}
this.listenToSidebarInsights();
//React on 'houston-widget-settings'
//actives : data.renderedSidebars,
// inactives : _inactives,
// registered : _registered,
// candidates : _candidates,
// available_locations : data.availableWidgetLocations//built server side
api.czr_widgetZoneSettings = api.czr_widgetZoneSettings || new api.Value();
api.czr_widgetZoneSettings.bind( function( updated_data_sent_from_preview , from ) {
//console.log('REACT ON czr_widgetZoneSettings', updated_data_sent_from_preview , from );
module.isReady.then( function() {
_.each( updated_data_sent_from_preview, function( _data, _key ) {
api.sidebar_insights( _key ).set( _data );
});
});
});
//AVAILABLE LOCATIONS FOR THE PRE MODEL
//1) add an observable value to module.preItem to handle the alert visibility
module.preItem_location_alert_view_state = new api.Value( 'closed');
//2) add state listeners
module.preItem_location_alert_view_state.callbacks.add( function( to, from ) {
module._toggleLocationAlertExpansion( module.container, to );
});
//REACT ON ADD / REMOVE ITEMS
module.bind( 'item-added', function( model ) {
module.addWidgetSidebar( model );
});
module.bind( 'pre_item_api_remove' , function(model) {
module.removeWidgetSidebar( model );
});
//records the top margin value of the widgets panel on each expansion
var fixTopMargin = new api.Values();
fixTopMargin.create('fixed_for_current_session');
fixTopMargin.create('value');
api.section(module.serverParams.dynWidgetSection).fixTopMargin = fixTopMargin;
api.section(module.serverParams.dynWidgetSection).fixTopMargin('fixed_for_current_session').set(false);
//setup reactions on widget section expansion
//change the expanded behaviour for the widget zone section
//api.section(module.serverParams.dynWidgetSection).expanded.callbacks.add( function() { return module.widgetSectionReact.apply(module, arguments ); } );
//bind actions on widget panel expansion and widget zone section expansion
//Fire the module
api.panel('widgets').expanded.callbacks.add( function(to, from) {
module.widgetPanelReact();//setup some visual adjustments, must be ran each time panel is closed or expanded
//Fire the module if not done already
if ( 'resolved' == module.isReady.state() )
return;
module.ready();
});
},//initialize
//When the control is embedded on the page, this method is fired in api.CZRBaseModuleControl:ready()
//=> right after the module is instantiated.
//VERIFIED
ready : function() {
var module = this;
api.CZRDynModule.prototype.ready.call( module );
//add state listener on pre Item view
module.preItemExpanded.callbacks.add( function( to, from ) {
if ( ! to )
return;
//refresh the location list
module.preItem.czr_Input( 'locations' )._setupLocationSelect( true );//true for refresh
//refresh the location alert message
module.preItem.czr_Input( 'locations' ).mayBeDisplayModelAlert();
});
},
//overrides parent method
//adds the default widget zones in the items
//VERIFIED
initializeModuleModel : function( constructorOptions ) {
var module = this, dfd = $.Deferred();
constructorOptions.items = _.union( _.has( module.serverParams, 'default_zones' ) ? module.serverParams.default_zones : [], constructorOptions.items );
return dfd.resolve( constructorOptions ).promise();
},
});//$.extend()
})( wp.customize , jQuery, _ );
@@ -0,0 +1,130 @@
//extends api.CZRDynModule
//globals widgetModuleLocalized, themeServerControlParams
var WidgetAreaConstructor = WidgetAreaConstructor || {};
( function ( api, $, _ ) {
$.extend( WidgetAreaConstructor, {
CZRWZonesInputMths : {
ready : function() {
var input = this;
input.bind('locations:changed', function(){
input.mayBeDisplayModelAlert();
});
api.CZRInput.prototype.ready.call( input);
},
//////////////////////////////////////////////////
///SETUP SELECTS
//////////////////////////////////////////////////
//setup select on view_rendered|item_content_event_map
setupSelect : function() {
var input = this;
if ( 'locations' == this.id )
this._setupLocationSelect();
if ( 'contexts' == this.id )
this._setupContextSelect();
},
//helper
_setupContextSelect : function() {
var input = this,
input_contexts = input(),
item = input.input_parent,
module = input.module;
//generates the contexts options
_.each( module.contexts, function( title, key ) {
var _attributes = {
value : key,
html: title
};
if ( key == input_contexts || _.contains( input_contexts, key ) )
$.extend( _attributes, { selected : "selected" } );
$( 'select[data-czrtype="contexts"]', input.container ).append( $('<option>', _attributes) );
});
//fire czrSelect2
$( 'select[data-czrtype="contexts"]', input.container ).czrSelect2();
},
//helper
//the refresh param is a bool
_setupLocationSelect : function(refresh ) {
var input = this,
input_locations = input(),
item = input.input_parent,
module = input.module,
available_locs = api.sidebar_insights('available_locations')();
//console.log('_setupLocationSelect', input(), module.locations );
//generates the locations options
//append them if not set yet
if ( ! $( 'select[data-czrtype="locations"]', input.container ).children().length ) {
_.each( module.locations, function( title, key ) {
var _attributes = {
value : key,
html: title
};
if ( key == input_locations || _.contains( input_locations, key ) )
$.extend( _attributes, { selected : "selected" } );
$( 'select[data-czrtype="locations"]', input.container ).append( $('<option>', _attributes) );
});
}//if
function setAvailability( state ) {
if (! state.id) { return state.text; }
if ( _.contains(available_locs, state.element.value) ) { return state.text; }
var $state = $(
'<span class="czr-unavailable-location fas fa-ban" title="' + widgetModuleLocalized.i18n.unavailableLocation + '">&nbsp;&nbsp;' + state.text + '</span>'
);
return $state;
}
if ( refresh ) {
$( 'select[data-czrtype="locations"]', input.container ).czrSelect2( 'destroy' );
}
//fire czrSelect2
$( 'select[data-czrtype="locations"]', input.container ).czrSelect2( {
templateResult: setAvailability,
templateSelection: setAvailability
});
},
//fired on view event map : 'locations:changed'
//@param obj { dom_el: $() , model : {} )
mayBeDisplayModelAlert : function() {
var input = this,
item = input.input_parent,
module = input.module;
//check if we are in the pre Item case => if so, the locations might be empty
if ( ! _.has( item(), 'locations') || _.isEmpty( item().locations ) )
return;
var _selected_locations = $('select[data-czrtype="locations"]', input.container ).val(),
available_locs = api.sidebar_insights('available_locations')(),
_unavailable = _.filter( _selected_locations, function( loc ) {
return ! _.contains(available_locs, loc);
});
//check if we are in the pre Item case => if so, the id is empty
if ( ! _.has( item(), 'id' ) || _.isEmpty( item().id ) ) {
module.preItem_location_alert_view_state.set( ! _.isEmpty( _unavailable ) ? 'expanded' : 'closed' );
} else {
item.czr_itemLocationAlert.set( ! _.isEmpty( _unavailable ) ? 'expanded' : 'closed' );
}
}
},//CZRWZonesInputMths
});//$.extend()
})( wp.customize , jQuery, _ );
@@ -0,0 +1,239 @@
//extends api.CZRDynModule
//globals widgetModuleLocalized, themeServerControlParams
var WidgetAreaConstructor = WidgetAreaConstructor || {};
( function ( api, $, _ ) {
$.extend( WidgetAreaConstructor, {
CZRWZonesItemConstructor : {
initialize : function( id, options ) {
var item = this,
module = item.module;
//Add some observable values for this item
item.czr_itemLocationAlert = new api.Value();
api.CZRItem.prototype.initialize.call( item, null, options );
// filter the params of the ajax query used to get the item wrapper template
// because we need a ru ( not a read update delete ) template for builtins widget zones
// requestParams = {
// tmpl : 'rud-item-part',
// module_type: 'all_modules',
// nonce: api.settings.nonce.save//<= do we need to set a specific nonce to fetch the tmpls ?
// };
// this has been introduced in March 2018, after the introduction of the tmpl ajax fetching
// it does the same job that the overriden getTemplateEl() was doing.
// This filter is declared in item::renderItemWrapper()
item.bind( 'item-wrapper-tmpl-params-before-fetching', function( requestParams ) {
//force view-content type to ru-item-part if the model is a built-in (primary, secondary, footer-1, ...)
//=> user can't delete a built-in model.
requestParams.tmpl = ( _.has( item(), 'is_builtin' ) && item().is_builtin ) ? 'ruItemPart' : requestParams.tmpl;
return requestParams;
});
},
//extend parent setupview
itemWrapperViewSetup : function() {
var item = this,
module = item.module;
api.CZRItem.prototype.itemWrapperViewSetup.call(item);
/// ALERT FOR NOT AVAILABLE LOCATION
item.czr_itemLocationAlert.set('closed');
//add a state listener on expansion change
item.czr_itemLocationAlert.callbacks.add( function( to, from ) {
module._toggleLocationAlertExpansion( item.container , to );
});
//update item title
item.writeSubtitleInfos(item());
//this is fired just after the itemWrapperViewSetupApiListeners
//=> add a callback to refresh the availability status of the locations in the select location picker
//add a state listener on expansion change
item.viewState.callbacks.add( function( to, from ) {
if ( -1 == to.indexOf('expanded') )//can take the expanded_noscroll value !
return;
//don't try to invoke the input instances before the content is actually rendered
//=> there might be cases when the content rendering is debounced...
item.bind('contentRendered', function() {
//refresh the location list
item.czr_Input('locations')._setupLocationSelect( true );//true for refresh
//refresh the location alert message
item.czr_Input('locations').mayBeDisplayModelAlert();
});
});
},
//extend parent listener
itemReact : function(to, from) {
var item = this;
api.CZRItem.prototype.itemReact.call(item, to, from);
item.writeSubtitleInfos(to);
item.updateSectionTitle(to).setModelUpdateTimer();
},
//Fired in setupItemListeners. Reacts to model change.
//Write html informations under the title : location(s) and context(s)
writeSubtitleInfos : function(model) {
var item = this,
module = item.module,
_model = _.clone( model || item() ),
_locations = [],
_contexts = [],
_html = '';
if ( ! item.container.length )
return this;
//generate the locations and the contexts text from the json data if exists
_model.locations =_.isString(_model.locations) ? [_model.locations] : _model.locations;
_.each( _model.locations, function( loc ) {
if ( _.has( module.locations , loc ) )
_locations.push(module.locations[loc]);
else
_locations.push(loc);
}
);
//build the context list
_model.contexts =_.isString(_model.contexts) ? [_model.contexts] : _model.contexts;
//all contexts cases ?
if ( item._hasModelAllContexts( model ) ) {
_contexts.push(module.contexts._all_);
} else {
_.each( _model.contexts, function( con ) {
if ( _.has( module.contexts , con ) )
_contexts.push(module.contexts[con]);
else
_contexts.push(con);
}
);
}
//Translated strings
var _locationText = widgetModuleLocalized.i18n.locations,
_contextText = widgetModuleLocalized.i18n.contexts,
_notsetText = widgetModuleLocalized.i18n.notset;
_locations = _.isEmpty( _locations ) ? '<span style="font-weight: bold;">' + _notsetText + '</span>' : _locations.join(', ');
_contexts = _.isEmpty( _contexts ) ? '<span style="font-weight: bold;">' + _notsetText + '</span>' : _contexts.join(', ');
//write the description if builtin
//else, write the dynamic location
// if ( _.has(_model, 'description') && _.has(_model, 'is_builtin') )
// _html = _model.description + ' <strong>|</strong> <u>Contexts</u> : ' + _contexts;
// else
_html = '<u>' + _locationText + '</u> : ' + _locations + ' <strong>|</strong> <u>' + _contextText + '</u> : ' + _contexts;
if ( ! $('.czr-zone-infos', item.container ).length ) {
var $_zone_infos = $('<div/>', {
class : [ 'czr-zone-infos' , module.control.css_attr.item_sort_handle ].join(' '),
html : _html
});
$( '.' + module.control.css_attr.item_btns, item.container ).after($_zone_infos);
} else {
$('.czr-zone-infos', item.container ).html(_html);
}
return this;
},//writeSubtitleInfos
////Fired in setupItemListeners
updateSectionTitle : function(model) {
var _sidebar_id = 'sidebar-widgets-' + model.id,
_new_title = model.title;
//does this section exists ?
if ( ! api.section.has(_sidebar_id) )
return this;
//update the section title
$('.accordion-section-title', api.section(_sidebar_id).container ).text(_new_title);
//update the top title ( visible when inside the expanded section )
$('.customize-section-title h3', api.section(_sidebar_id).container ).html(
'<span class="customize-action">' + api.section(_sidebar_id).params.customizeAction + '</span>' + _new_title
);
// $('.customize-section-title h3', api.section(_sidebar_id).container )
// .append('<span>', {
// class: 'customize-section-back',
// html: api.section(_sidebar_id).params.customizeAction
// } )
// .append(_new_title);
//remove and re-instanciate
//=> works for the section but the controls are not activated anymore.
//Should be easy to fix but useless to go further here. Jquery does the job.
// var _params = _.clone( api.section(_sidebar_id).params );
// _params.title = _new_title;
// api.section(_sidebar_id).container.remove();
// api.section.remove(_sidebar_id);
// api.section.add( _sidebar_id, new api.sectionConstructor[_params.type]( _params.id ,{ params : _params } ) );
return this;
},
//fired on model_update
//Don't hammer the preview with too many refreshs
//2 seconds delay
setModelUpdateTimer : function() {
var item = this,
module = item.module;
clearTimeout( $.data(this, 'modelUpdateTimer') );
$.data(
this,
'modelUpdateTimer',
_.delay( function() {
//refresh preview
api.previewer.refresh();
} , 1000)
);//$.data
},
//@return bool
//takes the model unique id
_hasModelAllContexts : function( model ) {
var item = this,
module = item.module,
moduleContexts = _.keys(module.contexts);
model = model || this();
if ( ! _.has(model, 'contexts') )
return;
if ( _.contains( model.contexts, '_all_') )
return true;
//case when model does not have _all_ but all the others
return _.isEmpty( _.difference( _.without(moduleContexts, '_all_') , model.contexts ) );
},
//@param contexts = array of contexts
//api.czr_wpQueryInfos is refreshed on each preview refresh
_getMatchingContexts : function( defaults ) {
var module = this,
_current = api.czr_wpQueryInfos().conditional_tags || {},
_matched = _.filter( module.context_match_map, function( hu, wp ) { return true === _current[wp]; } );
return _.isEmpty( _matched ) ? defaults : _matched;
}
},//CZRWZonesItemConstructor
});//$.extend()
})( wp.customize , jQuery, _ );
@@ -0,0 +1,173 @@
//extends api.CZRDynModule
//globals widgetModuleLocalized, themeServerControlParams
var WidgetAreaConstructor = WidgetAreaConstructor || {};
( function ( api, $, _ ) {
$.extend( WidgetAreaConstructor, {
/////////////////////////////////////////
/// ADD / REMOVE WIDGET ZONES
////////////////////////////////////////
//fired on model_added_by_user
//
//can also be called statically when a dynamic sidebar is added in the preview
//in this case the parameter are the sidebar data with id and name
addWidgetSidebar : function( model, sidebar_data ) {
if ( ! _.isObject(model) && _.isEmpty(sidebar_data) ) {
throw new Error('No valid input were provided to add a new Widget Zone.');
}
//ADD the new sidebar to the existing collection
//Clone the serverControlParams.defaultWidgetSidebar sidebar
var module = this,
_model = ! _.isEmpty(model) ? _.clone(model) : sidebar_data,
_new_sidebar = _.isEmpty(model) ? sidebar_data : $.extend(
_.clone( _.findWhere( api.Widgets.data.registeredSidebars, { id: module.serverParams.defaultWidgetSidebar } ) ),
{
name : _model.title,
id : _model.id
}
);
//Add it to the backbone collection
api.Widgets.registeredSidebars.add( _new_sidebar );
//test if added:
//api.Widgets.registeredSidebars('czr_sidebars_8');
//ADD the sidebar section
var _params = $.extend(
_.clone( api.section( "sidebar-widgets-" + module.serverParams.defaultWidgetSidebar ).params ),
{
id : "sidebar-widgets-" + _model.id,
instanceNumber: _.max(api.settings.sections, function(sec){ return sec.instanceNumber; }).instanceNumber + 1,
sidebarId: _new_sidebar.id,
title: _new_sidebar.name,
description : 'undefined' != typeof(sidebar_data) ? sidebar_data.description : api.section( "sidebar-widgets-" + module.serverParams.defaultWidgetSidebar ).params.description,
//always set the new priority to the maximum + 1 ( module.serverParams.dynWidgetSection is excluded from this calculation because it must always be at the bottom )
priority: _.max( _.omit( api.settings.sections, module.serverParams.dynWidgetSection), function(sec){ return sec.instanceNumber; }).priority + 1,
}
);
api.section.add( _params.id, new api.sectionConstructor[ _params.type ]( _params.id ,{ params : _params } ) );
//add it to the static collection of settings
api.settings.sections[ _params.id ] = _params.id;
//ADD A SETTING
//Clone the module.serverParams.defaultWidgetSidebar sidebar widget area setting
var _new_set_id = 'sidebars_widgets['+_model.id+']',
_new_set = $.extend(
_.clone( api.settings.settings['sidebars_widgets[' + module.serverParams.defaultWidgetSidebar + ']'] ),
{
value:[]
}
);
//add it to the static collection of settings
api.settings.settings[ _new_set_id ] = _new_set;
//instanciate it
api.create( _new_set_id, _new_set_id, _new_set.value, {
transport: _new_set.transport,
previewer: api.previewer,
dirty: false
} );
//ADD A CONTROL
var _cloned_control = $.extend(
_.clone( api.settings.controls['sidebars_widgets[' + module.serverParams.defaultWidgetSidebar + ']'] ),
{
settings : { default : _new_set_id }
}),
_new_control = {};
//replace serverControlParams.defaultWidgetSidebar by the new sidebar id
_.each( _cloned_control, function( param, key ) {
if ( 'string' == typeof(param) ) {
param = param.replace( module.serverParams.defaultWidgetSidebar , _model.id );
}
_new_control[key] = param;
});
//set the instance number (no sure if needed)
_new_control.instanceNumber = _.max(api.settings.controls, function(con){ return con.instanceNumber; }).instanceNumber + 1;
//add it to the static collection of controls
api.settings.controls[_new_set_id] = _new_control;
//instanciate it
api.control.add( _new_set_id, new api.controlConstructor[ _new_control.type ]( _new_set_id, {
params: _new_control,
previewer: api.previewer
} ) );
//say it to the control container
//only if we are in an instanciated object => because this method can be accessed statically
if ( _.has(this, 'container') )
this.container.trigger( 'widget_zone_created', { model : _model, section_id : "sidebar-widgets-" + _model.id , setting_id : _new_set_id });
},//addWidgetSidebar
//fired on "after_modelRemoved"
removeWidgetSidebar : function( model ) {
var module = this;
if ( ! _.isObject(model) || _.isEmpty(model) ) {
throw new Error('No valid data were provided to remove a Widget Zone.');
}
//Remove this sidebar from the backbone collection
api.Widgets.registeredSidebars.remove( model.id );
//remove the section from the api values and the DOM if exists
if ( api.section.has("sidebar-widgets-" + model.id) ) {
//Remove the section container from the DOM
api.section("sidebar-widgets-" + model.id).container.remove();
//Remove the sidebar section from the api
api.section.remove( "sidebar-widgets-" + model.id );
//Remove this section from the static collection
delete api.settings.sections[ "sidebar-widgets-" + model.id ];
}
//remove the setting from the api if exists
if ( api.has('sidebars_widgets['+model.id+']') ) {
//Remove this setting from the api
api.remove( 'sidebars_widgets['+model.id+']' );
//Remove this setting from the static collection
delete api.settings.settings['sidebars_widgets['+model.id+']'];
}
//remove the widget control of this sidebar from the api and the DOM if exists
if ( api.control.has('sidebars_widgets['+model.id+']') ) {
//Remove the control container from the DOM
api.control( 'sidebars_widgets['+model.id+']' ).container.remove();
//Remove this control from the api
api.control.remove( 'sidebars_widgets['+model.id+']' );
//Remove it to the static collection of controls
delete api.settings.controls['sidebars_widgets['+model.id+']'];
}
//refresh
var _refresh = function() {
api.previewer.refresh();
};
_refresh = _.debounce( _refresh, 500 );
$.when( _refresh() ).done( function() {
//say it
module.trigger( 'widget_zone_removed',
{
model : model,
section_id : "sidebar-widgets-" + model.id ,
setting_id : 'sidebars_widgets['+model.id+']'
}
);
});
},
});//$.extend()
})( wp.customize , jQuery, _ );
@@ -0,0 +1,66 @@
//extends api.CZRDynModule
//globals widgetModuleLocalized, themeServerControlParams
var WidgetAreaConstructor = WidgetAreaConstructor || {};
( function ( api, $, _ ) {
$.extend( WidgetAreaConstructor, {
/////////////////////////////////////////
/// SET EXPANSION CALLBACKS FOR WIDGET PANEL AND WIDGET ZONE CREATION SECTION
////////////////////////////////////////
//cb of : api.panel('widgets').expanded.callbacks.add
widgetPanelReact : function() {
var module = this;
//will be used for adjustments
var _top_margin = api.panel('widgets').container.find( '.control-panel-content' ).css('margin-top');
api.section(module.serverParams.dynWidgetSection).fixTopMargin('value').set( _top_margin );
var _section_content = api.section(module.serverParams.dynWidgetSection).container.find( '.accordion-section-content' ),
_panel_content = api.panel('widgets').container.find( '.control-panel-content' ),
_set_margins = function() {
_section_content.css( 'margin-top', '' );
_panel_content.css('margin-top', api.section(module.serverParams.dynWidgetSection).fixTopMargin('value')() );
};
// Fix the top margin after reflow.
api.bind( 'pane-contents-reflowed', _.debounce( function() {
_set_margins();
}, 150 ) );
//Close all views on widget panel expansion/clos
module.closeAllItems().closeRemoveDialogs();
//Close preItem dialog box if exists
if ( _.has( module, 'preItemExpanded' ) )
module.preItemExpanded.set(false);
},//widgetPanelReact()
//cb of api.section(module.serverParams.dynWidgetSection).expanded.callbacks
widgetSectionReact : function( to, from ) {
var module = this,
section = api.section(module.serverParams.dynWidgetSection),
container = section.container.closest( '.wp-full-overlay-sidebar-content' ),
content = section.container.find( '.accordion-section-content' ),
overlay = section.container.closest( '.wp-full-overlay' ),
backBtn = section.container.find( '.customize-section-back' ),
sectionTitle = section.container.find( '.accordion-section-title' ).first(),
headerActionsHeight = $( '#customize-header-actions' ).height(),
resizeContentHeight, expand, position, scroll;
if ( to ) {
overlay.removeClass( 'section-open' );
content.css( 'height', 'auto' );
//section.container.removeClass( 'open' );
sectionTitle.attr( 'tabindex', '0' );
content.css( 'margin-top', '' );
container.scrollTop( 0 );
}
module.closeAllItems().closeRemoveDialogs();
content.slideToggle();
}
});//$.extend()
})( wp.customize , jQuery, _ );
@@ -0,0 +1,72 @@
//extends api.CZRDynModule
//globals widgetModuleLocalized, themeServerControlParams
var WidgetAreaConstructor = WidgetAreaConstructor || {};
( function ( api, $, _ ) {
$.extend( WidgetAreaConstructor, {
/////////////////////////////////////////
/// LISTEN TO SIDEBAR INSIGHTS FROM THE PREVIEW FRAME
/// REACT TO THEM
////////////////////////////////////////
listenToSidebarInsights : function() {
var module = this;
//VISIBILITY BASED ON THE SIDEBAR INSIGHTS
api.sidebar_insights('registered').callbacks.add( function( _registered_zones ) {
var _current_collection = _.clone( module.itemCollection() );
_.each( _current_collection, function( _model ) {
if ( ! module.getViewEl(_model.id).length )
return;
module.getViewEl(_model.id).css('display' , _.contains( _registered_zones, _model.id ) ? 'block' : 'none' );
});
});
//OPACITY SIDEBAR INSIGHTS BASED
api.sidebar_insights('inactives').callbacks.add( function( _inactives_zones ) {
var _current_collection = _.clone( module.itemCollection() );
_.each( _current_collection, function( _model ) {
if ( ! module.getViewEl(_model.id).length )
return;
if ( _.contains( _inactives_zones, _model.id ) ) {
module.getViewEl( _model.id ).addClass('inactive');
if ( ! module.getViewEl( _model.id ).find('.czr-inactive-alert').length ) {
module.getViewEl( _model.id ).find('.czr-item-title').append(
$('<span/>', {class : "czr-inactive-alert", html : " [ " + widgetModuleLocalized.i18n.inactiveWidgetZone + " ]" })
);
}
}
else {
module.getViewEl( _model.id ).removeClass('inactive');
if ( module.getViewEl( _model.id ).find('.czr-inactive-alert').length )
module.getViewEl( _model.id ).find('.czr-inactive-alert').remove();
}
});
});
//WIDGET SIDEBAR CREATION BASED ON SIDEBAR INSIGHTS
//react to a new register candidate(s) on preview refresh
api.sidebar_insights('candidates').callbacks.add( function(_candidates) {
if ( ! _.isArray(_candidates) )
return;
_.each( _candidates, function( _sidebar ) {
if ( ! _.isObject(_sidebar) )
return;
//add this widget sidebar and the related setting and control.
//Only if not added already
if ( api.section.has("sidebar-widgets-" +_sidebar.id ) )
return;
//access the registration method statically
module.addWidgetSidebar( {}, _sidebar );
//activate it if so
if ( _.has( api.sidebar_insights('actives')(), _sidebar.id ) && api.section.has("sidebar-widgets-" +_sidebar.id ) )
api.section( "sidebar-widgets-" +_sidebar.id ).activate();
});
});
}//listenToSidebarInsights()
});//$.extend()
})( wp.customize , jQuery, _ );
@@ -0,0 +1,66 @@
//extends api.CZRDynModule
//globals widgetModuleLocalized, themeServerControlParams
var WidgetAreaConstructor = WidgetAreaConstructor || {};
( function ( api, $, _ ) {
$.extend( WidgetAreaConstructor, {
/////////////////////////////////////////
/// OVERRIDEN METHODS
////////////////////////////////////////
//fired in toggleItemExpansion()
//has to be overridden for the widget zones control because this control is embedded directly in a panel and not in a section
//therefore the module to animate the scrollTop is not the section container but $('.wp-full-overlay-sidebar-content')
_adjustScrollExpandedBlock : function( $_block_el, adjust ) {
if ( ! $_block_el.length )
return;
var module = this,
_currentScrollTopVal = $('.wp-full-overlay-sidebar-content').scrollTop(),
_scrollDownVal,
_adjust = adjust || 90;
setTimeout( function() {
if ( ( $_block_el.offset().top + $_block_el.height() + _adjust ) > $(window.top).height() ) {
_scrollDownVal = $_block_el.offset().top + $_block_el.height() + _adjust - $(window.top).height();
$('.wp-full-overlay-sidebar-content').animate({
scrollTop: _currentScrollTopVal + _scrollDownVal
}, 600);
}
}, 50);
},
//overrides the parent class default model getter
//=> add a dynamic title
getDefaultItemModel : function( id ) {
var module = this,
_current_collection = module.itemCollection(),
_default = _.clone( module.defaultItemModel ),
_default_contexts = _default.contexts;
return $.extend( _default, {
title : 'Widget Zone ' + ( _.size(_current_collection)*1 + 1 )
//contexts : module._getMatchingContexts( _default_contexts )
});
},
_toggleLocationAlertExpansion : function( $view, to ) {
var $_alert_el = $view.find('.czr-location-alert');
if ( ! $_alert_el.length ) {
var _html = [
'<span>' + widgetModuleLocalized.i18n.locationWarning + '</span>',
api.CZR_Helpers.getDocSearchLink( widgetModuleLocalized.i18n.locationWarning ),
].join('');
$_alert_el = $('<div/>', {
class:'czr-location-alert',
html:_html,
style:"display:none"
});
$('select[data-czrtype="locations"]', $view ).closest('div').after($_alert_el);
}
$_alert_el.toggle( 'expanded' == to);
}
});//$.extend()
})( wp.customize , jQuery, _ );
@@ -0,0 +1,41 @@
//globals widgetModuleLocalized, themeServerControlParams
/*****************************************************************************
* CAPTURE PREVIEW INFORMATIONS ON REFRESH + REACT TO THEM
*****************************************************************************/
(function (api, $, _) {
//Data are sent by the preview frame when the panel has sent the 'sync' or even better 'active' event
api.bind( 'ready', function() {
//observe widget settings changes
api.previewer.bind('houston-widget-settings', function(data) {
//console.log('control panel => ALORS ON HOUSTON- SETTINGS ? => ', data );
//get the difference
var _candidates = _.filter( data.registeredSidebars, function( sb ) {
return ! _.findWhere( _wpCustomizeWidgetsSettings.registeredSidebars, { id: sb.id } );
});
var _inactives = _.filter( data.registeredSidebars, function( sb ) {
return ! _.has( data.renderedSidebars, sb.id );
});
_inactives = _.map( _inactives, function(obj) {
return obj.id;
});
var _registered = _.map( data.registeredSidebars, function(obj) {
return obj.id;
});
//stores and update the widget zone settings
api.czr_widgetZoneSettings = api.czr_widgetZoneSettings || new api.Value();//will store all widget zones data sent by preview as an observable object
api.czr_widgetZoneSettings.set( {
actives : data.renderedSidebars,
inactives : _inactives,
registered : _registered,
candidates : _candidates,
available_locations : data.availableWidgetLocations//built server side
} );
});
});//api.bind('ready')
})( wp.customize , jQuery, _ );
@@ -0,0 +1,25 @@
//extends api.CZRDynModule
//globals widgetModuleLocalized, themeServerControlParams
var WidgetAreaConstructor = WidgetAreaConstructor || {};
( function ( api, $, _ ) {
//provides a description of each module
//=> will determine :
//1) how to initialize the module model. If not crud, then the initial item(s) model shall be provided
//2) which js template(s) to use : if crud, the module template shall include the add new and pre-item elements.
// , if crud, the item shall be removable
//3) how to render : if multi item, the item content is rendered when user click on edit button.
// If not multi item, the single item content is rendered as soon as the item wrapper is rendered.
//4) some DOM behaviour. For example, a multi item shall be sortable.
api.czrModuleMap = api.czrModuleMap || {};
$.extend( api.czrModuleMap, {
czr_widget_areas_module : {
mthds : WidgetAreaConstructor,
crud : true,
multi_item : false,
name : 'Widget Areas',
has_mod_opt : false,
ready_on_section_expanded : true,
//defaultItemModel : {}
}
});
})( wp.customize , jQuery, _ );
@@ -0,0 +1,269 @@
<?php
function hu_register_widget_zones_module( $args ) {
$defaults = array(
'setting_id' => '',
'base_url_path' => '',//PC_AC_BASE_URL/inc/czr-modules/social-links/
'version' => '',
'option_value' => array(), //<= will be used for the dynamic registration
'setting' => array(),
'control' => array(),
'section' => array(), //array( 'id' => '', 'label' => '' ),
'sanitize_callback' => '',
'validate_callback' => ''
);
$args = wp_parse_args( $args, $defaults );
if ( ! isset( $GLOBALS['czr_base_fmk_namespace'] ) ) {
error_log( __FUNCTION__ . ' => global czr_base_fmk not set' );
return;
}
$czrnamespace = $GLOBALS['czr_base_fmk_namespace'];
//czr_fn\czr_register_dynamic_module
$CZR_Fmk_Base_fn = $czrnamespace . 'CZR_Fmk_Base';
if ( ! function_exists( $CZR_Fmk_Base_fn) ) {
error_log( __FUNCTION__ . ' => Namespace problem => ' . $CZR_Fmk_Base_fn );
return;
}
$CZR_Fmk_Base_fn() -> czr_pre_register_dynamic_setting( array(
'setting_id' => $args['setting_id'],
'module_type' => 'czr_widget_areas_module',
'option_value' => ! is_array( $args['option_value'] ) ? array() : $args['option_value'],
'setting' => $args['setting'],
'section' => $args['section'],
'control' => $args['control']
));
// czr_fn\czr_register_dynamic_module()
$CZR_Fmk_Base_fn() -> czr_pre_register_dynamic_module( array(
'dynamic_registration' => true,
'module_type' => 'czr_widget_areas_module',
// 'sanitize_callback' => 'hu_sanitize_callback__czr_social_module',
// 'validate_callback' => 'hu_validate_callback__czr_social_module',
'customizer_assets' => array(
'control_js' => array(
// handle + params for wp_enqueue_script()
// @see https://developer.wordpress.org/reference/functions/wp_enqueue_script/
'czr-widget-areas-module' => array(
'src' => sprintf(
'%1$s/assets/js/%2$s',
$args['base_url_path'],
'_2_6_widget_areas_module.js'
),
'deps' => array('customize-controls' , 'jquery', 'underscore'),
'ver' => ( defined('WP_DEBUG') && true === WP_DEBUG ) ? time() : $args['version'],
'in_footer' => true
)
),
'localized_control_js' => array(
'deps' => 'czr-customizer-fmk',
'global_var_name' => 'widgetModuleLocalized',
'params' => array(
//Widget Area Module
'dynWidgetSection' => HU_DYN_WIDGETS_SECTION,
'defaultWidgetSidebar' => 'primary',//the one that will be cloned. Specific to each themes
'defaultWidgetLocation' => 's1',//Specific to each themes
'sidebar_contexts' => hu_get_contexts_list(),
'sidebar_locations' => hu_get_widget_el_locations(),
'i18n' => array(
'widgetZone' => __('Widget Zone', 'hueman'),
'widgetZoneAdded' => __('New Widget Zone created ! Scroll down to edit it.', 'hueman'),
'inactiveWidgetZone' => __('Inactive in current context/location', 'hueman'),
'unavailableLocation' => __('Unavailable location. Some settings must be changed.', 'hueman'),
'locationWarning' => __('A selected location is not available with the current settings.', 'hueman'),
'locations' => __('Location(s)', 'hueman'),
'contexts' => __('Context(s)', 'hueman'),
'notset' => __('Not set', 'hueman'),
)
//'default_zones' => hu_get_widget_el_default_zones()
)
)
),
'tmpl' => array()//tmpl
));
}//hu_register_widget_zones_module()
/* ------------------------------------------------------------------------- *
* Various Helpers
/* ------------------------------------------------------------------------- */
function hu_get_widget_el_locations() {
$_default_locations = hu_get_builtin_widget_zones_location();
//generates the locations for json
$locations = array();
foreach ($_default_locations as $_id => $data ) {
$_k = key($data);
$locations[$_k] = $data[$_k];
}
return $locations;
}
function hu_get_widget_el_default_zones() {
//generates the default widget zone for json
$default_zones = array();
foreach ( hu_get_default_widget_zones() as $_zone_id => $_data ) {
//get the default location
$_loc = isset($_default_locations[$_zone_id]) ? key($_default_locations[$_zone_id]) : '';
$default_zones[] = array(
'id' => $_data['id'],
'title' => $_data['name'],
'contexts' => array('_all_'),
'locations' => array($_loc),
'is_builtin' => true,
'description' => $_data['description']
);
}
return $default_zones;
}
/*****************************************************************************
* PREVIEW SCRIPT
*****************************************************************************/
//exports some wp_query informations. Updated on each preview refresh.
add_action( 'customize_preview_init' , 'hu_schedule_preview_script_printing', 20 );
function hu_schedule_preview_script_printing() {
add_action( 'wp_footer', 'hu_print_widget_module_script', 1000 );
}
function hu_print_widget_module_script() {
?>
<script id="hu-widget-zones-module">
//global _wpWidgetCustomizerPreviewSettings
( function( api, $, _ ) {
api.bind( 'preview-ready', function() {
api.preview.bind( 'active', function() {
api.preview.send( 'houston-widget-settings',
_.extend( _wpWidgetCustomizerPreviewSettings,
{
availableWidgetLocations : _.values( api.settings.availableWidgetLocations )
}
)
);//send()
});
});
})( wp.customize, jQuery, _ );
</script>
<?php
}
/*****************************************************************************
* PRINT TEMPLATES
*****************************************************************************/
//print the pre add view content
add_action( 'customize_controls_print_footer_scripts', 'hu_print_widget_areas_templates' , 1 );
function hu_print_widget_areas_templates() {
if ( ! isset( $GLOBALS['czr_base_fmk_namespace'] ) ) {
error_log( __FUNCTION__ . ' => global czr_base_fmk not set' );
return;
}
$czrnamespace = $GLOBALS['czr_base_fmk_namespace'];
//czr_fn\czr_register_dynamic_module
$CZR_Fmk_Base_fn = $czrnamespace . 'CZR_Fmk_Base';
if ( ! function_exists( $CZR_Fmk_Base_fn) ) {
error_log( __FUNCTION__ . ' => Namespace problem => ' . $CZR_Fmk_Base_fn );
return;
}
$css_attr = $CZR_Fmk_Base_fn()->czr_css_attr;
?>
<script type="text/html" id="tmpl-czr-module-widgets-pre-add-view-content">
<div class="<?php echo $css_attr['sub_set_wrapper']; ?>" data-input-type="text">
<div class="customize-control-title"><?php _e('Name', 'hueman'); ?></div>
<div class="czr-input">
<input data-czrtype="title" type="text" value="" placeholder="<?php _e('Give it a name', 'hueman'); ?>"></input>
</div>
<span class="czr-notice"><?php _e('Personalizing the name of the widget zone will help you identify it.', 'hueman'); ?></span>
</div>
<div class="<?php echo $css_attr['sub_set_wrapper']; ?> width-100" data-input-type="select">
<div class="customize-control-title"><?php _e('Location(s)', 'hueman'); ?></div>
<span class="czr-notice"><?php _e('Select the pre-defined location(s) in which you will embed this widget zone.', 'hueman'); ?></span>
<div class="czr-input">
<select data-czrtype="locations" class="js-example-basic-multiple" multiple="multiple"></select>
</div>
</div>
</script>
<?php
//print template for built-in models like primary, secondary, footer-1, etc...
//REDUCED VIEW TEMPLATE
//no remove button
//no remove alert wrapper
?>
<script type="text/html" id="tmpl-czr-module-widgets-ru-item-part">
<div class="<?php echo $css_attr['item_header']; ?> czr-builtin-model">
<div class="<?php echo $css_attr['item_title']; ?> <?php echo $css_attr['item_sort_handle']; ?>"><h4>{{ data.title }}</h4></div>
<div class="<?php echo $css_attr['item_btns']; ?>"><a title="<?php _e('Edit', 'hueman'); ?>" href="javascript:void(0);" class="fas fa-pencil-alt <?php echo $css_attr['edit_view_btn']; ?>"></a></div>
</div>
</script>
<?php
//the following template is a "sub view"
//it's rendered :
//1) on customizer start, depending on what is fetched from the db
//2) dynamically when designing from the customizer
//data looks like : { id : 'sidebar-one', title : 'A Title One' }
?>
<script type="text/html" id="tmpl-czr-module-widgets-item-input-list">
<div class="<?php echo $css_attr['sub_set_wrapper']; ?>" data-input-type="text">
<div class="customize-control-title"><?php _e('id', 'hueman'); ?></div>
<input data-czrtype="id" type="hidden"></input>
<span><?php _e('unique id', 'hueman')?> : {{ data.id }}</span>
</div>
<div class="<?php echo $css_attr['sub_set_wrapper']; ?>" data-input-type="text">
<div class="customize-control-title"><?php _e('Name', 'hueman'); ?></div>
<div class="czr-input">
<input data-czrtype="title" type="text" value="{{ data.title }}" placeholder="<?php _e('Enter a name', 'hueman'); ?>"></input>
</div>
<span class="czr-notice"><?php _e('Personalizing the name of the widget zone will help you identify it.', 'hueman'); ?></span>
</div>
<div class="<?php echo $css_attr['sub_set_wrapper']; ?> width-100" data-input-type="select">
<div class="customize-control-title"><?php _e('Location(s)', 'hueman'); ?></div>
<span class="czr-notice"><?php _e('Select the pre-defined location(s) in which you will embed this widget zone.', 'hueman'); ?></span>
<div class="czr-input">
<select data-czrtype="locations" class="js-example-basic-multiple" multiple="multiple"></select>
</div>
</div>
<div class="<?php echo $css_attr['sub_set_wrapper']; ?> width-100" data-input-type="select">
<div class="customize-control-title"><?php _e('Context(s)', 'hueman'); ?></div>
<span class="czr-notice"><?php _e('Pick the context(s) where this widget area will be displayed.', 'hueman'); ?></span>
<div class="czr-input">
<select data-czrtype="contexts" class="js-example-basic-multiple" multiple="multiple"></select>
</div>
</div>
</script>
<?php
}
@@ -0,0 +1,839 @@
<?php
/**
* Customizer actions and filters
* Loaded if hu_is_customizing()
*
* @package Hueman
* @since 3.0+
* @author Nicolas GUILLAUME <nicolas@presscustomizr.com>
* @copyright Copyright (c) 2016, Nicolas GUILLAUME
* @link http://presscustomizr.com/hueman
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
if ( ! class_exists( 'HU_customize' ) ) :
class HU_customize {
static $instance;
public $control_translations;
public $css_attr;
function __construct () {
self::$instance =& $this;
//v3.1.2 option update : registered sidebar names have changed
$this -> hu_update_widget_database_option();
//load custom customizer classes
//=> will be instantiated on "customize_register"
$this -> hu_load_customizer_custom_classes();
//add control class
add_action( 'customize_register' , array( $this , 'hu_augment_customizer' ),10,1);
//add the customizer built with the builder below
add_action( 'customize_register' , array( $this , 'hu_customize_register' ), 20, 1 );
//add the customizer built with the builder below
add_action( 'customize_register' , array( $this , 'hu_schedule_register_sidebar_section' ), 1000, 1 );
//modify some WP built-in settings / controls / sections
add_action( 'customize_register' , array( $this , 'hu_alter_wp_customizer_settings' ), 1000, 1 );
//Partial refreshs
add_action( 'customize_register' , array( $this, 'hu_register_partials' ) );
//Clean some deprecated options (header-image for example, now handled with wp header_image theme mod)
add_action( 'customize_save_after' , array( $this, 'hu_clean_deprecated_options' ) );
//custom logo compatibility option for WP version < WP 4.5
//the Hueman theme has switched to the WP custom_logo theme mod since v3.2.4
//for older version, the previous control is used
if ( ! function_exists( 'the_custom_logo' ) ) {
add_filter( 'hu_site_identity_sec', array( $this, 'hu_register_old_custom_logo') );
}
//Print modules and inputs templates
$this -> hu_load_tmpl();
//Add the module data server side generated + additional resources (like the WP text editor)
// DEPRECATED SINCE JUNE 2018
//$this -> hu_load_module_data_resources();
locate_template( 'functions/czr/czr-resources.php', true, true );
}
/* ------------------------------------------------------------------------- *
* DEPRECATED OPTIONS
/* ------------------------------------------------------------------------- */
//hook : customize_save_after
//When the users modifies the header_image, check if the old option exists and remove it if needed
function hu_clean_deprecated_options( $manager_inst ) {
//can we do things ?
if ( ! $manager_inst->is_preview() ) {
return;
}
$action = 'save-customize_' . $manager_inst->get_stylesheet();
if ( ! check_ajax_referer( $action, 'nonce', false ) ) {
return;
}
//only attempt to update option when header_image is modified
$setting_validities = $manager_inst->validate_setting_values( $manager_inst->unsanitized_post_values() );
if ( ! is_array( $setting_validities ) || ! isset($setting_validities['header_image'] ) )
return;
//clean old option if exists
$_options = get_option( HU_THEME_OPTIONS );
if ( isset($_options['header-image']) ) {
unset( $_options['header-image']);
update_option( HU_THEME_OPTIONS, $_options );
}
}
//hook : hu_site_identity_sec
//Registers the custom logo for WP version < 4.5
function hu_register_old_custom_logo( $settings ) {
global $wp_version;
return array_merge(
$settings,
array(
'custom-logo' => array(
'control' => version_compare( $wp_version, '4.3', '>=' ) ? 'HU_Customize_Cropped_Image_Control' : 'HU_Customize_Upload_Control',
'label' => __( 'Custom Header Logo' , 'hueman' ),
'section' => 'title_tagline' ,
'sanitize_callback' => array( HU_utils_settings_map::$instance , 'hu_sanitize_number' ),
//we can define suggested cropping area and allow it to be flexible (def 150x150 and not flexible)
'width' => 250,
'height' => 100,
'flex_width' => true,
'flex_height' => true,
//to keep the selected cropped size
'dst_width' => false,
'dst_height' => false,
'notice' => __('Upload your custom logo image. Supported formats : .jpg, .png, .gif, svg, svgz' , 'hueman'),
'priority' => 7
)
)
);
}
/* ------------------------------------------------------------------------- *
* LOAD CUSTOM CUSTOMIZER CLASSES FOR CONTROLS / SETTINGS / SECTIONS / PANELS
/* ------------------------------------------------------------------------- */
/**
* hook : 'init'
* Augments wp customize controls and settings classes
* @package Hueman
* @since Hueman 3.0
*/
function hu_load_customizer_custom_classes() {
$_classes = array(
'controls/class-base-control.php',
'controls/class-cropped-image-control.php',
'controls/class-layout-control.php',
'controls/class-multipicker-control.php',
'controls/class-modules-control.php',
'controls/class-upload-control.php',
'controls/class-code-editor-control.php',
'controls/class-color-alpha-control.php',
'panels/class-panels.php',
'sections/class-sections.php',
'sections/class-pro-section.php',
'sections/class-widgets-section.php',
'settings/class-settings.php'
);
foreach ($_classes as $_path) {
locate_template( 'functions/czr/' . $_path , $load = true, $require_once = true );
}
}
/* ------------------------------------------------------------------------- *
* AUGMENT CUSTOMIZER SERVER SIDE
/* ------------------------------------------------------------------------- */
/**
* hook : 'customize_register'
* Augments wp customize controls and settings classes
* @package Hueman
* @since Hueman 3.0
*/
function hu_augment_customizer( $manager ) {
//Registered types are eligible to be rendered via JS and created dynamically.
if ( class_exists('HU_Customize_Cropped_Image_Control') )
$manager -> register_control_type( 'HU_Customize_Cropped_Image_Control' );
if ( class_exists('HU_Customize_Panels') )
$manager -> register_panel_type( 'HU_Customize_Panels');
if ( class_exists('HU_Customize_Sections') )
$manager -> register_panel_type( 'HU_Customize_Sections');
if ( hu_is_pro_section_on() ) {
$manager -> register_section_type( 'HU_Customize_Section_Pro');
}
if ( class_exists('HU_Customize_Code_Editor_Control') )
$manager -> register_control_type( 'HU_Customize_Code_Editor_Control' );
if ( class_exists('HU_Customize_Color_Alpha_Control') )
$manager -> register_control_type( 'HU_Customize_Color_Alpha_Control' );
}
/* ------------------------------------------------------------------------- *
* PARTIALS
/* ------------------------------------------------------------------------- */
//hook : customize_register
function hu_register_partials( WP_Customize_Manager $wp_customize ) {
//Bail if selective refresh is not available (old versions) or disabled (for skope for example)
if ( ! isset( $wp_customize->selective_refresh ) || ! hu_is_partial_refreshed_on() ) {
return;
}
$wp_customize->selective_refresh->add_partial( 'social_links', array(
'selector' => '.social-links',
'settings' => array( 'hu_theme_options[social-links]' ),
'render_callback' => 'hu_print_social_links',
) );
$wp_customize->selective_refresh->add_partial( 'header_image', array(
'selector' => '#header-image-wrap',
'settings' => array( 'header_image' ),
'render_callback' => 'hu_render_header_image',
) );
//if ( ! function_exists( 'HU_AD') || ! HU_AD() -> ha_is_skop_on() ) {
$wp_customize->selective_refresh->add_partial( 'site_title', array(
'selector' => '.site-title',
'settings' => array( 'blogname' ),
'render_callback' => 'hu_do_render_logo_site_tite',
) );
//}
$wp_customize->selective_refresh->add_partial( 'site_description', array(
'selector' => '.site-description',
'settings' => array( 'blogdescription' ),
'render_callback' => 'hu_render_blog_description',
) );
}
/* ------------------------------------------------------------------------- *
* LOAD MODULES AND INPUTS TEMPLATES
/* ------------------------------------------------------------------------- */
function hu_load_tmpl() {
$_tmpl = array(
//'tmpl/modules/all-modules-tmpl.php',
'tmpl/modules/slide-module-tmpl.php',
//'tmpl/inputs/img-uploader-tmpl.php',
'tmpl/modules/text_editor-module-tmpl.php',
//'tmpl/inputs/text_editor-input-tmpl.php'
);
foreach ($_tmpl as $_path) {
locate_template( 'functions/czr/' . $_path , $load = true, $require_once = true );
}
}
// DEPRECATED SINCE JUNE 2018
// function hu_load_module_data_resources() {
// locate_template( 'functions/czr/modules/modules-data.php' , $load = true, $require_once = true );
// //locate_template( 'functions/czr/modules/modules-resources.php' , $load = true, $require_once = true );
// }
/* ------------------------------------------------------------------------- *
* MODIFY SETTINGS, CONTROLS, SECTIONS, PANELS SERVER SIDE
/* ------------------------------------------------------------------------- */
/*
* Since the WP_Customize_Manager::$controls and $settings are protected properties, one way to alter them is to use the get_setting and get_control methods
* Another way is to remove the control and add it back as an instance of a custom class and with new properties
* and set new property values
* hook : hu_customize_register:30
* @return void()
*/
function hu_alter_wp_customizer_settings( $wp_customize ) {
//SOME SETTINGS TRANSPORT
if ( is_object( $wp_customize -> get_setting( 'blogname' ) ) ) {
$wp_customize -> get_setting( 'blogname' )->transport = 'postMessage';
}
if ( is_object( $wp_customize -> get_setting( 'blogdescription' ) ) ) {
$wp_customize -> get_setting( 'blogdescription' )->transport = 'postMessage';
}
//ONLY IF SELECTIVE REFRESH IS SUPPORTED
if ( isset( $wp_customize->selective_refresh ) && is_object( $wp_customize -> get_setting( 'header_image' ) ) ) {
$wp_customize -> get_setting( 'header_image' )->transport = 'postMessage';
}
if ( isset( $wp_customize->selective_refresh ) && is_object( $wp_customize -> get_setting( 'header_image_data' ) ) ) {
$wp_customize -> get_setting( 'header_image_data' )->transport = 'postMessage';
}
//MOVE WP FRONT PAGE SECTION TO ROOT PANEL
if ( is_object( $wp_customize -> get_section( 'static_front_page' ) ) ) {
$wp_customize -> get_section( 'static_front_page' ) -> panel = '';//'hu-content-panel';
$wp_customize -> get_section( 'static_front_page' ) -> title = __( 'Front Page Content', 'hueman' );
$wp_customize -> get_section( 'static_front_page' ) -> priority = 10;
//$wp_customize -> get_section( 'static_front_page' ) -> active_callback = 'hu_is_home';
}
//CHANGE THE STATIC FRONT PAGE WP CONTROLS
if ( is_object( $wp_customize -> get_control( 'show_on_front' ) ) ) {
$wp_customize -> get_control( 'show_on_front' ) -> type = 'select';
$wp_customize -> get_control( 'show_on_front' ) -> choices = array(
'__nothing__' => __( 'Don\'t show any posts or page' , 'hueman'),
'posts' => __( 'Your latest posts' , 'hueman'),
'page' => __( 'A static page' , 'hueman' )
);
}
//IF WP VERSION >= 4.3 AND SITE_ICON SETTING EXISTS
//=> REMOVE OLD FAV ICON CONTROL
//=> CHANGE SITE ICON DEFAULT WP SECTION TO LOGO SECTION
global $wp_version;
if ( version_compare( $wp_version, '4.3', '>=' ) && is_object( $wp_customize -> get_control( 'site_icon' ) ) ) {
$hu_option_group = HU_THEME_OPTIONS;
$wp_customize -> remove_control( "{$hu_option_group}[favicon]" );
//note : the setting is kept because used in the customizer js api to handle the transition between Hueman favicon to WP site icon.
$wp_customize -> get_control( 'site_icon' ) -> section = 'title_tagline';
//add a favicon title after the logo upload
//@todo : update the callback
//add_action( '__after_setting_control' , array( $this , 'hu_add_favicon_title') );
}//end ALTER SITE ICON
//CHANGE MENUS PROPERTIES
// $locations = get_registered_nav_menus();
// $menus = wp_get_nav_menus();
// $choices = array( '' => __( '&mdash; Select &mdash;', 'hueman' ) );
// foreach ( $menus as $menu ) {
// $choices[ $menu->term_id ] = wp_html_excerpt( $menu->name, 40, '&hellip;' );
// }
// $_priorities = array(
// 'topbar' => 10,
// 'header' => 20,
// 'footer' => 30
// );
// //WP only adds the menu(s) settings and controls if the user has created at least one menu.
// //1) if no menus yet, we still want to display the menu picker + add a notice with a link to the admin menu creation panel
// //=> add_setting and add_control for each menu location. Check if they are set first by security
// //2) if user has already created a menu, the settings are already created, we just need to update the controls.
// $_priority = 0;
// //assign new priorities to the menus controls
// foreach ( $locations as $location => $description ) {
// $menu_setting_id = "nav_menu_locations[{$location}]";
// //create the settings if they don't exist
// //=> in the condition, make sure that the setting has really not been created yet (maybe over secured)
// if ( ! $menus && ! is_object( $wp_customize->get_setting($menu_setting_id ) ) ) {
// $wp_customize -> add_setting( $menu_setting_id, array(
// 'sanitize_callback' => 'absint',
// 'theme_supports' => 'menus',
// ) );
// }
// //remove the controls if they exists
// if ( is_object( $wp_customize->get_control( $menu_setting_id ) ) ) {
// $wp_customize -> remove_control( $menu_setting_id );
// }
// //replace the controls by our custom controls
// $_control_properties = array(
// 'label' => $description,
// 'section' => 'menu_locations',
// 'title' => "main" == $location ? __( 'Assign menus to locations' , 'hueman') : false,
// 'type' => 'select',
// 'choices' => $choices,
// 'priority' => isset($_priorities[$location]) ? $_priorities[$location] : $_priority
// );
// //add a notice property if no menu created yet.
// if ( ! $menus ) {
// //adapt the nav section description for v4.3 (menu in the customizer from now on)
// $_create_menu_link = version_compare( $GLOBALS['wp_version'], '4.3', '<' ) ? admin_url('nav-menus.php') : "javascript:wp.customize.section('nav').container.find('.customize-section-back').trigger('click'); wp.customize.panel('nav_menus').focus();";
// $_control_properties['notice'] = sprintf( __("You haven't created any menu yet. %s or check the %s to learn more about menus.", "hueman"),
// sprintf( '<strong><a href="%1$s" title="%2$s">%2$s</a></strong>', $_create_menu_link, __("Create a new menu now" , "hueman") ),
// sprintf( '<a href="%1$s" title="%2$s" target="_blank">%2$s</a>', esc_url('codex.wordpress.org/WordPress_Menu_User_Guide'), __("WordPress documentation" , "hueman") )
// );
// }
// $wp_customize -> add_control( new HU_controls( $wp_customize, $menu_setting_id, $_control_properties ) );
// $_priority = $_priority + 10;
// }//foreach
//MOVE THE HEADER IMAGE CONTROL INTO THE HEADER DESIGN SECTION
if ( is_object( $wp_customize -> get_control( 'header_image' ) ) ) {
$wp_customize -> get_control( 'header_image' ) -> section = 'header_image_sec';
$wp_customize -> get_control( 'header_image' ) -> priority = 100;
}
//CHANGE THE CUSTOM LOGO PRIORITY
//check if custom_logo is registered first for backward compatibility => custom_logo was introduced in WP 4.5.
if ( is_object( $wp_customize->get_control( 'custom_logo' ) ) ) {
$wp_customize -> get_control( 'custom_logo' ) -> priority = 7;
}
//The selective refresh support will be added later to the custom logo
if ( isset( $wp_customize->selective_refresh ) && is_object($wp_customize->get_setting( 'custom_logo' ) ) ) {
$wp_customize -> selective_refresh -> remove_partial( 'custom_logo' );
$wp_customize -> get_setting( 'custom_logo' ) -> transport = 'refresh';
}
//MOVE THE CUSTOM CSS SECTION (introduced in 4.7) INTO THE GLOBAL SETTINGS PANEL
if ( is_object( $wp_customize->get_section( 'custom_css' ) ) ) {
$wp_customize -> get_section( 'custom_css' ) -> panel = 'hu-advanced-panel';
$wp_customize -> get_section( 'custom_css' ) -> priority = 40;
}
}//end of hu_alter_wp_customizer_settings()
/*
* hook : '__after_setting_control' (declared in class-controls-settings.php)
* Display a title for the favicon control, after the logo
*/
function hu_add_favicon_title($set_id) {
printf( '<h3 class="czr-hueman-title">%s</h3>', __( 'SITE ICON' , 'hueman') );
}
/* ------------------------------------------------------------------------- *
* WIDGETS SPECIFICS
/* ------------------------------------------------------------------------- */
//updates the names of the built-in widget zones for users who installed the theme before v3.1.2
function hu_update_widget_database_option() {
if ( ! hu_user_started_before_version('3.1.2') )
return;
$_options = get_option('hu_theme_options');
$_update_widget_areas = array();
if ( ! isset($_options['sidebar-areas']) || ! is_array($_options['sidebar-areas']) )
return;
$_zones = hu_get_default_widget_zones();
foreach ( $_options['sidebar-areas'] as $key => $data ) {
if ( ! array_key_exists($data['id'], $_zones) )
continue;
$_id = $data['id'];
$_options['sidebar-areas'][$key]['title'] = $_zones[$_id]['name'];
}
update_option('hu_theme_options', $_options );
}
/**
* Why this ?
* Unlike the other panels, which are all added on customize_register, the Widgets panel is added on 2 different hooks
* 1) customize_register for the left panel
* 2) 'wp' for the preview frame.
* @see WP_Customize_Widgets::schedule_customize_register()
*
* Therefore to add a section and a control to the Widgets panel, we have to follow the same logic
* if not, the added section will always be deactivated.
*
* Note that the related setting added in this section must always be registered early in customize_register
*/
function hu_schedule_register_sidebar_section( $wp_customize ) {
$this -> hu_customize_factory (
$wp_customize,
$this -> hu_customize_arguments(),
array(
'add_setting' => array(
'sidebar-areas' => array(
'registered_dynamically' => true,
'default' => array(),//empty array by default
'control' => 'HU_Customize_Modules',
'label' => __('Create And Order Widget Areas', 'hueman'),
'section' => HU_DYN_WIDGETS_SECTION,
'type' => 'czr_module',
'module_type' => 'czr_widget_areas_module',
'notice' => __('You must save changes for the new areas to appear below. <br /><i>Warning: Make sure each area has a unique ID.</i>' , 'hueman'),
'transport' => 'postMessage',
'skoped' => false,
)
)
)
);
//$this->hu_customize_register( $wp_customize );
if ( is_admin() ) {
$this -> hu_register_sidebar_section( $wp_customize );
} else {
add_action( 'wp', array( $this, 'hu_register_sidebar_section' ) );
}
}
function hu_register_sidebar_section( $wp_customize ) {
$_widget_section_name = HU_DYN_WIDGETS_SECTION;
$_map = array(
'add_control' => array(
'sidebar-areas' => array(
'registered_dynamically' => true,
'default' => array(),//empty array by default
'control' => 'HU_Customize_Modules',
'label' => __('Create And Manage Widget Areas', 'hueman'),
'section' => $_widget_section_name,
'type' => 'czr_module',
'module_type' => 'czr_widget_areas_module',
'notice' => __('You must save changes for the new areas to appear below. <br /><i>Warning: Make sure each area has a unique ID.</i>' , 'hueman'),
'transport' => 'postMessage'
)
),//'add_control'
'add_section' => array(
"{$_widget_section_name}" => array(
'title' => __( 'Create and manage widget zones', 'hueman' ),
'priority' => 1000,
'panel' => 'widgets',
'section_class' => 'HU_Customize_Manage_Widgets_Section',
'type' => 'widget_zones_management'
)
)//add_section
);//map
//wp_customize is not defined when hooked on wp
if ( 'wp' == current_filter() )
global $wp_customize;
$this -> hu_customize_factory (
$wp_customize,
$this -> hu_customize_arguments(),
$_map
);
$wp_customize -> get_panel('widgets') -> title = __('Dynamic Sidebars and Widgets', 'hueman');
}
/* ------------------------------------------------------------------------- *
* FACTORY
/* ------------------------------------------------------------------------- */
/**
* Generates customizer sections, settings and controls
* @package Hueman
* @since Hueman 3.0
*/
function hu_customize_register( $wp_customize) {
return $this -> hu_customize_factory(
$wp_customize,
$this -> hu_customize_arguments(),
HU_utils_settings_map::$instance -> hu_get_customizer_map()
);
}
/**
* Defines authorized arguments for panels, sections, settings and controls
* @package Hueman
* @since Hueman 3.0
*/
function hu_customize_arguments() {
$args = array(
'panels' => array(
'title',
'czr_subtitle',
'description',
'priority' ,
'theme_supports',
'capability',
'type'
),
'sections' => array(
'title' ,
'priority' ,
'description',
'panel',
'theme_supports',
'type',
'active_callback',
'pro_text',
'pro_url',
'ubq_panel'
),
'settings' => array(
'default' => null,
'capability' => 'manage_options' ,
'setting_type' => 'option' ,
'sanitize_callback' => null,
'sanitize_js_callback' => null,
'transport' => null
),
'controls' => array(
'title' ,
'label' ,
'description',
'section' ,
'settings',
'type' ,
'module_type',
'syncCollection',
'choices' ,
'priority' ,
'sanitize_callback',
'sanitize_js_callback',
'notice' ,
'buttontext' ,//button specific
'link' ,//button specific
'step' ,//number specific
'min' ,//number specific
'range-input' ,
'max',
'cssid',
'slider_default',
'active_callback',
'content_after',
'content_before',
'icon',
'width',
'height',
'flex_width',
'flex_height',
'dst_width',
'dst_height',
'ubq_section',
//for the code editor
'code_type',
'input_attrs'
)
);
return apply_filters( 'hu_customizer_arguments', $args );
}
/**
* Generates customizer
* @package Hueman
* @since Hueman 3.0
*/
function hu_customize_factory ( $wp_customize , $args, $setup ) {
global $wp_version;
//add panels if current WP version >= 4.0
if ( isset( $setup['add_panel']) && version_compare( $wp_version, '4.0', '>=' ) ) {
foreach ( $setup['add_panel'] as $p_key => $p_options ) {
//declares the clean section option array
$panel_options = array();
//checks authorized panel args
foreach( $args['panels'] as $p_set) {
$panel_options[$p_set] = isset( $p_options[$p_set]) ? $p_options[$p_set] : null;
}
$wp_customize -> add_panel( new HU_Customize_Panels( $wp_customize, $p_key, $panel_options ) );
}
}
//remove sections
if ( isset( $setup['remove_section'])) {
foreach ( $setup['remove_section'] as $section) {
$wp_customize -> remove_section( $section);
}
}
//add sections
if ( isset( $setup['add_section'])) {
foreach ( $setup['add_section'] as $key => $options) {
//generate section array
$option_section = array();
foreach( $args['sections'] as $sec) {
$option_section[$sec] = isset( $options[$sec]) ? $options[$sec] : null;
}
//instanciate a custom class if defined
if( ! isset( $options['section_class']) )
$wp_customize -> add_section( $key,$option_section);
else if ( isset( $options['section_class']) && class_exists( $options['section_class'] ) )
$wp_customize -> add_section( new $options['section_class']( $wp_customize, $key, $option_section ));
}//end foreach
}//end if
//add setting alone
if ( isset( $setup['add_setting'])) {
foreach ( $setup['add_setting'] as $key => $options) {
//isolates the option name for the setting's filter
$f_option = preg_match_all( '/\[(.*?)\]/' , $key , $match );
$f_option_name = isset( $match[1][0] ) ? $match[1][0] : 'setting';
$hu_option_group = HU_THEME_OPTIONS;
$_opt_name = "{$hu_option_group}[{$key}]";
//declares settings array
$option_settings = array();
foreach( $args['settings'] as $set => $set_value) {
if ( $set == 'setting_type' ) {
$option_settings['type'] = isset( $options['setting_type']) ? $options['setting_type'] : $args['settings'][$set];
$option_settings['type'] = apply_filters( "{$f_option_name}_customizer_set", $option_settings['type'] , $set );
}
else {
$option_settings[$set] = isset( $options[$set]) ? $options[$set] : $args['settings'][$set];
$option_settings[$set] = apply_filters( "{$f_option_name}_customizer_set" , $option_settings[$set] , $set );
}
}
//add setting
if ( class_exists('HU_Customize_Setting') )
$wp_customize -> add_setting( new HU_Customize_Setting ( $wp_customize, $_opt_name, $option_settings ) );
else
$wp_customize -> add_setting( $_opt_name, $option_settings );
}//end for each
}//end if isset
//add control alone
if ( isset( $setup['add_control'])) {
foreach ( $setup['add_control'] as $key => $options) {
//isolates the option name for the setting's filter
$f_option = preg_match_all( '/\[(.*?)\]/' , $key , $match );
$f_option_name = isset( $match[1][0] ) ? $match[1][0] : 'setting';
$hu_option_group = HU_THEME_OPTIONS;
$_opt_name = "{$hu_option_group}[{$key}]";
//generate controls array
$option_controls = array();
foreach( $args['controls'] as $con) {
$option_controls[$con] = isset( $options[$con]) ? $options[$con] : null;
}
//add control with a class instanciation if not default
if( ! isset( $options['control']) )
$wp_customize -> add_control( $_opt_name, $option_controls );
else
$wp_customize -> add_control( new $options['control']( $wp_customize, $_opt_name, $option_controls ));
}//end for each
}//end if isset
//add settings and controls
if ( isset( $setup['add_setting_control'])) {
foreach ( $setup['add_setting_control'] as $key => $options) {
//isolates the option name for the setting's filter
$f_option = preg_match_all( '/\[(.*?)\]/' , $key , $match );
$f_option_name = isset( $match[1][0] ) ? $match[1][0] : 'setting';
$hu_option_group = HU_THEME_OPTIONS;
$_opt_name = "{$hu_option_group}[{$key}]";
//declares settings array
$option_settings = array();
// bail here if the setting is registered dynamically
// since June 2018
if ( array_key_exists( 'registered_dynamically', $options ) && true === $options[ 'registered_dynamically' ] )
continue;
foreach( $args['settings'] as $set => $set_value) {
if ( $set == 'setting_type' ) {
$option_settings['type'] = isset( $options['setting_type']) ? $options['setting_type'] : $args['settings'][$set];
$option_settings['type'] = apply_filters( "{$f_option_name}_customizer_set", $option_settings['type'] , $set );
}
else {
$option_settings[$set] = isset( $options[$set]) ? $options[$set] : $args['settings'][$set];
$option_settings[$set] = apply_filters( "{$f_option_name}_customizer_set" , $option_settings[$set] , $set );
}
}
//add setting
if ( class_exists('HU_Customize_Setting') )
$wp_customize -> add_setting( new HU_Customize_Setting ( $wp_customize, $_opt_name, $option_settings ) );
else
$wp_customize -> add_setting( $_opt_name, $option_settings );
//generate controls array
$option_controls = array();
foreach( $args['controls'] as $con) {
$option_controls[$con] = isset( $options[$con]) ? $options[$con] : null;
}
//add control with a class instanciation if not default
if( ! isset( $options['control']) )
$wp_customize -> add_control( $_opt_name, $option_controls );
else
$wp_customize -> add_control( new $options['control']( $wp_customize, $_opt_name, $option_controls ));
}//end for each
}//end if isset
}//end of customize generator function
/* ------------------------------------------------------------------------- *
* HELPERS
/* ------------------------------------------------------------------------- */
//@return array of WP builtin settings
function hu_get_wp_builtin_settings() {
return array(
'blogname',
'blogdescription',
'site_icon',
'custom_logo',
'background_color',
'show_on_front',
'page_on_front',
'page_for_posts',
'header_image',
'header_image_data'
);
}
}//end of class
endif;
@@ -0,0 +1,248 @@
<?php
/**
* Add controls to customizer
*
*/
if ( ! class_exists( 'HU_controls' ) ) :
class HU_controls extends WP_Customize_Control {
public $type;
public $link;
public $title;
public $label;
public $buttontext;
public $settings;
public $hr_after;
public $notice;
//number vars
public $step;
public $min;
public $icon;
public $ubq_section;
static $enqueued_resources;
public function render_content() {
do_action( '__before_setting_control' , $this -> id );
switch ( $this -> type) {
case 'hr':
echo '<hr class="czr-customizer-separator" />';
break;
case 'title' :
?>
<?php if (isset( $this->title)) : ?>
<h3 class="czr-customizr-title"><?php echo esc_html( $this->title); ?></h3>
<?php endif; ?>
<?php if (isset( $this->notice)) : ?>
<i class="czr-notice"><?php echo $this -> notice ?></i>
<?php endif; ?>
<?php
break;
case 'select':
if ( empty( $this->choices ) )
return;
?>
<?php if (!empty( $this->title)) : ?>
<h3 class="czr-customizr-title"><?php echo esc_html( $this->title); ?></h3>
<?php endif; ?>
<label>
<span class="customize-control-title"><?php echo $this->label; ?></span>
<?php $this -> hu_print_select_control( '' ) ?>
<?php if(!empty( $this -> notice)) : ?>
<span class="czr-notice"><?php echo $this -> notice ?></span>
<?php endif; ?>
</label>
<?php
break;
case 'number':
?>
<?php if (isset( $this->title)) : ?>
<h3 class="czr-customizr-title"><?php echo esc_html( $this->title); ?></h3>
<?php endif; ?>
<label>
<span class="czr-number-label customize-control-title"><?php echo $this->label ?></span>
<input <?php $this->link() ?> type="number" step="<?php echo $this-> step ?>" min="<?php echo $this-> min ?>" id="posts_per_page" value="<?php echo $this->value() ?>" class="czr-number-input small-text">
<?php if(!empty( $this -> notice)) : ?>
<span class="czr-notice"><?php echo $this-> notice ?></span>
<?php endif; ?>
</label>
<?php
break;
case 'checkbox':
case 'nimblecheck':
?>
<?php if (isset( $this->title)) : ?>
<h3 class="czr-customizr-title"><?php echo esc_html( $this->title); ?></h3>
<?php endif; ?>
<?php if ( 'checkbox' === $this->type ) : ?>
<?php
printf('<div class="czr-check-label"><label><span class="customize-control-title">%1$s</span></label></div>',
$this->label
);
?>
<input <?php $this->link(); ?> type="checkbox" value="<?php echo esc_attr( $this->value() ); ?>" <?php checked( $this->value() ); ?> />
<?php elseif ( 'nimblecheck' === $this->type ) : ?>
<div class="czr-control-nimblecheck">
<?php
printf('<div class="czr-check-label"><label><span class="customize-control-title">%1$s</span></label></div>',
$this->label
);
?>
<div class="nimblecheck-wrap">
<input id="nimblecheck-<?php echo $this -> id; ?>" <?php $this->link(); ?> type="checkbox" value="<?php echo esc_attr( $this->value() ); ?>" <?php checked( $this->value() ); ?> class="nimblecheck-input">
<label for="nimblecheck-<?php echo $this -> id; ?>" class="nimblecheck-label">Switch</label>
</div>
</div>
<?php endif; ?>
<?php if(!empty( $this -> notice)) : ?>
<span class="czr-notice"><?php echo $this-> notice ?></span>
<?php endif; ?>
<?php
break;
case 'textarea':
?>
<?php if (isset( $this->title)) : ?>
<h3 class="czr-customizr-title"><?php echo esc_html( $this->title); ?></h3>
<?php endif; ?>
<label>
<span class="customize-control-title"><?php echo $this->label; ?></span>
<?php if(!empty( $this -> notice)) : ?>
<span class="czr-notice"><?php echo $this-> notice; ?></span>
<?php endif; ?>
<textarea class="widefat" rows="3" cols="10" <?php $this->link(); ?>><?php echo esc_html( $this->value() ); ?></textarea>
</label>
<?php
break;
case 'url':
case 'email':
?>
<?php if (isset( $this->title)) : ?>
<h3 class="czr-customizr-title"><?php echo esc_html( $this->title); ?></h3>
<?php endif; ?>
<?php
printf('<label><span class="customize-control-title %1$s">%2$s</span><input type="text" value="%3$s" %4$s /></label>',
! empty( $this -> icon) ? $this -> icon : '',
$this->label,
call_user_func( array( HU_utils_settings_map::$instance, 'hu_sanitize_' . $this -> type), $this->value() ),
call_user_func( array( $this, 'get'.'_'.'link' ) )
);
break;
default:
global $wp_version;
?>
<?php if (isset( $this->title)) : ?>
<h3 class="czr-customizr-title"><?php echo esc_html( $this->title); ?></h3>
<?php endif; ?>
<label>
<?php if ( ! empty( $this->label ) ) : ?>
<span class="customize-control-title"><?php echo $this->label; ?></span>
<?php endif; ?>
<?php if ( ! empty( $this->description ) ) : ?>
<span class="description customize-control-description"><?php echo $this->description; ?></span>;;;
<?php endif; ?>
<?php if ( ! version_compare( $wp_version, '4.0', '>=' ) ) : ?>
<input type="<?php echo esc_attr( $this->type ); ?>" value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->link(); ?> />
<?php else : ?>
<input type="<?php echo esc_attr( $this->type ); ?>" <?php $this->input_attrs(); ?> value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->link(); ?> />
<?php endif; ?>
<?php if(!empty( $this -> notice)) : ?>
<span class="czr-notice"><?php echo $this-> notice; ?></span>
<?php endif; ?>
</label>
<?php
break;
}//end switch
do_action( '__after_setting_control' , $this -> id );
}//end function
private function hu_print_select_control($class) {
printf('<select %1$s class="%2$s">%3$s</select>',
call_user_func( array( $this, 'get'.'_'.'link' ) ),
$class,
$this -> hu_get_select_options()
);
}
private function hu_get_select_options() {
$_options_html = '';
switch ( $this -> id ) {
default:
foreach ( $this->choices as $value => $label ) {
$_options_html .= sprintf('<option value="%1$s" %2$s>%3$s</option>',
esc_attr( $value ),
selected( $this->value(), $value, false ),
$label
);
}
break;
}//end switch
return $_options_html;
}//end of fn
/**
* Enqueue scripts/styles
* fired by the parent Control class constructor
*
*/
// public function enqueue() {
// if ( ! empty( self::$enqueued_resources ) )
// return;
// self::$enqueued_resources = true;
// wp_enqueue_script( 'wp-color-picker' );
// wp_enqueue_style( 'wp-color-picker' );
// wp_enqueue_style(
// 'font-awesome',
// sprintf('%1$s/assets/front/css/font-awesome.min.css', get_template_directory_uri() ),
// array(),
// HUEMAN_VER,
// $media = 'all'
// );
// //select2 stylesheet
// //overriden by some specific style in theme-customzer-control.css
// wp_enqueue_style(
// 'select2-css',
// sprintf('%1$s/assets/czr/css/lib/select2.min.css', get_template_directory_uri() ),
// array( 'customize-controls' ),
// HUEMAN_VER,
// $media = 'all'
// );
// }
/**
* Refresh the parameters passed to the JavaScript via JSON.
*
*
* @Override
* @see WP_Customize_Control::to_json()
*/
public function to_json() {
parent::to_json();
if ( is_array( $this->ubq_section ) && array_key_exists( 'section', $this->ubq_section ) )
$this->json['ubq_section'] = $this->ubq_section;
}
}//end of class
endif;
@@ -0,0 +1,51 @@
<?php
/*
*/
if ( class_exists('WP_Customize_Code_Editor_Control') && ! class_exists( 'HU_Customize_Code_Editor_Control' ) ) :
class HU_Customize_Code_Editor_Control extends WP_Customize_Code_Editor_Control {
public $type = 'czr_code_editor';
public $title;
public $notice;
/**
* Refresh the parameters passed to the JavaScript via JSON.
*
* @see WP_Customize_Control::json()
*
* @return array Array of parameters passed to the JavaScript.
*/
public function json() {
$json = parent::json();
if ( is_array( $json ) ) {
$json['title'] = !empty( $this -> title ) ? esc_html( $this -> title ) : '';
$json['notice'] = !empty( $this -> notice ) ? $this -> notice : '';
}
return $json;
}
/**
* Render a JS template for the content of the media control.
*
* @since 3.4.19
* @package Customizr
*
* @Override
* @see WP_Customize_Control::content_template()
*/
public function content_template() {
?>
<# if ( data.title ) { #>
<h3 class="czr-customizr-title">{{{ data.title }}}</h3>
<# } #>
<?php parent::content_template(); ?>
<# if ( data.notice ) { #>
<span class="czr-notice">{{{ data.notice }}}</span>
<# } #>
<?php
}
}//end class
endif;
?>
@@ -0,0 +1,82 @@
<?php
/*
*/
if ( ! class_exists( 'HU_Customize_Color_Alpha_Control' ) ) :
class HU_Customize_Color_Alpha_Control extends HU_controls {
public $type = 'wp_color_alpha';
public $title;
public $notice;
public $statuses;
public $mode = 'full';
/**
* Constructor.
*
* @since 3.4.0
* @uses WP_Customize_Control::__construct()
*
* @param WP_Customize_Manager $manager Customizer bootstrap instance.
* @param string $id Control ID.
* @param array $args Optional. Arguments to override class property defaults.
*/
public function __construct( $manager, $id, $args = array() ) {
$this->statuses = array( '' => __('Default', 'hueman') );
parent::__construct( $manager, $id, $args );
}
/**
* Refresh the parameters passed to the JavaScript via JSON.
*
* @see WP_Customize_Control::json()
*
* @return array Array of parameters passed to the JavaScript.
*/
public function to_json() {
parent::to_json();
$this->json['statuses'] = $this->statuses;
$this->json['defaultValue'] = $this->setting->default;
$this->json['mode'] = $this->mode;
$this->json['title'] = !empty( $this -> title ) ? esc_html( $this -> title ) : '';
$this->json['notice'] = !empty( $this -> notice ) ? $this -> notice : '';
}
/**
*
*/
public function content_template() {
?>
<# var defaultValue = '#RRGGBB', defaultValueAttr = '',
isHueSlider = data.mode === 'hue';
if ( data.defaultValue && _.isString( data.defaultValue ) && ! isHueSlider ) {
if ( '#' !== data.defaultValue.substring( 0, 1 ) ) {
defaultValue = '#' + data.defaultValue;
} else {
defaultValue = data.defaultValue;
}
defaultValueAttr = ' data-default-color=' + defaultValue; // Quotes added automatically.
} #>
<# if ( data.label ) { #>
<span class="customize-control-title">{{{ data.label }}}</span>
<# } #>
<# if ( data.description ) { #>
<span class="description customize-control-description">{{{ data.description }}}</span>
<# } #>
<div class="customize-control-content">
<label><span class="screen-reader-text">{{{ data.label }}}</span>
<# if ( isHueSlider ) { #>
<input data-alpha="true" class="color-picker-hue" type="text" data-type="hue" />
<# } else { #>
<input data-alpha="true" class="color-picker-hex" type="text" maxlength="7" placeholder="{{ defaultValue }}" {{ defaultValueAttr }} />
<# } #>
</label>
</div>
<?php
}
}//end class
endif;
?>
@@ -0,0 +1,65 @@
<?php
/*
*/
if ( class_exists('WP_Customize_Cropped_Image_Control') && ! class_exists( 'HU_Customize_Cropped_Image_Control' ) ) :
class HU_Customize_Cropped_Image_Control extends WP_Customize_Cropped_Image_Control {
public $type = 'czr_cropped_image';
public $title;
public $notice;
public $dst_width;
public $dst_height;
/**
* Refresh the parameters passed to the JavaScript via JSON.
*
*
* @Override
* @see WP_Customize_Control::to_json()
*/
public function to_json() {
parent::to_json();
$this->json['title'] = !empty( $this -> title ) ? esc_html( $this -> title ) : '';
$this->json['notice'] = !empty( $this -> notice ) ? $this -> notice : '';
$this->json['dst_width'] = isset( $this -> dst_width ) ? $this -> dst_width : $this -> width;
$this->json['dst_height'] = isset( $this -> dst_height ) ? $this -> dst_height : $this -> height;
//overload WP_Customize_Upload_Control
//we need to re-build the absolute url of the logo src set in old Customizr
$value = $this->value();
if ( $value ) {
//re-build the absolute url if the value isn't an attachment id before retrieving the id
if ( (int) esc_attr( $value ) < 1 ) {
$upload_dir = wp_upload_dir();
$value = false !== strpos( $value , '/wp-content/' ) ? $value : $upload_dir['baseurl'] . $value;
}
// Get the attachment model for the existing file.
$attachment_id = attachment_url_to_postid( $value );
if ( $attachment_id ) {
$this->json['attachment'] = wp_prepare_attachment_for_js( $attachment_id );
}
}//end overload
}
/**
* Render a JS template for the content of the media control.
*
* @since 3.4.19
* @package Customizr
*
* @Override
* @see WP_Customize_Control::content_template()
*/
public function content_template() {
?>
<# if ( data.title ) { #>
<h3 class="czr-customizr-title">{{{ data.title }}}</h3>
<# } #>
<?php parent::content_template(); ?>
<# if ( data.notice ) { #>
<span class="czr-notice">{{{ data.notice }}}</span>
<# } #>
<?php
}
}//end class
endif;
@@ -0,0 +1,66 @@
<?php
/**************************************************************************************************
* LAYOUT SELECT
***************************************************************************************************/
if ( ! class_exists( 'HU_Customize_Layout_Control' ) ) :
/**
* Customize Multi-picker Control Class
*
* @package WordPress
* @subpackage Customize
* @since 3.4.10
*/
class HU_Customize_Layout_Control extends HU_controls {
public function render_content() {
if ( empty( $this->choices ) )
return;
?>
<?php if (!empty( $this->title)) : ?>
<h3 class="czr-customizr-title"><?php echo esc_html( $this->title); ?></h3>
<?php endif; ?>
<label>
<span class="customize-control-title"><?php echo $this->label; ?></span>
<?php $this -> hu_print_select_control( 'no-selecter-js' ); //no-selecter-js : we don't want the default selecter $ plugin fired for this control ?>
<?php if(!empty( $this -> notice)) : ?>
<span class="czr-notice"><?php echo $this -> notice ?></span>
<?php endif; ?>
</label>
<?php
}
private function hu_print_select_control($class) {
printf('<select %1$s class="%2$s">%3$s</select>',
call_user_func( array( $this, 'get'.'_'.'link' ) ),
$class,
$this -> hu_get_select_options()
);
}
private function hu_get_select_options() {
$_options_html = '';
switch ( $this -> id ) {
default:
foreach ( $this->choices as $value => $data ) {
$_options_html .= sprintf('<option value="%1$s" %2$s>%3$s</option>',
esc_attr( $value ),
selected( $this->value(), $value, false ),
$data['label']
);
}
break;
}//end switch
return $_options_html;
}//end of fn
//the layouts are turned into a js object
//{ 'col-1c' : { src: ..., label : ... }, ... }
public function to_json() {
parent::to_json();
$this->json['layouts'] = $this->choices;
}
}//end class
endif;
@@ -0,0 +1,30 @@
<?php
/*
* @since 4.0
*/
if ( ! class_exists( 'HU_Customize_Modules' ) ) :
class HU_Customize_Modules extends HU_controls {
public $module_type;
public $syncCollection;
public $syncSektion;
/**
* Constructor.
*
*/
public function __construct($manager, $id, $args = array()) {
//let the parent do what it has to
parent::__construct($manager, $id, $args );
}
public function render_content(){}
public function to_json() {
parent::to_json();
$this->json['syncCollection'] = $this->syncCollection;
$this->json['syncSektion'] = $this->syncSektion;
$this->json['module_type'] = $this->module_type;
}
}
endif;
@@ -0,0 +1,116 @@
<?php
/**************************************************************************************************
* MULTIPICKER CLASSES
***************************************************************************************************/
if ( ! class_exists( 'HU_Customize_Multipicker_Control' ) ) :
/**
* Customize Multi-picker Control Class
*
* @package WordPress
* @subpackage Customize
* @since 3.4.10
*/
abstract class HU_Customize_Multipicker_Control extends HU_controls {
public function render_content() {
if ( ! $this -> type ) return;
do_action( '__before_setting_control' , $this -> id );
$dropdown = $this -> hu_get_dropdown_multipicker();
if ( empty( $dropdown ) ) return;
$dropdown = str_replace( '<select', '<select multiple="multiple"' . $this->get_link(), $dropdown );
//start rendering
if (!empty( $this->title)) :
?>
<h3 class="czr-customizr-title"><?php echo esc_html( $this->title); ?></h3>
<?php endif; ?>
<label>
<span class="customize-control-title"><?php echo $this->label; ?></span>
<?php echo $dropdown; ?>
<?php if(!empty( $this -> notice)) : ?>
<span class="czr-notice"><?php echo $this -> notice ?></span>
<?php endif; ?>
</label>
<?php
do_action( '__after_setting_control' , $this -> id );
}
//to define in the extended classes
abstract public function hu_get_dropdown_multipicker();
}//end class
endif;
if ( ! class_exists( 'HU_Customize_Multipicker_Categories_Control' ) ) :
class HU_Customize_Multipicker_Categories_Control extends HU_Customize_Multipicker_Control {
public function hu_get_dropdown_multipicker() {
$cats_dropdown = wp_dropdown_categories(
array(
'name' => '_customize-'.$this->type,
'id' => $this -> id,
//hide empty, set it to false to avoid complains
'hide_empty' => 0 ,
'echo' => 0 ,
'walker' => new HU_Walker_CategoryDropdown_Multipicker(),
'hierarchical' => 1,
'class' => 'czrSelect2 no-selecter-js '.$this->type,
'selected' => implode(',', $this->value() )
)
);
return $cats_dropdown;
}
}
endif;
/**
* @ dropdown multi-select walker
* Create HTML dropdown list of Categories.
*
* @package WordPress
* @since 2.1.0
* @uses Walker
*
* we need to allow more than one "selected" attribute
*/
if ( ! class_exists( 'HU_Walker_CategoryDropdown_Multipicker' ) ) :
class HU_Walker_CategoryDropdown_Multipicker extends Walker_CategoryDropdown {
/**
* Start the element output.
*
* @Override
*
* @see Walker::start_el()
*
* @param string $output Passed by reference. Used to append additional content.
* @param object $category Category data object.
* @param int $depth Depth of category. Used for padding.
* @param array $args Uses 'selected', 'show_count', and 'value_field' keys, if they exist.
* See {@see wp_dropdown_categories()}.
*/
public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
$pad = str_repeat('&mdash;', $depth );
/** This filter is documented in wp-includes/category-template.php */
$cat_name = apply_filters( 'list_cats', $category->name, $category );
$value_field = 'term_id';
$output .= "\t<option class=\"level-$depth\" value=\"" . esc_attr( $category->{$value_field} ) . "\"";
//Treat selected arg as array
if ( in_array( (string) $category->{$value_field}, explode( ',', $args['selected'] ) ) )
$output .= ' selected="selected"';
$output .= '>';
$output .= $pad.$cat_name;
if ( $args['show_count'] )
$output .= '&nbsp;&nbsp;('. number_format_i18n( $category->count ) .')';
$output .= "</option>\n";
}
}
endif;
@@ -0,0 +1,78 @@
<?php
/*********************************************************************************
* Old upload control used until v3.4.18, still used if current version of WP is < 4.3
**********************************************************************************/
if ( ! class_exists( 'HU_Customize_Upload_Control' ) ) :
/**
* Customize Upload Control Class
*
* @package WordPress
* @subpackage Customize
* @since 3.4.0
*/
class HU_Customize_Upload_Control extends WP_Customize_Control {
public $type = 'czr_upload';
public $removed = '';
public $context;
public $extensions = array();
public $title;
public $notice;
/**
* Enqueue control related scripts/styles.
*
* @since 3.4.0
*/
public function enqueue() {
wp_enqueue_script( 'wp-plupload' );
}
/**
* Refresh the parameters passed to the JavaScript via JSON.
*
* @since 3.4.0
* @uses WP_Customize_Control::to_json()
*/
public function to_json() {
parent::to_json();
$this->json['removed'] = $this->removed;
if ( $this->context )
$this->json['context'] = $this->context;
if ( $this->extensions )
$this->json['extensions'] = implode( ',', $this->extensions );
}
/**
* Render the control's content.
*
* @since 3.4.0
*/
public function render_content() {
do_action( '__before_setting_control' , $this -> id );
?>
<?php if ( isset( $this->title) ) : ?>
<h3 class="czr-customizr-title"><?php echo esc_html( $this->title); ?></h3>
<?php endif; ?>
<label>
<?php if ( ! empty( $this->label ) ) : ?>
<span class="customize-control-title"><?php echo $this->label; ?></span>
<?php endif;
if ( ! empty( $this->description ) ) : ?>
<span class="description customize-control-description"><?php echo $this->description; ?></span>
<?php endif; ?>
<div>
<a href="#" class="button-secondary czr-upload"><?php _e( 'Upload' , 'hueman' ); ?></a>
<a href="#" class="remove"><?php _e( 'Remove' , 'hueman' ); ?></a>
</div>
<?php if(!empty( $this -> notice)) : ?>
<span class="czr-notice"><?php echo $this -> notice; ?></span>
<?php endif; ?>
</label>
<?php
do_action( '__after_setting_control' , $this -> id );
}
}
endif;
@@ -0,0 +1,260 @@
<?php
//control scripts and style
//Note that the 'czr-theme-customizer-fmk' is loaded @priority 10
add_action( 'customize_controls_enqueue_scripts' , 'hu_customize_controls_js_css', 20 );
//preview scripts
//set with priority 20 to be fired after hu_customize_store_db_opt in HU_utils
add_action( 'customize_preview_init' , 'hu_customize_preview_js', 20 );
//exports some wp_query informations. Updated on each preview refresh.
add_action( 'customize_preview_init' , 'hu_add_preview_footer_action', 20 );
//hook : customize_preview_init
function hu_customize_preview_js() {
global $wp_version;
wp_enqueue_script(
'hu-preview-reactions',
HU_BASE_URL . 'assets/czr/js/_customize_preview_reactions.js',//src
'czr-customizer-preview',
( defined('WP_DEBUG') && true === WP_DEBUG ) ? time() : HUEMAN_VER,
true//$in_footer = false
);
//localizes
wp_localize_script(
'czr-customizer-preview', // this is the handle of the base czr fmk
'themeServerPreviewParams',
apply_filters('hu_js_customizer_preview_params' ,
array(
'wpBuiltinSettings' => HU_customize::$instance -> hu_get_wp_builtin_settings(),
'themeOptionsPrefix' => HU_THEME_OPTIONS,
'fonts' => array( 'src' => hu_get_fonts( array( 'all' => true, 'request' => 'src' ) ), 'family' => hu_get_fonts( array( 'all' => true, 'request' => 'family' ) ) ),
'copyright' => sprintf('%1$s &copy; %2$s. %3$s',
get_bloginfo('name'),
date( 'Y' ),
__( 'All Rights Reserved.', 'hueman' )
)
)
)
);
}
/**
* Add script to controls
* Dependency : customize-controls located in wp-includes/script-loader.php
* Hooked on customize_controls_enqueue_scripts located in wp-admin/customize.php
* @package Hueman
* @since Hueman 3.3.0
*/
function hu_customize_controls_js_css() {
wp_enqueue_script(
'hu-control-dependencies',
HU_BASE_URL . 'assets/czr/js/_customize_control_dependencies_and_dom_ready_actions.js',//src
'czr-theme-customizer-fmk',
( defined('WP_DEBUG') && true === WP_DEBUG ) ? time() : HUEMAN_VER,
true//$in_footer = false
);
$_front_page_content_notice = esc_js( sprintf( __( "Jump to the %s.", 'hueman'),
sprintf('<a href="%1$s" title="%2$s">%2$s</a>',
"javascript:wp.customize.section(\'content_blog_sec\').focus();",
__('blog design panel', 'hueman')
)
) );
$_header_menu_notice = esc_js( sprintf( __( "The menu currently displayed in your header is a default page menu, you can disable it in the %s.", 'hueman'),
sprintf('<a href="%1$s" title="%2$s">%2$s</a>',
"javascript:wp.customize.section(\'header_design_sec\').focus();",
__('Header Panel', 'hueman')
)
) );
//localizes
wp_localize_script(
'czr-theme-customizer-fmk', // this is the handle of the base czr fmk
'themeServerControlParams',
apply_filters('czr_js_customizer_control_params' ,
array(
//should be included in all themes
'wpBuiltinSettings' => HU_customize::$instance -> hu_get_wp_builtin_settings(),
'isThemeSwitchOn' => ! (bool)HU_IS_PRO,
'themeSettingList' => HU_utils::$_theme_setting_list,
'themeOptions' => HU_THEME_OPTIONS,
'HUNonce' => wp_create_nonce( 'hu-customizer-nonce' ),
'themeName' => THEMENAME,// <= do we need this ?
//'optionAjaxAction' => HU_OPT_AJAX_ACTION,//DEPRECATED
'faviconOptionName' => 'favicon',
'i18n' => hu_get_czr_translated_strings(),
// For the control dependencies js file
'isMultisite' => is_multisite(),
'frontPageContentNotice' => html_entity_decode( $_front_page_content_notice ),
'headerMenuNotice' => html_entity_decode( $_header_menu_notice )
)
)
);
}
//hook : customize_preview_init
function hu_add_preview_footer_action() {
//Add the postMessages actions
add_action( 'wp_footer', 'hu_add_customize_preview_data' , 20 );
}
//hook : wp_footer in the preview
function hu_add_customize_preview_data() {
global $wp_query, $wp_customize;
$current_obj = get_queried_object();
$query_data = array(
'post_id' => false,
'post_thumbnail_id' => false,
'post_title' => false
);
//post, custom post types, page
if ( is_singular() && ! hu_is_real_home() && isset($current_obj -> post_type) ) {
$query_data['post_id'] = $current_obj -> ID;
$query_data['post_title'] = $current_obj -> post_title;
$query_data['post_thumbnail_id'] = has_post_thumbnail( $current_obj -> ID ) ? get_post_thumbnail_id( $current_obj -> ID ) : false;
}
$_wp_query_infos = array(
'conditional_tags' => array(),
'query_data' => $query_data
);
$_available_locations = hu_get_available_widget_loc();
//Populates the conditional tags
foreach( (array)$wp_query as $prop => $val ) {
if ( false === strpos($prop, 'is_') )
continue;
if ( 'is_home' == $prop )
$val = hu_is_real_home();
$_wp_query_infos['conditional_tags'][$prop] = $val;
}
$_wp_query_infos = apply_filters( 'czr-preview-query-data', $_wp_query_infos );
?>
<script id="czr-customizer-data">
(function ( _export ){
_export.czr_wpQueryInfos = <?php echo wp_json_encode( $_wp_query_infos ) ?>;
_export.availableWidgetLocations = <?php echo wp_json_encode( $_available_locations ) ?>;
})( _wpCustomizeSettings );
</script>
<?php
}
function hu_get_czr_translated_strings() {
return apply_filters( 'controls_translated_strings',
array(
'edit' => __('Edit', 'hueman'),
'close' => __('Close', 'hueman'),
'faviconNote' => __( "Your favicon is currently handled with an old method and will not be properly displayed on all devices. You might consider to re-upload your favicon with the new control below." , 'hueman'),
'locations' => __('Location(s)', 'hueman'),
'contexts' => __('Context(s)', 'hueman'),
'notset' => __('Not set', 'hueman'),
'rss' => __('Rss', 'hueman'),
'selectSocialIcon' => __('Select a social icon', 'hueman'),
'followUs' => __('Follow us on', 'hueman'),
'successMessage' => __('Done !', 'hueman'),
'socialLinkAdded' => __('New Social Link created ! Scroll down to edit it.', 'hueman'),
'selectBgRepeat' => __('Select repeat property', 'hueman'),
'selectBgAttachment' => __('Select attachment property', 'hueman'),
'selectBgPosition' => __('Select position property', 'hueman'),
// 'widgetZone' => __('Widget Zone', 'hueman'),
// 'widgetZoneAdded' => __('New Widget Zone created ! Scroll down to edit it.', 'hueman'),
// 'inactiveWidgetZone' => __('Inactive in current context/location', 'hueman'),
// 'unavailableLocation' => __('Unavailable location. Some settings must be changed.', 'hueman'),
// 'locationWarning' => __('A selected location is not available with the current settings.', 'hueman'),
'readDocumentation' => __('Learn more about this in the documentation', 'hueman'),
'Settings' => __('Settings', 'hueman'),
'Options for' => __('Options for', 'hueman'),
'skope' => array(
//skope reset
'Reset the current customizations for' => __('Reset the current customizations for','hueman'),
'Reset the theme options published sitewide' => __('Reset the theme options published sitewide','hueman'),
'Reset your website published options for' => __('Reset your website published options for','hueman'),
'Please confirm that you want to reset your current ( not published ) customizations for' => __('Please confirm that you want to reset your current ( not published ) customizations for','hueman'),
'Your customizations have been reset for' => __('Your customizations have been reset for','hueman'),
'Please confirm that you want to reset your sitewide published customizations. Note : this will not reset the customizations made in other option scopes' => __('Please confirm that you want to reset your sitewide published customizations. Note : this will not reset the customizations made in other option scopes', 'hueman'),
'Please confirm that you want to reset your published customizations for' => __('Please confirm that you want to reset your published customizations for','hueman'),
'Your published customizations have been reset for' => __('Your published customizations have been reset for','hueman'),
//control reset
'Reset your customized ( and published ) value' => __('Reset your customized ( and published ) value', 'hueman'),
'Reset your customized ( but not yet published ) value' => __('Reset your customized ( but not yet published ) value', 'hueman'),
'Not customized yet, nothing to reset' => __('Not customized yet, nothing to reset', 'hueman'),
'Reset your customized ( but not yet published ) value' => __('Reset your customized ( but not yet published ) value', 'hueman'),
'Please confirm that you want to reset your current customizations for this option' => __( 'Please confirm that you want to reset your current customizations for this option', 'hueman' ),
'Please confirm that you want to reset your current customizations for this option in' => __('Please confirm that you want to reset your current customizations for this option in', 'hueman'),
'sitewide' => __('sitewide', 'hueman'),
'Your customizations have been reset' => __('Your customizations have been reset', 'hueman'),
'This WordPress setting can not be reset sitewide' => __('This WordPress setting can not be reset sitewide', 'hueman'),
'Please confirm that you want to reset this option' => __('Please confirm that you want to reset this option', 'hueman'),
'Please confirm that you want to reset this option in' => __('Please confirm that you want to reset this option in', 'hueman'),
'The option has been reset' => __('The option has been reset', 'hueman'),
//control notices
'Display informations about the scope of this option.' => __('Display informations about the scope of this option.', 'hueman'),
'This option is always customized sitewide and cannot be reset.' => __('This option is always customized sitewide and cannot be reset.', 'hueman'),
'Customized. Will be applied sitewide once published.' => __('Customized. Will be applied sitewide once published.','hueman'),
'Customized. Will be applied to' => __('Customized. Will be applied to', 'hueman'),
'once published.' => __('once published.', 'hueman'),
'Customized and applied sitewide.' => __('Customized and applied sitewide.', 'hueman'),
'Customized and applied to' => __('Customized and applied to','hueman'),
'Default website value applied sitewide.' => __('Default website value applied sitewide.','hueman'),
'Default website value.' => __('Default sitewide value.','hueman'),
'You can customize this specifically for' => __('You can customize this specifically for', 'hueman'),
'Currently inherited from' => __('Currently inherited from','hueman'),
'You can customize this specifically for' => __('You can customize this specifically for','hueman'),
'The value currently applied to' => __('The value currently applied to','hueman'),
'The value that will be applied to' => __('The value that will be applied to','hueman'),
'is set in' => __('is set in','hueman'),
'is customized in' => __('is customized in','hueman'),
//various skope
'is always customized sitewide.' => __('is always customized sitewide.', 'hueman'),
'Menus are created sitewide.' => __('Menus are created sitewide.', 'hueman'),
'Widgets are created sitewide.' => __('Widgets are created sitewide.', 'hueman'),
'and' => __('and', 'hueman'),
'Switch to scope' => __('Switch to scope', 'hueman'),
'In this context :' => __('In this context :', 'hueman'),
'inherits from' => __('inherits from', 'hueman'),
'overridden by' => __('overridden by', 'hueman'),
//error when loading
'There was a problem when trying to load the customizer.' => __('There was a problem when trying to load the customizer.','hueman'),
'Please refer to' => __('Please refer to','hueman'),
'this documentation page' => __('this documentation page','hueman'),
'to understand how to fix the problem.' => __('to understand how to fix the problem.','hueman'),
//skope preview bottom informations
'The customizations made site wide are inherited by all other levels of customization.' => __('The customizations made site wide are inherited by all other levels of customization.', 'hueman'),
'The current context' => __('The current context', 'hueman'),
'can be customized more specifically at the following level' => __('can be customized more specifically at the following level', 'hueman'),
'The current customizations will be applied to' => __('The current customizations will be applied to', 'hueman'),
'The options not customized at this level will inherit their value from' => __('The options not customized at this level will inherit their value from', 'hueman'),
'can be customized more specifically at the following level' => __('can be customized more specifically at the following level', 'hueman'),
'can be customized with a specific set of options.' => __('can be customized with a specific set of options.', 'hueman'),
'The options not customized at this level will inherit their value from' => __('The options not customized at this level will inherit their value from', 'hueman')
)
)
);
}
@@ -0,0 +1,70 @@
<?php
/***************************************************
* AUGMENTS WP CUSTOMIZE PANELS
***************************************************/
if ( ! class_exists( 'HU_Customize_Panels') ) :
class HU_Customize_Panels extends WP_Customize_Panel {
public $czr_subtitle = '';
// function __construct( $manager, $id, $args = array() ) {
// $keys = array_keys( get_object_vars( $this ) );
// foreach ( $keys as $key ) {
// if ( isset( $args[ $key ] ) ) {
// $this->$key = $args[ $key ];
// }
// }
// parent::__construct( $manager, $id, $args );
// }
public function json() {
$array = parent::json();
$array['czr_subtitle'] = html_entity_decode( $this->czr_subtitle, ENT_QUOTES, get_bloginfo( 'charset' ) );
return $array;
}
/**
* Render the panel's JS templates.
*
* This function is only run for panel types that have been registered with
* WP_Customize_Manager::register_panel_type().
*
* @since 4.3.0
*
* @see WP_Customize_Manager::register_panel_type()
*/
public function print_template() {
?>
<script type="text/html" id="tmpl-customize-panel-hu_panel">
<?php $this->hu_render_template(); ?>
</script>
<?php
}
/**
* An Underscore (JS) template for rendering this panel's container.
*
* Class variables for this panel class are available in the `data` JS object;
* export custom variables by overriding WP_Customize_Panel::json().
*
* @see WP_Customize_Panel::print_template()
*
* @since 4.3.0
* @access protected
*/
protected function hu_render_template() {
?>
<li id="accordion-panel-{{ data.id }}" class="accordion-section control-section control-panel control-panel-{{ data.type }}">
<h3 class="accordion-section-title" tabindex="0">
{{ data.title }}
<span class="czr-panel-subtitle">{{ data.czr_subtitle }}</span>
<span class="screen-reader-text"><?php _e( 'Press return or enter to open this panel', 'hueman' ); ?></span>
</h3>
<ul class="accordion-sub-container control-panel-content"></ul>
</li>
<?php
}
}
endif;
@@ -0,0 +1,55 @@
<?php
/**
* Pro customizer section.
* highly based on
* https://github.com/justintadlock/trt-customizer-pro/blob/master/example-1/section-pro.php
*/
class HU_Customize_Section_Pro extends WP_Customize_Section {
/**
* The type of customize section being rendered.
*
* @var string
*/
public $type ='czr-customize-section-pro';
/**
* Custom button text to output.
*
* @var string
*/
public $pro_text = '';
/**
*
* @var string
*/
public $pro_url = '';
/**
* Add custom parameters to pass to the JS via JSON.
*
* @return void
* @override
*/
public function json() {
$json = parent::json();
$json['pro_text'] = $this->pro_text;
$json['pro_url'] = $this->pro_url;
return $json;
}
//overrides the default template
protected function render_template() { ?>
<li id="accordion-section-{{ data.id }}" class="accordion-section control-section control-section-{{ data.type }} cannot-expand">
<h3 class="accordion-section-title">
{{ data.title }}
<# if ( data.pro_text && data.pro_url ) { #>
<a href="{{ data.pro_url }}" title="{{ data.title }}" class="button button-secondary alignright" target="_blank">{{ data.pro_text }}</a>
<# } #>
</h3>
</li>
<?php }
}
?>
@@ -0,0 +1,31 @@
<?php
/**
* Base customizer section.
*/
class HU_Customize_Sections extends WP_Customize_Section {
/**
* The type of customize section being rendered.
*
* @var string
*/
public $type = 'czr-customize-sections';
public $ubq_panel;
/**
* Add custom parameters to pass to the JS via JSON.
*
* @return void
* @override
*/
public function json() {
$json = parent::json();
if ( is_array( $this->ubq_panel ) && array_key_exists( 'panel', $this->ubq_panel ) ) {
$json['ubq_panel'] = $this->ubq_panel;
}
return $json;
}
}
?>
@@ -0,0 +1,45 @@
<?php
/***************************************************
* AUGMENTS WP CUSTOMIZE SECTIONS
***************************************************/
if ( ! class_exists( 'HU_Customize_Manage_Widgets_Section' ) ) :
class HU_Customize_Manage_Widgets_Section extends WP_Customize_Section {
/**
* type of this section.
*
* @since 4.3.0
* @access public
* @var string
*/
public $type = 'widget_zones_management';
public function __construct( $manager, $id, $args = array() ) {
//let the parent say what he needs to. We need to hear that sometimes.
parent::__construct($manager, $id, $args );
//add_action( 'customize_controls_print_footer_scripts', array( $this, 'hu_render_widget_zone_template' ), 1 );
}
/**
* Render the section, and the controls that have been added to it.
* hook : customize_controls_print_footer_scripts
*/
public function hu_render_widget_zone_template() {
?>
<script type="text/html" id="tmpl-customize-section-<?php echo $this->type; ?>">
<li id="accordion-section-{{ data.id }}" class="czr-widget-zone-section accordion-section control-section control-section-{{ data.type }}">
<h3 class="accordion-section-title" tabindex="0">
{{ data.title }}
<span class="screen-reader-text"><?php _e( 'Press return or enter to open this section', 'hueman' ); ?></span>
</h3>
<ul class="accordion-section-content"></ul>
</li>
</script>
<?php
}
}//class
endif;
@@ -0,0 +1,61 @@
<?php
/***************************************************
* AUGMENTS WP CUSTOMIZE SETTINGS
***************************************************/
if ( ! class_exists( 'HU_Customize_Setting') ) :
class HU_Customize_Setting extends WP_Customize_Setting {
/**
* Fetch the value of the setting.
*
* @since 3.4.0
*
* @return mixed The value.
*/
public function value() {
// Get the callback that corresponds to the setting type.
switch( $this->type ) {
case 'theme_mod' :
$function = 'get_theme_mod';
break;
case 'option' :
$function = 'get_option';
break;
default :
/**
* Filter a Customize setting value not handled as a theme_mod or option.
*
* The dynamic portion of the hook name, `$this->id_date['base']`, refers to
* the base slug of the setting name.
*
* For settings handled as theme_mods or options, see those corresponding
* functions for available hooks.
*
* @since 3.4.0
*
* @param mixed $default The setting default value. Default empty.
*/
return apply_filters( 'customize_value_' . $this->id_data[ 'base' ], $this->default );
}
// Handle non-array value
if ( empty( $this->id_data[ 'keys' ] ) )
return $function( $this->id_data[ 'base' ], $this->default );
// Handle array-based value
$values = $function( $this->id_data[ 'base' ] );
//Ctx future backward compat
$_maybe_array = $this->multidimensional_get( $values, $this->id_data[ 'keys' ], $this->default );
if ( ! is_array( $_maybe_array ) )
return $_maybe_array;
if ( isset($_maybe_array['all_ctx']) )
return $_maybe_array['all_ctx'];
if ( isset($_maybe_array['all_ctx_over']) )
return $_maybe_array['all_ctx_over'];
return $_maybe_array;
//$this->default;
}
}
endif;
@@ -0,0 +1,388 @@
<?php
/* ------------------------------------------------------------------------- *
* Dynamic styles
/* ------------------------------------------------------------------------- */
/* Convert hexadecimal to rgb
/* ------------------------------------ */
if ( !function_exists( 'hu_hex2rgb' ) ) {
function hu_hex2rgb( $hex, $array = false ) {
// skip if already rgb
if ( hu_is_rgb_color($hex) )
return $hex;
$hex = str_replace("#", "", $hex);
if ( strlen($hex) == 3 ) {
$r = hexdec(substr($hex,0,1).substr($hex,0,1));
$g = hexdec(substr($hex,1,1).substr($hex,1,1));
$b = hexdec(substr($hex,2,1).substr($hex,2,1));
} else {
$r = hexdec(substr($hex,0,2));
$g = hexdec(substr($hex,2,2));
$b = hexdec(substr($hex,4,2));
}
$rgb = array( $r, $g, $b );
if ( !$array ) { $rgb = implode(",", $rgb); }
return $rgb;
}
}
// @return bool
function hu_is_rgb_color( $color = '' ) {
return is_string( $color ) && false !== strpos($color, 'rgb');
}
/* Google fonts
/* ------------------------------------ */
if ( !function_exists( 'hu_print_gfont_head_link' ) ) {
//@return void()
//hook : 'wp_head'
function hu_print_gfont_head_link () {
$user_font = hu_get_option( 'font' );
$gfamily = hu_get_fonts( array( 'font_id' => $user_font, 'request' => 'src' ) );//'Source+Sans+Pro:400,300italic,300,400italic,600&subset=latin,latin-ext',
//bail here if self hosted font (titilium) of web font
if ( ( empty( $gfamily ) || !is_string( $gfamily ) ) )
return;
printf( '<link id="hu-user-gfont" href="//fonts.googleapis.com/css?family=%1$s" rel="stylesheet" type="text/css">', $gfamily );
}
}
add_action( 'wp_head', 'hu_print_gfont_head_link', 2 );
// Write user option inline style
// @see wp_add_inline_style( 'hueman-main-style', apply_filters( 'ha_user_options_style' , '' ) );
// tThis hook is also used in hueman pro for the user options rules of the slider style for example
add_filter( 'ha_user_options_style', 'hu_get_user_defined_inline_css_rules');
/* Dynamic css output
/* ------------------------------------ */
if ( !function_exists( 'hu_get_user_defined_inline_css_rules' ) ) {
//@return string
//hook : ha_user_options_style
function hu_get_user_defined_inline_css_rules() {
// rgb values
// $color_1 = hu_get_option('color-1');
// $color_1_rgb = hu_hex2rgb($color_1);
$glue = hu_is_checked('minified-css') ? '' : "\n";
//start computing style
$styles = array();
// google / web fonts style
$user_font = hu_get_option( 'font' );
$user_font_size = hu_get_option( 'body-font-size' );
$user_font_size = is_numeric( $user_font_size ) ? $user_font_size : '16';
//turn into rem
$remsize = $user_font_size / 16;
$remsize = number_format( (float)$remsize, 2, '.', '');
$family = hu_get_fonts( array( 'font_id' => $user_font, 'request' => 'family' ) );//'"Raleway", Arial, sans-serif'
if ( !empty( $family ) && is_string( $family ) ) {
$styles[] = sprintf('body { font-family:%1$s;font-size:%2$srem }', $family, $remsize );
} else {
$styles[] = sprintf('body { font-size:%1$srem; }', $remsize );
}
//specific font size for menu items, also customized live
$styles[] = '@media only screen and (min-width: 720px) {
.nav > li { font-size:' . $remsize .'rem; }
}';
//sprintf('@media only screen and (min-width: 720px) { .nav > li { font-size:%1$srem; } }', $remsize );
// container width
$container_width = hu_get_option('container-width');
if ( $container_width != '1380' ) {
if ( hu_is_checked( 'boxed' ) ) {
$styles[] = '.boxed #wrapper, .container-inner { max-width: '.$container_width.'px; }';
$styles[] = '@media only screen and (min-width: 720px) {
.boxed .desktop-sticky {
width: ' . $container_width .'px;
}
}';
}
else {
$styles[] = '.container-inner { max-width: '.$container_width.'px; }';
}
}
// sidebar padding
$sb_pad = hu_get_option('sidebar-padding');
if ( $sb_pad != '30' ) {
$styles[] = '.sidebar .widget { padding-left: '.$sb_pad.'px; padding-right: '.$sb_pad.'px; padding-top: '.$sb_pad.'px; }';
}
// primary color
$prim_color = maybe_hash_hex_color( hu_get_option('color-1') );
//$def_prim_col = hu_user_started_before_version( '3.3.8' ) ? '#3b8dbd' : '#16cfc1';
if ( $prim_color != '#16cfc1' ) {
$styles = array_merge( $styles, hu_get_primary_color_style() );
}
$second_color = maybe_hash_hex_color( hu_get_option('color-2') );
//$def_second_col = hu_user_started_before_version( '3.3.8' ) ? '#82b965' : '#efb93f';
// secondary color
if ( $second_color != '#efb93f' ) {
$styles = array_merge( $styles, hu_get_second_color_style() );
}
// what is the transparency setting to be applied to both topbar and mobile menu on scroll ?
$is_transparent = hu_is_checked( 'transparent-fixed-topnav' );
// Background color are important ?
// implemented for https://github.com/presscustomizr/hueman-pro-addons/issues/181
$header_bg_colors_important = hu_is_checked( 'user-header-bg-color-important' ) ? '!important' : '';
// topbar color
// The default background is #121d30 / semi transparent because hu_is_checked( 'transparent-fixed-topnav' ) : rgba(18, 29, 48, 0.8)
// those default css rules are hard coded in the theme main stylesheed.
// If user settings are different, let's write a custom rule
$tb_color = maybe_hash_hex_color( hu_get_option('color-topbar') );
$is_transparent = hu_is_checked( 'transparent-fixed-topnav' );
//$def_tb_col = hu_user_started_before_version( '3.3.8' ) ? '#26272b' : '#121d30';
if ( $tb_color != '#121d30' || !$is_transparent ) {
if ( $tb_color != '#121d30' ) {
$styles[] = '.search-expand,
#nav-topbar.nav-container { background-color: '.$tb_color.$header_bg_colors_important.'}';
$styles[] = '@media only screen and (min-width: 720px) {
#nav-topbar .nav ul { background-color: '.$tb_color.$header_bg_colors_important.'; }
}';
}
if ( $is_transparent && !hu_is_rgb_color($tb_color) ) {
$sticky_color_rgba = 'rgba(' . hu_hex2rgb( $tb_color ) . ',0.90)';
$sticky_color_rgba_dark = 'rgba(' . hu_hex2rgb( $tb_color ) . ',0.95)';
$styles[] = '.is-scrolled #header .nav-container.desktop-sticky,
.is-scrolled #header .search-expand { background-color: '.$tb_color.$header_bg_colors_important.'; background-color: '.$sticky_color_rgba.$header_bg_colors_important.' }';
$styles[] = '.is-scrolled .topbar-transparent #nav-topbar.desktop-sticky .nav ul { background-color: '.$tb_color.$header_bg_colors_important.'; background-color: '.$sticky_color_rgba_dark.$header_bg_colors_important.' }';
}
}
// header color
$h_color = maybe_hash_hex_color( hu_get_option('color-header') );
//$def_h_col = hu_user_started_before_version( '3.3.8' ) ? '#33363b' : '#454e5c';
if ( $h_color != '#454e5c' ) {
$styles[] = '#header { background-color: '.$h_color.'; }
@media only screen and (min-width: 720px) {
#nav-header .nav ul { background-color: '.$h_color.'; }
}
';
}
// Mobile menu color
$mm_color = maybe_hash_hex_color( hu_get_option('color-mobile-menu') );
if ( $mm_color != '#454e5c' ) {
$styles[] = '#header #nav-mobile { background-color: '.$mm_color.$header_bg_colors_important.'; }';
}
if ( $is_transparent && !hu_is_rgb_color($mm_color) ) {
$mm_color_rgba = 'rgba(' . hu_hex2rgb( $mm_color ) . ',0.90)';
//$mm_color_rgba_dark = 'rgba(' . hu_hex2rgb( $mm_color ) . ',0.95)';
$styles[] = '.is-scrolled #header #nav-mobile { background-color: '.$mm_color.$header_bg_colors_important.'; background-color: '.$mm_color_rgba.$header_bg_colors_important.' }';
//$styles[] = '.is-scrolled .topbar-transparent #nav-topbar.desktop-sticky .nav ul { background-color: '.$tb_color.'; background-color: '.$mm_color_rgba_dark.' }';
}
// header menu color
$hm_color = maybe_hash_hex_color( hu_get_option('color-header-menu') );
//$def_hm_col = hu_user_started_before_version( '3.3.8' ) ? '#33363b' : '#454e5c';
if ( $hm_color != '#454e5c' ) {
$styles[] = '#nav-header.nav-container, #main-header-search .search-expand { background-color: '.$hm_color.'; }
@media only screen and (min-width: 720px) {
#nav-header .nav ul { background-color: '.$hm_color.'; }
}
';
}
// footer color
if ( maybe_hash_hex_color( hu_get_option('color-footer') ) != '#33363b' ) {
$styles[] = '#footer-bottom { background-color: '.hu_get_option('color-footer').'; }';
}
// header logo max-height
if ( hu_get_option('logo-max-height') != '60' ) {
$styles[] = '.site-title a img { max-height: '.hu_get_option('logo-max-height').'px; }';
}
// image border radius
if ( hu_get_option('image-border-radius') != '0' ) {
$styles[] = 'img { -webkit-border-radius: '.hu_get_option('image-border-radius').'px; border-radius: '.hu_get_option('image-border-radius').'px; }';
}
// sidebars background
$sidebars_bg = maybe_hash_hex_color( hu_get_option('sidebar-background') );
if ( '#f0f0f0' !== $sidebars_bg ) {
$styles[] = '.sidebar.expanding, .sidebar.collapsing, .sidebar .sidebar-content, .sidebar .sidebar-toggle, .container-inner > .main::before,.container-inner > .main::after { background-color: '.$sidebars_bg.'; }';
$styles[] = '@media only screen and (min-width: 480px) and (max-width: 1200px) { .s2.expanded { background-color: '.$sidebars_bg.'; } }';
$styles[] = '@media only screen and (min-width: 480px) and (max-width: 960px) { .s1.expanded { background-color: '.$sidebars_bg.'; } }';
}
// // body background (old)
// if ( hu_get_option('body-background') != '#eaeaea' ) {
// $styles .= 'body { background-color: '.hu_get_option('body-background').'; }';
// }
// body background (@fromfull) => keep on wp.org
$body_bg = hu_get_option('body-background');
if ( !empty( $body_bg ) ) {
//for users of wp.org version prior to 3.0+, this option is an hex color string.
if ( is_string($body_bg) ) {
$styles[] = 'body { background-color: ' . $body_bg . '; }';
} elseif ( is_array($body_bg) ) {
//set-up sub-options
foreach ( array( 'color', 'image', 'attachment', 'position', 'size', 'repeat' ) as $prop ) {
$body_bg[ "background-{$prop}" ] = isset( $body_bg[ "background-{$prop}" ] ) ? $body_bg[ "background-{$prop}" ] : '';
}
//background_image retrieve src
$body_bg[ 'background-image' ] = hu_get_img_src( $body_bg[ 'background-image' ] );
$body_bg_style = '';
//set-up style
if ( $body_bg[ 'background-image' ] ) {
$body_bg_style = 'background: '.$body_bg['background-color'].' url('.$body_bg['background-image'].') '.$body_bg['background-repeat'].' '.$body_bg['background-position']. ';';
$body_bg_style .= 'background-attachment:'.$body_bg[ 'background-attachment' ].';';
if ( $body_bg[ 'background-size' ] )
$body_bg_style .= 'background-size: '.$body_bg['background-size'].';';
$styles[] = 'body {'. $body_bg_style . "}\n";
}
elseif ( $body_bg['background-color'] ) {
$styles[] = 'body { background-color: '.$body_bg['background-color'].'; }';
}
}
}
// end computing
if ( empty ( $styles ) )
return '';
$_p_styles[] = implode( "{$glue}", $styles );
return implode( "{$glue}", $_p_styles );
}
}
/* ------------------------------------------------------------------------- *
* Dynamic styles Helpers
/* ------------------------------------------------------------------------- */
function hu_get_primary_color_style() {
$glue = hu_is_checked('minified-css') ? '' : "\n";
$styles = array();
$prim_color = hu_get_option('color-1');
$styles[] = '::selection { background-color: '.$prim_color.'; }
::-moz-selection { background-color: '.$prim_color.'; }';
$_primary_color_color_prop_selectors = array(
'a',
'a>span.hu-external::after',
'.themeform label .required',
'#flexslider-featured .flex-direction-nav .flex-next:hover',
'#flexslider-featured .flex-direction-nav .flex-prev:hover',
'.post-hover:hover .post-title a',
'.post-title a:hover',
'.sidebar.s1 .post-nav li a:hover i',
'.content .post-nav li a:hover i',
'.post-related a:hover',
'.sidebar.s1 .widget_rss ul li a',
'#footer .widget_rss ul li a',
'.sidebar.s1 .widget_calendar a',
'#footer .widget_calendar a',
'.sidebar.s1 .alx-tab .tab-item-category a',
'.sidebar.s1 .alx-posts .post-item-category a',
'.sidebar.s1 .alx-tab li:hover .tab-item-title a',
'.sidebar.s1 .alx-tab li:hover .tab-item-comment a',
'.sidebar.s1 .alx-posts li:hover .post-item-title a',
'#footer .alx-tab .tab-item-category a',
'#footer .alx-posts .post-item-category a',
'#footer .alx-tab li:hover .tab-item-title a',
'#footer .alx-tab li:hover .tab-item-comment a',
'#footer .alx-posts li:hover .post-item-title a',
'.comment-tabs li.active a',
'.comment-awaiting-moderation',
'.child-menu a:hover',
'.child-menu .current_page_item > a',
'.wp-pagenavi a'
);
$_primary_color_color_prop_selectors = implode( ",{$glue}", apply_filters( 'hu_dynamic_primary_color_color_prop_selectors', $_primary_color_color_prop_selectors ) );
$styles[] = $_primary_color_color_prop_selectors ? $_primary_color_color_prop_selectors . '{ color: '.$prim_color.'; }'."{$glue}" : '';
$_primary_color_background_color_prop_selectors = array(
'input[type="submit"]',
'.themeform button[type="submit"]',
'.sidebar.s1 .sidebar-top',
'.sidebar.s1 .sidebar-toggle',
'#flexslider-featured .flex-control-nav li a.flex-active',
'.post-tags a:hover',
'.sidebar.s1 .widget_calendar caption',
'#footer .widget_calendar caption',
'.author-bio .bio-avatar:after',
'.commentlist li.bypostauthor > .comment-body:after',
'.commentlist li.comment-author-admin > .comment-body:after'
);
$_primary_color_background_color_prop_selectors = implode( ",{$glue}", apply_filters( 'hu_dynamic_primary_color_background_color_prop_selectors', $_primary_color_background_color_prop_selectors ) );
$styles[] = $_primary_color_background_color_prop_selectors ? $_primary_color_background_color_prop_selectors . '{ background-color: '.$prim_color.'; }'."{$glue}" : '';
$styles[] ='.post-format .format-container { border-color: '.$prim_color.'; }';
$_primary_color_border_bottom_color_prop_selectors = array(
'.sidebar.s1 .alx-tabs-nav li.active a',
'#footer .alx-tabs-nav li.active a',
'.comment-tabs li.active a',
'.wp-pagenavi a:hover',
'.wp-pagenavi a:active',
'.wp-pagenavi span.current'
);
$_primary_color_border_bottom_color_prop_selectors = implode( ",{$glue}", apply_filters( 'hu_dynamic_primary_color_border_bottom_color_prop_selectors', $_primary_color_border_bottom_color_prop_selectors ) );
$styles[] = $_primary_color_border_bottom_color_prop_selectors ? $_primary_color_border_bottom_color_prop_selectors . '{ border-bottom-color: '.$prim_color.'!important; }'."{$glue}" : '';
return $styles;
}//hu_get_primary_color_style
function hu_get_second_color_style() {
$glue = hu_is_checked('minified-css') ? '' : "\n";
$styles = array();
$styles[] = '.sidebar.s2 .post-nav li a:hover i,
.sidebar.s2 .widget_rss ul li a,
.sidebar.s2 .widget_calendar a,
.sidebar.s2 .alx-tab .tab-item-category a,
.sidebar.s2 .alx-posts .post-item-category a,
.sidebar.s2 .alx-tab li:hover .tab-item-title a,
.sidebar.s2 .alx-tab li:hover .tab-item-comment a,
.sidebar.s2 .alx-posts li:hover .post-item-title a { color: '.hu_get_option('color-2').'; }
';
$_secondary_color_background_color_prop_selectors = array(
'.sidebar.s2 .sidebar-top',
'.sidebar.s2 .sidebar-toggle',
'.post-comments',
'.jp-play-bar',
'.jp-volume-bar-value',
'.sidebar.s2 .widget_calendar caption'
);
$_secondary_color_background_color_prop_selectors = implode( ",{$glue}", apply_filters( 'hu_dynamic_secondary_color_background_color_prop_selectors', $_secondary_color_background_color_prop_selectors ) );
$styles[] = $_secondary_color_background_color_prop_selectors ? $_secondary_color_background_color_prop_selectors . '{ background-color: '.hu_get_option('color-2').'; }'."{$glue}" : '';
$styles[] ='.sidebar.s2 .alx-tabs-nav li.active a { border-bottom-color: '.hu_get_option('color-2').'; }
.post-comments::before { border-right-color: '.hu_get_option('color-2').'; }
';
return $styles;
}//hu_get_second_color_style
@@ -0,0 +1,436 @@
<?php
/* ------------------------------------------------------------------------- *
* Admin panel functions
/* ------------------------------------------------------------------------- */
/* Post formats script
/* ------------------------------------ */
if ( !function_exists( 'hu_post_formats_script' ) ) {
function hu_post_formats_script( $hook ) {
// Only load on posts, pages
if ( !in_array($hook, array('post.php','post-new.php')) )
return;
global $post;
wp_enqueue_script('post-formats', get_template_directory_uri() . '/assets/admin/js/post-formats.js', array( 'jquery' ));
wp_localize_script( 'post-formats',
'HUPostFormatsParams' ,
array(
'currentPostFormat' => get_post_format( $post ),
)
);
}
}
add_action( 'admin_enqueue_scripts', 'hu_post_formats_script');
/* ------------------------------------------------------------------------- *
* Loads and instanciates admin pages related classes
/* ------------------------------------------------------------------------- */
if ( is_admin() && !hu_is_customizing() ) {
if ( !defined( 'HU_IS_PRO' ) || !HU_IS_PRO ) {
//Update notice
load_template( get_template_directory() . '/functions/admin/class-admin-update-notification.php' );
new HU_admin_update_notification;
}
if ( hu_is_checked('about-page') ) {
load_template( get_template_directory() . '/functions/admin/class-admin-page.php' );
new HU_admin_page;
}
}
add_action( 'admin_init' , 'hu_admin_style' );
function hu_admin_style() {
wp_enqueue_style(
'hu-admincss',
sprintf('%1$sassets/admin/css/hu_admin.css' , HU_BASE_URL ),
array(),
( defined('WP_DEBUG') && true === WP_DEBUG ) ? time() : HUEMAN_VER
);
}
/* ------------------------------------------------------------------------- *
* Loads functions for plugin recommendation
/* ------------------------------------------------------------------------- */
if ( is_admin() && !hu_is_customizing() && !hu_is_plugin_active('nimble-builder/nimble-builder.php') ) {
load_template( get_template_directory() . '/functions/admin/class-plugin-rec.php' );
}
/* ------------------------------------------------------------------------- *
* Initialize the meta boxes.
/* ------------------------------------------------------------------------- */
//Managing plugins on jetpack's wordpress.com dashboard fix
//https://github.com/presscustomizr/hueman/issues/541
//For some reason admin_init is fired but is_admin() returns false
//so some required OT admin files are not loaded:
//see OT_Loader::admin_includes() : it returns if not is_admin()
if ( is_admin() ) {
add_action( 'admin_init', 'hu_custom_meta_boxes' );
}
function hu_custom_meta_boxes() {
/* Custom meta boxes
/* ------------------------------------ */
$page_options = array(
'id' => 'page-options',
'title' => 'Page Options',
'desc' => '',
'pages' => array( 'page' ),
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'label' => 'Heading',
'id' => '_heading',
'type' => 'text'
),
array(
'label' => 'Subheading',
'id' => '_subheading',
'type' => 'text'
),
array(
'label' => sprintf('%1$s</br><i style="font-size:12px">%2$s</i>', __('Select a widget zone for the primary sidebar.', 'hueman'), __('Notes : 1)This will override any default settings of the customizer options panel. 2) The primary sidebar is placed on the left in a 3 columns layout. It can be on the right in a 2 columns layout, when the content is on the left.', 'hueman') ),
'id' => '_sidebar_primary',
'type' => 'sidebar-select',
'desc' => ''
),
array(
'label' => sprintf('%1$s</br><i style="font-size:12px">%2$s</i>', __('Select a widget zone for the secondary sidebar.', 'hueman'), __('Notes : 1)This will override any default settings of the customizer options panel. 2) The secondary sidebar is placed on the right in a 3 columns layout.', 'hueman') ),
'id' => '_sidebar_secondary',
'type' => 'sidebar-select',
'desc' => ''
)
)
);
$post_options = array(
'id' => 'post-options',
'title' => 'Post Options',
'desc' => '',
'pages' => apply_filters( 'hu_custom_meta_boxes_post_options_in', array( 'post') ),
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'label' => sprintf('%1$s</br><i style="font-size:12px">%2$s</i>', __('Select a widget zone for the left sidebar.', 'hueman'), __('This will override any default settings of the customizer options panel.', 'hueman') ),
'id' => '_sidebar_primary',
'type' => 'sidebar-select',
'desc' => ''
),
array(
'label' => sprintf('%1$s</br><i style="font-size:12px">%2$s</i>', __('Select a widget zone for the right sidebar.', 'hueman'), __('This will override any default settings of the customizer options panel.', 'hueman') ),
'id' => '_sidebar_secondary',
'type' => 'sidebar-select',
'desc' => ''
)
)
);
if ( apply_filters( 'hu_enable_singular_layout_meta_box', true ) ) {
$post_options['fields'][] = array(
'label' => 'Layout',
'id' => '_layout',
'type' => 'radio-image',
'desc' => 'Overrides the default layout option',
'std' => 'inherit',
'choices' => array(
array(
'value' => 'inherit',
'label' => 'Inherit Layout',
'src' => get_template_directory_uri() . '/assets/admin/img/layout-off.png'
),
array(
'value' => 'col-1c',
'label' => '1 Column',
'src' => get_template_directory_uri() . '/assets/admin/img/col-1c.png'
),
array(
'value' => 'col-2cl',
'label' => '2 Column Left',
'src' => get_template_directory_uri() . '/assets/admin/img/col-2cl.png'
),
array(
'value' => 'col-2cr',
'label' => '2 Column Right',
'src' => get_template_directory_uri() . '/assets/admin/img/col-2cr.png'
),
array(
'value' => 'col-3cm',
'label' => '3 Column Middle',
'src' => get_template_directory_uri() . '/assets/admin/img/col-3cm.png'
),
array(
'value' => 'col-3cl',
'label' => '3 Column Left',
'src' => get_template_directory_uri() . '/assets/admin/img/col-3cl.png'
),
array(
'value' => 'col-3cr',
'label' => '3 Column Right',
'src' => get_template_directory_uri() . '/assets/admin/img/col-3cr.png'
)
)
);
$page_options['fields'][] = array(
'label' => sprintf('%1$s</br><i style="font-size:12px">%2$s</i>', __('Select a layout for this page.', 'hueman'), __('This will override any default settings of the customizer options panel.', 'hueman') ),
'id' => '_layout',
'type' => 'radio-image',
'desc' => '',
'std' => 'inherit',
'choices' => array(
array(
'value' => 'inherit',
'label' => 'Inherit Layout',
'src' => get_template_directory_uri() . '/assets/admin/img/layout-off.png'
),
array(
'value' => 'col-1c',
'label' => '1 Column',
'src' => get_template_directory_uri() . '/assets/admin/img/col-1c.png'
),
array(
'value' => 'col-2cl',
'label' => '2 Column Left',
'src' => get_template_directory_uri() . '/assets/admin/img/col-2cl.png'
),
array(
'value' => 'col-2cr',
'label' => '2 Column Right',
'src' => get_template_directory_uri() . '/assets/admin/img/col-2cr.png'
),
array(
'value' => 'col-3cm',
'label' => '3 Column Middle',
'src' => get_template_directory_uri() . '/assets/admin/img/col-3cm.png'
),
array(
'value' => 'col-3cl',
'label' => '3 Column Left',
'src' => get_template_directory_uri() . '/assets/admin/img/col-3cl.png'
),
array(
'value' => 'col-3cr',
'label' => '3 Column Right',
'src' => get_template_directory_uri() . '/assets/admin/img/col-3cr.png'
)
)
);
}
//post format are @fromfull => keep it in hueman on wp.org
$post_format_audio = array(
'id' => 'format-audio',
'title' => 'Format: Audio',
'desc' => 'These settings enable you to embed audio into your posts. You must provide both .mp3 and .ogg/.oga file formats in order for self hosted audio to function accross all browsers.',
'pages' => array( 'post' ),
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'label' => 'MP3 File URL',
'id' => '_audio_mp3_url',
'type' => 'upload',
'desc' => 'The URL to the .mp3 or .m4a audio file'
),
array(
'label' => 'OGA File URL',
'id' => '_audio_ogg_url',
'type' => 'upload',
'desc' => 'The URL to the .oga, .ogg audio file'
)
)
);
$post_format_gallery = array(
'id' => 'format-gallery',
'title' => 'Format: Gallery',
'desc' => '<a title="Add Media" data-editor="content" class="button insert-media add_media" id="insert-media-button" href="#">Add Media</a> <br /><br />
To create a gallery, upload your images and then select "<strong>Uploaded to this post</strong>" from the dropdown (in the media popup) to see images attached to this post. You can drag to re-order or delete them there. <br /><br /><i>Note: Do not click the "Insert into post" button. Only use the "Insert Media" section of the upload popup, not "Create Gallery" which is for standard post galleries.</i>',
'pages' => array( 'post' ),
'context' => 'normal',
'priority' => 'high',
'fields' => array()
);
$post_format_chat = array(
'id' => 'format-chat',
'title' => 'Format: Chat',
'desc' => 'Input chat dialogue.',
'pages' => array( 'post' ),
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'label' => 'Chat Text',
'id' => '_chat',
'type' => 'textarea',
'rows' => '2'
)
)
);
$post_format_link = array(
'id' => 'format-link',
'title' => 'Format: Link',
'desc' => 'Input your link.',
'pages' => array( 'post' ),
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'label' => 'Link Title',
'id' => '_link_title',
'type' => 'text'
),
array(
'label' => 'Link URL',
'id' => '_link_url',
'type' => 'text'
)
)
);
$post_format_quote = array(
'id' => 'format-quote',
'title' => 'Format: Quote',
'desc' => 'Input your quote.',
'pages' => array( 'post' ),
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'label' => 'Quote',
'id' => '_quote',
'type' => 'textarea',
'rows' => '2'
),
array(
'label' => 'Quote Author',
'id' => '_quote_author',
'type' => 'text'
)
)
);
$post_format_video = array(
'id' => 'format-video',
'title' => 'Format: Video',
'desc' => 'These settings enable you to embed videos into your posts.',
'pages' => array( 'post' ),
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'label' => 'Video URL',
'id' => '_video_url',
'type' => 'text',
'desc' => ''
)
)
);
/* Register meta boxes
/* ------------------------------------ */
ot_register_meta_box( $page_options );
ot_register_meta_box( $post_format_audio );
ot_register_meta_box( $post_format_chat );
ot_register_meta_box( $post_format_gallery );
ot_register_meta_box( $post_format_link );
ot_register_meta_box( $post_format_quote );
ot_register_meta_box( $post_format_video );
ot_register_meta_box( $post_options );
}
if ( is_admin() && !hu_is_customizing() ) {
add_action( 'init' , 'hu_add_editor_style' );
//@return void()
//hook : init
// It used to be after_setup_theme, but, don't know from whic WP version, is_rtl() always returns false at that stage.
function hu_add_editor_style() {
//we need only the relative path, otherwise get_editor_stylesheets() will treat this as external CSS
//which means:
//a) child-themes cannot override it
//b) no check on the file existence will be made (producing the rtl error, for instance : https://github.com/presscustomizr/customizr/issues/926)
$_stylesheets = array(
'assets/admin/css/block-editor-style.css', //block editor style
'assets/admin/css/editor-style.css',
//hu_get_front_style_url(),
//get_stylesheet_uri()
);
$gfont_src = hu_maybe_add_gfonts_to_editor();
if ( apply_filters( 'hu_add_user_fonts_to_editor' , false != $gfont_src ) )
$_stylesheets = array_merge( $_stylesheets , $gfont_src );
add_editor_style( $_stylesheets );
}
/*
* @return css string
*
*/
function hu_maybe_add_gfonts_to_editor() {
$user_font = hu_get_option( 'font' );
$gfamily = hu_get_fonts( array( 'font_id' => $user_font, 'request' => 'src' ) );//'Source+Sans+Pro:400,300italic,300,400italic,600&subset=latin,latin-ext',
//bail here if self hosted font (titilium) of web font
if ( ( empty( $gfamily ) || !is_string( $gfamily ) ) )
return;
//Commas in a URL need to be encoded before the string can be passed to add_editor_style.
return array(
str_replace(
',',
'%2C',
sprintf( '//fonts.googleapis.com/css?family=%s', $gfamily )
)
);
}
}
add_filter( 'tiny_mce_before_init' , 'hu_user_defined_tinymce_css' );
/**
* Extend TinyMCE config with a setup function.
* See http://www.tinymce.com/wiki.php/API3:event.tinymce.Editor.onInit
* http://wordpress.stackexchange.com/questions/120831/how-to-add-custom-css-theme-option-to-tinymce
* @package Customizr
* @since Customizr 3.2.11
*
*/
function hu_user_defined_tinymce_css( $init ) {
if ( !apply_filters( 'hu_add_custom_fonts_to_editor' , true ) )
return $init;
if ( 'tinymce' != wp_default_editor() )
return $init;
//some plugins fire tiny mce editor in the customizer
//in this case, the CZR_resource class has to be loaded
// if ( !class_exists('CZR_resources') || !is_object(CZR_resources::$instance) ) {
// CZR___::$instance -> czr_fn_req_once( 'inc/czr-init.php' );
// new CZR_resources();
// }
// google / web fonts style
$user_font = hu_get_option( 'font' );
$family = hu_get_fonts( array( 'font_id' => $user_font, 'request' => 'family' ) );//'"Raleway", Arial, sans-serif'
$family = ( empty( $family ) || !is_string( $family ) ) ? "'Titillium Web', Arial, sans-serif" : $family;
//maybe add rtl class
$_mce_body_context = is_rtl() ? 'mce-content-body.rtl' : 'mce-content-body';
//fonts
$_css = "body.{$_mce_body_context}{ font-family : {$family}; }\n";
$init['content_style'] = trim( preg_replace('/\s+/', ' ', $_css ) );
return $init;
}
@@ -0,0 +1,260 @@
<?php
/* ------------------------------------------------------------------------- *
* Base functionality
/* ------------------------------------------------------------------------- */
// Content width
if ( !isset( $content_width ) ) { $content_width = 720; }
/* Theme setup
/* ------------------------------------ */
if ( !function_exists( 'hu_setup' ) ) {
function hu_setup() {
// Load theme languages
load_theme_textdomain( HU_THEME_TEXT_DOM, get_stylesheet_directory().'/languages' );
// Enable header image
// the header image is stored as a theme mod option
// get_theme_mod( 'header_image', get_theme_support( 'custom-header', 'default-image' ) );
// Backward compat : if a header-image was previously set by the user, then it becomes the default image, otherwise we fall back on the asset's default.
$_old_header_image_val = hu_get_option('header-image');
$did_user_set_an_image = false != $_old_header_image_val && !empty($_old_header_image_val);
$headers = apply_filters( 'hu_default_header_img' , array(
'default-header' => array(
'url' => '%s/assets/front/img/header/default-header-280.jpg',
'thumbnail_url' => '%s/assets/front/img/header/default-header-280.jpg',
'description' => 'Coffee'
),
'yosemite' => array(
'url' => '%s/assets/front/img/header/yosemite-280.jpg',
'thumbnail_url' => '%s/assets/front/img/header/yosemite-280.jpg',
'description' => 'Yosemite'
),
'bridge' => array(
'url' => '%s/assets/front/img/header/bridge-280.jpg',
'thumbnail_url' => '%s/assets/front/img/header/bridge-280.jpg',
'description' => 'Golden Gate Bridge'
),
'nyc' => array(
'url' => '%s/assets/front/img/header/nyc-280.jpg',
'thumbnail_url' => '%s/assets/front/img/header/nyc-280.jpg',
'description' => 'New York City'
),
'california' => array(
'url' => '%s/assets/front/img/header/california-280.jpg',
'thumbnail_url' => '%s/assets/front/img/header/california-280.jpg',
'description' => 'California'
)
)
);
register_default_headers( $headers );
add_theme_support( 'custom-header', array(
'default-image' => $did_user_set_an_image ? hu_get_img_src_from_option('header-image') : sprintf( '%1$s/assets/front/img/header/default-header-280.jpg' , get_template_directory_uri() ),
'width' => 1380,
'height' => 280,
'flex-width' => true,
'flex-height' => true,
'header-text' => false
) );
// Enable Custom Logo
add_theme_support( 'custom-logo', array(
'width' => 250,
'height' => 100,
'flex-width' => true,
'flex-height' => true,
) );
// Enable title tag
add_theme_support( 'title-tag' );
// Enable automatic feed links
// => Adds RSS feed links to <head> for posts and comments.
add_theme_support( 'automatic-feed-links' );
// Enable featured image
add_theme_support( 'post-thumbnails' );
// Enable post format support
add_theme_support( 'post-formats', array( 'audio', 'aside', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video' ) );
// Add theme support for selective refresh for widgets.
// Only add if the link manager is not enabled
// cf WP core ticket #39451
if ( !get_option( 'link_manager_enabled' ) ) {
add_theme_support( 'customize-selective-refresh-widgets' );
}
// Add support for Gutenberg cover image sizes
add_theme_support( 'align-wide' );
// Add support for Gutenberg responsive embeds
add_theme_support( 'responsive-embeds' );
// Add support for Block editor styles.
add_theme_support( 'editor-styles' );
// Implemented for https://github.com/presscustomizr/hueman/issues/842
// documented : https://codex.wordpress.org/Theme_Markup
add_theme_support( 'html5', array( 'search-form', 'script', 'style' ) );
// Thumbnail sizes
add_image_size( 'thumb-small', 80, 80, true );//used for Hueman Dynamic Tabs widget <= april 2020 changed from 160x160 to 80x80 for https://github.com/presscustomizr/hueman/issues/866
add_image_size( 'thumb-standard', 320, 320, true );//used for standard post list / and for related posts
add_image_size( 'thumb-medium', 520, 245, true );//used for classic post grid / and for related posts
add_image_size( 'thumb-large', 720, 340, true );// used in singular to display the featured image ( when cropped option checked ) / used in image and audio post formats
add_image_size( 'thumb-xlarge', 980, 450, true );// used in featured content on blog page
add_image_size( 'thumb-xxlarge', 1320, 500, true );// used in featured content on blog page
// Custom menu areas
register_nav_menus( array(
'topbar' => __( 'Topbar', 'hueman' ),
'mobile' => __( 'Mobile. You can set a specific menu for mobile devices. If not set, the theme will use the menu assigned to the Topbar, or the Header.', 'hueman' ),
'header' => __( 'Header', 'hueman' ),
'footer' => __( 'Footer', 'hueman' )
) );
}
}
add_action( 'after_setup_theme', 'hu_setup' );
add_action( 'after_setup_theme', 'hu_fn_load_czr_base_fmk', 15 );
function hu_fn_load_czr_base_fmk() {
// load the czr-base-fmk
if ( !isset( $GLOBALS['czr_base_fmk_namespace'] ) ) {
require_once( dirname( __FILE__ ) . '/czr-base-fmk/czr-base-fmk.php' );
if ( function_exists('\hu_czr_fmk\CZR_Fmk_Base') ) {
\hu_czr_fmk\CZR_Fmk_Base( array(
'text_domain' => 'customizr',
'base_url' => HU_BASE_URL . 'functions/czr-base-fmk',
'version' => HUEMAN_VER
) );
} else {
error_log( __FUNCTION__ . ' => \hu_czr_fmk\CZR_Fmk_Base() does not exists');
}
} else {
//error_log('Warning => the czr_base_fmk should be loaded and instantiated by the theme.');
}
}
/* ------------------------------------------------------------------------- *
* REGISTER DYNAMIC MODULES
/* ------------------------------------------------------------------------- */
// Important : fired @priority 100 because when hueman addons is enabled or in hueman pro, the contextualizer is loaded @after_setup_theme:40
// and some modules might be deactivated / modified when contextualized.
add_action( 'after_setup_theme', 'hu_load_social_links_module', 100 );
function hu_load_social_links_module() {
// load the social links module
require_once( HU_BASE . 'functions/czr-modules/social-links/social_links_module.php' );
hu_register_social_links_module(
array(
'setting_id' => 'hu_theme_options[social-links]',
'base_url_path' => HU_BASE_URL . 'functions/czr-modules/social-links',
'version' => HUEMAN_VER,
'option_value' => hu_get_option( 'social-links' ), // for dynamic registration
'setting' => array(
'type' => 'option',
'default' => array(),
'transport' => hu_is_partial_refreshed_on() ? 'postMessage' : 'refresh',
'sanitize_callback' => 'hu_sanitize_callback__czr_social_module',
// we only sanitize for now, to avoid : https://github.com/presscustomizr/social-links-modules/issues/1
'validate_callback' => ''//hu_validate_callback__czr_social_module'
),
'section' => array(
'id' => 'social_links_sec',
'title' => __( 'Social links', 'hueman' ),
'panel' => 'hu-general-panel',
'priority' => 30
),
'control' => array(
'priority' => 10,
'label' => __( 'Create and organize your social links', 'hueman' ),
'type' => 'czr_module',
)
)
);
}
add_action( 'after_setup_theme', 'hu_maybe_load_body_bg_module', 100 );
function hu_maybe_load_body_bg_module() {
// deactivated when the contextualizer is on
if ( !apply_filters( 'hu_maybe_load_body_bg_module', true ) )
return;
// load the social links module
require_once( HU_BASE . 'functions/czr-modules/body-background/body_bg_module.php' );
hu_register_body_bg_module(
array(
'setting_id' => 'hu_theme_options[body-background]',
'base_url_path' => HU_BASE_URL . 'functions/czr-modules/body-background',
'version' => HUEMAN_VER,
'option_value' => hu_get_option( 'body-background' ), // for dynamic registration
'setting' => array(
'type' => 'option',
'default' => array( 'background-color' => '#eaeaea' ),
//'transport' => hu_is_partial_refreshed_on() ? 'postMessage' : 'refresh',
// 'sanitize_callback' => 'hu_sanitize_callback__czr_social_module',
// 'validate_callback' => 'hu_validate_callback__czr_social_module'
),
// 'section' => array(
// 'id' => 'social_links_sec',
// 'title' => __( 'Social links', 'hueman' ),
// 'panel' => 'hu-general-panel',
// 'priority' => 30
// ),
'control' => array(
'priority' => 10,
'label' => __( 'Site Wide Body Background', 'hueman' ),
'description' => __('Set the website background color', 'hueman'),
'type' => 'czr_module',
// When contx is on and activated for the theme options, let's move the body background in the contx_body_bg section
'section' => function_exists('ctx_we_can_contextualize_not_wp_core_options') && ctx_we_can_contextualize_not_wp_core_options() ? 'contx_body_bg' : 'general_design_sec'
)
)
);
}
add_action( 'after_setup_theme', 'hu_load_widget_areas_module', 100 );
function hu_load_widget_areas_module() {
// load the social links module
require_once( HU_BASE . 'functions/czr-modules/widget-zones/widget_zones_module.php' );
hu_register_widget_zones_module(
array(
'setting_id' => 'hu_theme_options[sidebar-areas]',
'base_url_path' => HU_BASE_URL . 'functions/czr-modules/widget-zones/',
'version' => HUEMAN_VER,
'option_value' => hu_get_option( 'sidebar-areas' ), // for dynamic registration
'setting' => array(
'type' => 'option',
'default' => array(),//empty array by default
//'transport' => hu_is_partial_refreshed_on() ? 'postMessage' : 'refresh',
// 'sanitize_callback' => 'hu_sanitize_callback__czr_social_module',
// 'validate_callback' => 'hu_validate_callback__czr_social_module'
),
// 'section' => array(
// 'id' => 'social_links_sec',
// 'title' => __( 'Social links', 'hueman' ),
// 'panel' => 'hu-general-panel',
// 'priority' => 30
// ),
'control' => array(
'priority' => 10,
'label' => __('Create And Order Widget Areas', 'hueman'),
'type' => 'czr_module',
'notice' => __('You must save changes for the new areas to appear below. <br /><i>Warning: Make sure each area has a unique ID.</i>' , 'hueman'),
'transport' => 'postMessage',
'section' => 'HU_DYN_WIDGETS_SECTION'
)
)
);
}
@@ -0,0 +1,414 @@
<?php
/* ------------------------------------------------------------------------- *
* Define some useful constants
/* ------------------------------------------------------------------------- */
//get WP_Theme object of Hueman
$hu_theme = wp_get_theme();
//Get infos from parent theme if using a child theme
$hu_theme = $hu_theme -> parent() ? $hu_theme -> parent() : $hu_theme;
$hu_base_data = array();
$hu_base_data['prefix'] = $hu_base_data['title'] = $hu_theme -> name;
$hu_base_data['version'] = $hu_theme -> version;
$hu_base_data['authoruri'] = $hu_theme -> {'Author URI'};
//HUEMAN_VER is the Version
if( !defined( 'HUEMAN_VER' ) ) define( 'HUEMAN_VER' , $hu_base_data['version'] );
//HU_BASE is the root server path of the parent theme
if( !defined( 'HU_BASE' ) ) define( 'HU_BASE' , get_template_directory().'/' );
//HU_BASE_CHILD is the root server path of the child theme
if( !defined( 'HU_BASE_CHILD' ) ) define( 'HU_BASE_CHILD' , get_stylesheet_directory().'/' );
//HU_BASE_URL http url of the loaded parent theme
if( !defined( 'HU_BASE_URL' ) ) define( 'HU_BASE_URL' , get_template_directory_uri() . '/' );
//HU_BASE_URL_CHILD http url of the loaded child theme
if( !defined( 'HU_BASE_URL_CHILD' ) ) define( 'HU_BASE_URL_CHILD' , get_stylesheet_directory_uri() . '/' );
//THEMENAME contains the Name of the currently loaded theme. Will always be the parent theme name is a child theme is activated.
if( !defined( 'THEMENAME' ) ) define( 'THEMENAME' , $hu_base_data['title'] );
//HU_OPTION_GROUP contains the Name of the hueman theme options in wp_options
//=> was previously option tree default name
if( !defined( 'HU_THEME_OPTIONS' ) ) define( 'HU_THEME_OPTIONS' , apply_filters( 'hu_theme_options', 'hu_theme_options' ) );
if( !defined( 'HU_OPT_AJAX_ACTION' ) ) define( 'HU_OPT_AJAX_ACTION' , 'hu_get_option' );
//HU_IS_PRO
if( !defined( 'HU_IS_PRO' ) ) define( 'HU_IS_PRO' , file_exists( HU_BASE . 'addons/init-hueman-pro.php' ) && "hueman-pro" == sanitize_file_name( strtolower($hu_theme -> name) ) );
//HU_IS_PRO_ADDONS
if( !defined( 'HU_IS_PRO_ADDONS' ) ) define( 'HU_IS_PRO_ADDONS' , false );
//TEXT DOMAIN FOR TRANSLATIONS
if( !defined( 'HU_THEME_TEXT_DOM' ) ) define( 'HU_THEME_TEXT_DOM' , HU_IS_PRO ? 'hueman-pro' : 'hueman' );
//HU_WEBSITE is the home website of Hueman
if( !defined( 'HU_WEBSITE' ) ) define( 'HU_WEBSITE' , $hu_base_data['authoruri'] );
//define useful constants
if( !defined( 'HU_DYN_WIDGETS_SECTION' ) ) define( 'HU_DYN_WIDGETS_SECTION' , 'dyn_widgets_section' );
if( !defined( 'PREV_REC_NOTICE_ID' ) ) define( 'PREV_REC_NOTICE_ID' , 'rec-notice-hueman-1119' );
if( !defined( 'REC_NOTICE_ID' ) ) define( 'REC_NOTICE_ID' , 'rec-notice-hueman-0321' );
/* ------------------------------------------------------------------------- *
* Loads Pluggable Functions
/* ------------------------------------------------------------------------- */
load_template( HU_BASE . 'functions/init-functions.php' );
/* ------------------------------------------------------------------------- *
* OptionTree framework integration: Use in theme mode
/* ------------------------------------------------------------------------- */
//control if we use option tree
//@todo remove : for TEST PURPOSES ONLY
//add_filter( 'use_option_tree' , isset( $_GET['use_option_tree'] ) ? '__return_true' : '__return_false' );
add_filter( 'ot_show_pages', '__return_false' );
add_filter( 'ot_show_new_layout', '__return_false' );
add_filter( 'ot_theme_mode', '__return_true' );
/* ------------------------------------------------------------------------- *
* OptionTree options moved to the customizer
/* ------------------------------------------------------------------------- */
//disable all ot options : page, etc...
add_filter( 'ot_use_theme_options', '__return_false' );
//override the function controlling the theme Option page link for the admin bar.
function ot_register_theme_options_admin_bar_menu() {}
add_filter('ot_theme_options_page_title', 'hu_change_option_tree_title');
add_filter('ot_theme_options_menu_title', 'hu_change_option_tree_title');
function hu_change_option_tree_title() {
return __('Theme Options [OLD]', 'hueman');
}
/* ------------------------------------------------------------------------- *
* Loads and instanciates Utils Classes
/* ------------------------------------------------------------------------- */
load_template( HU_BASE . 'functions/class-utils-settings-map.php' );
new HU_utils_settings_map;
load_template( HU_BASE . 'functions/class-utils.php' );
new HU_utils;
//@param $use_default = boolean
//hu_opt( $option_name , $option_group = null, $use_default = true )
function hu_get_option( $option_id, $use_default = true ) {
return HU_utils::$inst -> hu_opt( $option_id, null, $use_default );
}
/* ------------------------------------------------------------------------- *
* Sidebars and Widgets Init
* => Loads Custom Widgets
* => Registers sidebars
/* ------------------------------------------------------------------------- */
load_template( get_template_directory() . '/functions/init-sidebars-widgets.php' );
/* ------------------------------------------------------------------------- *
* Retro compatibility process and functions
/* ------------------------------------------------------------------------- */
load_template( get_template_directory() . '/functions/init-retro-compat.php' );
/* ------------------------------------------------------------------------- *
* Pro
/* ------------------------------------------------------------------------- */
// Load pro template file only if needed
if ( HU_IS_PRO ) {
load_template( HU_BASE . 'addons/init-hueman-pro.php' );
new HU_init_pro();
}
/* ------------------------------------------------------------------------- *
* Load OptionTree framework
* Has to be loaded before after_setup_theme (important for plugin compatibility like ACF)
/* ------------------------------------------------------------------------- */
load_template( get_template_directory() . '/option-tree/ot-loader.php' );
/* ------------------------------------------------------------------------- *
* Text Domain
* Meta Boxes
* Registers Image Sizes, Theme Supports, Nav Menus
/* ------------------------------------------------------------------------- */
load_template( get_template_directory() . '/functions/init-after-setup-theme.php' );
/* ------------------------------------------------------------------------- *
* Plugins Compatibility
/* ------------------------------------------------------------------------- */
load_template( get_template_directory() . '/functions/init-plugins-compat.php' );
/* ------------------------------------------------------------------------- *
* WP Core Filters : embeds, image_resize_dimensions, widget_text
/* ------------------------------------------------------------------------- */
load_template( get_template_directory() . '/functions/init-wp-core-filters.php' );
/* ------------------------------------------------------------------------- *
* Init Admin actions and filters
* Meta Boxes
* TGM Plugin recommendation
/* ------------------------------------------------------------------------- */
load_template( get_template_directory() . '/functions/init-admin.php' );
/* ------------------------------------------------------------------------- *
* Loads and instanciates customizer related classes
/* ------------------------------------------------------------------------- */
if ( hu_is_customizing() ) {
load_template( get_template_directory() . '/functions/czr/class-czr-init.php' );
new HU_customize();
}
/* ------------------------------------------------------------------------- *
* Nimble Integration
/* ------------------------------------------------------------------------- */
// Replaces the default Nimble theme template by a custom one for Hueman
add_filter( 'nimble_get_locale_template_path', 'hu_set_specific_nimble_template', 10, 2 );
function hu_set_specific_nimble_template( $path, $file_name ) {
if ( 'nimble_template' === $file_name ) {
$path = HU_BASE .'tmpl/nimble-tmpl.php';
}
return $path;
}
add_action( '__after_header', 'hu_render_nimble_sections_after_header', PHP_INT_MAX );
function hu_render_nimble_sections_after_header() {
if ( function_exists( 'Nimble\sek_page_uses_nimble_header_footer' ) && \Nimble\sek_page_uses_nimble_header_footer() )
return;
hu_do_render_nimble_sections();
// this occurs only when user pick the nimble template for a given context
// 'nimble-tmpl.php' is the Hueman theme template overriding the Nimble one. Located in HU_BASE .'tmpl/nimble-tmpl.php'
}
function hu_do_render_nimble_sections() {
if ( function_exists( 'Nimble\sek_get_locale_template' ) && 'nimble-tmpl.php' === basename( \Nimble\sek_get_locale_template() ) ) {
if ( function_exists('Nimble\Nimble_Manager') && function_exists('Nimble\sek_get_local_content_locations') ) {
if ( method_exists( \Nimble\Nimble_Manager(), 'render_nimble_locations') ) {
\Nimble\Nimble_Manager()->render_nimble_locations(
array_keys( \Nimble\sek_get_local_content_locations() ),//array( 'loop_start', 'before_content', 'after_content', 'loop_end'),
array(
// the location rendered even if empty.
// This way, the user starts customizing with only one location for the content instead of four
// But if the other locations were already customized, they will be printed.
'fallback_location' => 'loop_start'
)
);
}
}
}
}
add_filter( 'body_class', 'hu_body_class_for_nimble_template' );
function hu_body_class_for_nimble_template( $classes ) {
if ( function_exists( '\Nimble\sek_get_locale_template' ) && 'nimble-tmpl.php' === basename( \Nimble\sek_get_locale_template() ) ) {
$classes[] = 'nimble-template-enabled';
}
return $classes;
}
/* ------------------------------------------------------------------------- *
* Register locations for Nimble Builder when posts are featured on top of the blog
* @see if ( hu_is_checked('featured-posts-enabled') ) { get_template_part('parts/featured'); }
/* ------------------------------------------------------------------------- */
add_action( 'init', 'czr_fn_maybe_register_nimble_location');
function czr_fn_maybe_register_nimble_location() {
if ( function_exists('nimble_register_location') ) {
nimble_register_location('__before_featured');
nimble_register_location('__after_featured');
}
}
/* ------------------------------------------------------------------------- *
* Loads Front End files
/* ------------------------------------------------------------------------- */
load_template( get_template_directory() . '/functions/init-front.php' );
// Load dynamic styles
load_template( get_template_directory() . '/functions/dynamic-styles.php' );
do_action('hu_hueman_loaded');
/* ------------------------------------------------------------------------- *
* Utils
/* ------------------------------------------------------------------------- */
//@return url string
function hu_get_front_style_url() {
return sprintf('%1$s/assets/front/css/%2$s%3$s.css',
get_template_directory_uri(),
hu_is_checked( 'responsive' ) ? 'main' : 'main-not-responsive',
hu_is_checked( 'minified-css' ) ? '.min' : ''
);
}
//@args = array(
// 'request' => 'src',//can be 'title', 'src' or 'family'
// all = bool
//)
function hu_get_fonts( $args = array() ) {
$args = wp_parse_args(
$args,
array(
'request' => 'src',//can be 'title', 'src' or 'family'
'all' => false,
'font_id' => '',//the id of the font
)
);
$_key_to_return = $args['request'];
$font_id = empty( $args['font_id'] ) ? '___' : $args['font_id'];
//make sure the request is possible : 'title', 'src' or 'family'
if ( !in_array( $_key_to_return, array( 'title', 'src', 'family' ) ) )
return;
//bail if no font id provided and request is not for all fonts
if ( false == $args['all'] && !is_string( $args['font_id'] ) )
return;
$_fonts_map = apply_filters(
'hu_fonts',
array(
//Google fonts
'titillium-web' => array(
'title' => 'Titillium Web, Latin (Self-hosted)',
'src' => false,
'family' => false
),
'titillium-web-ext' => array(
'title' => 'Titillium Web, Latin-Ext',
'src' => 'Titillium+Web:400,400italic,300italic,300,600&subset=latin,latin-ext',
'family' => "'Titillium Web', Arial, sans-serif"
),
'poppins' => array(
'title' => 'Poppins, Latin-Ext',
'src' => 'Poppins:300,400,500,600,700&subset=latin-ext',
'family' => "'Poppins', sans-serif"
),
'droid-serif' => array(
'title' => 'Droid Serif, Latin',
'src' => 'Droid+Serif:400,400italic,700',
'family' => "'Droid Serif', serif"
),
'source-sans-pro' => array(
'title' => 'Source Sans Pro, Latin-Ext',
'src' => 'Source+Sans+Pro:400,300italic,300,400italic,600&subset=latin,latin-ext',
'family' => "'Source Sans Pro', Arial, sans-serif"
),
'lato' => array(
'title' => 'Lato, Latin',
'src' => 'Lato:400,300,300italic,400italic,700',
'family' => "'Lato', Arial, sans-serif"
),
'raleway' => array(
'title' => 'Raleway, Latin',
'src' => 'Raleway:400,300,600',
'family' => "'Raleway', Arial, sans-serif"
),
'ubuntu' => array(
'title' => 'Ubuntu, Latin-Ext',
'src' => 'Ubuntu:400,400italic,300italic,300,700&subset=latin,latin-ext',
'family' => "'Ubuntu', Arial, sans-serif"
),
'ubuntu-cyr' => array(
'title' => 'Ubuntu, Latin / Cyrillic-Ext',
'src' => 'Ubuntu:400,400italic,300italic,300,700&subset=latin,cyrillic-ext',
'family' => "'Ubuntu', Arial, sans-serif"
),
'roboto-condensed' => array(
'title' => 'Roboto Condensed, Latin-Ext',
'src' => 'Roboto+Condensed:400,300italic,300,400italic,700&subset=latin,latin-ext',
'family' => "'Roboto Condensed', Arial, sans-serif"
),
'roboto-condensed-cyr' => array(
'title' => 'Roboto Condensed, Latin / Cyrillic-Ext',
'src' => 'Roboto+Condensed:400,300italic,300,400italic,700&subset=latin,cyrillic-ext',
'family' => "'Roboto Condensed', Arial, sans-serif"
),
'roboto-slab' => array(
'title' => 'Roboto Slab, Latin-Ext',
'src' => 'Roboto+Slab:400,300italic,300,400italic,700&subset=latin,cyrillic-ext',
'family' => "'Roboto Slab', Arial, sans-serif"
),
'roboto-slab-cyr' => array(
'title' => 'Roboto Slab, Latin / Cyrillic-Ext',
'src' => 'Roboto+Slab:400,300italic,300,400italic,700&subset=latin,cyrillic-ext',
'family' => "'Roboto Slab', Arial, sans-serif"
),
'playfair-display' => array(
'title' => 'Playfair Display, Latin-Ext',
'src' => 'Playfair+Display:400,400italic,700&subset=latin,latin-ext',
'family' => "'Playfair Display', Arial, sans-serif"
),
'playfair-display-cyr' => array(
'title' => 'Playfair Display, Latin / Cyrillic',
'src' => 'Playfair+Display:400,400italic,700&subset=latin,cyrillic',
'family' => "'Playfair Display', Arial, sans-serif"
),
'open-sans' => array(
'title' => 'Open Sans, Latin-Ext',
'src' => 'Open+Sans:400,400italic,300italic,300,600&subset=latin,latin-ext',
'family' => "'Open Sans', Arial, sans-serif"
),
'open-sans-cyr' => array(
'title' => 'Open Sans, Latin / Cyrillic-Ext',
'src' => 'Open+Sans:400,400italic,300italic,300,600&subset=latin,cyrillic-ext',
'family' => "'Open Sans', Arial, sans-serif"
),
'pt-serif' => array(
'title' => 'PT Serif, Latin-Ext',
'src' => 'PT+Serif:400,700,400italic&subset=latin,latin-ext',
'family' => "'PT Serif', serif"
),
'pt-serif-cyr' => array(
'title' => 'PT Serif, Latin / Cyrillic-Ext',
'src' => 'PT+Serif:400,700,400italic&subset=latin,cyrillic-ext',
'family' => "'PT Serif', serif"
),
//Web fonts
'arial' => array(
'title' => 'Arial',
'src' => false,
'family' => 'Arial, sans-serif'
),
'georgia' => array(
'title' => 'Georgia',
'src' => false,
'family' => 'Georgia, serif'
),
'verdana' => array(
'title' => 'Verdana',
'src' => false,
'family' => 'Verdana, sans-serif'
),
'tahoma' => array(
'title' => 'Tahoma',
'src' => false,
'family' => 'Tahoma, sans-serif'
)
));
if ( true == $args['all'] ) {
$_return = array();
foreach ( $_fonts_map as $id => $data ) {
if ( !array_key_exists( $_key_to_return, $data ) )
continue;
$_return[$id] = $data[$_key_to_return];
}
} else {
$_return = '';
if ( array_key_exists( $font_id, $_fonts_map ) ) {
$_return = array_key_exists( $_key_to_return, $_fonts_map[$font_id] ) ? $_fonts_map[$font_id][$_key_to_return] : $_return;
}
}
return apply_filters( 'hu_get_fonts', $_return, $args );
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,698 @@
<?php
/****************************************************************************
****************************** HELPERS **************************************
*****************************************************************************/
/**
* Returns the "real" queried post ID or if !isset, get_the_ID()
* Checks some contextual booleans
*
*/
function hu_get_id() {
if ( in_the_loop() ) {
$_id = get_the_ID();
} else {
global $post;
$queried_object = get_queried_object();
$_id = ( !empty ( $post ) && isset($post -> ID) ) ? $post -> ID : null;
$_id = ( isset ($queried_object -> ID) ) ? $queried_object -> ID : $_id;
}
return ( is_404() || is_search() || is_archive() ) ? null : $_id;
}
//@return bool
function hu_isprevdem() {
global $wp_customize;
$is_dirty = false;
if ( is_object( $wp_customize ) && method_exists( $wp_customize, 'unsanitized_post_values' ) ) {
$real_cust = $wp_customize -> unsanitized_post_values( array( 'exclude_changeset' => true ) );
$_preview_index = array_key_exists( 'customize_messenger_channel' , $_POST ) ? $_POST['customize_messenger_channel'] : '';
$_is_first_preview = false !== strpos( $_preview_index ,'-0' );
$_doing_ajax_partial = array_key_exists( 'wp_customize_render_partials', $_POST );
//There might be cases when the unsanitized post values contains old widgets infos on initial preview load, giving a wrong dirtyness information
$is_dirty = ( !empty( $real_cust ) && !$_is_first_preview ) || $_doing_ajax_partial;
}
return apply_filters( 'hu_isprevdem', !$is_dirty && hu_get_raw_option( 'template', null, false ) != get_stylesheet() && !is_child_theme() && !HU_IS_PRO );
}
//@return bool
function hu_is_pro_section_on() {
return !HU_IS_PRO && class_exists( 'HU_Customize_Section_Pro' ) && !hu_isprevdem();
}
//Use to generate unique menu id attribute data-menu-id
//=> is used in the front js app to populate the collection
//the css # id could not be used because historically not unique in the theme
function hu_get_menu_id( $location = 'menu' ) {
if ( !isset( $GLOBALS['menu_id'] ) )
$GLOBALS['menu_id'] = 0;
$GLOBALS['menu_id'] = $GLOBALS['menu_id'] + 1;
return $location . '-' . $GLOBALS['menu_id'];
}
//@return the position of the sidebar as a string, depending on the choosen layout
//=> is used to write an html attribute, used by the front end js
function hu_get_sidebar_position( $sidebar = 's1' ) {
$layout = hu_get_layout_class();
$position_map = array(
's1' => array(
'col-2cl' => 'right',
'col-3cl' => 'right',
'col-3cm' => 'left',
'col-3cr' => 'left',
),
's2' => array(
'col-2cr' => 'right',
'col-3cm' => 'right',
'col-3cr' => 'middle-left',
'col-3cl' => 'middle-right',
)
);
if ( !array_key_exists( $sidebar, $position_map ) )
return 'left';
return array_key_exists( $layout, $position_map[ $sidebar ] ) ? $position_map[ $sidebar ][ $layout ] : 'left';
}
/**
* Is the customizer left panel being displayed ?
* @return boolean
* @since 3.3+
*/
function hu_is_customize_left_panel() {
global $pagenow;
return is_admin() && isset( $pagenow ) && 'customize.php' == $pagenow;
}
/**
* Is the customizer preview panel being displayed ?
* @return boolean
* @since 3.3+
*/
function hu_is_customize_preview_frame() {
return is_customize_preview() || ( !is_admin() && isset($_REQUEST['customize_messenger_channel']) );
}
/**
* Always include wp_customize or customized in the custom ajax action triggered from the customizer
* => it will be detected here on server side
* typical example : the donate button
*
* @return boolean
* @since 3.3+
*/
function hu_doing_customizer_ajax() {
$_is_ajaxing_from_customizer = isset( $_POST['customized'] ) || isset( $_POST['wp_customize'] );
return $_is_ajaxing_from_customizer && ( defined( 'DOING_AJAX' ) && DOING_AJAX );
}
/**
* Are we in a customization context ? => ||
* 1) Left panel ?
* 2) Preview panel ?
* 3) Ajax action from customizer ?
* @return bool
* @since 3.3+
*/
function hu_is_customizing() {
//checks if is customizing : two contexts, admin and front (preview frame)
global $pagenow;
// the check on $pagenow does NOT work on multisite install @see https://github.com/presscustomizr/nimble-builder/issues/240
// That's why we also check with other global vars
// @see wp-includes/theme.php, _wp_customize_include()
$is_customize_php_page = ( is_admin() && 'customize.php' == basename( $_SERVER['PHP_SELF'] ) );
$is_customize_admin_page_one = (
$is_customize_php_page
||
( isset( $_REQUEST['wp_customize'] ) && 'on' == $_REQUEST['wp_customize'] )
||
( !empty( $_GET['customize_changeset_uuid'] ) || !empty( $_POST['customize_changeset_uuid'] ) )
);
$is_customize_admin_page_two = is_admin() && isset( $pagenow ) && 'customize.php' == $pagenow;
//checks if is customizing : two contexts, admin and front (preview frame)
return $is_customize_admin_page_one || $is_customize_admin_page_two || hu_is_customize_preview_frame() || hu_doing_customizer_ajax();
}
//@return boolean
//Is used to check if we can display specific notes including deep links to the customizer
function hu_user_can_see_customize_notices_on_front() {
return !hu_is_customizing() && is_user_logged_in() && current_user_can( 'edit_theme_options' ) && is_super_admin();
}
//@return boolean
function hu_is_partial_refreshed_on() {
return apply_filters( 'hu_partial_refresh_on', true );
}
/* HELPER FOR CHECKBOX OPTIONS */
//the old options used 'on' and 'off'
//the new options use 1 and 0
function hu_is_checked( $opt_name = '') {
$val = hu_get_option( $opt_name );
//cast to string if array
$val = is_array($val) ? $val[0] : $val;
return hu_booleanize_checkbox_val( $val );
}
function hu_booleanize_checkbox_val( $val ) {
if ( !$val )
return false;
if ( is_bool( $val ) && $val )
return true;
switch ( (string) $val ) {
case 'off':
case '' :
case 'false' :
return false;
case 'on':
case '1' :
case 'true' :
return true;
default : return false;
}
}
//used in the customizer
//replace wp checked() function
function hu_checked( $val ) {
echo hu_is_checked( $val ) ? 'checked="checked"' : '';
}
/**
* Returns a boolean
* check if user started to use the theme before ( strictly < ) the requested version
* @param $_ver : string free version
* @param $_pro_ver : string pro version
*/
function hu_user_started_before_version( $_ver, $_pro_ver = null ) {
$_trans = HU_IS_PRO ? 'started_using_hueman_pro' : 'started_using_hueman';
//the transient is set in HU_utils::hu_init_properties()
if ( !get_transient( $_trans ) )
return false;
$_ver = HU_IS_PRO ? $_pro_ver : $_ver;
if ( !is_string( $_ver ) )
return false;
$_start_version_infos = explode( '|', esc_attr( get_transient( $_trans ) ) );
if ( !is_array( $_start_version_infos ) || count( $_start_version_infos ) < 2 )
return false;
switch ( $_start_version_infos[0] ) {
//in this case we know exactly what was the starting version (most common case)
case 'with':
return isset( $_start_version_infos[1] ) ? version_compare( $_start_version_infos[1] , $_ver, '<' ) : true;
break;
//here the user started to use the theme before, we don't know when.
//but this was actually before this check was created
case 'before':
return true;
break;
default :
return false;
break;
}
}
//@return bool
function hu_user_started_with_current_version() {
if ( HU_IS_PRO )
return;
$_trans = 'started_using_hueman';
//the transient is set in HU_utils::hu_init_properties()
if ( !get_transient( $_trans ) )
return false;
$_start_version_infos = explode( '|', esc_attr( get_transient( $_trans ) ) );
//make sure we're good at this point
if ( !is_string( HUEMAN_VER ) || !is_array( $_start_version_infos ) || count( $_start_version_infos ) < 2 )
return false;
return 'with' == $_start_version_infos[0] && version_compare( $_start_version_infos[1] , HUEMAN_VER, '==' );
}
/**
* Is there a menu assigned to a given location ?
* If not, are we in the case where a default page menu can be used has fallback ?
* @param $location string can be header, footer, topbar
* @return bool
*/
function hu_has_nav_menu( $_location ) {
$bool = false;
if ( has_nav_menu( $_location ) || !in_array( $_location, array( 'topbar', 'footer') ) ) {
$bool = has_nav_menu( $_location );
} else {
switch ($_location) {
case 'footer':
$bool = hu_is_checked( "default-menu-footer" );
break;
case 'topbar':
$bool = hu_is_checked( "default-menu-header" );
break;
}
}
return apply_filters( 'hu_has_nav_menu', $bool, $_location );
}
//@return an array of unfiltered options
//=> all options or a single option val
//@param $report_error is used only when invoking HU_utils::set_option() to avoid a potential theme option reset
//=> prevent issue https://github.com/presscustomizr/hueman/issues/571
function hu_get_raw_option( $opt_name = null, $opt_group = null, $from_cache = true, $report_error = false ) {
$alloptions = wp_cache_get( 'alloptions', 'options' );
$alloptions = maybe_unserialize( $alloptions );
//prevent issue https://github.com/presscustomizr/hueman/issues/492
//prevent issue https://github.com/presscustomizr/hueman/issues/571
if ( $report_error ) {
if ( !is_array( $alloptions ) || empty( $alloptions ) ) {
return new WP_Error( 'wp_options_not_cached', '' );
}
}
$alloptions = !is_array( $alloptions ) ? array() : $alloptions;//prevent issue https://github.com/presscustomizr/hueman/issues/492
//is there any option group requested ?
if ( !is_null( $opt_group ) && array_key_exists( $opt_group, $alloptions ) ) {
$alloptions = maybe_unserialize( $alloptions[ $opt_group ] );
}
//shall we return a specific option ?
if ( is_null( $opt_name ) ) {
return $alloptions;
} else {
$opt_value = array_key_exists( $opt_name, $alloptions ) ? maybe_unserialize( $alloptions[ $opt_name ] ) : false;//fallback on cache option val
//do we need to get the db value instead of the cached one ? <= might be safer with some user installs not properly handling the wp cache
//=> typically used to checked the template name for hu_isprevdem()
if ( !$from_cache ) {
global $wpdb;
//@see wp-includes/option.php : get_option()
$row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", $opt_name ) );
if ( is_object( $row ) ) {
$opt_value = $row->option_value;
}
}
return $opt_value;
}
}
/* ------------------------------------------------------------------------- *
* Various Helpers
/* ------------------------------------------------------------------------- */
/**
* helper
* Check if we are displaying posts lists or front page
* => not real home
* @return bool
*/
function hu_is_home() {
//get info whether the front page is a list of last posts or a page
return is_home() || ( is_home() && ( 'posts' == get_option( 'show_on_front' ) || '__nothing__' == get_option( 'show_on_front' ) ) ) || is_front_page();
}
/**
* helper ( can be already defined in hueman-addons)
* Check if we are really on home, all cases covered
* @return bool
*/
if ( !function_exists( 'hu_is_real_home') ) {
function hu_is_real_home() {
// Warning : when show_on_front is a page, but no page_on_front has been picked yet, is_home() is true
// beware of https://github.com/presscustomizr/nimble-builder/issues/349
return ( is_home() && ( 'posts' == get_option( 'show_on_front' ) || '__nothing__' == get_option( 'show_on_front' ) ) )
|| ( is_home() && 0 == get_option( 'page_on_front' ) && 'page' == get_option( 'show_on_front' ) )//<= this is the case when the user want to display a page on home but did not pick a page yet
|| is_front_page();
}
}
/**
* Check if we show posts or page content on home page
* @return bool
*/
function hu_is_home_empty() {
//check if the users has choosen the "no posts or page" option for home page
return ( is_home() || is_front_page() ) && '__nothing__' == get_option( 'show_on_front' );
}
/**
* helper
* States if the current context is the blog page from a WP standpoint
* @return bool
*/
function hu_is_blogpage() {
return is_home() && !is_front_page();
}
/**
* helper
* //must be archive or search result. Returns false if home is empty in options.
* @return bool
*/
function hu_is_post_list() {
global $wp_query;
return apply_filters( 'hu_is_post_list',
( !is_singular()
&& !is_404()
&& ( is_search() && 0 != $wp_query -> post_count )
&& !hu_is_home_empty() )
|| hu_is_blogpage() || is_home() || is_search() || is_archive()
);
}
/**
* helper
* used to define active callback in the customizer
* => is_single triggers an error in 4.7
* @return bool
*/
function hu_is_page() {
return is_page();
}
/**
* helper
* used to define active callback in the customizer
* => is_single triggers an error in 4.7
* @return bool
*/
function hu_is_single() {
return is_single();
}
/**
* helper
* used to define active callback in the customizer
* => is_single triggers an error in 4.7
* @return bool
*/
function hu_is_singular() {
return is_singular();
}
/**
* helper
* @return bool
*/
function hu_has_social_links() {
$_raw_socials = hu_get_option('social-links');
if ( !is_array( $_raw_socials ) )
return;
//get the social mod opts and the items
foreach( $_raw_socials as $key => $item ) {
if ( !array_key_exists( 'is_mod_opt', $item ) )
$_social_items[] = $item;
}
return !empty( $_social_items );
}
/**
* helper
* Whether or not we are in the ajax context
* @since v3.2.14
* @return bool
*/
function hu_is_ajax() {
/*
* wp_doing_ajax() introduced in 4.7.0
*/
$wp_doing_ajax = ( function_exists('wp_doing_ajax') && wp_doing_ajax() ) || ( ( defined('DOING_AJAX') && 'DOING_AJAX' ) );
/*
* https://core.trac.wordpress.org/ticket/25669#comment:19
* http://stackoverflow.com/questions/18260537/how-to-check-if-the-request-is-an-ajax-request-with-php
*/
$_is_ajax = $wp_doing_ajax || ( !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
return apply_filters( 'hu_is_ajax', $_is_ajax );
}
/**
* helper ensuring backward compatibility with the previous option system
* @return img src string
*/
function hu_get_img_src( $img ) {
if ( !$img )
return;
$_image_src = '';
$_width = false;
$_height = false;
$_attachment_id = '';
//Get the img src
if ( is_numeric( $img ) ) {
$_attachment_id = $img;
$_attachment_data = apply_filters( "hu_attachment_img" , wp_get_attachment_image_src( $_attachment_id, 'full' ), $_attachment_id );
$_img_src = is_array($_attachment_data) ? $_attachment_data[0] : '';
$_width = ( isset($_attachment_data[1]) && $_attachment_data[1] > 1 ) ? $_attachment_data[1] : $_width;
$_height = ( isset($_attachment_data[2]) && $_attachment_data[2] > 1 ) ? $_attachment_data[2] : $_height;
} else { //old treatment
//rebuild the img path : check if the full path is already saved in DB. If not, then rebuild it.
$upload_dir = wp_upload_dir();
$_saved_path = esc_url ( $img );
$_img_src = ( false !== strpos( $_saved_path , '/wp-content/' ) ) ? $_saved_path : $upload_dir['baseurl'] . $_saved_path;
}
//return img source + make ssl compliant
return is_ssl() ? str_replace('http://', 'https://', $_img_src) : $_img_src;
}
/**
* helper ensuring backward compatibility with the previous option system
* @return (false|array) returns an array (url, width, height), or false, if no image is available.
*/
function hu_get_img_source( $img ) {
if ( !$img )
return;
$_image_src = '';
$_width = false;
$_height = false;
$_attachment_id = '';
//Get the img src
if ( is_numeric( $img ) ) {
$_attachment_id = $img;
$_attachment_data = apply_filters( "hu_attachment_img" , wp_get_attachment_image_src( $_attachment_id, 'full' ), $_attachment_id );
if ( is_array($_attachment_data) ) {
$_img_src = $_attachment_data[0];
$_width = ( isset($_attachment_data[1]) && $_attachment_data[1] > 1 ) ? $_attachment_data[1] : $_width;
$_height = ( isset($_attachment_data[2]) && $_attachment_data[2] > 1 ) ? $_attachment_data[2] : $_height;
}
} else { //old treatment
//rebuild the img path : check if the full path is already saved in DB. If not, then rebuild it.
$upload_dir = wp_upload_dir();
$_saved_path = esc_url ( $img );
$_img_src = ( false !== strpos( $_saved_path , '/wp-content/' ) ) ? $_saved_path : $upload_dir['baseurl'] . $_saved_path;
$width = '';
$height = '';
}
//return img source + make ssl compliant
$_img_src = is_ssl() ? str_replace('http://', 'https://', $_img_src) : $_img_src;
return $_img_src ? array( $_img_src, $_width, $_height ) : false;
}
/**
* wrapper of hu_get_img_src specific for theme options
* @return logo src string
*/
function hu_get_img_src_from_option( $option_name ) {
$_img_option = esc_attr( hu_get_option( $option_name ) );
if ( !$_img_option )
$_src = false;
$_src = hu_get_img_src( $_img_option );
//hook
return apply_filters( "hu_img_src_from_option" , $_src, $option_name ) ;
}
/**
* wrapper of hu_get_img_source specific for theme options
* @return (false|array) returns an array (url, width, height), or false, if no image is available.
*/
function hu_get_img_source_from_option( $option_name ) {
$_img_option = esc_attr( hu_get_option( $option_name ) );
if ( !$_img_option )
$_source = false;
$_source = hu_get_img_source( $_img_option );
//hook
return apply_filters( "hu_img_source_from_option" , $_source, $option_name ) ;
}
/**
* Wrapper of the_post_thumbnail
* It also handles the placeholder image if requested and option checked
* => the goal is to "scope" the filter the thumbnail html only to the Hueman theme.
* => avoid potential conflict with plugins
*
* @echo html
*/
function hu_the_post_thumbnail( $size = 'post-thumbnail', $attr = '', $placeholder = true, $placeholder_size = null ) {
$html = '';
$post = get_post();
$placeholder_size = is_null( $placeholder_size ) ? $size : $placeholder_size;
$is_attachment = is_object( $post ) && isset( $post -> post_type ) && 'attachment' == $post -> post_type;
if ( !$post || ( !$is_attachment && !has_post_thumbnail() ) ) {
if ( hu_is_checked('placeholder') && (bool)$placeholder ) {
$html = hu_print_placeholder_thumb( $size );
}
} else if ( $is_attachment ) {//typically : the case when attachment are included in search results
$html = wp_get_attachment_image( $post -> ID, $size, false, $attr );
} else {
$html = get_the_post_thumbnail( null, $size, $attr );
}
echo apply_filters( 'hu_post_thumbnail_html', $html, $size, $attr );
}
//@return bool
//WHEN DO WE DISPLAY THE REGULAR TOP NAV ?
//=> when there's a topbar menu assigned or when the default page menu option "default-menu-header" is checked ( not for multisite @see issue on github )
function hu_is_topbar_displayed() {
$top_nav_fb = apply_filters( 'hu_topbar_menu_fallback_cb', ( !is_multisite() && hu_is_checked( "default-menu-header" ) ) ? 'hu_page_menu' : '' );
return hu_has_nav_menu( 'topbar' ) || !empty( $top_nav_fb );
}
//WHEN DO WE DISPLAY THE HEADER NAV ?
// => when there's a header menu assigned or when the fallback callback function is set ( with a filter, used in prevdem scenario typically )
function hu_is_header_nav_displayed() {
$header_nav_fb = apply_filters( 'hu_header_menu_fallback_cb', '' );
return hu_has_nav_menu( 'header' ) || !empty( $header_nav_fb );
}
// When do we display the comment icon in grids ?
// Handles the post and page cases
// Should be used in the loop, when global $post is set
// @return bool
function hu_is_comment_icon_displayed_on_grid_item_thumbnails() {
// the comment icon is displayed only if comment are enabled for this type of post
// 'comment-count' option => Display comment count on thumbnails
global $post;
if ( empty ( $post ) || !isset( $post -> ID ) )
return;
$are_comments_contextually_enabled = false;
if ( 'page' == $post -> post_type && hu_is_checked( 'page-comments' ) ) {
$are_comments_contextually_enabled = true;
} else if ( 'page' != $post -> post_type && hu_is_checked( 'post-comments' ) ) {
$are_comments_contextually_enabled = true;
}
return comments_open() && hu_is_checked( 'comment-count') && $are_comments_contextually_enabled;
}
// @return string
function hu_is_full_nimble_tmpl() {
$bool = false;
if ( function_exists('Nimble\sek_get_locale_template') ) {
$tmpl_name = \Nimble\sek_get_locale_template();
$tmpl_name = ( !empty( $tmpl_name ) && is_string( $tmpl_name ) ) ? basename( $tmpl_name ) : '';
// kept for retro-compat.
// since Nimble Builder v1.4.0, the 'nimble_full_tmpl_ghf.php' has been deprecated
$bool = 'nimble_full_tmpl_ghf.php' === $tmpl_name;
// "is full Nimble template" when header, footer and content use Nimble templates.
if ( function_exists('Nimble\sek_page_uses_nimble_header_footer') ) {
$bool = ( 'nimble_template.php' === $tmpl_name || 'nimble-tmpl.php' === $tmpl_name ) && Nimble\sek_page_uses_nimble_header_footer();
}
}
return $bool;
}
/**
* Check whether a category exists.
* (wp category_exists isn't available in pre_get_posts)
*
* @see term_exists()
*
* @param int $cat_id.
* @return bool
*/
function hu_category_id_exists( $cat_id ) {
return term_exists( (int) $cat_id, 'category' );
}
// @return bool
function hu_is_pro() {
return ( defined( 'HU_IS_PRO' ) && HU_IS_PRO ) || ( defined('HU_IS_PRO_ADDONS') && HU_IS_PRO_ADDONS );
}
/* ------------------------------------------------------------------------- *
* Template tags parsing
/* ------------------------------------------------------------------------- */
function hu_get_year() {
return esc_attr( date('Y') );
}
function hu_find_pattern_match($matches) {
$replace_values = array(
'home_url' => 'home_url',
'year' => 'hu_get_year',
'site_title' => 'get_bloginfo'
);
if ( array_key_exists( $matches[1], $replace_values ) ) {
$dyn_content = $replace_values[$matches[1]];
if ( function_exists( $dyn_content ) ) {
return call_user_func( $dyn_content ); //$dyn_content();//<= @todo handle the case when the callback is a method
} else if ( is_string($dyn_content) ) {
return $dyn_content;
} else {
return null;
}
}
return null;
}
// fired @filter 'hu_parse_template_tags'
function hu_parse_template_tags( $val ) {
//the pattern could also be '!\{\{(\w+)\}\}!', but adding \s? allows us to allow spaces around the term inside curly braces
//see https://stackoverflow.com/questions/959017/php-regex-templating-find-all-occurrences-of-var#comment71815465_959026
return is_string( $val ) ? preg_replace_callback( '!\{\{\s?(\w+)\s?\}\}!', 'hu_find_pattern_match', $val) : $val;
}
add_filter( 'hu_parse_template_tags', 'hu_parse_template_tags' );
/* ------------------------------------------------------------------------- *
* FLEXSLIDER SCRIPT
/* ------------------------------------------------------------------------- */
// March 2020, introduced for https://github.com/presscustomizr/hueman/issues/869
// September 2020, introduced a new boolean filter for https://github.com/presscustomizr/hueman/issues/912
function hu_front_needs_flexslider() {
if ( !apply_filters( 'hu_front_needs_flexslider', true ) )
return false;
return has_post_format( 'gallery' ) || ( is_home() && !is_paged() && ( hu_is_checked('featured-posts-enabled') && hu_get_option('featured-posts-count') != '0' ) );
}
@@ -0,0 +1,562 @@
<?php
//add various plugins compatibilty (Jetpack, Bbpress, Qtranslate, Woocommerce, The Event Calendar ...)
add_action ('after_setup_theme' , 'hu_set_plugins_supported', 20 );
add_action ('after_setup_theme' , 'hu_plugins_compatibility', 30 );
/**
* Set plugins supported ( before the plugin compat function is fired )
* => allows to easily remove support by firing remove_theme_support() (with a priority < hu_plugins_compatibility) on hook 'after_setup_theme'
* hook : after_setup_theme:20
*
*/
function hu_set_plugins_supported() {
//add support for plugins (added in v3.1+)
add_theme_support( 'jetpack' );
add_theme_support( 'buddy-press' );
add_theme_support( 'uris' );///Ultimate Responsive Image Slider
add_theme_support( 'the-events-calendar' );///Ultimate Responsive Image Slider
add_theme_support( 'woocommerce' );///WooCoomerce
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
add_theme_support( 'wp-pagenavi' );///WP PageNavi
add_theme_support( 'polylang' );
add_theme_support( 'wpml' );
}
/**
* This function handles the following plugins compatibility : Jetpack (for the carousel addon and photon), Bbpress...
* hook : after_setup_theme:30
*/
function hu_plugins_compatibility() {
/* JETPACK */
//adds compatibilty with the jetpack image carousel and photon
if ( current_theme_supports( 'jetpack' ) && hu_is_plugin_active('jetpack/jetpack.php') )
hu_set_jetpack_compat();
/* BUDDYPRESS */
//if buddypress is installed and activated, we can check the existence of the contextual boolean function is_buddypress() to execute some code
// we have to use buddy-press instead of buddypress as string for theme support as buddypress makes some checks on current_theme_supports('buddypress') which result in not using its templates
if ( current_theme_supports( 'buddy-press' ) && hu_is_plugin_active('buddypress/bp-loader.php') )
hu_set_buddypress_compat();
/* Ultimate Responsive Image Slider */
if ( current_theme_supports( 'uris' ) && hu_is_plugin_active('ultimate-responsive-image-slider/ultimate-responsive-image-slider.php') )
hu_set_uris_compat();
/* The Events Calendar */
if ( current_theme_supports( 'the-events-calendar' ) && hu_is_plugin_active('the-events-calendar/the-events-calendar.php') )
hu_set_the_events_calendar_compat();
/* Woocommerce */
if ( current_theme_supports( 'woocommerce' ) && hu_is_plugin_active('woocommerce/woocommerce.php') )
hu_set_woocommerce_compat();
/* WP PageNavi */
if ( current_theme_supports( 'wp-pagenavi' ) && hu_is_plugin_active('wp-pagenavi/wp-pagenavi.php') )
hu_set_wp_pagenavi_compat();
/* Polylang */
if ( current_theme_supports( 'polylang' ) && ( hu_is_plugin_active('polylang/polylang.php') || hu_is_plugin_active('polylang-pro/polylang.php') ) )
hu_set_polylang_compat();
/* WPML */
if ( current_theme_supports( 'wpml' ) && hu_is_plugin_active('sitepress-multilingual-cms/sitepress.php') )
hu_set_wpml_compat();
}
/**
* Jetpack compat hooks
*
*/
function hu_set_jetpack_compat() {
//Photon jetpack's module conflicts with our smartload feature:
//Photon removes the width,height attribute in php, then in js it compute them (when they have the special attribute 'data-recalc-dims')
//based on the img src. When smartload is enabled the images parsed by its js which are not already smartloaded are dummy
//and their width=height is 1. The image is correctly loaded but the space
//assigned to it will be 1x1px. Photon js, is compatible with Auttomatic plugin lazy load and it sets the width/height
//attribute only when the img is smartloaded. This is pretty useless to me, as it doesn't solve the main issue:
//document's height change when the img are smartloaded.
//Anyway to avoid the 1x1 issue we alter the img attribute (data-recalc-dims) which photon adds to the img tag(php) so
//the width/height will not be erronously recalculated
if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'photon' ) )
add_filter( 'hu_img_smartloaded', 'hu_jp_smartload_img');
function hu_jp_smartload_img( $img ) {
return str_replace( 'data-recalc-dims', 'data-tcjp-recalc-dims', $img );
}
}//end jetpack compat
/**
* BuddyPress compat hooks
*
*/
function hu_set_buddypress_compat() {
//disable smartload in change-avatar buddypress profile page
//to avoid the img tag (in a template loaded with backbone) being parsed on server side but
//not correctly processed by the front js.
//the action hook "xprofile_screen_change_avatar" is a buddypress specific hook
//fired before wp_head where we hook hu_parse_imgs
//side-effect: all the images in this pages will not be smartloaded, this isn't a big deal
//as there should be at maximum 2 images there:
//1) the avatar, if already set
//2) a cover image, if already set
//anyways this page is not a regular "front" page as it pertains more to a "backend" side
//if we can call it that way.
add_action( 'xprofile_screen_change_avatar', 'hu_buddypress_maybe_disable_img_smartload' );
function hu_buddypress_maybe_disable_img_smartload() {
add_filter( 'hu_opt_smart_load_img', '__return_false' );//hu_opt_smart_load_image filters the option 'smart_load_img'
}
}
/**
* Ultimate Responsive Image Slider compat hooks (uris)
*
*/
function hu_set_uris_compat() {
add_filter ( 'hu_img_smart_load_options', 'hu_uris_disable_img_smartload' ) ;
function hu_uris_disable_img_smartload( $options ){
if ( !is_array( $options ) )
$options = array();
if ( !is_array( $options['opts'] ) )
$options['opts'] = array();
if ( !is_array( $options['opts']['excludeImg'] ) )
$options['opts']['excludeImg'] = array();
$options['opts']['excludeImg'][] = '.sp-image';
return $options;
}
}//end uris compat
/**
* The Events Calendar compat hooks
*/
function hu_set_the_events_calendar_compat() {
/*
* Are we in the Events list context?
*/
if ( !( function_exists( 'hu_is_tec_events_list' ) ) ) {
function hu_is_tec_events_list() {
return function_exists( 'tribe_is_event_query' ) && tribe_is_event_query() && is_post_type_archive();
}
}
/*
* Are we in single Event context?
*/
if ( !( function_exists( 'hu_is_tec_single_event' ) ) ) {
function hu_is_tec_single_event() {
return function_exists( 'tribe_is_event_query' ) && tribe_is_event_query() && is_single();
}
}
/*
* Avoid php smartload image php parsing in events list content
* See: https://github.com/presscustomizr/hueman/issues/285
*/
add_filter( 'hu_disable_img_smart_load', 'hu_tec_disable_img_smart_load_events_list', 999, 2);
function hu_tec_disable_img_smart_load_events_list( $_bool, $parent_filter ) {
if ( 'the_content' == $parent_filter && hu_is_tec_events_list() )
return true;//disable
return $_bool;
}
}
/**
* The Events Calendar compat hooks
*/
function hu_set_woocommerce_compat() {
//Wrappers
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
add_action('woocommerce_before_main_content', 'hu_theme_wrapper_start', 10);
add_action('woocommerce_after_main_content', 'hu_theme_wrapper_end', 10);
//show hu custom single post meta boxes in product post type
add_filter( 'hu_custom_meta_boxes_post_options_in', 'hu_add_woocommerce_custom_meta_boxes_in_product');
if ( !function_exists('hu_add_woocommerce_custom_meta_boxes_in_product') ) {
function hu_add_woocommerce_custom_meta_boxes_in_product( $array ) {
if ( is_array( $array ) && post_type_exists( 'product' ) )
array_push( $array, 'product' );
return $array;
}
}
if ( apply_filters( 'hu_wc_basic_support', false ) ) {
return;
}
//do not show default shop title, we'll do it
add_filter( 'woocommerce_show_page_title', '__return_false' );
add_filter( 'hu_in_wrapper_page_title', 'hu_print_woocommerce_page_title' );
if ( !function_exists('hu_print_woocommerce_page_title') ) {
function hu_print_woocommerce_page_title( $title ) {
if ( function_exists('is_woocommerce') && is_woocommerce() && function_exists('woocommerce_page_title') ) {
?>
<div class="page-title hu-pad group">
<?php if ( is_single() ):
global $product;
if ( isset($product) ) :
$product = !( is_object ($product ) && ( $product instanceof WC_Product ) ) ? wc_get_product( get_the_ID() ) : $product;
$review_enabled = get_option( 'woocommerce_enable_review_rating' ) !== 'no';
$review_count = $review_enabled ? $product->get_review_count() : '';
$product_id = method_exists( $product, 'get_id' ) ? $product->get_id() : $product->id;
$categories = function_exists( 'wc_get_product_category_list' ) ? wc_get_product_category_list( $product_id, '<span>/</span>' ) : $product->get_categories( '<span>/</span>' );
?>
<ul class="meta-single group">
<li class="category category_products"><?php echo $categories ?></li>
<?php if ( comments_open() && ( hu_is_checked( 'comment-count' ) ) && $review_enabled ): ?>
<li class="comments rewiews"><a href="#reviews" class="woocommerce-review-link" rel="nofollow"><i class="far fa-star"></i><?php echo $review_count ? '<span itemprop="reviewCount" class="count">'.$review_count.'</span>' : '' ?></a></li>
<?php endif /*comments_open*/ ?>
</ul>
<?php endif /*isset( $product )*/ ?>
<?php else: ?>
<h1><?php woocommerce_page_title() ?></h1>
<?php endif ?>
</div><!--/.page-title-->
<?php
}
}
}
add_filter( 'hu_in_wrapper_container_class', 'hu_add_woocommerce_context' );
if ( !function_exists( 'hu_add_woocommerce_context' ) ) {
function hu_add_woocommerce_context( $classes ) {
if ( function_exists('is_woocommerce') && is_woocommerce() ) {
array_push( $classes, 'woocommerce' );
}
return $classes;
}
}
//add icons to the tab titles
foreach ( array( 'description', 'additional_information', 'reviews' ) as $filter_key ) {
add_filter("woocommerce_product_{$filter_key}_tab_title", "hu_wc_{$filter_key}_tab_title" );
}
if ( !function_exists( 'hu_wc_description_tab_title' ) ) {
function hu_wc_description_tab_title( $title ){
return '<i class="fas fa-pencil-alt"></i>' . $title;
}
}
if ( !function_exists( 'hu_wc_additional_information_tab_title' ) ) {
function hu_wc_additional_information_tab_title( $title ){
return '<i class="fas fa-info"></i>' . $title;
}
}
if ( !function_exists( 'hu_wc_reviews_tab_title' ) ) {
function hu_wc_reviews_tab_title( $title ) {
if ( apply_filters( 'hu_wc_experimental_reviews_tab_title', true ) ) {
global $product;
if ( isset( $product ) ) {
$review_count = isset( $product ) ? $product->get_review_count() : '';
$review_count_search = !empty($review_count) ? "($review_count)" : '';
$review_count_replace = !empty($review_count) ? "<span>$review_count</span>" : '';
$title = trim( str_replace($review_count_search, '', $title) ) . $review_count_replace;
}
}
return '<i class="fas fa-star"></i>' . $title;
}
}
//add specific dynamic style selectors
foreach ( array(
'primary_color_color',
'primary_color_background_color',
'primary_color_border_bottom_color',
'secondary_color_background_color',
) as $filter_key ) {
add_filter( "hu_dynamic_{$filter_key}_prop_selectors", "hu_wc_{$filter_key}_prop_selectors" );
}
if ( !function_exists( 'hu_wc_primary_color_color_prop_selectors' ) ) {
/*
* @param array $selectors
* return array $selectors
*/
function hu_wc_primary_color_color_prop_selectors( $selectors ) {
array_push( $selectors, '.entry.woocommerce div.product .woocommerce-tabs ul.tabs li.active a' );
return $selectors;
}
}
if ( !function_exists( 'hu_wc_primary_color_background_color_prop_selectors' ) ) {
/*
* @param array $selectors
* return array $selectors
*/
function hu_wc_primary_color_background_color_prop_selectors( $selectors ) {
array_push( $selectors,
'.themeform .woocommerce #respond input#submit.alt',
'.themeform .woocommerce a.button.alt',
'.themeform .woocommerce button.button.alt',
'.themeform .woocommerce input.button.alt'
);
return $selectors;
}
}
if ( !function_exists( 'hu_wc_primary_color_border_bottom_color_prop_selectors' ) ) {
/*
* @param array $selectors
* return array $selectors
*/
function hu_wc_primary_color_border_bottom_color_prop_selectors( $selectors ) {
array_push( $selectors, '.entry.woocommerce div.product .woocommerce-tabs ul.tabs li.active a' );
return $selectors;
}
}
if ( !function_exists( 'hu_wc_secondary_color_background_color_prop_selectors' ) ) {
/*
* @param array $selectors
* return array $selectors
*/
function hu_wc_secondary_color_background_color_prop_selectors( $selectors ) {
array_push( $selectors,
'.themeform .woocommerce #respond input#submit',
'.themeform .woocommerce a.button',
'.themeform .woocommerce button.button',
'.themeform .woocommerce input.button'
);
return $selectors;
}
}
}
/**
* WP PageNavi compat hoks
*/
function hu_set_wp_pagenavi_compat() {
/* WP-PageNavi support - @devinsays (via GitHub)
/* ------------------------------------ */
if ( !function_exists( 'hu_deregister_wp_pagenavi_style' ) ) {
function hu_deregister_wp_pagenavi_style() {
wp_deregister_style( 'wp-pagenavi' );
}
}
add_action( 'wp_print_styles', 'hu_deregister_wp_pagenavi_style', 100 );
}
/**
* HELPER
* Check whether the plugin is active by checking the active_plugins list.
* copy of is_plugin_active declared in wp-admin/includes/plugin.php
*
*
* @param string $plugin Base plugin path from plugins directory.
* @return bool True, if in the active plugins list. False, not in the list.
*/
function hu_is_plugin_active( $plugin ) {
return in_array( $plugin, (array) get_option( 'active_plugins', array() ) ) || hu_is_plugin_active_for_network( $plugin );
}
/**
* HELPER
* Check whether the plugin is active for the entire network.
* copy of is_plugin_active_for_network declared in wp-admin/includes/plugin.php
*
*
* @param string $plugin Base plugin path from plugins directory.
* @return bool True, if active for the network, otherwise false.
*/
function hu_is_plugin_active_for_network( $plugin ) {
if ( !is_multisite() )
return false;
$plugins = get_site_option( 'active_sitewide_plugins');
if ( isset($plugins[$plugin]) )
return true;
return false;
}
/*
/* Theme's wrappers (used by WooCommerce e.g.)
/* ------------------------------------ */
function hu_theme_wrapper_start() {
echo '<main class="content" id="content">';
if ( $page_title = apply_filters( 'hu_in_wrapper_page_title', '' ) )
echo $page_title;
echo '<div class="hu-pad themeform">';
printf( '<div class="%s">', implode(' ', apply_filters( 'hu_in_wrapper_container_class', array('group', 'entry' ) ) ) );
}
function hu_theme_wrapper_end() {
echo '</div>';
echo '</div>';
echo '</main>';
}
/* WFC Compatibility code */
/*
* Add theme localized selector titles
*/
add_filter( 'tc_default_selector_title_map', 'hu_wfc_selector_title' );
function hu_wfc_selector_title( $_list) {
$_hu_list = array(
'top_menu_items' => __( 'Top-Menu items' , 'hueman' ),
'slider_title' => __( 'Slider title', 'hueman' ),
'slider_subtitle' => __( 'Slider subtitle', 'hueman' ),
'slider_button' => __( 'Slider button', 'hueman' ),
//'marketing' => __( 'Featured Pages', 'hueman' ),
'single_post_title' => __( 'Single Post titles' , 'hueman' ),
'single_page_title' => __( 'Single Page titles' , 'hueman' ),
'post_content' => __( 'Post/Page content' , 'hueman' ),
'post_excerpt' => __( 'Post/Page excerpt' , 'hueman' ),
'post_lists' => __( 'Lists in post/pages' , 'hueman' ),
'single_category_meta' => __( 'Single Post Categories meta' , 'hueman' ),
'single_tag' => __( 'Single Post tags' , 'hueman' ),
'archive_type_titles' => __( 'Archive Type Title' , 'hueman' ),
'postlist_post_metas' => __( 'Post list post metas' , 'hueman' ),
'postlist_category_meta' => __( 'Post list category meta' , 'hueman' ),
'single_tags' => __( 'Single post tags' , 'hueman' ),
'comment_meta' => __( 'Comments metas' , 'hueman' ),
'sidebars_top' => __( 'Sidebar Top Boxes' , 'hueman' ),
'footer_social_links' => __( 'Footer Social Links', 'hueman' )
);
return array_merge( $_list, $_hu_list );
}
/*
* Do not add specific FP zone for the moment
*/
//add_filter( 'tc_font_customizer_zone_map', 'hu_wfc_zone_map' );
function hu_wfc_zone_map( $zone_map ) {
$_hu_zone_map = array(
'marketing' => array('full-layout' , __( 'Featured pages' , 'hueman' ))
);
return array_merge( $zone_map, $_hu_zone_map );
}
/* FPU Compatibility code */
/*
* Custom CSS
*/
add_action( 'fpu_enqueue_plug_resource_after', 'hu_fpu_enqueue_custom_css' );
function hu_fpu_enqueue_custom_css() {
$_fpu_style = apply_filters( 'hu_fpu_custom_css', hu_fpu_custom_css() );
wp_add_inline_style( 'fpu-front-style', $_fpu_style );
}
function hu_fpu_custom_css() {
/* Hueman compatibility CSS */
return '#wrapper > .fpc-marketing,
header + .fpc-marketing {
padding-bottom: 30px;
}
#wrapper > .fpc-marketing {
margin-bottom: 0px;
}
#wrapper header + .fpc-container.fpc-marketing {
margin-top: -50px;
margin-bottom: 60px;
}
.fpc-marketing + .featurette-divider.__after_header,
.fpc-marketing + .featurette-divider.__before_header,
.fpc-marketing + .featurette-divider.__before_footer {
display: none;
}';
/* End Hueman compatibility CSS*/
}
/* Add fpu backward compatibility hook */
add_filter( 'tc_fpc_get_opt_tc_fp_position' , 'hu_set_fp_position_compatibility' );
function hu_set_fp_position_compatibility( $_option_value ) {
if ( 'loop_start' == $_option_value && hu_is_checked('featured-posts-enabled') && is_home() ) {
return '__before_featured';
}
return $_option_value;
}
/*End FPU Compatibility */
/**
* Polylang compat hooks
*/
function hu_set_polylang_compat() {
/**
* Tax filtering (home/blog posts filtered by cat)
* @param array of term ids
*/
function hu_pll_translate_tax( $term_ids ){
if ( !( is_array( $term_ids ) && !empty( $term_ids ) ) || !function_exists( 'pll_get_term' ) )
return $term_ids;
$translated_terms = array();
foreach ( $term_ids as $id ){
$translated_term = pll_get_term( $id );
$translated_terms[] = $translated_term ? $translated_term : $id;
}
return array_unique( $translated_terms );
}
if ( !is_admin() ) {
//Translate category ids for the filtered posts in home/blog
add_filter('hu_opt_blog-restrict-by-cat', 'hu_pll_translate_tax');
}
/*end tax filtering*/
}
/**
* WPML compat hooks
*/
function hu_set_wpml_compat() {
//Wras wpml_object_id in a more convenient function which recursevely translates array of values
//$object can be an array or a single value
function hu_fn_wpml_object_id( $object_id, $type ) {
if ( empty( $object_id ) )
return $object_id;
if ( is_array( $object_id ) )
return array_map( 'hu_fn_wpml_object_id', $object_id, array_fill( 0, sizeof( $object_id ), $type ) );
return apply_filters( 'wpml_object_id', $object_id, $type, true );
}
/**
* Cat filtering (home/blog posts filtered by cat)
*
* AFAIK wpml needs to exactly know which kind of tax we're looking for, category, tag ecc..
* @param array of term ids
*/
function hu_wpml_translate_cat( $cat_ids ){
if ( !( is_array( $cat_ids ) && !empty( $cat_ids ) ) )
return $cat_ids;
return array_unique( hu_fn_wpml_object_id( $cat_ids, 'category' ) );
}
if ( !is_admin() ) {
//Translate category ids for the filtered posts in home/blog
add_filter('hu_opt_blog-restrict-by-cat', 'hu_wpml_translate_cat');
}
/*end tax filtering*/
}
@@ -0,0 +1,481 @@
<?php
/* ------------------------------------------------------------------------- *
* SIDEBAR OPTION RETRO COMPATIBILITY
/* ------------------------------------------------------------------------- */
//backup the sidebar_widgets as they are before the migration
//if something wrong happens, we'll be able to restore them with wp_set_sidebars_widgets()
//and to remove the potential _orphaned generated
add_action( 'after_switch_theme', 'hu_backup_sidebars', 0 );
function hu_backup_sidebars() {
$sidebars_widgets = get_theme_mod( 'sidebars_widgets' );
$data = isset($sidebars_widgets['data']) ? $sidebars_widgets['data'] : array();
if ( !get_transient( '_hu_sidebar_backup' ) )
set_transient( '_hu_sidebar_backup', $data, 24 * 3600 * 365 * 20 );
}
//get the previous locations and contexts and turn them into new options
add_filter('hu_implement_options_compat', 'hu_filter_add_new_sidebar_options');
//hook : hu_implement_options_compat
function hu_filter_add_new_sidebar_options( $__options ) {
//generates the default widget zone options
$_default_locations = hu_get_builtin_widget_zones_location();
$builtin_zones = array();
foreach ( hu_get_default_widget_zones() as $_zone_id => $_data ) {
$_locs = hu_get_old_locations($_zone_id, $__options);
if ( empty($_locs) && isset($_default_locations[$_zone_id]) ) {
$_locs[] = key($_default_locations[$_zone_id]);
}
$_contexts = hu_get_old_contexts($_zone_id, $__options);
if ( empty($_contexts) && isset($_default_locations[$_zone_id]) ) {
$_contexts[] = ('_all_');
}
$builtin_zones[] = array(
'id' => $_data['id'],
'title' => $_data['name'],
'contexts' => $_contexts,
'locations' => $_locs,
'is_builtin' => true,
'description' => $_data['description']
);
}
//generates the custom widget zone options
$_old_custom_zone_opt = isset( $__options['sidebar-areas'] ) ? $__options['sidebar-areas'] : array();
$custom_zones = array();
if ( !empty($_old_custom_zone_opt) ) {
//array( 'title' => string, 'id' => string )
foreach ( $_old_custom_zone_opt as $_zone ) {
if ( !isset($_zone['id']) )
continue;
$_zone_id = $_zone['id'];
//get the default location
$_locs = hu_get_old_locations($_zone_id, $__options);
$_contexts = hu_get_old_contexts($_zone_id, $__options);
$custom_zones[] = array(
'id' => $_zone['id'],
'title' => $_zone['title'],
'contexts' => $_contexts,
'locations' => $_locs,
);
}//foreach
}//if
//make sure the previous "rules" for sidebars and respected
$_new_sb_areas_opts = hu_clean_old_sidebar_options( array_merge( $builtin_zones, $custom_zones ), $__options );
$__options['sidebar-areas'] = $_new_sb_areas_opts;
return $__options;
}
//helper used to re-build the sidebar-areas option from defaults if the option is empty or has been deleted for some reasons
function hu_generate_new_sidebar_options() {
//generates the default widget zone options
$_default_locations = hu_get_builtin_widget_zones_location();
$builtin_zones = array();
foreach ( hu_get_default_widget_zones() as $_zone_id => $_data ) {
$_locs = array();
if ( isset($_default_locations[$_zone_id]) ) {
$_locs[] = key($_default_locations[$_zone_id]);
}
$_contexts = array();
if ( isset($_default_locations[$_zone_id]) ) {
$_contexts[] = ('_all_');
}
$builtin_zones[] = array(
'id' => $_data['id'],
'title' => $_data['name'],
'contexts' => $_contexts,
'locations' => $_locs,
'is_builtin' => true,
'description' => $_data['description']
);
}
return $builtin_zones;
}
function hu_get_old_locations( $_zone_id, $__options) {
$locations = array();
$_old_sd_options = array(
's1-home',
's2-home',
's1-single',
's2-single',
's1-archive',
's2-archive',
's1-archive-category',
's2-archive-category',
's1-search',
's2-search',
's1-404',
's2-404',
's1-page',
's2-page'
);
//the following zones are assigned to fixed locations
//primary, secondary, footer-*, header-ads, footer-ads could be assigned to s1 and s2 previously but they were always assigned in any cases to their respective default location
//user will be able to change this with the new options
//edge case : a user who had assigned the footer-1 to the s1 location on home will loose this setting
//=> the fix is to create a new zone, and select the home context + assign it to the s1 (right sidebar) location
$_fixed_locations = array(
's1' => 'primary',
's2' => 'secondary',
'header-ads' => 'header-ads',
'footer-ads' => 'footer-ads',
'footer-1' => 'footer-1',
'footer-2' => 'footer-2',
'footer-3' => 'footer-3',
'footer-4' => 'footer-4'
);
if ( in_array($_zone_id, $_fixed_locations) ) {
$locations[] = array_search($_zone_id, $_fixed_locations);
return $locations;
}
foreach ($_old_sd_options as $opt_name) {
//does the option exists ?
if( !array_key_exists($opt_name, $__options) )
continue;
//if exists, grab its value
$value = $__options[$opt_name];
if ( $value != $_zone_id )
continue;
//we have a match, extract the location if not already there
$loc = substr($opt_name, 0, 2);
if ( !in_array($loc, $locations) )
$locations[] = $loc;
}
return $locations;
}
function hu_get_old_contexts( $_zone_id, $__options) {
$contexts = array();
$_old_sd_options = array(
's1-home',
's2-home',
's1-single',
's2-single',
's1-archive',
's2-archive',
's1-archive-category',
's2-archive-category',
's1-search',
's2-search',
's1-404',
's2-404',
's1-page',
's2-page'
);
$_default_contexts = array();
//populates the map with the contexts
foreach ( hu_get_contexts_list() as $c => $title ) {
if ( '_all_' == $c )
continue;
$_default_contexts[] = $c;
}
//the following zones are assigned to fixed contexts
//user will be able to change this with the new options
//edge case : a user who had assigned the footer-1 to the s1 location on home will loose this setting
//=> the fix is to create a new zone, and select the home context + assign it to the s1 (right sidebar) location
$_fixed_contexts = array(
'primary',
'secondary',
'header-ads',
'footer-ads',
'footer-1',
'footer-2',
'footer-3',
'footer-4'
);
if ( in_array($_zone_id, $_fixed_contexts) ) {
$contexts = $_default_contexts;
return $contexts;
}
foreach ($_old_sd_options as $opt_name) {
//does the option exists ?
if( !array_key_exists($opt_name, $__options) )
continue;
//if exists, grab its value
$value = $__options[$opt_name];
if ( $value != $_zone_id )
continue;
//we have a match, extract the context if not already there
$con = substr($opt_name, 3);
if ( !in_array($con, $contexts) )
$contexts[] = $con;
}
return $contexts;
}
//SIDEBAR RULES FOR THE MIGRATIONS
//
//Locations s1 and s2, for a given context :
// 1) can only have one widget zone assigned
// 2) fallback on primary (for s1) and secondary (for s2) if no widget zone is assigned.
//
//Zones footer-*, header-ads, footer-ads, primary, secondary :
// 1) could be assigned to s1 and s2 in specific contexts
// 2) are now always assigned to their default locations in all contexts
function hu_clean_old_sidebar_options( $_new_sb_opts, $__options ) {
//for s1 and s2, create an array of context => array( 's1' => [ widget_zones ], 's2' => [widget_zones] );
//and for each one, determine who is the winner
$_old_sd_options = array(
's1-home',
's2-home',
's1-single',
's2-single',
's1-archive',
's2-archive',
's1-archive-category',
's2-archive-category',
's1-search',
's2-search',
's1-404',
's2-404',
's1-page',
's2-page'
);
$_default_zone_for_sidebars = array(
's1' => 'primary',
's2' => 'secondary'
);
$_forbidden_zones_for_sidebars = array(
'header-ads',
'footer-ads',
'footer-1',
'footer-2',
'footer-3',
'footer-4'
);
//make sure that s1 and s2 have only one widget zone for a given context
foreach ($_old_sd_options as $opt_name) {
//is the option defined ?
if( !array_key_exists($opt_name, $__options) )
continue;
//get previous settings
$_loc = substr($opt_name, 0, 2);//is always s1 or s2
$_con = substr($opt_name, 3 );
$_user_zone_id = $__options[$opt_name];
//if no zone was assigned to this location-context, then continue
if ( empty($_user_zone_id ) || !$_user_zone_id )
continue;
//is the zone different than the default one?
//if not, continue
if ( $_user_zone_id == $_default_zone_for_sidebars[$_loc] )
continue;
//if the zone belongs to the forbidden zones, then continue because this is not supported for the migration
//for example, the migration won't support a footer-1 assigned to s1
if ( in_array($_user_zone_id, $_forbidden_zones_for_sidebars) )
continue;
//loop on the new options and fix
//if a zone different than the default (primary or secondary) was assigned to s1 or s2 on a given context, then remove this context from its context list
$_zone_to_modify = $_default_zone_for_sidebars[$_loc];
foreach ($_new_sb_opts as $key => $data) {
//don't take any risk...
if ( !is_array($data) || !array_key_exists('id', $data) || !array_key_exists('locations', $data) || !array_key_exists('contexts', $data) )
continue;
if ( $_zone_to_modify != $data['id'] )
continue;
//remove the context from the list
$_key_to_remove = array_search($_con, $data['contexts']);
unset($_new_sb_opts[$key]['contexts'][$_key_to_remove]);
}//foreach
}//foreach
return $_new_sb_opts;
}
//fired early
//@param $_options = get_option( HU_THEME_OPTIONS )
//handles the transfer from option tree to customizer
//=> as of v3.0.10, options have been moved from option tree to customizer to be compliant with the wp.org theme guidelines
function hu_maybe_transfer_option_tree_to_customizer( $_options ) {
$copy_option_tree = isset( $_GET['copy_option_tree'] );
//have the option already been copied ?
if ( isset($_options['has_been_copied']) && true === $_options['has_been_copied'] && !$copy_option_tree )
return;
$_old_options = get_option( 'option_tree' );
$_old_options = ( false == $_old_options || empty($_old_options) ) ? array() : $_old_options;
//if not then grab the options from option tree and copy them into the new option raw
//Ensure compatibility for some options like sidebar-areas + s1*, s2*options
$_opt_to_copy = apply_filters('hu_implement_options_compat', $_old_options );
update_option(
HU_THEME_OPTIONS,
array_merge( $_opt_to_copy, array('has_been_copied' => true) )
);
}
//fired early
//@return void()
//@param $_options = get_option( HU_THEME_OPTIONS )
//handles the transition to the WP custom_logo support introduced in wp 4.5.
//Several cases :
//1) user had defined a custom logo with the previous Hueman option
//=> the option has to be copied to WP custom_logo theme mod
//=> display-header-logo set to true
//2) user had not defined a custom logo in Hueman
//=> display-header-logo set to false
function hu_maybe_copy_logo_to_theme_mod( $_options ) {
//keep using the old logo if WP version < 4.5
if ( !function_exists( 'the_custom_logo' ) )
return;
$_old_custom_logo_exists = isset($_options['custom-logo']) && false != $_options['custom-logo'] && !empty($_options['custom-logo']);
if ( $_old_custom_logo_exists ) {
set_theme_mod( 'custom_logo', $_options['custom-logo'] );
$_options['display-header-logo'] = 1;
unset($_options['custom-logo']);
update_option( HU_THEME_OPTIONS, $_options );
}
}
//hook : hu_init_options_done
//=> this hook is invoked in Utils::hu_init_properties(), when started_using_hueman transient has been set
function hu_update_option_backward_compat() {
//copy old options from option tree framework into new option raw 'hu_theme_options'
//copy logo from previous to custom_logo introduced in wp 4.5
//only if user is logged in
if ( is_user_logged_in() && current_user_can( 'edit_theme_options' ) ) {
$_options = get_option( HU_THEME_OPTIONS );
hu_maybe_transfer_option_tree_to_customizer( $_options );
hu_maybe_copy_logo_to_theme_mod( $_options );
}
}
add_action( 'hu_init_options_done', 'hu_update_option_backward_compat' );
/* Backward compatibility. Typically useful for users of child themes using old function names. */
if ( !function_exists('alx_layout_class') ) {
function alx_layout_class() {
return hu_get_layout_class();
}
}
if ( !function_exists('alx_social_links') ) {
function alx_social_links() {
return hu_print_social_links();
}
}
if ( !function_exists('alx_site_title') ) {
function alx_site_title() {
return hu_site_title();
}
}
if ( !function_exists('alx_blog_title') ) {
function alx_blog_title() {
return hu_blog_title();
}
}
if ( !function_exists('alx_page_title') ) {
function alx_page_title() {
return hu_get_page_title();
}
}
if ( !function_exists('alx_post_images') ) {
function alx_post_images() {
return hu_post_images();
}
}
if ( !function_exists('alx_related_posts') ) {
function alx_related_posts() {
return hu_get_related_posts();
}
}
if ( !function_exists('hu_related_posts')) {
function hu_related_posts() {
return hu_get_related_posts();
}
}
if ( !function_exists('alx_sidebar_secondary') ) {
function alx_sidebar_secondary() {
return 'secondary';
}
}
if ( !function_exists('alx_sidebar_primary') ) {
function alx_sidebar_primary() {
return 'primary';
}
}
if ( !function_exists('alx_sidebar_primary') ) {
function alx_sidebar_primary() {
return 'primary';
}
}
if ( !function_exists( 'hu_get_placeholder_thumb' ) ) {
function hu_get_placeholder_thumb( $_requested_size = 'thumb-medium' ) {
return hu_print_placeholder_thumb( $_requested_size );
}
}
@@ -0,0 +1,264 @@
<?php
/* Loads Custom Widgets
/* ------------------------------------ */
// June 2019 : Hueman widgets can now be overriden from a child theme
// @see https://github.com/presscustomizr/hueman/issues/798
locate_template( 'functions/widgets/alx-tabs.php', true );
locate_template( 'functions/widgets/alx-video.php', true );
locate_template( 'functions/widgets/alx-posts.php', true );
/* Register sidebars
/* ------------------------------------ */
//@return the array of built-in widget zones
function hu_get_default_widget_zones() {
return array(
'primary' => array(
'name' => __( 'Primary', 'hueman' ),
'id' => 'primary',
'description' => __( "Full width widget zone. Located in the left sidebar in a 3 columns layout. Can be on the right of a 2 columns sidebar when content is on the left.", 'hueman'),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
),
'secondary' => array(
'name' => __( 'Secondary', 'hueman' ),
'id' => 'secondary',
'description' => __( "Full width widget zone. Located in the right sidebar in a 3 columns layout.", 'hueman'),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>'
),
'footer-1' => array(
'name' => __( 'Footer 1', 'hueman'),
'id' => 'footer-1',
'description' => __( "Widgetized footer 1", 'hueman'),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>'
),
'footer-2' => array(
'name' => __('Footer 2', 'hueman' ),
'id' => 'footer-2',
'description' => __("Widgetized footer 2", 'hueman' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>'
),
'footer-3' => array(
'name' => __('Footer 3', 'hueman' ),
'id' => 'footer-3',
'description' => __("Widgetized footer 3", 'hueman' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>'
),
'footer-4' => array(
'name' => __('Footer 4', 'hueman' ),
'id' => 'footer-4',
'description' => __("Widgetized footer 4", 'hueman' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widget-title">','after_title' => '</h3>'
),
'header-ads' => array(
'name' => __( 'Header (next to logo / title)', 'hueman' ),
'id' => 'header-ads',
'description' => __( "The Header Widget Zone is located next to your logo or site title.", 'hueman'),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>'
),
'footer-ads' => array(
'name' => __('Footer Full Width', 'hueman'),
'id' => 'footer-ads',
'description' => __( "The Footer Widget Zone is located before the other footer widgets and takes 100% of the width. Very appropriate to display a Google Map or an advertisement banner.", 'hueman'),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>'
)
);
}
//@return an array of default widgets ids
function hu_get_widget_zone_ids() {
$widgets = hu_get_default_widget_zones();
return array_keys( $widgets );
}
//@return an array of widget option names
function hu_get_registered_widgets_option_names() {
global $wp_registered_widgets;
$opt_names = array();
foreach ($wp_registered_widgets as $id => $data ) {
if ( !isset($data['callback']) || !isset($data['callback'][0]) || !isset($data['callback'][0] -> option_name ) )
continue;
if ( !in_array( $data['callback'][0] -> option_name, $opt_names ) )
array_push( $opt_names, $data['callback'][0] -> option_name );
}
return $opt_names;
}
//@return the array describing the previous correspondance between location => widget zone name
function hu_get_widget_zone_rosetta_stone() {
return array(
's1' => 'primary',
's2' => 'secondary',
'header-ads' => 'header-ads',
'footer-ads' => 'footer-ads',
'footer-1' => 'footer-1',
'footer-2' => 'footer-2',
'footer-3' => 'footer-3',
'footer-4' => 'footer-4'
);
}
//helper
//@return array()
//used both on front end and in the customizer
function hu_get_contexts_list() {
return array(
'_all_' => __('All contexts', 'hueman'),
'home' => __('Home', 'hueman'),
'blog-page' => __('Blog Page', 'hueman'),
'page' => __('Pages', 'hueman'),
'single' => __('Single Posts', 'hueman'),
'archive' => __('Archives', 'hueman'),
'archive-category' => __('Categories', 'hueman'),
'search' => __('Search Results', 'hueman'),
'404' => __('404 Error Pages', 'hueman')
);
}
//the original mapping (s1 and s2) has to be kept since it is used in many places
//widget_zone_name => location, title
function hu_get_builtin_widget_zones_location() {
return array(
'primary' => array( 's1' => __('Primary Sidebar (on the left in a 3 columns layout)', 'hueman') ),
'secondary' => array( 's2' => __('Secondary Sidebar (on the right in a 3 columns layout)', 'hueman') ),
'footer-1' => array( 'footer-1' => __('Footer 1', 'hueman') ),
'footer-2' => array( 'footer-2' => __('Footer 2', 'hueman') ),
'footer-3' => array( 'footer-3' => __('Footer 3', 'hueman') ),
'footer-4' => array( 'footer-4' => __('Footer 4', 'hueman') ),
'header-ads' => array( 'header-ads' => __('Header (next to logo / title)', 'hueman') ),
'footer-ads' => array( 'footer-ads' => __('Footer Full Width', 'hueman') )
);
}
if ( !function_exists( 'hu_maybe_register_builtin_widget_zones' ) ) :
function hu_maybe_register_builtin_widget_zones() {
$_map = hu_get_default_widget_zones();
foreach ( $_map as $zone_id => $data ) {
register_sidebar( $data );
}
}
endif;
add_action( 'widgets_init', 'hu_maybe_register_builtin_widget_zones' );
/* Register custom sidebars
/* ------------------------------------ */
if ( !function_exists( 'hu_maybe_register_custom_widget_zones' ) ) :
function hu_maybe_register_custom_widget_zones() {
$customized = array();
if ( hu_is_customizing() && isset($_POST['customized']) ) {
$customized = json_decode( wp_unslash( $_POST['customized'] ), true );
if ( isset($customized['hu_theme_options[sidebar-areas]']) )
$sidebars = $customized['hu_theme_options[sidebar-areas]'];
else
$sidebars = hu_get_option('sidebar-areas', array());
}
else {
$sidebars = hu_get_option('sidebar-areas', array());
}
//at this point we need smthg really clean
if ( !is_array($sidebars) || empty( $sidebars ) )
return;
$default_args = array(
'name' => '',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>','before_title' => '<h3 class="widget-title">','after_title' => '</h3>'
);
$default_zones = hu_get_default_widget_zones();
foreach( $sidebars as $sb ) {
if ( !isset($sb['id']) || empty($sb['id']) )
return;
//is it a built-in one?
//=> in this case it's been registered another way
$_id = $sb['id'];
if ( isset( $default_zones[$_id]) )
continue;
$args = wp_parse_args(
array(
'name' => isset($sb['title']) ? ''. esc_attr( $sb['title'] ).'' : '',
'id' => ''. esc_attr( strtolower($sb['id']) ).''
),
$default_args
);
register_sidebar( $args );
}//for each
}
endif;
//add_action( hu_is_customize_preview_frame() ? 'customize_preview_init' : 'widgets_init' , 'hu_maybe_register_custom_widget_zones' );
add_action( 'widgets_init' , 'hu_maybe_register_custom_widget_zones' );
//add_action( 'customize_preview_init' , 'hu_maybe_register_custom_widget_zones' );
//helper
//must be fired after 'wp' to have access to the $wp_query
//"real" because left and right sidebars are always registered
//@return array of locations
function hu_get_available_widget_loc() {
$_available = array();
$_footer_widgets = intval ( hu_get_option('footer-widgets') );
$layout = hu_get_layout_class();
if ( hu_is_checked('header-ads') )
$_available[] = 'header-ads';
if ( hu_is_checked('footer-ads') )
$_available[] = 'footer-ads';
if ( $_footer_widgets >= 1 )
$_available[] = 'footer-1';
if ( $_footer_widgets >= 2 )
$_available[] = 'footer-2';
if ( $_footer_widgets >= 3 )
$_available[] = 'footer-3';
if ( $_footer_widgets >= 4 )
$_available[] = 'footer-4';
//for left and right sidebar, it depends on the $layout class computed with options and post_metas
if ( $layout != 'col-1c' )
$_available[] = 's1';
if ( in_array( $layout, array('col-3cm', 'col-3cm', 'col-3cr' ) ) )
$_available[] = 's2';
return $_available;
}
@@ -0,0 +1,80 @@
<?php
/* ------------------------------------------------------------------------- *
* WP Core Filters
/* ------------------------------------------------------------------------- */
/* Add wmode transparent to media embeds
/* ------------------------------------ */
if ( !function_exists( 'hu_embed_wmode_transparent' ) ) {
function hu_embed_wmode_transparent( $html, $url, $attr ) {
if ( strpos( $html, "<embed src=" ) !== false )
{ return str_replace('</param><embed', '</param><param name="wmode" value="opaque"></param><embed wmode="opaque" ', $html); }
elseif ( strpos ( $html, 'feature=oembed' ) !== false )
{ return str_replace( 'feature=oembed', 'feature=oembed&wmode=opaque', $html ); }
else
{ return $html; }
}
}
add_filter( 'embed_oembed_html', 'hu_embed_wmode_transparent', 10, 3 );
/* Add responsive container to embeds
/* ------------------------------------ */
if ( !function_exists( 'hu_embed_html' ) ) {
function hu_embed_html( $html, $url ) {
if ( !file_exists( ABSPATH . WPINC . '/class-wp-oembed.php' ))
return $html;
require_once( ABSPATH . WPINC . '/class-wp-oembed.php' );
$wp_oembed = _wp_oembed_get_object();
$provider = $wp_oembed -> get_provider( $url, $args = '' );
if ( !$provider || false === $data = $wp_oembed->fetch( $provider, $url, $args ) ) {
return $html;
}
// Check that we have a valid $data object
// for https://wordpress.org/support/topic/error-in-theme-6/
if ( is_object($data) && isset($data->type) ) {
$type = $data->type;
switch( $type ) {
case 'video' :
$html = sprintf('<div class="video-container">%1$s</div>', $html );
break;
}
}
return $html;
}
}
add_filter( 'embed_oembed_html', 'hu_embed_html', 10, 3 );
/* Add responsive container to jetpack embeds
/* ------------------------------------ */
if ( !function_exists( 'hu_embed_html_jp' ) ) {
function hu_embed_html_jp( $html ) {
return '<div class="video-container">' . $html . '</div>';
}
}
add_filter( 'video_embed_html', 'hu_embed_html_jp' );
/* Add shortcode support to text widget
/* ------------------------------------ */
add_action( 'after_setup_theme', 'hu_widget_text_do_shortcode' );
function hu_widget_text_do_shortcode() {
if ( !has_filter( 'widget_text', 'do_shortcode' ) ) {
add_filter( 'widget_text', 'do_shortcode' );
}
}
// WP 5.0.0 compat. until the bug is fixed
// this hook fires before the customize changeset is inserter / updated in database
// Removing the wp_targeted_link_rel callback from the 'content_save_pre' filter prevents corrupting the changeset JSON
// more details in this ticket : https://core.trac.wordpress.org/ticket/45292
add_action( 'customize_save_validation_before' , 'hu_remove_callback_wp_targeted_link_rel' );
function hu_remove_callback_wp_targeted_link_rel() {
if ( false !== has_filter( 'content_save_pre', 'wp_targeted_link_rel' ) ) {
remove_filter( 'content_save_pre', 'wp_targeted_link_rel' );
}
}
@@ -0,0 +1,222 @@
<?php
/*
AlxPosts Widget
License: GNU General Public License v3.0
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Copyright: (c) 2013 Alexander "Alx" AgnarsCopyright: (c) 2013-2015 Alexander "Alx" Agnarson, 2015 Nicolas GUILLAUME (nikeo)
@package AlxPosts
@version 1.0
*/
class AlxPosts extends WP_Widget {
/* Constructor
/* ------------------------------------ */
function __construct() {
parent::__construct(
'alxposts',
__('Hueman Posts', 'hueman'),
array(
'description' => __('Display posts from a category', 'hueman'),
'classname' => 'widget_hu_posts'
)
);
}
public function hu_get_defaults() {
return array(
'title' => '',
// Posts
'posts_thumb' => 1,
'posts_category' => 1,
'posts_date' => 1,
'posts_num' => '4',
'posts_cat_id' => '0',
'posts_orderby' => 'date',
'posts_time' => '0',
);
}
/* Widget
/* ------------------------------------ */
public function widget($args, $instance) {
extract( $args );
$defaults = $this -> hu_get_defaults();
$instance = wp_parse_args( (array) $instance, $defaults );
$title = apply_filters('widget_title',$instance['title']);
$title = empty( $title ) ? '' : $title;
$output = $before_widget."\n";
if( $title || ! empty( $before_title) )
$output .= $before_title.$title.$after_title;
ob_start();
?>
<?php
$posts_query_params = apply_filters( 'hu_posts_widget_query_args', array(
'post_type' => array( 'post' ),
'showposts' => $instance['posts_num'],
'cat' => $instance['posts_cat_id'],
'ignore_sticky_posts' => true,
'orderby' => $instance['posts_orderby'],
'order' => 'dsc',
'date_query' => array(
array(
'after' => $instance['posts_time'],
)
)
) );
$posts = new WP_Query( is_array( $posts_query_params ) ? $posts_query_params : array() );
$date_format = apply_filters( 'hu_posts_widget_date_format', get_option( 'date_format' ) );
?>
<ul class="alx-posts group <?php if($instance['posts_thumb']) { echo 'thumbs-enabled'; } ?>">
<?php
// do not allow the browser to pick a size larger than 'thumb-medium'
if( !function_exists('hu_limit_srcset_img_width_for_thumb_medium') ) {
function hu_limit_srcset_img_width_for_thumb_medium() { return '520'; }
}
// april 2020 : added for https://github.com/presscustomizr/hueman/issues/866
add_filter( 'max_srcset_image_width', 'hu_limit_srcset_img_width_for_thumb_medium' );
?>
<?php while ($posts->have_posts()): $posts->the_post(); ?>
<li>
<?php if($instance['posts_thumb']) { // Thumbnails enabled? ?>
<div class="post-item-thumbnail">
<a href="<?php the_permalink(); ?>">
<?php hu_the_post_thumbnail('thumb-medium'); ?>
<?php if ( has_post_format('video') && !is_sticky() ) echo'<span class="thumb-icon small"><i class="fas fa-play"></i></span>'; ?>
<?php if ( has_post_format('audio') && !is_sticky() ) echo'<span class="thumb-icon small"><i class="fas fa-volume-up"></i></span>'; ?>
<?php if ( is_sticky() ) echo'<span class="thumb-icon small"><i class="fas fa-star"></i></span>'; ?>
</a>
</div>
<?php } ?>
<div class="post-item-inner group">
<?php if($instance['posts_category']) { ?><p class="post-item-category"><?php the_category(' / '); ?></p><?php } ?>
<p class="post-item-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></p>
<?php if($instance['posts_date']) { ?><p class="post-item-date"><?php the_time( $date_format ); ?></p><?php } ?>
</div>
</li>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
<?php remove_filter( 'max_srcset_image_width', 'hu_limit_srcset_img_width_for_thumb_medium' ); ?>
</ul><!--/.alx-posts-->
<?php
$output .= ob_get_clean();
$output .= $after_widget."\n";
echo $output;
}
/* Widget update
/* ------------------------------------ */
public function update($new,$old) {
$instance = $old;
$instance['title'] = strip_tags($new['title']);
// Posts
$instance['posts_thumb'] = $new['posts_thumb']?1:0;
$instance['posts_category'] = $new['posts_category']?1:0;
$instance['posts_date'] = $new['posts_date']?1:0;
$instance['posts_num'] = strip_tags($new['posts_num']);
$instance['posts_cat_id'] = strip_tags($new['posts_cat_id']);
$instance['posts_orderby'] = strip_tags($new['posts_orderby']);
$instance['posts_time'] = strip_tags($new['posts_time']);
return $instance;
}
/* Widget form
/* ------------------------------------ */
public function form($instance) {
// Default widget settings
$defaults = $this -> hu_get_defaults();
$instance = wp_parse_args( (array) $instance, $defaults );
?>
<style>
.widget .widget-inside .alx-options-posts .postform { width: 100%; }
.widget .widget-inside .alx-options-posts p { margin: 3px 0; }
.widget .widget-inside .alx-options-posts hr { margin: 20px 0 10px; }
.widget .widget-inside .alx-options-posts h4 { margin-bottom: 10px; }
</style>
<div class="alx-options-posts">
<p>
<label for="<?php echo esc_attr( $this->get_field_id('title') ); ?>">Title:</label>
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id('title') ); ?>" name="<?php echo esc_attr( $this->get_field_name('title') ); ?>" type="text" value="<?php echo esc_attr( $instance["title"] ); ?>" />
</p>
<h4>List Posts</h4>
<p>
<input type="checkbox" class="checkbox" id="<?php echo esc_attr( $this->get_field_id('posts_thumb') ); ?>" name="<?php echo esc_attr( $this->get_field_name('posts_thumb') ); ?>" <?php checked( (bool) $instance["posts_thumb"], true ); ?>>
<label for="<?php echo esc_attr( $this->get_field_id('posts_thumb') ); ?>">Show thumbnails</label>
</p>
<p>
<label style="width: 55%; display: inline-block;" for="<?php echo esc_attr( $this->get_field_id("posts_num") ); ?>">Items to show</label>
<input style="width:20%;" id="<?php echo esc_attr( $this->get_field_id("posts_num") ); ?>" name="<?php echo esc_attr( $this->get_field_name("posts_num") ); ?>" type="text" value="<?php echo absint($instance["posts_num"]); ?>" size='3' />
</p>
<p>
<label style="width: 100%; display: inline-block;" for="<?php echo esc_attr( $this->get_field_id("posts_cat_id") ); ?>">Category:</label>
<?php wp_dropdown_categories( array( 'name' => $this->get_field_name("posts_cat_id"), 'selected' => $instance["posts_cat_id"], 'show_option_all' => 'All', 'show_count' => true ) ); ?>
</p>
<p style="padding-top: 0.3em;">
<label style="width: 100%; display: inline-block;" for="<?php echo esc_attr( $this->get_field_id("posts_orderby") ); ?>">Order by:</label>
<select style="width: 100%;" id="<?php echo esc_attr( $this->get_field_id("posts_orderby") ); ?>" name="<?php echo esc_attr( $this->get_field_name("posts_orderby") ); ?>">
<option value="date"<?php selected( $instance["posts_orderby"], "date" ); ?>>Most recent</option>
<option value="comment_count"<?php selected( $instance["posts_orderby"], "comment_count" ); ?>>Most commented</option>
<option value="rand"<?php selected( $instance["posts_orderby"], "rand" ); ?>>Random</option>
</select>
</p>
<p style="padding-top: 0.3em;">
<label style="width: 100%; display: inline-block;" for="<?php echo esc_attr( $this->get_field_id("posts_time") ); ?>">Posts from:</label>
<select style="width: 100%;" id="<?php echo esc_attr( $this->get_field_id("posts_time") ); ?>" name="<?php echo esc_attr( $this->get_field_name("posts_time") ); ?>">
<option value="0"<?php selected( $instance["posts_time"], "0" ); ?>>All time</option>
<option value="1 year ago"<?php selected( $instance["posts_time"], "1 year ago" ); ?>>This year</option>
<option value="1 month ago"<?php selected( $instance["posts_time"], "1 month ago" ); ?>>This month</option>
<option value="1 week ago"<?php selected( $instance["posts_time"], "1 week ago" ); ?>>This week</option>
<option value="1 day ago"<?php selected( $instance["posts_time"], "1 day ago" ); ?>>Past 24 hours</option>
</select>
</p>
<hr>
<h4>Post Info</h4>
<p>
<input type="checkbox" class="checkbox" id="<?php echo esc_attr( $this->get_field_id('posts_category') ); ?>" name="<?php echo esc_attr( $this->get_field_name('posts_category') ); ?>" <?php checked( (bool) $instance["posts_category"], true ); ?>>
<label for="<?php echo esc_attr( $this->get_field_id('posts_category') ); ?>">Show categories</label>
</p>
<p>
<input type="checkbox" class="checkbox" id="<?php echo esc_attr( $this->get_field_id('posts_date') ); ?>" name="<?php echo esc_attr( $this->get_field_name('posts_date') ); ?>" <?php checked( (bool) $instance["posts_date"], true ); ?>>
<label for="<?php echo esc_attr( $this->get_field_id('posts_date') ); ?>">Show dates</label>
</p>
<hr>
</div>
<?php
}
}
/* Register widget
/* ------------------------------------ */
if ( ! function_exists( 'hu_register_widget_posts' ) ) {
function hu_register_widget_posts() {
register_widget( 'AlxPosts' );
}
}
add_action( 'widgets_init', 'hu_register_widget_posts' );
@@ -0,0 +1,456 @@
<?php
/*
AlxTabs Widget
License: GNU General Public License v3.0
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Copyright: (c) 2013-2015 Alexander "Alx" Agnarson, 2015 Nicolas GUILLAUME (nikeo)
@package AlxTabs
@version 1.0
*/
class AlxTabs extends WP_Widget {
/* Constructor
/* ------------------------------------ */
function __construct() {
parent::__construct(
'alxtabs',
__('Hueman Dynamic Tabs', 'hueman'),
array(
'description' => __('List posts, comments, and/or tags with or without tabs.', 'hueman'),
'classname' => 'widget_hu_tabs'
)
);
}
public function hu_get_defaults() {
return array(
'title' => '',
'tabs_category' => 1,
'tabs_date' => 1,
// Recent posts
'recent_enable' => 1,
'recent_thumbs' => 1,
'recent_cat_id' => '0',
'recent_num' => '5',
// Popular posts
'popular_enable' => 1,
'popular_thumbs' => 1,
'popular_cat_id' => '0',
'popular_time' => '0',
'popular_num' => '5',
// Recent comments
'comments_enable' => 1,
'comments_avatars' => 1,
'comments_num' => '5',
// Tags
'tags_enable' => 1,
// Order
'order_recent' => '1',
'order_popular' => '2',
'order_comments' => '3',
'order_tags' => '4',
);
}
/* Create tabs-nav
/* ------------------------------------ */
private function _create_tabs($tabs,$count) {
// Borrowed from Jermaine Maree, thanks mate!
$titles = array(
'recent' => __('Recent Posts','hueman'),
'popular' => __('Popular Posts','hueman'),
'comments' => __('Recent Comments','hueman'),
'tags' => __('Tags','hueman')
);
$icons = array(
'recent' => 'far fa-clock',
'popular' => 'fas fa-star',
'comments' => 'far fa-comments',
'tags' => 'fas fa-tags'
);
$output = sprintf('<ul class="alx-tabs-nav group tab-count-%s">', $count);
foreach ( $tabs as $tab ) {
$output .= sprintf('<li class="alx-tab tab-%1$s"><a href="#tab-%2$s" title="%4$s"><i class="%3$s"></i><span>%4$s</span></a></li>',
$tab,
$tab . '-' . $this -> number,
$icons[$tab],
$titles[$tab]
);
}
$output .= '</ul>';
return $output;
}
/* Widget
/* ------------------------------------ */
public function widget($args, $instance) {
extract( $args );
$defaults = $this -> hu_get_defaults();
$instance = wp_parse_args( (array) $instance, $defaults );
$title = apply_filters('widget_title',$instance['title']);
$title = empty( $title ) ? '' : $title;
$output = $before_widget."\n";
if( $title || ! empty( $before_title) )
$output .= $before_title.$title.$after_title;
ob_start();
/* Set tabs-nav order & output it
/* ------------------------------------ */
$tabs = array();
$count = 0;
$order = array(
'recent' => $instance['order_recent'],
'popular' => $instance['order_popular'],
'comments' => $instance['order_comments'],
'tags' => $instance['order_tags']
);
asort($order);
foreach ( $order as $key => $value ) {
if ( $instance[$key.'_enable'] ) {
$tabs[] = $key;
$count++;
}
}
if ( $tabs && ($count > 1) ) { $output .= $this->_create_tabs($tabs,$count); }
?>
<div class="alx-tabs-container">
<?php if($instance['recent_enable']) { // Recent posts enabled? ?>
<?php
$recent_query_params = apply_filters( 'hu_tabs_widget_recent_query_args', array(
'post_type' => array( 'post' ),
'showposts' => $instance["recent_num"],
'cat' => $instance['recent_cat_id'],
'ignore_sticky_posts' => true
) );
$recent = new WP_Query( is_array( $recent_query_params ) ? $recent_query_params : array() );
?>
<ul id="tab-recent-<?php echo $this -> number ?>" class="alx-tab group <?php if($instance['recent_thumbs']) { echo 'thumbs-enabled'; } ?>">
<?php
// do not allow the browser to pick a size larger than 'thumb-small'
if( !function_exists('hu_limit_srcset_img_width_for_thumb_small') ) {
function hu_limit_srcset_img_width_for_thumb_small() { return '80'; }
}
// april 2020 : added for https://github.com/presscustomizr/hueman/issues/866
add_filter( 'max_srcset_image_width', 'hu_limit_srcset_img_width_for_thumb_small' );
?>
<?php while ($recent->have_posts()): $recent->the_post(); ?>
<li>
<?php if($instance['recent_thumbs']) { // Thumbnails enabled? ?>
<div class="tab-item-thumbnail">
<a href="<?php the_permalink(); ?>">
<?php hu_the_post_thumbnail('thumb-small'); ?>
<?php if ( has_post_format('video') && !is_sticky() ) echo'<span class="thumb-icon small"><i class="fas fa-play"></i></span>'; ?>
<?php if ( has_post_format('audio') && !is_sticky() ) echo'<span class="thumb-icon small"><i class="fas fa-volume-up"></i></span>'; ?>
<?php if ( is_sticky() ) echo'<span class="thumb-icon small"><i class="fas fa-star"></i></span>'; ?>
</a>
</div>
<?php } ?>
<div class="tab-item-inner group">
<?php if($instance['tabs_category']) { ?><p class="tab-item-category"><?php the_category(' / '); ?></p><?php } ?>
<p class="tab-item-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></p>
<?php if($instance['tabs_date']) { ?><p class="tab-item-date"><?php echo get_the_date(); ?></p><?php } ?>
</div>
</li>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
<?php remove_filter( 'max_srcset_image_width', 'hu_limit_srcset_img_width_for_thumb_small' ); ?>
</ul><!--/.alx-tab-->
<?php } ?>
<?php if($instance['popular_enable']) { // Popular posts enabled? ?>
<?php
$popular_query_params = apply_filters( 'hu_tabs_widget_popular_query_args', array(
'post_type' => array( 'post' ),
'showposts' => $instance['popular_num'],
'cat' => $instance['popular_cat_id'],
'ignore_sticky_posts' => true,
'orderby' => 'comment_count',
'order' => 'dsc',
'date_query' => array(
array(
'after' => $instance['popular_time'],
),
),
) );
$popular = new WP_Query( is_array( $popular_query_params ) ? $popular_query_params : array() );
?>
<ul id="tab-popular-<?php echo $this -> number ?>" class="alx-tab group <?php if($instance['popular_thumbs']) { echo 'thumbs-enabled'; } ?>">
<?php
// do not allow the browser to pick a size larger than 'thumb-small'
if( !function_exists('hu_limit_srcset_img_width_for_thumb_small') ) {
function hu_limit_srcset_img_width_for_thumb_small() { return '80'; }
}
// april 2020 : added for https://github.com/presscustomizr/hueman/issues/866
add_filter( 'max_srcset_image_width', 'hu_limit_srcset_img_width_for_thumb_small' );
?>
<?php while ( $popular->have_posts() ): $popular->the_post(); ?>
<li>
<?php if($instance['popular_thumbs']) { // Thumbnails enabled? ?>
<div class="tab-item-thumbnail">
<a href="<?php the_permalink(); ?>">
<?php hu_the_post_thumbnail('thumb-small'); ?>
<?php if ( has_post_format('video') && !is_sticky() ) echo'<span class="thumb-icon small"><i class="fas fa-play"></i></span>'; ?>
<?php if ( has_post_format('audio') && !is_sticky() ) echo'<span class="thumb-icon small"><i class="fas fa-volume-up"></i></span>'; ?>
<?php if ( is_sticky() ) echo'<span class="thumb-icon small"><i class="fas fa-star"></i></span>'; ?>
</a>
</div>
<?php } ?>
<div class="tab-item-inner group">
<?php if($instance['tabs_category']) { ?><p class="tab-item-category"><?php the_category(' / '); ?></p><?php } ?>
<p class="tab-item-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></p>
<?php if($instance['tabs_date']) { ?><p class="tab-item-date"><?php echo get_the_date(); ?></p><?php } ?>
</div>
</li>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
<?php remove_filter( 'max_srcset_image_width', 'hu_limit_srcset_img_width_for_thumb_small' ); ?>
</ul><!--/.alx-tab-->
<?php } ?>
<?php if($instance['comments_enable']) { // Recent comments enabled? ?>
<?php $comments = get_comments(array('number'=>$instance["comments_num"],'status'=>'approve','post_status'=>'publish')); ?>
<ul id="tab-comments-<?php echo $this -> number ?>" class="alx-tab group <?php if($instance['comments_avatars']) { echo 'avatars-enabled'; } ?>">
<?php foreach ($comments as $comment): ?>
<li>
<?php if($instance['comments_avatars']) { // Avatars enabled? ?>
<div class="tab-item-avatar">
<a href="<?php echo esc_url(get_comment_link($comment->comment_ID)); ?>">
<?php echo get_avatar($comment->comment_author_email,$size='96'); ?>
</a>
</div>
<?php } ?>
<div class="tab-item-inner group">
<?php $str=explode(' ',get_comment_excerpt($comment->comment_ID)); $comment_excerpt=implode(' ',array_slice($str,0,11)); if(count($str) > 11 && substr($comment_excerpt,-1)!='.') $comment_excerpt.='...' ?>
<div class="tab-item-name"><?php echo esc_html( $comment->comment_author ); ?> <?php _e('says:','hueman'); ?></div>
<div class="tab-item-comment"><a href="<?php echo esc_url(get_comment_link($comment->comment_ID)); ?>"><?php echo esc_html( $comment_excerpt ); ?></a></div>
</div>
</li>
<?php endforeach; ?>
</ul><!--/.alx-tab-->
<?php } ?>
<?php if($instance['tags_enable']) { // Tags enabled? ?>
<ul id="tab-tags-<?php echo $this -> number ?>" class="alx-tab group">
<li>
<?php wp_tag_cloud(); ?>
</li>
</ul><!--/.alx-tab-->
<?php } ?>
</div>
<?php
$output .= ob_get_clean();
$output .= $after_widget."\n";
echo $output;
}
/* Widget update
/* ------------------------------------ */
public function update($new,$old) {
$instance = $old;
$instance['title'] = strip_tags($new['title']);
$instance['tabs_category'] = $new['tabs_category']?1:0;
$instance['tabs_date'] = $new['tabs_date']?1:0;
// Recent posts
$instance['recent_enable'] = $new['recent_enable']?1:0;
$instance['recent_thumbs'] = $new['recent_thumbs']?1:0;
$instance['recent_cat_id'] = strip_tags($new['recent_cat_id']);
$instance['recent_num'] = strip_tags($new['recent_num']);
// Popular posts
$instance['popular_enable'] = $new['popular_enable']?1:0;
$instance['popular_thumbs'] = $new['popular_thumbs']?1:0;
$instance['popular_cat_id'] = strip_tags($new['popular_cat_id']);
$instance['popular_time'] = strip_tags($new['popular_time']);
$instance['popular_num'] = strip_tags($new['popular_num']);
// Recent comments
$instance['comments_enable'] = $new['comments_enable']?1:0;
$instance['comments_avatars'] = $new['comments_avatars']?1:0;
$instance['comments_num'] = strip_tags($new['comments_num']);
// Tags
$instance['tags_enable'] = $new['tags_enable']?1:0;
// Order
$instance['order_recent'] = strip_tags($new['order_recent']);
$instance['order_popular'] = strip_tags($new['order_popular']);
$instance['order_comments'] = strip_tags($new['order_comments']);
$instance['order_tags'] = strip_tags($new['order_tags']);
return $instance;
}
/* Widget form
/* ------------------------------------ */
public function form($instance) {
// Default widget settings
$defaults = $this -> hu_get_defaults();
$instance = wp_parse_args( (array) $instance, $defaults );
?>
<style>
.widget .widget-inside .alx-options-tabs .postform { width: 100%; }
.widget .widget-inside .alx-options-tabs p { margin: 3px 0; }
.widget .widget-inside .alx-options-tabs hr { margin: 20px 0 10px; }
.widget .widget-inside .alx-options-tabs h4 { margin-bottom: 10px; }
</style>
<div class="alx-options-tabs">
<p>
<label for="<?php echo esc_attr( $this->get_field_id('title') ); ?>">Title:</label>
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id('title') ); ?>" name="<?php echo esc_attr( $this->get_field_name('title') ); ?>" type="text" value="<?php echo esc_attr($instance["title"]); ?>" />
</p>
<h4>Recent Posts</h4>
<p>
<input type="checkbox" class="checkbox" id="<?php echo esc_attr( $this->get_field_id('recent_enable') ); ?>" name="<?php echo esc_attr( $this->get_field_name('recent_enable') ); ?>" <?php checked( (bool) $instance["recent_enable"], true ); ?>>
<label for="<?php echo esc_attr( $this->get_field_id('recent_enable') ); ?>">Enable recent posts</label>
</p>
<p>
<input type="checkbox" class="checkbox" id="<?php echo esc_attr( $this->get_field_id('recent_thumbs') ); ?>" name="<?php echo esc_attr( $this->get_field_name('recent_thumbs') ); ?>" <?php checked( (bool) $instance["recent_thumbs"], true ); ?>>
<label for="<?php echo esc_attr( $this->get_field_id('recent_thumbs') ); ?>">Show thumbnails</label>
</p>
<p>
<label style="width: 55%; display: inline-block;" for="<?php echo esc_attr( $this->get_field_id("recent_num") ); ?>">Items to show</label>
<input style="width:20%;" id="<?php echo esc_attr( $this->get_field_id("recent_num") ); ?>" name="<?php echo esc_attr( $this->get_field_name("recent_num") ); ?>" type="text" value="<?php echo absint($instance["recent_num"]); ?>" size='3' />
</p>
<p>
<label style="width: 100%; display: inline-block;" for="<?php echo esc_attr( $this->get_field_id("recent_cat_id") ); ?>">Category:</label>
<?php wp_dropdown_categories( array( 'name' => $this->get_field_name("recent_cat_id"), 'selected' => $instance["recent_cat_id"], 'show_option_all' => 'All', 'show_count' => true ) ); ?>
</p>
<hr>
<h4>Most Popular</h4>
<p>
<input type="checkbox" class="checkbox" id="<?php echo esc_attr( $this->get_field_id('popular_enable') ); ?>" name="<?php echo esc_attr( $this->get_field_name('popular_enable') ); ?>" <?php checked( (bool) $instance["popular_enable"], true ); ?>>
<label for="<?php echo esc_attr( $this->get_field_id('popular_enable') ); ?>">Enable most popular posts</label>
</p>
<p>
<input type="checkbox" class="checkbox" id="<?php echo esc_attr( $this->get_field_id('popular_thumbs') ); ?>" name="<?php echo esc_attr( $this->get_field_name('popular_thumbs') ); ?>" <?php checked( (bool) $instance["popular_thumbs"], true ); ?>>
<label for="<?php echo esc_attr( $this->get_field_id('popular_thumbs') ); ?>">Show thumbnails</label>
</p>
<p>
<label style="width: 55%; display: inline-block;" for="<?php echo esc_attr( $this->get_field_id("popular_num") ); ?>">Items to show</label>
<input style="width:20%;" id="<?php echo esc_attr( $this->get_field_id("popular_num") ); ?>" name="<?php echo esc_attr( $this->get_field_name("popular_num") ); ?>" type="text" value="<?php echo absint($instance["popular_num"]); ?>" size='3' />
</p>
<p>
<label style="width: 100%; display: inline-block;" for="<?php echo esc_attr( $this->get_field_id("popular_cat_id") ); ?>">Category:</label>
<?php wp_dropdown_categories( array( 'name' => $this->get_field_name("popular_cat_id"), 'selected' => $instance["popular_cat_id"], 'show_option_all' => 'All', 'show_count' => true ) ); ?>
</p>
<p style="padding-top: 0.3em;">
<label style="width: 100%; display: inline-block;" for="<?php echo esc_attr( $this->get_field_id("popular_time") ); ?>">Post with most comments from:</label>
<select style="width: 100%;" id="<?php echo esc_attr( $this->get_field_id("popular_time") ); ?>" name="<?php echo esc_attr( $this->get_field_name("popular_time") ); ?>">
<option value="0"<?php selected( $instance["popular_time"], "0" ); ?>>All time</option>
<option value="1 year ago"<?php selected( $instance["popular_time"], "1 year ago" ); ?>>This year</option>
<option value="1 month ago"<?php selected( $instance["popular_time"], "1 month ago" ); ?>>This month</option>
<option value="1 week ago"<?php selected( $instance["popular_time"], "1 week ago" ); ?>>This week</option>
<option value="1 day ago"<?php selected( $instance["popular_time"], "1 day ago" ); ?>>Past 24 hours</option>
</select>
</p>
<hr>
<h4>Recent Comments</h4>
<p>
<input type="checkbox" class="checkbox" id="<?php echo esc_attr( $this->get_field_id('comments_enable') ); ?>" name="<?php echo esc_attr( $this->get_field_name('comments_enable') ); ?>" <?php checked( (bool) $instance["comments_enable"], true ); ?>>
<label for="<?php echo esc_attr( $this->get_field_id('comments_enable') ); ?>">Enable recent comments</label>
</p>
<p>
<input type="checkbox" class="checkbox" id="<?php echo esc_attr( $this->get_field_id('comments_avatars') ); ?>" name="<?php echo esc_attr( $this->get_field_name('comments_avatars') ); ?>" <?php checked( (bool) $instance["comments_avatars"], true ); ?>>
<label for="<?php echo esc_attr( $this->get_field_id('comments_avatars') ); ?>">Show avatars</label>
</p>
<p>
<label style="width: 55%; display: inline-block;" for="<?php echo esc_attr( $this->get_field_id("comments_num") ); ?>">Items to show</label>
<input style="width:20%;" id="<?php echo esc_attr( $this->get_field_id("comments_num") ); ?>" name="<?php echo esc_attr( $this->get_field_name("comments_num") ); ?>" type="text" value="<?php echo absint($instance["comments_num"]); ?>" size='3' />
</p>
<hr>
<h4>Tags</h4>
<p>
<input type="checkbox" class="checkbox" id="<?php echo esc_attr( $this->get_field_id('tags_enable') ); ?>" name="<?php echo esc_attr( $this->get_field_name('tags_enable') ); ?>" <?php checked( (bool) $instance["tags_enable"], true ); ?>>
<label for="<?php echo esc_attr( $this->get_field_id('tags_enable') ); ?>">Enable tags</label>
</p>
<hr>
<h4>Tab Order</h4>
<p>
<label style="width: 55%; display: inline-block;" for="<?php echo esc_attr( $this->get_field_id("order_recent") ); ?>">Recent posts</label>
<input class="widefat" style="width:20%;" type="text" id="<?php echo esc_attr( $this->get_field_id("order_recent") ); ?>" name="<?php echo esc_attr( $this->get_field_name("order_recent") ); ?>" value="<?php echo esc_attr( $instance["order_recent"] ); ?>" />
</p>
<p>
<label style="width: 55%; display: inline-block;" for="<?php echo esc_attr( $this->get_field_id("order_popular") ); ?>">Most popular</label>
<input class="widefat" style="width:20%;" type="text" id="<?php echo esc_attr( $this->get_field_id("order_popular") ); ?>" name="<?php echo esc_attr( $this->get_field_name("order_popular") ); ?>" value="<?php echo esc_attr( $instance["order_popular"] ); ?>" />
</p>
<p>
<label style="width: 55%; display: inline-block;" for="<?php echo esc_attr( $this->get_field_id("order_comments") ); ?>">Recent comments</label>
<input class="widefat" style="width:20%;" type="text" id="<?php echo esc_attr( $this->get_field_id("order_comments") ); ?>" name="<?php echo esc_attr( $this->get_field_name("order_comments") ); ?>" value="<?php echo esc_attr( $instance["order_comments"] ); ?>" />
</p>
<p>
<label style="width: 55%; display: inline-block;" for="<?php echo esc_attr( $this->get_field_id("order_tags") ); ?>">Tags</label>
<input class="widefat" style="width:20%;" type="text" id="<?php echo esc_attr( $this->get_field_id("order_tags") ); ?>" name="<?php echo esc_attr( $this->get_field_name("order_tags") ); ?>" value="<?php echo esc_attr( $instance["order_tags"] ); ?>" />
</p>
<hr>
<h4>Tab Info</h4>
<p>
<input type="checkbox" class="checkbox" id="<?php echo esc_attr( $this->get_field_id('tabs_category') ); ?>" name="<?php echo esc_attr( $this->get_field_name('tabs_category') ); ?>" <?php checked( (bool) $instance["tabs_category"], true ); ?>>
<label for="<?php echo esc_attr( $this->get_field_id('tabs_category') ); ?>">Show categories</label>
</p>
<p>
<input type="checkbox" class="checkbox" id="<?php echo esc_attr( $this->get_field_id('tabs_date') ); ?>" name="<?php echo esc_attr( $this->get_field_name('tabs_date') ); ?>" <?php checked( (bool) $instance["tabs_date"], true ); ?>>
<label for="<?php echo esc_attr( $this->get_field_id('tabs_date') ); ?>">Show dates</label>
</p>
<hr>
</div>
<?php
}
}
/* Register widget
/* ------------------------------------ */
if ( ! function_exists( 'hu_register_widget_tabs' ) ) {
function hu_register_widget_tabs() {
register_widget( 'AlxTabs' );
}
}
add_action( 'widgets_init', 'hu_register_widget_tabs' );
@@ -0,0 +1,119 @@
<?php
/*
AlxVideo Widget
License: GNU General Public License v3.0
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Copyright: (c) 2013-2015 Alexander "Alx" Agnarson, 2015 Nicolas GUILLAUME (nikeo)
@package AlxVideo
@version 1.0
*/
class AlxVideo extends WP_Widget {
/* Constructor
/* ------------------------------------ */
function __construct() {
parent::__construct(
'alxvideo',
__('Hueman Videos', 'hueman'),
array(
'description' => __('Display a responsive video with a YouTube or Vimeo link.', 'hueman'),
'classname' => 'widget_hu_video'
)
);
}
public function hu_get_defaults() {
return array(
'title' => '',
// Video
'video_url' => '',
);
}
/* Widget
/* ------------------------------------ */
public function widget($args, $instance) {
extract( $args );
$instance['title'] = isset( $instance['title'] ) ? $instance['title'] : '';
$title = apply_filters('widget_title',$instance['title']);
$output = $before_widget."\n";
if($title)
$output .= $before_title.$title.$after_title;
ob_start();
// The widget
if ( !empty($instance['video_url']) ) {
global $wp_embed;
$video = $wp_embed->run_shortcode('[embed]'.$instance['video_url'].'[/embed]');
}
else {
$video = '';
}
echo $video;
$output .= ob_get_clean();
$output .= $after_widget."\n";
echo $output;
}
/* Widget update
/* ------------------------------------ */
public function update($new,$old) {
$instance = $old;
$instance['title'] = esc_attr($new['title']);
// Video
$instance['video_url'] = esc_url($new['video_url']);
return $instance;
}
/* Widget form
/* ------------------------------------ */
public function form($instance) {
// Default widget settings
$defaults = $this -> hu_get_defaults();
$instance = wp_parse_args( (array) $instance, $defaults );
?>
<style>
.widget .widget-inside .alx-options-video .postform { width: 100%; }
.widget .widget-inside .alx-options-video p { margin: 3px 0; }
.widget .widget-inside .alx-options-video hr { margin: 20px 0 10px; }
.widget .widget-inside .alx-options-video h4 { margin-bottom: 10px; }
</style>
<div class="alx-options-video">
<p>
<label for="<?php echo esc_attr( $this->get_field_id('title') ); ?>">Title:</label>
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id('title') ); ?>" name="<?php echo esc_attr( $this->get_field_name('title') ); ?>" type="text" value="<?php echo esc_attr($instance["title"]); ?>" />
</p>
<h4>Responsive Video</h4>
<p>
<label for="<?php echo esc_attr( $this->get_field_id("video_url") ); ?>">Video URL</label>
<input style="width:100%;" id="<?php echo esc_attr( $this->get_field_id("video_url") ); ?>" name="<?php echo esc_attr( $this->get_field_name("video_url") ); ?>" type="text" value="<?php echo esc_url( $instance["video_url"] ); ?>" />
</p>
</div>
<?php
}
}
/* Register widget
/* ------------------------------------ */
if ( ! function_exists( 'hu_register_widget_video' ) ) {
function hu_register_widget_video() {
register_widget( 'AlxVideo' );
}
}
add_action( 'widgets_init', 'hu_register_widget_video' );