_x( "Discount Manager", "Discount Manager" ), 'name' => _x( "Discount Manager", "Discount Manager" ), 'menu_name' => 'Discount Manager', 'add_new' => _x( "Add New Entry", "Discount Manager" ), 'add_new_item' => __( "Add New" ), 'edit_item' => __( "Edit Entry" ), 'new_item' => __( "New Entry" ), 'view_item' => __( "View Entry" ), 'search_items' => __( "Search Entries" ), 'not_found' => __( "No Entries Found" ), 'not_found_in_trash' => __( "No Entries Found in Trash" ), 'parent_item_colon' => '' ); // Register post type register_post_type( 'sup_discount_manager', array( 'labels' => $labels, 'public' => true, 'menu_position' => 100, 'has_archive' => false, 'hierarchical' => false, 'publicly_queryable' => false, 'menu_icon' => plugins_url( 'icon.png', __FILE__ ), 'capabilities' => array( 'edit_post' => 'update_core', 'read_post' => 'update_core', 'delete_post' => 'update_core', 'edit_posts' => 'update_core', 'edit_others_posts' => 'update_core', 'delete_posts' => 'update_core', 'publish_posts' => 'update_core', 'read_private_posts' => 'update_core' ), 'rewrite' => array( 'slug' => '', 'with_front' => false ), 'supports' => array( 'title' ) ) ); } add_action( 'init', 'supadu_create_discount_manager', 0 ); if( function_exists( 'acf_add_local_field_group' ) ): acf_add_local_field_group( array( 'key' => 'group_578769945f83a', 'title' => 'Discount Manager', 'fields' => array( array( 'key' => 'field_57876cd5fdbed', 'label' => 'Discount Scope', 'name' => 'discount_manager_scope', 'type' => 'select', 'instructions' => '', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'choices' => array( 'All' => 'All', 'ISBN List' => 'ISBN List', ), 'default_value' => array(), 'allow_null' => 0, 'multiple' => 0, 'ui' => 0, 'ajax' => 0, 'return_format' => 'value', 'placeholder' => '', ), array( 'key' => 'field_57f798e16b2d6', 'label' => 'ISBNs', 'name' => 'discount_manager_isbns', 'type' => 'text', 'instructions' => 'Please enter a comma separated ISBN list', 'required' => 0, 'conditional_logic' => array( array( array( 'field' => 'field_57876cd5fdbed', 'operator' => '==', 'value' => 'ISBN List', ), ), ), 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', ), array( 'key' => 'field_590841f7ffe4c', 'label' => 'Discount Parameter', 'name' => 'discount_manager_parameter', 'type' => 'text', 'instructions' => '', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', ), array( 'key' => 'field_590843924682e', 'label' => 'Start Date', 'name' => 'discount_manager_startdate', 'type' => 'date_picker', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'display_format' => 'd/m/Y', 'return_format' => 'd/m/Y', 'first_day' => 1, ), array( 'key' => 'field_59b16a0ffed76', 'label' => 'End Date', 'name' => 'discount_manager_enddate', 'type' => 'date_picker', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'display_format' => 'd/m/Y', 'return_format' => 'd/m/Y', 'first_day' => 1, ), array( 'key' => 'field_590844aee4f69', 'label' => 'Currency', 'name' => 'discount_manager_currency', 'type' => 'select', 'instructions' => '', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'choices' => array( 'All' => 'All', 'GBP' => 'GBP', 'USD' => 'USD', ), 'default_value' => array(), 'allow_null' => 0, 'multiple' => 0, 'ui' => 0, 'ajax' => 0, 'return_format' => 'value', 'placeholder' => '', ), array( 'key' => 'field_59b2751e77dd5', 'label' => 'Discount Type', 'name' => 'discount_manager_type', 'type' => 'select', 'instructions' => '', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'choices' => array( 'Percentage' => 'Percentage', 'Flat' => 'Flat', 'Other' => 'Other', ), 'default_value' => array(), 'allow_null' => 0, 'multiple' => 0, 'ui' => 0, 'ajax' => 0, 'return_format' => 'value', 'placeholder' => '', ), array( 'key' => 'field_59b275d677dd6', 'label' => 'Discount Value', 'name' => 'discount_manager_value', 'type' => 'number', 'instructions' => 'Please enter a number', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'min' => '', 'max' => '', 'step' => '', ), ), 'location' => array( array( array( 'param' => 'post_type', 'operator' => '==', 'value' => 'sup_discount_manager', ), ), ), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => '', ) ); endif; /** * @return array */ function supadu_discount_manager_get_discounts() { $discounts = array(); //AT - this needs to be changed to only get discounts that are active or relevant to the book // [3:56 PM] David Kane: you should be doing a WP Query on the meta data for any discounts with the isbn && and discounts with "all" // [3:56 PM] David Kane: or something // [3:56 PM] David Kane: and in date range yes $args = array( 'post_type' => 'sup_discount_manager', ); $my_query = new WP_Query( $args ); if( isset( $my_query->posts ) && count( $my_query->posts ) > 0 ) { foreach( $my_query->posts as $post ) { $tmp = get_post_meta( $post->ID ); foreach( $tmp as $key => $value ) { $tmp[$key] = reset( $value ); } $tmp['discount_manager_title'] = $post->post_title; $postDate = strtotime( $post->post_modified ); $discounts[$postDate] = $tmp; } } return $discounts; } /** * @param $supapress * @param $discounts * @param $returnObject * * @return string */ function supadu_discount_manager_get_discount($supapress, $discounts, $returnObject = false) { $myDiscounts = array(); $myDiscount = ''; if( isset( $supapress ) && !empty( $discounts ) ) { foreach( $discounts as $dateModified => $discount ) { $inDateRange = supadu_discount_manager_date_in_range( $discount['discount_manager_startdate'], $discount['discount_manager_enddate'] ); $inCurrency = supadu_discount_manager_in_currency( $supapress->currency, $discount['discount_manager_currency'] ); $price = supadu_discount_manager_get_price( $supapress->prices, $supapress->currency ); $discountAmount = supadu_discount_manager_real_amount( $price, $discount ); if( $discount['discount_manager_scope'] == 'All' ) { if( $inDateRange && $inCurrency ) { $myDiscounts[$discountAmount] = $discount; } } else { $isbns = explode( ',', $discount['discount_manager_isbns'] ); $inISBNs = !empty( $isbns ) && in_array( $supapress->isbn, $isbns ); if( $inDateRange && $inCurrency && $inISBNs ) { $myDiscounts[$discountAmount] = $discount; } } } } if( !empty( $myDiscounts ) ) { krsort( $myDiscounts ); $myDiscount = reset( $myDiscounts ); if( $returnObject ) { return $myDiscount; } $myDiscount = $myDiscount['discount_manager_parameter']; } return $returnObject ? array() : $myDiscount; } /** * @param $startDate * @param $endDate * * @return bool */ function supadu_discount_manager_date_in_range($startDate, $endDate) { $return = true; $today = date( 'Ymd' ); if( isset( $startDate ) && $startDate !== '' ) { $return = $return && $startDate <= $today; } if( isset( $endDate ) && $endDate !== '' ) { $return = $return && $endDate >= $today; } return $return; } /** * @param $currency * @param $discountCurrency * * @return bool */ function supadu_discount_manager_in_currency($currency, $discountCurrency) { return $currency === $discountCurrency || $discountCurrency === 'All'; } /** * @param $price * @param $discount * * @return string */ function supadu_discount_manager_real_amount($price, $discount) { if( $discount['discount_manager_type'] === 'Flat' ) { $return = number_format( $discount['discount_manager_value'], 2 ); } elseif( $discount['discount_manager_type'] === 'Percentage' ) { $return = number_format( ( $discount['discount_manager_value'] * $price ) / 100, 2 ); } else { $return = false; } if( $return !== false ) { $return = number_format($price - $return,2); } else { $return = null; } return $return; } /** * @param $prices * @param $currency * * @return mixed */ function supadu_discount_manager_get_price($prices, $currency) { $price = false; if( !empty( $prices ) && $currency !== '' ) { foreach( $prices as $value ) { if( $value->locale === $currency ) { $price = $value->amount; break; } } } return $price; } ACTIVESTILLS: How Photography Can Become A Means Of Protest - Test - Pluto Press
Pluto Press Logo

Books

Authors

Events

On the Blog

Activestills collective work can be considered as part of this shift, from photojournalism to visual activism, and from the documentation of victimhood and destitution to the visualization of the social relationships and networks that underlie the activities of struggling and protesting communities. Activestills’ members see themselves as activists, photographers, and witnesses. They view their photographic act as tantamount to the act of protest itself, and not simply as a form of witnessing, the collective’s emphasis is not on “representation” of the “suffering of the other,” but on the enactment of political agency and the demand for rights—to mobility, livelihood, and protection from violence. As opposed to documentary photography, activist photography is intrinsically bounded within the communities and oppressive strategies it works to expose. Activestills’ work in Palestine/Israel is thus meant to address the struggling communities’ visual and material needs, while also working to emphasize the specific conditions of life under Israeli occupation and segregation policies.

Activestills collective work can be considered as part of this shift, from photojournalism to visual activism, and from the documentation of victimhood and destitution to the visualization of the social relationships and networks that underlie the activities of struggling and protesting communities. Activestills’ members see themselves as activists, photographers, and witnesses. They view their photographic act as tantamount to the act of protest itself, and not simply as a form of witnessing, the collective’s emphasis is not on “representation” of the “suffering of the other,” but on the enactment of political agency and the demand for rights—to mobility, livelihood, and protection from violence. As opposed to documentary photography, activist photography is intrinsically bounded within the communities and oppressive strategies it works to expose. Activestills’ work in Palestine/Israel is thus meant to address the struggling communities’ visual and material needs, while also working to emphasize the specific conditions of life under Israeli occupation and segregation policies.

