403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.141.12.236
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/misswavenigeria.com/wp-content/plugins/totalpoll-lite/src/Modules/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/misswavenigeria.com/wp-content/plugins/totalpoll-lite/src/Modules/Template.php
<?php

namespace TotalPoll\Modules;

use TotalPoll\Contracts\Poll\Model;
use TotalPollVendors\TotalCore\Helpers\Html;

/**
 * Template.
 * @package TotalPoll\Modules
 */
abstract class Template extends \TotalPollVendors\TotalCore\Modules\Template {
	protected $locale;

	/**
	 * Template constructor.
	 *
	 * @param array $options
	 */
	public function __construct( $options = [] ) {
		parent::__construct( $options );
		$this->locale = get_locale();
		add_action( 'totalpoll/actions/render', [ $this, 'assets' ] );
	}

	/**
	 * Enqueue template related assets.
	 *
	 * @since 4.0.3
	 */
	public function assets() {

	}

	/**
	 * Get poll instance.
	 *
	 * @since 4.0.3
	 * @return Model
	 */
	public function getPoll() {
		return $this->getOption( 'poll' );
	}

	/**
	 * Format question content.
	 *
	 * @param $question
	 *
	 * @return string
	 */
	public function questionContent( $question ) {
		$content = wpautop( do_shortcode( $question['content'] ) );

		/**
		 * Filters the content of a question.
		 *
		 * @param string $content  Question content.
		 * @param array  $question Question.
		 *
		 * @since 4.0.0
		 * @return string
		 */
		return apply_filters( 'totalpoll/filters/template/content/question', $content, $question );
	}

	/**
	 * Format choice label.
	 *
	 * @param $choice
	 *
	 * @return string
	 */
	public function choiceLabel( $choice ) {
		$label = do_shortcode( $choice['label'] );

		/**
		 * Filters the content of a choice label.
		 *
		 * @param string $label  Choice label content.
		 * @param array  $choice Choice.
		 *
		 * @since 4.0.0
		 * @return string
		 */
		return apply_filters( 'totalpoll/filters/template/content/choice', $label, $choice );
	}

	/**
	 * Format user content.
	 *
	 * @param $content
	 *
	 * @return string
	 */
	public function userContent( $content ) {
		$content = wpautop( do_shortcode( $content ) );

		/**
		 * Filters the content of user-defined fragments.
		 *
		 * @param string $content Fragment content.
		 *
		 * @since 4.0.0
		 * @return string
		 */
		return apply_filters( 'totalpoll/filters/template/content/user', $content );
	}

	/**
	 * @param $question
	 *
	 * @return string
	 */
	public function questionAttributes( $question ) {
		/**
		 * Filters the HTML attributes of question container.
		 *
		 * @param array $attributes Attributes [name => value].
		 * @param array $question   Question.
		 *
		 * @since 4.0.0
		 * @return array
		 */
		$attributes = apply_filters( 'totalpoll/filters/template/attributes/question/container', [], $question );

		return Html::attributesToHtml( $attributes );
	}

	/**
	 * @param $question
	 *
	 * @return string
	 */
	public function questionContentAttributes( $question ) {
		/**
		 * Filters the HTML attributes of question content.
		 *
		 * @param array $attributes Attributes [name => value].
		 * @param array $question   Question.
		 *
		 * @since 4.0.0
		 * @return array
		 */
		$attributes = apply_filters( 'totalpoll/filters/template/attributes/question/content', [], $question );

		return Html::attributesToHtml( $attributes );
	}

	/**
	 * @param $choice
	 *
	 * @return string
	 */
	public function choiceAttributes( $choice ) {
		/**
		 * Filters the HTML attributes of choice container.
		 *
		 * @param array $attributes Attributes [name => value].
		 * @param array $question   Choice.
		 *
		 * @since 4.0.0
		 * @return array
		 */
		$attributes = apply_filters( 'totalpoll/filters/template/attributes/choice/container', [], $choice );

		return Html::attributesToHtml( $attributes );
	}

	/**
	 * @param $choice
	 *
	 * @return string
	 */
	public function choiceLabelAttributes( $choice ) {
		/**
		 * Filters the HTML attributes of choice label.
		 *
		 * @param array $attributes Attributes [name => value].
		 * @param array $question   Choice.
		 *
		 * @since 4.0.0
		 * @return array
		 */
		$attributes = apply_filters( 'totalpoll/filters/template/attributes/choice/label', [], $choice );

		return Html::attributesToHtml( $attributes );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit