/** * Verfy and return first buttons content * * @since 1.0 * @param Object $arga * @return String HTML */ private static function _start_buttons_html(\stdClass $args) { $nonce = wp_create_nonce(Ajax_Controller::AJAX_VERIFY_NONCE_COUNTER); $permalink = Utils_Helper::get_permalink(); $post_id = Utils_Helper::get_id(); $content = "<div data-element-url=\"{$permalink}\" data-component=\"counter-social-share\""; $content .= " data-attr-reference=\"{$post_id}\" class=\"{$args->prefix}"; $content .= " {$args->prefix}-{$args->layout} {$args->position_fixed}"; $content .= " {$args->class_first} {$args->custom_class}\" data-attr-nonce=\"{$nonce}\">\n"; if (!empty($args->position_fixed) || 'square-plus' == $args->layout) { $content .= static::_total_count($args->prefix, $args->layout, $args->position_fixed); } return apply_filters(Init::PLUGIN_SLUG . 'start-buttons-html', $content); }