Bassem Ibrahim Abu Rahmah flying a kite between two segments of the Israeli separation barrier during the weekly protest against the occupation, Bil’in, West Bank, 25.7.2008

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce eu est diam. Sed odio sapien, rhoncus eget magna ut, lobortis pharetra nisl. Nunc bibendum ac eros ut laoreet. In vel imperdiet ante. Phasellus tristique nunc eget massa euismod maximus. Donec faucibus facilisis odio, eget vehicula leo. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec vitae dolor posuere dui iaculis condimentum. Etiam metus orci, elementum nec magna vitae, suscipit placerat erat. Etiam at ex vitae sem gravida sollicitudin a vel metus.

Morbi tincidunt porttitor leo, a mollis lacus ornare quis. Donec sit amet lobortis libero. Duis eu ante odio. Donec a nisi rutrum, pellentesque leo ut, ornare nisl. Fusce id diam aliquet, efficitur sapien vel, accumsan neque. Phasellus sem orci, posuere vel sem a, lacinia fermentum justo. Vestibulum elementum purus et magna ornare sodales. Sed porta diam nunc, consectetur euismod lectus pulvinar in. Aliquam vulputate quam a tortor efficitur, ac tincidunt dolor rhoncus. Duis vitae egestas arcu, eu tempor metus. Nullam imperdiet dolor quis magna feugiat tristique. Nulla facilisi. Aenean eu sodales risus.

Donec ac nisl in arcu dapibus sodales. Donec interdum tortor pellentesque urna maximus, at aliquet velit sagittis. Cras finibus elit eros, quis porta sapien fringilla ut. Curabitur ullamcorper hendrerit magna. Suspendisse potenti. Proin placerat maximus lobortis. Sed tempor, neque non molestie hendrerit, leo odio ultricies est, quis imperdiet sapien nisl venenatis quam. Aliquam non euismod dolor, nec molestie turpis. Pellentesque pharetra lacus et elit aliquam pellentesque. Praesent rutrum vitae nisi commodo rhoncus. Phasellus consectetur sem dignissim dapibus convallis. Donec commodo lectus euismod diam pretium, nec posuere lectus vestibulum. Fusce congue at sem et ornare. Morbi nulla risus, molestie sed velit sed, fermentum ultrices massa. Ut viverra sem purus, sit amet interdum mauris pellentesque et. Vivamus ipsum magna, vulputate in vehicula eget, ornare eget magna.

Suspendisse potenti. Integer non metus ac nisi laoreet finibus ac quis tortor. Mauris auctor, nisl sit amet fringilla rhoncus, felis orci feugiat neque, eget interdum nibh velit eu leo. Ut sit amet odio nec mauris mattis tempus. Maecenas dolor elit, tristique quis varius eleifend, volutpat quis magna. Praesent fringilla porttitor lobortis. Ut ante dui, rhoncus eu orci at, dignissim dapibus tortor. Aliquam erat volutpat. Vivamus tempus mi augue, eu lacinia risus aliquet ac. Integer ornare at dui a iaculis. Fusce erat sapien, viverra sed nibh sed, bibendum tincidunt nisl. Aliquam pellentesque lobortis justo ac vestibulum. Fusce ac suscipit tellus, eget lacinia ligula. Donec elit enim, lobortis a congue non, facilisis vitae mi. Vestibulum eu sodales sem, vel vehicula tellus.

Quisque eu commodo mauris. Cras risus mauris, condimentum non tincidunt vel, rutrum ac augue. Proin ac venenatis dui, faucibus vulputate massa. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse commodo libero vitae egestas auctor. Cras molestie varius nunc at vulputate. Donec ut sem in magna semper dictum nec in velit. Donec congue augue a diam bibendum, ac luctus turpis posuere. Donec id finibus tellus, et tempus est. Proin id tincidunt lorem.