HEX
Server: LiteSpeed
System: Linux eko108.isimtescil.net 4.18.0-477.21.1.lve.1.el8.x86_64 #1 SMP Tue Sep 5 23:08:35 UTC 2023 x86_64
User: uyarreklamcomtr (11202)
PHP: 7.4.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/blog.class.php.tar
www/vhosts/uyarreklam.com.tr/httpdocs/wp-content/themes/vadimarketv4/inc/form-fields/blog.class.php000064400000002747151545472550030367 0ustar00var<?php

/**
 * Class Temavadisi_Custom_Field_Blog
 */
class Temavadisi_Custom_Field_Blog extends SiteOrigin_Widget_Field_Base {

	protected $prompt;

	protected function render_field( $value, $instance ) {
		?>
			<select name="<?php echo $this->element_name ?>" id="<?php echo $this->element_id ?>">
	<?php 
	$args = array(  'taxonomy' => 'category', 'orderby' => 'name', 'hide_empty' => '0' ); $categories = get_categories( $args );
		echo '<option value="">--SEÇİNİZ--</option>';
			foreach ( $categories as $category ) {
				$kategoris = $category->slug; ?>
					<option <?php if ($value==$kategoris) { echo 'selected="selected"'; } ?> value="<?php echo $kategoris ?>"><?php echo $kategoris ?> (<?php echo $category->count; ?>)</option>
	<?php } ?>
			</select>
		<?php
	}

	protected function sanitize_field_input($value, $instance) {
		$sanitized_value = sanitize_text_field( $value );
		return $sanitized_value;
	}

	protected function get_label_classes( $value, $instance ) {
		$label_classes = parent::get_label_classes( $value, $instance );
		$label_classes[] = 'wd_title';
		return $label_classes;
	}

	protected function render_field_label($value, $instance) {
		
		parent::render_field_label( $value, $instance );

	}

	protected function render_before_field( $value, $instance ) {
		
		parent::render_before_field( $value, $instance );

	}

	protected function render_after_field( $value, $instance ) {
		$this->render_field_description();
	}
}