File manager - Edit - /home/matthif/www/wp-content/plugins/gutenverse/includes/block/class-social-share-stumbleupon.php
Back
<?php /** * Social Share Block class * * @author Jegstudio * @since 1.0.0 * @package gutenverse\block */ namespace Gutenverse\Block; use Gutenverse\Framework\Block\Block_Abstract; /** * Class Social Share Block * * @package gutenverse\block */ class Social_Share_Stumbleupon extends Block_Abstract { /** * $attributes, $content * * @param string $text . * * @return string */ public function render_content( $text ) { $share_text = $this->attributes['showText'] ? "<div class='gutenverse-share-text'>{$text}</div>" : ''; return "<div class='gutenverse-share-icon'> <i class='fab fa-stumbleupon'></i> </div>{$share_text}"; } /** * Render view in editor */ public function render_gutenberg() { $text = esc_html( $this->attributes['text'] ); $content = $this->render_content( $text ); return "<div class='gutenverse-share-stumbleupon gutenverse-share-item' id='{$this->get_element_id()}'> <a href='#' aria-label='{$text}'> {$content} </a> </div>"; } /** * Render view in frontend */ public function render_frontend() { $post_id = get_the_ID(); $title = get_the_title( $post_id ); $encoded_post_url = gutenverse_encode_url( $post_id ); $share_url = esc_url( 'http://www.stumbleupon.com/submit?url=' . $encoded_post_url . '&title=' . $title ); $text = esc_html( $this->attributes['text'] ); $content = $this->render_content( $text ); return "<div class='gutenverse-share-stumbleupon gutenverse-share-item' id='{$this->get_element_id()}'> <a target='_blank' href='{$share_url}' aria-label='{$text}'> {$content} </a> </div>"; } }
| ver. 1.4 |
Github
|
.
| PHP 5.4.45 | Generation time: 0 |
proxy
|
phpinfo
|
Settings