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.php 0000644 00000002747 15154547255 0030367 0 ustar 00 var <?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();
}
}