מספר יצירה: #0061
1958
מופשט
גבעתיים
אולפני גבע, ויצמן 65
פרטית
כ־3X3 מטר
קרמיקה
פסיפס
ציבורי
חוץ
לא
רשתות של מרובעים
על קיר בכניסה לאולפני גבע בגבעתיים הייתה יצירה מאבני פסיפס צבעוניות. הקיר נהרס כשהמבנה נהרס.

if ( ! class_exists( 'eh_reordertax_Custom_Taxonomy_Order' ) ) { class eh_reordertax_Custom_Taxonomy_Order { function __construct() { add_action( 'admin_head', array( $this, 'eh_reordertax_custom_tax_order_admin_init' ) ); add_action( 'init', array( $this, 'eh_reordertax_custom_tax_order_front_end_init' ) ); add_action( 'wp_ajax_update_taxonomy_order', array( $this, 'eh_reordertax_handle_ajax_request' ) ); } public function eh_reordertax_custom_tax_order_admin_init() { if( is_admin() ) { $screen = get_current_screen(); if( isset( $screen ) && isset( $screen->base ) ) { if( $screen->base == 'edit-tags' ) { $this->eh_reordertax_ensure_terms_have_tax_position_value( $screen ); //set here the taxonomies to be used in taxonomy === '____' if( ! isset( $_GET['orderby'] ) && in_array( $screen->taxonomy, [ 'material', 'technique' ] ) ) { $this->eh_reordertax_sto_enqueue_scripts_and_styles(); add_filter( 'admin_init', array( $this, 'eh_reordertax_ensure_tax_position_set' ) ); add_filter( 'terms_clauses', array( $this, 'eh_reordertax_alter_tax_order' ), 10, 3 ); } } } } } public function eh_reordertax_custom_tax_order_front_end_init() { add_filter( 'terms_clauses', array( $this, 'eh_reordertax_alter_tax_order' ), 10, 3 ); } public function eh_reordertax_sto_enqueue_scripts_and_styles() { wp_enqueue_style( 'eh-reordertax-drag-drop-styles', get_stylesheet_directory_uri() . '/lib/reorder/lib/css/eh-reordertax-drag-drop.css' ); wp_enqueue_script( 'jquery-ui-core' ); wp_enqueue_script( 'jquery-ui-sortable' ); wp_enqueue_script( 'eh-reordertax-drag-drop', get_stylesheet_directory_uri() . '/lib/reorder/lib/js/eh-reordertax-drag-drop.js', array( 'jquery-ui-core', 'jquery-ui-sortable' ), true ); wp_localize_script( 'eh-reordertax-drag-drop', 'simple_taxonomy_ordering_data', array( 'ajax_url' => esc_url( admin_url( 'admin-ajax.php' ) ), 'preloader_url' => esc_url( admin_url( 'images/wpspin_light.gif' ) ), ) ); } public function eh_reordertax_ensure_terms_have_tax_position_value( $screen ) { if( isset( $screen ) && isset( $screen->taxonomy ) ) { $terms = get_terms( $screen->taxonomy, array( 'hide_empty' => false ) ); $x = 1; foreach( $terms as $term ) { if( ! get_term_meta( $term->term_id, 'tax_position', true ) ) { update_term_meta( $term->term_id, 'tax_position', $x ); $x++; } } } } public function eh_reordertax_alter_tax_order( $pieces, $taxonomies, $args ) { foreach( $taxonomies as $taxonomy ) { if ( in_array( $taxonomy, [ 'material', 'technique' ] ) ) { global $wpdb; $join_statement = " LEFT JOIN $wpdb->termmeta AS term_meta ON t.term_id = term_meta.term_id AND term_meta.meta_key = 'tax_position'"; if ( ! $this->eh_reordertax_does_substring_exist( $pieces['join'], $join_statement ) ) { $pieces['join'] .= $join_statement; } $pieces['orderby'] = "ORDER BY CAST( term_meta.meta_value AS UNSIGNED )"; } } return $pieces; } protected function eh_reordertax_does_substring_exist( $string, $substring ) { return ( strstr( $string, $substring ) === false ) ? false : true; } public function eh_reordertax_handle_ajax_request() { $array_data = $_POST['updated_array']; foreach( $array_data as $taxonomy_data ) { update_term_meta( $taxonomy_data[0], 'tax_position', (int) ( $taxonomy_data[1] + 1 ) ); } wp_die(); exit; } } } // init new eh_reordertax_Custom_Taxonomy_Order;
על קיר בכניסה לאולפני גבע בגבעתיים הייתה יצירה מאבני פסיפס צבעוניות. הקיר נהרס כשהמבנה נהרס.
