* @license GPL-2.0+ * @link http://www.ankyler.com/ * @copyright 2014, Ankyler */ // Block direct requests if ( ! function_exists( 'add_filter' ) ) { header( 'Status: 403 Forbidden' ); header( 'HTTP/1.1 403 Forbidden' ); exit(); } wp_nonce_field( 'ankyler_widget_update', 'ankyler_widget_nonce' ); ?>

get_field_id('') .'" type="submit" class="button" name="'. $this->get_field_name( 'uploader_button' ) .'" id="'. $this->get_field_id('uploader_button') .'" value="'. __( 'Select an image', $this->text_domain ) .'" />' : ''; ?>

0 ) { echo wp_get_attachment_image( $instance['image'], 'medium', false ); echo sprintf( '
', ( Ankyler::use_old_uploader() ? ' old-uploader' : '' ) ); if ( Ankyler::use_old_uploader() ) { echo sprintf( '
X
', $this->get_field_id(''), __( 'Remove image', $this->text_domain ) ); } else { echo sprintf( '
', $this->get_field_id(''), __( 'Remove image', $this->text_domain ) ); } echo '
'; } ?>

text_domain ); foreach ( $descriptions as $key => $description ) { $field_id = $this->get_field_id( 'description' ) .'_'. $key; $field_name = $this->get_field_name( 'description' ) .'['. $key .']'; echo sprintf( '

', $field_id, $description_title ); echo sprintf( '

', $field_id, $field_name, format_to_edit( $description ) ); } if ( empty( $instance['read_more'] ) ) { $instance['read_more'] = __( 'Read more', $this->text_domain ); } ?>

false ); $custom_post_types = get_post_types( $args ); $posts_and_pages = array( 'post' => 'post', 'page' => 'page' ); $all_post_types = array_merge( $posts_and_pages, $custom_post_types ); foreach ( $all_post_types as $post_type ) { $post_type_object = get_post_type_object( $post_type ); if ( isset( $post_type_object->labels->singular_name ) ) { $singular_name = $post_type_object->labels->singular_name; } else { $singular_name = $post_type_object->labels->name; } $singular_names[] = $singular_name; $posttypesArray[] = array( $post_type, $singular_name ); } $internal_link_title = ''; $internal_link_title = __( 'Choose from a', $this->text_domain ) .' '. implode( ", ", $singular_names ); if ( ! empty( $posttypesArray ) ) { ?>