settings = $settings;
$this->options = get_option( 'tt_arkam_lite' );
$this->counter = new TT_Arkam_Lite_Counter( $this->settings, $this->options );
$this->helper = new TT_Arkam_Lite_Helper();
}
/**
* Render a list of channels counts
*
* @since 1.0.0
*/
public function render_counts( $channels, $opts ) {
$output = $class = '';
$class .= isset( $opts['layout'] )? ' layout-' . esc_attr( $opts['layout'] ) : '';
$class .= isset( $opts['spacing'] )? ' spacing-' . esc_attr( $opts['spacing'] ) : '';
$class .= isset( $opts['size'] )? ' size-' . esc_attr( $opts['size'] ) : '';
$class .= isset( $opts['color'] )? ' color-'. esc_attr( $opts['color'] ) : '';
ob_start(); ?>
-
render_count( $channel, $opts ); ?>
options['backlink'] ) && $this->options['backlink'] ) { ?>
'. esc_html__( 'Arkam', 'arkam-lite' ) .'' ); ?>
helper->get_channel_url( $channel, $this->options );
$style = !empty( $this->options[$channel]['color'] )? ' style="color:'. esc_attr( $this->options[$channel]['color'] ) .';background-color:'. esc_attr( $this->options[$channel]['color'] ) .';border-color:'. esc_attr( $this->options[$channel]['color'] ) .';"': '';
$attr = '';
if ( $link != '' ) {
$el_start = '';
$el_end = '';
} else {
$el_start = $el_end = '';
}
ob_start(); ?>
>
counter->get_cached_count( $channel ); ?>
options[$channel]['text'] ) ) { ?>
options[$channel]['text'] ); ?>
options )? $this->options: $args;
unset( $sorted['cache'] );
unset( $sorted['backlink'] );
foreach ( $sorted as $key => $value ) {
$data = $args[$key];
$style = isset( $data['color'] )? ' style="background-color:'. esc_attr( $data['color'] ) .';"': '';
$icon = isset( $data['icon'] )? '': '';
$scheme = $style != ''? ' dark-lite-color': ''; ?>
render_field( $field, $key );
} ?>
| render_label( $args['label'] ); ?> |
render_option( $args['option'], $channel ); ?> |
options[$channel][$args['name']] )? $this->options[$channel][$args['name']]: '';
} else {
$name = 'tt_arkam_lite['. $args['name'] .']';
$value = isset( $this->options[$args['name']] )? $this->options[$args['name']]: '';
}
}
if ( isset( $value ) && $value == '' && isset( $args['default'] ) ) {
$value = $args['default'];
}
if ( $args['type'] == 'text' ) {
$this->render_text_option( $args, $name, $value );
} else if ( $args['type'] == 'color' ) {
$this->render_color_option( $name, $value );
} else if ( $args['type'] == 'select' ) {
$this->render_select_option( $args, $name, $value );
} else if ( $args['type'] == 'button' ) {
$this->render_button_option( $args );
}
}
/**
* Render Text Option
*
* @since 1.0.0
*/
public function render_text_option( $args, $name = null, $value = null ) {
$type = isset( $args['input_type'] )? $args['input_type']: 'text';
$placeholder = isset( $args['placeholder'] )? $args['placeholder']: ''; ?>
options[$setting_name] ) && $this->options[$setting_name] == '1'? true: $this->settings[$setting_name]; ?>
>
$value ) {
$atts .= $att .'="'. $value .'" ';
}
} ?>
options;
}
/**
* Set options array
*
* @since 1.0.0
*/
public function set_options( $options ) {
$this->options = $options;
}
}
}