Soporte » Buscar » Resultados de búsqueda para 'woocommerce email'

Viendo 15 resultados - del 301 al 315 (de un total de 323)
  • Foro: Plugins y Hacks
    En respuesta a: Modulo de pago Redsys

    Buenas tardes tonism12:
    Descargando el nuevo plugin de RedSys Gateway for WooCommerce» ya viene preparado para la nueva encriptación SHA-256.

    El proceso es algo tedioso pero por parte de RedSys, ya que tienes que loguearte en sus entornos para conseguir la clave que luego debes ingresar en el plugin.

    Ponte en contacto con ellos y diles que te envíen un email con los pasos a seguir. Hace poco hice esta modificación en 2 páginas y no tuve problemas.

    Si ves que te trabas en algún punto, vuelve a escribirnos y con gusto te echaremos una mano.

    Un saludo,
    Mauricio

    • Tengo instalada la última versión de Woocomerce 2.4.10 y me he dado cuenta hoy que el fichero: wp-content/plugins/woocommerce/readme.txt ha sido modificado, insertando un mogollón de texto que ni pajolera idea de que es. No sé si es malo o bueno. Para que veáis lo que ha insertado, os dejo el texto:

      = 2.3.13 – 07/07/2015 =
      353 * Fix – Improved the email settings save and tabs for 3rd party plugins.
      354 * Fix – Datepicker range for variations.
      355
      356 = 2.3.12 – 06/07/2015 =
      357 * Fix – Fixed Google Chrome forcing to use SSL. This can cause some issues on websites behind load balancers or reverse proxies. [Read more](http://docs.woothemes.com/document/ssl-and-https/#websites-behind-load-balancers-or-reverse-proxies).
      358 * Fix – Escaped shop url in empty cart template.
      359 * Fix – Escaped product tabs titles.
      360 * Fix – Removed deprecated PHP4 constructor on Widget classes.
      361 * Fix – Wrong price_slider_updated JS event arguments.
      362 * Fix – Stock quantity type in WC-API.
      363 * Fix – Don’t reveal username when login failed on valid email login.
      364 * Fix – Fatal error on order details when have some downloadable product deleted.
      365 * Fix – Relative paths validation for downloadable product.
      366 * Fix – Flat rate shipping costs should ignore virtual items.
      367 * Tweak – Keep product quantity when happens some error while add product on the cart.
      368
      369 = 2.3.11 – 10/06/2015 =
      370 * Fix – Check if rating is enabled before check if rating is required to a review.
      371 * Fix – get_discounted_price needs to check if taxes are enabled.
      372 * Fix – Fixed filetype check for digital downloads.
      373 * Fix – Newfoundland and Labrador state rename.
      374 * Fix – Escaped js in widget layered nav when use the dropdown option.
      375 * Fix – Switch the permissions check for json_search_products to use the read_product capability.
      376 * Fix – Fixed the addition of variable products using the Order API.
      377 * Fix – Sale item exclusion logic for variations.
      378 * Fix – Clear correct variation stock transients when setting stock.
      379 * Fix – Switch to JSON to avoid unserializing untrusted data when handling responses from PayPal.
      380 * Fix – API – Fixed the sanitization for downloadable files on products endpoint.
      381 * Tweak – woocommerce_downloadable_file_exists filter.
      382
      383 = 2.3.10 – 01/06/2015 =
      384 * Fix – Fixed theme check notice for core supported themes.
      385 * Fix – Add RTL direction to emails.
      386 * Fix – Fixed product category media upload modal.
      387 * Fix – Coupon maximum discount calculation.
      388 * Fix – PayPal icons and URLs.
      389 * Fix – API – Fixed subtotal_tax round and decimal dp.
      390 * Fix – Wrap payment js in jquery.
      391 * Fix – Delete correct transient when linking variations.
      392 * Fix – Set default currency position format string (in case of missing or invalid woocommerce_currency_pos option value).
      393 * Fix – Simplify Commerce undefined constant (‘error_code’ > ‘$error’ typo).
      394 * Fix – Fixes too many arguments in function or method call: WC_Shortcode_My_Account::add_payment_method.
      395 * Fix – Pass correct number of arguments to wc_lostpassword_url(), wc_nav_menu_items(), wc_nav_menu_item_classes(), and wc_change_term_counts().
      396 * Fix – Fixes usage of void return value from wc_cart_totals_taxes_total_html().
      397 * Fix – Missing global in render_product_columns().
      398 * Fix – Add $args arguments to WC_Product_Factory->get_product_class() to allow $product_type to be overwritten by $args['product_type'].
      399 * Fix – Remove call to wp_specialchars_decode() in wc_get_price_thousand_separator() and wc_get_price_decimal_separator().
      400 * Fix – fclose in logging class requires a resource, not a string.
      401 * Fix – Prevent (admin) SQLi when setting stock levels for product variations.
      402 * Tweak – Extra escaping of customer emails in wc_customer_bought_product().
      403 * Tweak – Improve tooltip sanitization.
      404 * Tweak – Escape provided array of post codes in tax class.
      405 * Tweak – Escape metadata when duplicating products.
      406 * Tweak – Escape permalink settings slugs.
      407 * Tweak – Sanitize columns value in shortcodes.
      408 * Tweak – Use prepare for updating attributes.
      409 * Tweak – Use wp_safe_remote_ functions in place of wp_remote_ where applicable.
      410 * Tweak – Added extra capability checks to notices, email template editing, and admin ajax requests.
      411 * Tweak – Set nonce_user_logged_out to WC session ID, if set.
      412 * Tweak – Added wc_send_frame_options_header function to prevent checkout and account pages from being used in iFrames. Added via filter so this can be disabled.
      413 * Tweak – Validate file types are allowed for downloadable products when saving.
      414 * Tweak – Filter: woocommerce_cart_item_removed_title
      415 * Tweak – Update html-admin-page-status-report.php to show unaltered URLs.
      416 * Tweak – When updating transients, clear previous version of transients.
      417 * Tweak – Replace max_related_posts_query for performance reasons.
      418 * Tweak – Combine transients for get_rating_count.
      419 * Tweak – Bump the PrettyPhoto version during enqueue to flush caches.
      420 * Tweak – Remove all instances of sslverify=false #8058
      421 * Tweak – Error prevention when showing customer orders on the frontend.
      422 * Tweak – Added PH states.
      423
      424 = 2.3.9 – 19/05/2015 =
      425 * Fix – Fixed language upgrader verification.
      426 * Fix – Refund reporting #8010
      427 * Fix – Redirect after bulk editing.
      428 * Fix – Prevent variable overwrite in save_product_meta.
      429 * Fix – Fix stock report pagination.
      430 * Fix – Fixed paypal about URL for Malta.
      431 * Fix – Fixed save downloadable files for product variations.
      432 * Fix – Remove submitdiv and fix post status updating.
      433 * Fix – Fixed the sort order dropdown items when create new product attributes.
      434 * Fix – Move action to prevent infinite recursion on login/restoring saved carts.
      435 * Fix – Update PrettyPhoto to 3.1.6 to resolve XSS security issue https://github.com/scaron/prettyphoto/issues/149
      436
      437 = 2.3.8 – 20/04/2015 =
      438 * Fix – Ensure coupon taxes are reset when calculating totals.
      439 * Fix – Downloads url sanitization to work correctly with shortcodes and urls.
      440 * Fix – State/Contry select2 issues with Internet Explorer.
      441 * Fix – Flat rate per item and per class if no additional costs added.
      442 * Fix – Simplify Commerce compatibility with free trial subscriptions.
      443 * Fix – Select2 z-index in the admin.
      444 * Fix – Postmeta records deletation on plugin uninstall.
      445 * Fix – List only approved comments in products reviews on API.
      446 * Fix – Improved variation SKU display.
      447 * Fix – Prices including tax within orders.
      448 * Fix – Ensure line taxes are stored when calculating tax theough the API.
      449 * Fix – Add null date check for download permissions.
      450 * Fix – PayPal Logging.
      451 * Fix – Coupon product id and category id checks should run for all coupon types.
      452 * Tweak – Hook in cart totals via action.
      453 * Tweak – Prevent errors when adding or deleting products for the coupon.
      454 * Tweak – Prevent errors when check customer capability to view orders.
      455 * Tweak – Ensure Price Filter links has a trailing slash to avoid pagination issues.
      456 * Tweak – Improved the check for mismatched totals in items lines for PayPal payment gateway.
      457 * Tweak – Use wc_stock_amount to format API orders stock amount.
      458 * Tweak – Ensure show_in_admin_all_list is respected for order statuses.
      459 * Tweak – Remove rounding from shipping costs for greater shipping tax precision.
      460 * Tweak – Only automatically cancel orders created via checkout + allow post_parent to be set.
      461 * Tweak – Deny all access to revisions through API.
      462
      463 = 2.3.7 – 18/03/2015 =
      464 * Fix – Allow saving of empty download expiry date on orders.
      465 * Fix – get_total_discount() function with certain tax setups.
      466 * Fix – stock management for variations for Products API.
      467 * Fix – Price filter styling.
      468 * Fix – Support price filter min or max only.
      469 * Fix – Allowed paths for file url.
      470 * Tweak – Chile address format.
      471 * Tweak – Revised how discounts/discount taxes are stored for consistency. Always store ex. tax to make data retrieval easier, and to ensure totals are correct after settings changes. Backwards compatibility maintained through use of order versioning.
      472 * Tweak – Delete product attachments when the Products API fails.
      473
      474 = 2.3.6 – 13/03/2015 =
      475 * Fix – Removal of coupons containing spaces.
      476 * Fix – Unclosed div in profile page.
      477 * Fix – Export report CSV.
      478 * Fix – Settings API – allow multiselect fields to be emptied.
      479 * Fix – Saving an order needs to save the discount amount ex. tax like the cart.
      480 * Fix – Order again with custom attributes.
      481 * Fix – [CVE-2015-2329] Prevent potential XSS within tooltips (discovered by Fortinet FortiGuard Labs).
      482 * Fix – Paypal debug option.
      483 * Fix – Removed $q->query[‘wc_query’] = ‘product_query’ which broke redirects (#7703). Use $q->get(‘wc_query’) instead.
      484 * Fix – Sanitize tax_rate_id when saving taxes in the backend to prevent potential SQL injection (discovered by WordFence).
      485 * Tweak – Show discounts inc. tax when showing order totals inc. tax.
      486 * Tweak – Use 30 days instead of year for transients to avoid bugs in memcache plugins.
      487 * Tweak – Add reports menu item if user can access reports but not the main WC section.
      488 * Tweak – Improve grouped product quantity inputs.
      489 * Tweak – Load the persistant cart if cart is empty.
      490 * Tweak – Prevent cart being cleared when accessing the login page.
      491 * Tweak – Shipping calculator – Made state/postcode respect country locale like checkout.
      492 * Tweak – Move default customer location to general settings tab.
      493 * Tweak – Only run save_category_fields for product_cat taxonomy.
      494 * Tweak – Improved message when variation attributes are missing.
      495 * Tweak – Allow wc_attribute_label to support product-level attribute names.
      496 * Tweak – Added the option to not round the line total.
      497 * Tweak – Improved coupon percent calculation for fixed discounts.
      498 * Tweak – Show calculate total when shipping is needed, but shipping is hidden.
      499 * Tweak – Cart total labels.
      500 * Tweak – Increase wc_get_weight precision.
      501 * Dev – API – reports/sales now also returns total refunds.
      502
      503 = 2.3.5 – 20/02/2015 =
      504 * Fix – Plain text address formatting.
      505 * Fix – Detect shortcodes when saving URLs.
      506 * Fix – Unhook wc_page_endpoint_title after it is ran once (main page title).
      507 * Fix – Taxes save issue when page is paginated.
      508 * Fix – Cross/up-sells should not search variations.
      509 * Fix – Related post offset.
      510 * Tweak – Round report values.
      511 * Tweak – Text in plain text emails.
      512 * Tweak – Improve category coupon message.
      513 * Tweak – Don’t download GeoIP Database until geolocation option is enabled in settings.
      514
      515 = 2.3.4 – 17/02/2015 =
      516 * Fix – limit_usage_to_x_items option in coupons.
      517 * Fix – Run coupon codes through html_entity_decode.
      518 * Fix – Tax by code report for refunds.
      519 * Fix – Auto-generation of slug when adding new attribute.
      520 * Fix – Prevented errors when DOMDocument is not found (used for your HTML/Multipart emails).
      521 * Fix – Load WC css on user edit screen.
      522 * Fix – DB error when showing reports by product without selecting a product.
      523 * Fix – Stock status when updating out of stock product.
      524 * Fix – Fix place order button text on init.
      525 * Fix – When duplicating products, handle entities.
      526 * Fix – Double shop page in breadcrumb and white space issues.
      527 * Fix – When purchasing multiple downloadable products (same item), multiply download limit by qty purchased.
      528 * Fix – Added checks for gzopen to prevent activation errors.
      529 * Tweak – Added DOMDocument item in the System Status as a requirement.
      530 * Tweak – Simplify default mode should be ‘standard’.
      531 * Tweak – Set attribte ‘query_var’ true when public.
      532 * Tweak – Use wc_get_page_permalink() to get page permalinks.
      533 * Tweak – Register shop_order post statuses earlier to ensure statuses are registered for cron.
      534 * Tweak – Improvements to refund handling in Taxes by code/date, and sales by date reports. Gross/net excludes refunds.
      535 * Tweak – Share data between Sales by Date report and API.
      536 * Tweak – Related posts – replace ORDER BY RAND() with random offset.
      537 * Tweak – Run item meta label through wc_attribute_label() in admin order page.
      538 * Tweak – Run File URLs through esc_url_raw instead of wc_clean to preserve spaces.
      539 * Tweak – Small timeout on checkout update action to prevent several triggering at once.
      540 * Tweak – Restock items AFTER refund, not before.
      541 * Tweak – If logged in, populate customer data from user meta.
      542
      543 = 2.3.3 – 12/02/2015 =
      544 * Fix – Potential notice with preg_match wildcard search, if used incorrectly.
      545 * Fix – Typo in get_from_name method.
      546 * Fix – Fix errors during checkout when mb_convert_encoding() is not supported.
      547 * Fix – Change hooks used to output post columns – fixes columns after quick edit.
      548 * Fix – Only apply product/cat coupon checks for cart to cart coupons.
      549 * Fix – Query in uninstall script.
      550 * Tweak – Only run the uninstaller if the «Uninstall on Delete» option is checked in system status.
      551
      552 = 2.3.2 – 12/02/2015 =
      553 * Fix – Item meta removal query in order class.
      554 * Fix – Pass correct shipping cost to PayPal.
      555 * Fix – Flat rate extra costs when costs are an array.
      556 * Fix – When ratings are required for reviews, ensure validation is performed if the rating element is removed from DOM.
      557 * Fix – When updating shipping in cart, keep shipping calculator in DOM.
      558 * Fix – WC_TEMPLATE_DEBUG_MODE in admin.
      559 * Fix – Average product rating when ratings are not required.
      560 * Fix – attribute_public option.
      561
      562 = 2.3.1 – 11/02/2015 =
      563 * Fix – When the geolocation database cannot download, ensure the correct method is used to log the error.
      564 * Fix – Notice in woocommerce_form_field().
      565 * Fix – attribute_public notice before DB upgrade.
      566 * Fix – [products] ids and sku args.
      567 * Fix – Backwards compatibility for (deprecated) $tax variable in WC_Cart.
      568 * Fix – is_available() check in local pickup.
      569 * Fix – Added WC version of GEOIP classes to prevent conflicts with other plugins.
      570
      571 = 2.3.0 – 11/02/2015 =
      572 * Feature – Option to geo-locate the customer’s inital location.
      573 * Feature – Display taxes in store based on the customer location, rather than the shop base.
      574 * Feature – Made tax importer expand postcode ranges.
      575 * Feature – Print styles for reports.
      576 * Feature – Remove products from the cart in the widget.
      577 * Feature – Bulk edit sales schedule on variations.
      578 * Feature – Fresh new frontend / email design.
      579 * Feature – Undo link in message when removing products from the cart.
      580 * Feature – Compatibility with Twenty Fifteen default theme.
      581 * Feature – Added ‘top freebies’ to product report.
      582 * Feature – Added numeric sort for attributes.
      583 * Feature – Added support for some Jetpack features: Omnisearch, Publicize and Markdown editor.
      584 * Feature – UI for adding Webhooks.
      585 * Feature – Show Gross and Net totals in reports.
      586 * Refactor – Removed deprecated methods from WC_Frontend_Scripts and rewrote script registration and localization to run once.
      587 * Refactor – Routing all email functionality through one send() method.
      588 * Refactor – Replaced existing email css inliner with Emogrifier.
      589 * Refactor – get_product_search_form().
      590 * Refactor – Improved the Shipping Class field in products quick edit and bulk edit.
      591 * Refactor – Removed style settings in favour of separate plugin.
      592 * Refactor – Removed quantity increment/decrement buttons in favour of separate plugin.
      593 * Feature – Added link on purchased products list on orders screen.
      594 * Fix – When ‘hide out of stock products’ is disabled, out of stock variations / attributes are now visible.
      595 * Fix – Fix cart coupon on-sale checks for variations.
      596 * Tweak – Double the default product image dimensions.
      597 * Tweak – Added refunds to Sales by Date report.
      598 * Tweak – Updated prevent_caching() method to work if a cart/checkout page isn’t set.
      599 * Tweak – When user tries to download a file and isn’t logged in, send them to the account page with a notice.
      600 * Tweak – Logic in wc_paying_customer to only increase for ‘simple’ orders.
      601 * Tweak – Added tool to refresh stats to customer list.
      602 * Tweak – Recent order table on my account is responsive.
      603 * Tweak – Drop WC tables in wpmu_drop_tables (for multisite).
      604 * Tweak – Moved ‘Proceed to checkout’ button on cart to beneath totals.
      605 * Tweak – Improved ‘responsiveness’ of product data tabs on add/edit product screen.
      606 * Tweak – Added ‘stupidtable’ script to allow order item sorting on the order screen (by name, cost, qty).
      607 * Tweak – In the cart, add variation selected data to the permalink.
      608 * Dev – API – Look up product by sku.
      609 * Dev – API – New parent_id param for products API.
      610 * Dev – API – Sales data in API now matches sales data in WooCommerce reports page.
      611 * Dev – API – Added ‘net_sales’ data to reports.
      612 * Dev – API – catalog_visibility is set to visible by default in products API.
      613 * Dev – API – Added new filter to query for specific products by ID: /products?filter[in]
      614 * Dev – Made template debug mode set WC_TEMPLATE_DEBUG_MODE constant and remove all overrides for all template loading functions.
      615 * Dev – Switched to .scss from .less for all styles.
      616 * Dev – Included bourbon for scss mixins.
      617 * Dev – Decoupled the order summary and payments area. Both are updated independently via ajax fragments and can be moved around via actions. TEMPLATES OVERRIDING THESE TEMPLATES WILL NEED TO UPDATE THEIR FILES.
      618 * Dev – Moved WC_Cart::get_cart_from_session() and dependencies to a later hook (was init, now wp_loaded).
      619 * Dev – Migrated away from CHOSEN to SELECT2. Chosen is still registered in case 3rd parties try to enqueue.
      620 * Localisation – Add Ukrainian currency and symbol.
      621 * Localisation – Greece regions.
      622
      623 = 2.2.11 – 29/01/2015 =
      624 * Add – URL in Usage/Limit column in Coupons table to query for orders.
      625 * Fix – esc_url() applied to prevent potential XSS issues.
      626 * Fix – «Link all variations» button.
      627
      628 = 2.2.10 – 16/12/2014 =
      629 * Fix – Stock status on quick and bulk edit.
      630 * Fix – Incorrect clearing of error messages.
      631
      632 = 2.2.9 – 15/12/2014 =
      633 * Add – API – parent_id for products endpoint.
      634 * Fix – Processing and On-hold order links in WooCommerce Status dashboard widget.
      635 * Fix – Orders API when query orders with deleted products.
      636 * Fix – Check order exists in wc_clear_cart_after_payment().
      637 * Fix – move $cart_updated inside $passed_validation to prevent unnessary updates.
      638 * Fix – MX states keys.
      639 * Fix – sanitize_user correctly during registration.
      640 * Fix – API – Variation handling for stock data.
      641 * Fix – When bulk editing variable products, set the stock status for non-stock managed variations.
      642 * Fix – Fix coupons by date queries to prevent inflated results.
      643 * Fix – During refunds, correctly set shipping tax totals.
      644 * Fix – Ensure floats are safely converted to strings.
      645 * Fix – remove_taxes needs to clear line_tax_data.
      646 * Fix – Correctly save custom address fields in admin.
      647 * Fix – API – Fixed a bug for save multiple images from the media library in products endpoint.
      648 * Fix – API – Delete products when happens some error.
      649 * Fix – API – enable_free_shipping, product_category_ids, exclude_product_category_ids and customer_emails coupons params.
      650 * Fix – API – Coupons expiry_date format.
      651 * Fix – Force HTTP option behavior on Customizer Preview screen.
      652 * Fix – Cart error messages when the session is expired.
      653 * Tweak – API – set_fee should support tax_data.
      654 * Tweak – Don’t force tax_rate_id to an integer. Allow strings.
      655 * Tweak – Additional filters inside tax class to support extensions.
      656 * Tweak – Allow plugins to filter the taxable location.
      657 * Tweak – Added result and message keys to order_review AJAX call.
      658 * Tweak – Added get_cart_item to WC_Cart class.
      659
      660 = 2.2.8 – 29/10/2014 =
      661 * Fix – Image crop option.
      662 * Fix – Display of order note date.
      663 * Fix – API POST/PUT products attributes values.
      664 * Fix – Added fallbacks to wp_get_referer().
      665 * Fix – PayPal encoding for return urls.
      666 * Fix – Low stock report should hide no stock.
      667 * Fix – Fixed nonce check in form handler.
      668 * Fix – Notices in status report when checking if templates exist.
      669 * Fix – Allow to filter empty tax rate code.
      670 * Fix – Fixed the value format in stock field with wc_stock_amount().
      671 * Fix – Remove strtolower for status names and capitalize statuses.
      672 * Tweak – Removed unused methods from PayPal gateway.
      673 * Tweak – Use current user ID for refunds.
      674 * Tweak – Allow API edit_product method to update post_name (slug).
      675
      676 = 2.2.7 – 22/10/2014 =
      677 * Fix – Fix refund date.
      678 * Fix – Fixed various notices.
      679 * Fix – Make updater set parent backorder status.
      680 * Fix – In the US address format, use state code rather than the full state name.
      681 * Fix – Use mb_strtolower to prevent issues with unicode chars.
      682 * Fix – Introduced the wc_strtolower() function
      683 * Fix – Make cart total consider taxes when saving an order.
      684 * Fix – Fix /shop/ base URL Non Latin issue with url decode.
      685 * Fix – Correct report handling for full and partial refunds.
      686 * Fix – Update jquery payment to prevent autocomplete issues.
      687 * Fix – Coupon API: Don’t return current timestamp when expiry_date is not set.
      688 * Fix – wc_update_product_stock should update stock regardless, if the meta data doesn’t currently exist.
      689 * Fix – Added wp_kses_post to purchase note
      690 * Fix – Fixed edit account page fields #6577.
      691 * Fix – Fix stock report queries #6565.
      692 * Fix – Fix error message with maximum amount in coupon class.
      693 * Fix – Fix nonce usage during checkout/account pages.
      694 * Fix – Incorrect conversion of Unicode characters in order status names.
      695 * Fix – Edit Account fields order.
      696 * Fix – Shipping address values on checkout page.
      697 * Fix – Enforce slug format of translated edit-address-slugs.
      698 * Tweak – Allow for non-integer stock quantities.
      699 * Tweak – Update simplify commerce to use new $order->get_status().
      700 * Tweak – Only show integrations subnav when there are multiple integrations.
      701
      702 = 2.2.6 – 08/10/2014 =
      703 * Fix – Notices in the cache helper.
      704 * Fix – Prevent bulk edit from breaking sale price scheduled dates.
      705 * Fix – Prevent address fields being empty when editing an address within an order.
      706 * Fix – Removed save_post remove_action call which breaks 3rd party plugins. See ticket #6376 and #6485 for details.
      707 * Fix – Prevent warnings when set «Specific Countries» empty in shipping methods.
      708 * Tweak – Added woocommerce_product_subcategories_hide_empty filter.
      709 * Tweak – Added filter for shipping tax.
      710 * Tweak – Product attribute shortcode should return columns css class.
      711
      712 = 2.2.5 – 07/10/2014 =
      713 * Fix – Filters in admin screen for coupons and orders.
      714 * Fix – When bulk editing, don’t allow sale price to be negative.
      715 * Fix – When manually adding items to an order, show tax columns.
      716 * Fix – When manually adding items to an order, include variation data.
      717 * Fix – Prevent errors when constructing WC_Order without an ID.
      718 * Fix – Item_id notices in email templates.
      719 * Fix – Use variation get_stock_quantity() for variation max_qty.
      720 * Fix – Prevent bulk edit cancel from clearing options when bulk editing variations.
      721 * Fix – Use term_taxonomy_id for transient names – fixes counts in layered nav.
      722 * Fix – Use wc_get_order in simplify-commerce.
      723 * Fix – Use ‘no’ instead of boolean to disable PayPal gateway.
      724 * Fix – Do not escape redirect url in form handler – fixes malformed URLs.
      725 * Fix – Prevented non-existant pages from breaking cache helper.
      726 * Fix – Prevent sale prices showing errors in admin wrongly.
      727 * Fix – Prevent order statuses affecting other queries.
      728 * Fix – Removed deprecated get_page() functions.
      729 * Fix – Category archives. WP core still has issues dealing with pad_counts + parent when getting categories. Workaround by not hiding empty cats, then filtering the returned list using wp_list_filter.
      730 * Fix – When formatting meta data for display, suffix items to prevent issues when there are multiple values for the same meta key.
      731 * Fix – Unhook save_meta_boxes after first successful run to prevent race conditions.
      732 * Tweak – Added refunds to Sales by Date report.
      733 * Tweak – Tweak load_plugin_textdomain to be relative – this falls back to WP_LANG_DIR automatically. Can prevent «open_basedir restriction in effect».
      734 * Tweak – Added acceptance marks to PayPal Standard where applicable to replace generic PayPal icon.
      735
      736 = 2.2.4 – 18/09/2014 =
      737 * Fix – Prevent errors when adding ‘zero-rated’ tax on checkout.
      738 * Fix – Fixed a varation product width inheritance bug.
      739 * Fix – Totals in taxes by date report.
      740 * Fix – Fix the ‘only 1 visible product’ redirect to not trigger when paging results.
      741 * Tweak – Improved headers sent notice to include file and line.
      742 * Tweak – When updating order status, ensure its a valid WC order status.
      743 * Tweak – Add notice when order is no longer editable.
      744 * Dev – Allow getting rating count for a specific rating value #6284.
      745 * Localisation – Nepal States.
      746 * Localisation – Mexico states.
      747
      748 = 2.2.3 – 16/09/2014 =
      749 * Fix – Order status translation in admin and account page.
      750 * Fix – Ensure shipping address gets displayed – fixes needs_shipping_address() method.
      751 * Fix – Escaping of country names in tax settings.
      752 * Fix – Encoding of pagination link when using default permalinks.
      753 * Fix – NPR currency.
      754 * Fix – Fixing «Invalid key» error when clicking link in password reset email.
      755 * Fix – Mobile checkout via PayPal when using tax inclusive prices.
      756 * Fix – Thumbnails «hard crop» option.
      757 * Fix – Missing variables when add new product variation.
      758 * Fix – Fixed minor XSS issue on reports screens by escaping and sanitizing ‘range’ GET variable.
      759 * Fix – Number format when calculate the line items tax.
      760 * Fix – Language update/install in Multisites.
      761 * Fix – «Set product image» media gallery title in non-product post type.
      762 * Fix – Number of processing orders in WooCommerce > Orders menu.
      763 * Fix – Issue that preventing cookies being set on shutdown after wp_send_json.
      764 * Fix – Incorrect shipping calculation because of missing width in product variation.
      765 * Tweak – Display of locale information on system status page.
      766 * Tweak – Removed postcode for Bahamas.
      767 * Tweak – In system status, show path to template file override.
      768 * Tweak – Dynamically get the address fields in WC_Checkout::create_order()
      769 * Tweak – If a refund fails, delete refund post.
      770 * Tweak – Button for hide the language update message.
      771 * Tweak – Method for install the translations directly.
      772 * Tweak – Display of h4 in settings pages.
      773 * Dev – Added woocommerce_get_settings_ID filters.
      774
      775 = 2.2.2 – 11/09/2014 =
      776 * Fix – Saving of variation stock when parent stock management is disabled.
      777 * Fix – «open_basedir restriction in effect» error caused on install when trying to create the WC logging directory.
      778 * Fix – For regular products, ensure stock level saves on product creation.
      779
      780 = 2.2.1 – 10/09/2014 =
      781 * Fix – Small tweak to the installer to prevent errors caused by outdated plugins.
      782 * Fix – Mijireh Checkout update link.
      783 * Tweak – Small tweak to update notification to remind users to update old plugins prior to install.
      784
      785 = 2.2.0 – 10/09/2014 =
      786 * Feature – Refunds system for orders.
      787 * Feature – New orders panel for managing line items + totals.
      788 * Feature – Language pack downloader. po and mo files removed from core (too heavy).
      789 * Feature – Added used payment gateway to view orders screens.
      790 * Feature – Allow backorders to be configured at variation level.
      791 * Feature – Protect admins from shop manager users.
      792 * Feature – Ability to add custom quantity using add_to_cart shortcode.
      793 * Feature – Ability to set a maximum spend for coupons.
      794 * Feature – Added Simplify Commerce payment gateway.
      795 * Fix – Allow endpoint use on the front page.
      796 * Fix – user_activation_key password reset code.
      797 * Tweak – Recalculate the cart totals, in the event a user registers during checkout and in doing so qualifies for any discounts.
      798 * Tweak – Use woocommerce_valid_order_statuses_for_payment in pay_action too.
      799 * Tweak – Added the possibility to translate the edit-address endpoint slug.
      800 * Tweak – Removed all the_content filter in favor to wpautop() and do_shortcode().
      801 * Tweak – Send IPN email notifications to new order email.
      802 * Tweak – Clear and wipe session data on logout and end of checkout for guests.
      803 * Tweak – Load archive-product.php for other product taxonomies.
      804 * Tweak – Disable image size settings if filters are being used.
      805 * Tweak – Hide the shipping address when local pickup is used.
      806 * Tweak – Password protected posts are not hidden from catalog by default anymore, visibility can be set via the ‘Catalog visibility’ option.
      807 * Tweak – Removed the shortcode button in favor to [WooCommerce Shortcodes](https://wordpress.org/plugins/woocommerce-shortcodes/)
      808 * Dev – API Version 2 with push support.
      809 * Dev – API: Lookup customers by email endpoint.
      810 * Dev – API: Allow ordering on the resource level.
      811 * Dev – Customers API / Methods PUT/POST/DELETE.
      812 * Dev – Coupons API / Methods PUT/POST/DELETE.
      813 * Dev – Orders API / Methods PUT/POST/DELETE.
      814 * Dev – Products API / Methods PUT/POST/DELETE.
      815 * Dev – Added description parameter to the woocommerce_form_field function.
      816 * Dev – Introduce woocommerce_valid_order_statuses_for_payment_complete filter.
      817 * Dev – Introduce woocommerce_thankyou_order_received_text filter.
      818 * Dev – Introduce woocommerce_product_backorders_allowed filter.
      819 * Dev – get_user and get_user_id methods.
      820 * Dev – Add new ‘wc_admin_reports_path’ filter to reports.
      821 * Dev – Add user ID to shipping packages.
      822 * Dev – Added product id parameter to related posts filters.
      823 * Dev – WC_LOG_DIR constant for defining the log directory.
      824 * Dev – Moved default logging directory 1 level above WordPress, rather than in the plugin folder.
      825 * Dev – Added log viewer in System Status.
      826 * Dev – Made stateless classes static to allow unhooking of methods.
      827 * Dev – Introduces the wc_get_log_file_path() function.
      828 * Dev – Introduces the WC_Order::needs_shipping_address() method.
      829 * Dev – Gateways can set transaction ID for the order.
      830 * Dev – Gateways can do refunds via the Payment Gateway API.
      831 * Refactor – Changed the method in which order statuses are stored. Previously, order status was a taxonomy. This caused issues when unique term slugs differed from what we were expecting, and also added additonal overhead to order queries in reports. https://github.com/woothemes/woocommerce/issues/3064 Order status is now stored as post status – several new post statuses have been added. Order class variables are backwards compatible. The only thing to note (for devs) is that any query must use the order status instead of ‘publish’ when getting orders and querying by post_status. THe shop_order_status has also been removed.
      832 * Refactor – Update stock amounts with DB queries.
      833 * Refactor – Simplified attribute name sanitisation which maintains UTF8 char integrity.
      834 * Refactor – Country class return methods.
      835 * Notice – Deprecated Mijireh gateway in core. Plugin is available on .org.
      836 * Localisation – Egypptian currency.
      837 * Localisation – Address format of Taiwan.
      838 * Localisation – Removed language files from core to made the package lighter (see language pack downloader feature).
      839
      840 = 2.1.12 – 01/07/2014 =
      841 * Fix – Total tax should be +, not -.
      842 * Fix – Address format in plain text emails to use line breaks, not commas.
      843 * Fix – order item count fix and tr class filters.
      844 * Fix – Missing translations during checkout.
      845 * Fix – Correctly clear transients, including sale transient.
      846 * Tweak – woocommerce_get_order_item_totals_excl_free_fees hook.
      847
      848 = 2.1.11 – 09/06/2014 =
      849 * Fix – Plain text email display of customer address.
      850 * Fix – Saving tax rates threw notices (missing git cherry pick).
      851
      852 = 2.1.10 – 03/06/2014 =
      853 * Fix – Removed unecessary localization from edit account.
      854 * Fix – Admin welcome screen css.
      855 * Fix – Fixed my account setting values to wrong user submitted strings.
      856 * Fix – Menu order terms were coming back empty.
      857 * Fix – Fix notice that occurs from external function call.
      858 * Fix – Addons page, reference new json API endpoint.
      859 * Fix – Notices when rendering WooCommerce Shop as Front Page.
      860 * Fix – Prevent undefined notice for Layered Nav title.
      861 * Fix – state_province is not required for mijireh any longer.
      862 * Fix – Fix coupon limit checks and enhance to check ID by provided email (if logged out).
      863 * Fix – Danish krone symbol.
      864 * Fix – check for the existence of the cart during the is_available().
      865 * Fix – Fixes performance degradation on large wp_options tables.
      866 * Fix – improved the shortcodes button for support WordPress 3.9.
      867 * Tweak – Stronger session ID generation.
      868 * Dev – Add action hooks when saving tax rates.
      869
      870 = 2.1.9 – 14/05/2014 =
      871 * Fix – fix case-insensitive matching for coupon posts with uppercase chars.
      872 * Fix – Make the welcome page RTL compatible.
      873 * Fix – Sanitize, but decode, flat rate shipping method ids. UTF-8 Friendly.
      874 * Fix – Stop sending line items to Mijireh. Like PayPal, Mijireh struggles with out prices including tax due to rounding errors. Since the validation cannot be disabled, its better to just send the order as 1 item. This will prevent rounding errors and payment failures. Prices excluding tax are unaffected.
      875 * Fix – Fix fee/coupon lines typo in REST API order response.
      876 * Fix – Fixes a fatal error when WC()->payment_gateways()->get_available_payment_gateways() is called in the admin.
      877 * Fix – is_available check in shipping for excluding countries was backwards.
      878 * Fix – Encoding of @ in download links.
      879 * Fix – Revise how variation attributes are deleted/updated. Prevents issues with WPE caching when you delete and then update right after.
      880 * Fix – Trim commas and empty lines off address formats.
      881 * Fix – defined a min value to cart quantity input.
      882 * Fix – Fix qty input styling in Firefox 29.
      883 * Fix – Use WP SEO class method rather than deprecated fn.
      884 * Fix – Cleaned up logic in email_instructions.
      885 * Fix – Prevent empty session data being stored until a cookie or session exists to retrieve it.
      886 * Fix – fixed WC_Product_Variable::set_stock() compatibility with WC_Product::set_stock().
      887 * Fix – Fix notice when not scanning any files in system status.
      888 * Fix – Made wc_get_product_terms support custom menu_order by using get_terms and an include.
      889 * Fix – Correct character 3 vaildation for UK postcodes.
      890 * Tweak – Add a tip for default selections, and use opt groups for the long bulk edit list.
      891 * Tweak – Option to toggle enable_for_virtual for COD, rather than just doing it.
      892 * Dev – Introduce woocommerce_coupon_data_panels action.
      893 * Dev – Add $package to is_available shipping method hooks.
      894 * Dev – Add tool for disabling shipping rate cache for debug.
      895
      896 = 2.1.8 – 30/04/2014 =
      897 * Fix – Prevent saving duplicate skus in quick edit.
      898 * Fix – Sorting of downloads on my account page.
      899 * Fix – Clear cached API reports when deleting other order transients.
      900 * Fix – Shipping calculator cart messages.
      901 * Fix – Display of UTF8 attributes on view order page.
      902 * Fix – Changed the way the order review html is appended to the checkout page via JS to reduce likelihood of errors.
      903 * Fix – Allow removing downloads from product by removing all rows.
      904 * Fix – Ignore variation stock if disabled globally.
      905 * Fix – Prevent duplicate admin menu items when using menu editor plugins.
      906 * Fix – Remove title from product not purchasable message to prevent possible data leak. Thanks Julio Potier.
      907 * Tweak – Updated REST API docs link.
      908 * Tweak – Updated prettyphoto dependencies.
      909 * Tweak – Customer search performance improvements.
      910 * Tweak – Made default shipping label clearer.
      911 * Tweak – Default order email to user email.
      912 * Tweak – Only show downloadable item related text when product has downloads.
      913 * Tweak – Improved Abstract product constructor.
      914 * Tweak – Add COD instructions to emails.
      915
      916 = 2.1.7 – 10/04/2014 =
      917 * Fix – Allow WC API to generate API keys for different user than the one that is making request.
      918 * Fix – Fix the SKU search logic so it works with other filters.
      919 * Fix – Correctly round shipping + shipping tax together when passes the tax inclusive total to paypal.
      920 * Fix – orderby – skip adding hidden input of submit on a GET so JS can submit properly.
      921 * Fix – Check wc_checkout_params.is_checkout against string ‘1’ instead of int 1.
      922 * Fix – Check order exists when resuming on checkout.
      923 * Fix – When removing base taxes, round to precision.
      924 * Fix – Ensure _order_currency is set.
      925 * Fix – Use $wpdb->db_version() instead of mysql_get_server_info() deprecated in PHP 5.5.
      926 * Fix – myaccount registration added check for auto generate password option.
      927 * Fix – API: normalize both key and value before calculating OAuth signature.
      928 * Fix – API: double-encode percent symbols when normalizing parameters.
      929 * Fix – API: Remove post_parent so grouped simple products are also returned.
      930 * Fix – Clear featured transients when needed.
      931 * Fix – Stay on checkout when removing coupon.
      932 * Fix – Prevent totals refreshing on every keydown event on the checkout.
      933 * Fix – When hierarchy is off, only show children in the cat widget.
      934 * Fix – Delete term count transients after stock status change and trashed post.
      935 * Fix – During save_meta_boxes, only save for the «main» post being saved, not nested or subsequent save_post events.
      936 * Fix – Stop _wc_session_expires autoloading.
      937 * Fix – Remove nonce from comment form to prevent issues with caching.
      938 * Fix – reset grouped products correctly to work with short codes.
      939 * Fix – In admin, work out cart discount without tax amounts.
      940 * Tweak – Apply filters to $product_type and we can set a default product type to new products.
      941 * Tweak – wp_kses_post for meta display in admin.
      942 * Tweak – woocommerce_order_cancelled_notice hook.
      943 * Tweak – Use is_ssl() for get_woocommerce_api_url().
      944 * Tweak – Changes to filters to see if shipping is needed or not in the cart class.
      945 * Tweak – Chunk option names in cleanup_sessions() to reduce load.
      946 * Tweak – Change \WC_Order::add_order_note cap to edit_shop_order instead of manage_woocommerce.
      947 * Tweak – Allow filtering order statuses in dashboard reports widget.
      948 * Tweak – Added is_paying_customer() to easily check if a user is a WC customer.
      949 * Tweak – Allow query string fallback for REST API SSL auth.
      950 * Tweak – woocommerce_coupon_get_discount_amount filter in coupon class.
      951 * Tweak – More friendly/less blunt «no shipping» messages.
      952 * Tweak – use network_site_url instead of network_admin_url for multisite.
      953 * Tweak – Updater – Only show upgrade notices, and use transient cache.
      954 * Tweak – get_image_id method for use in email template. Shows correct variation images.
      955 * Tweak – added validation when save the frontend colors.
      956
      957 = 2.1.6 – 25/03/2014 =
      958 * Fix – Fixed a bug where cron events are scheduled using a function name rather than a hook name.
      959 * Fix – Given transients not required on all pages expiration times to prevent autoloading.
      960 * Fix – Don’t trailingslash Order Cancel URLs with a Query String.
      961 * Fix – Switch to jquery trim to allow checkout in older IE.
      962 * Fix – Variation bulk sale price edit over reaching causing errors on save.
      963 * Fix – Only append generator tag on HTML pages.
      964 * Fix – AED currency symbol.
      965 * Fix – Move loop_end hooks as it is generic and used in all WP loops. Prevents some theme conflicts.
      966 * Fix – Lingering tooltip after gallery image delete.
      967 * Fix – Move plugin headers to main WC POT file.
      968 * Fix – Correct discount calculation in admin when fees are involved.
      969 * Fix – Fix sale flash for out of stock sale items.
      970 * Fix – Use protocol relative URLs in the cart widget because it gets cached and can display on https or http pages.
      971 * Fix – Fix term recount during WP callbacks.
      972 * Fix – Convert states to strings for PayPal (non-US).
      973 * Fix – Hide empty at walker level to fix category widget display.
      974 * Fix – form-login form values were not persistent after failed submission.
      975 * Fix – URL decode not needed for custom text attribute names.
      976 * Fix – Fix bulk editing variation sale price.
      977 * Fix – Remove comment exclusion in order notes meta box.
      978 * Fix – Sync min and max prices for regular and sale prices so prices are displayed correctly when sale price is lower than a regular price of another variation.
      979 * Fix – Expanding line item_meta causes conflicts if attributes are named with things like ‘name’, ‘type’ or ‘qty’. Added blacklist to exclude unsafe values.
      980 * Fix – Added support for clearing report transients when using object caching.
      981 * Fix – encoding issues with attribute values.
      982 * Fix – Escape the contents of the changelog when displayed.
      983 * Fix – Edge case where tax was still displayed for shipping when exempt.
      984 * Tweak – Allow city field to use another input method.
      985 * Tweak – Several new filters.
      986 * Tweak – PayPal, modify currency error message to include both sent and returned currencies for comparison.
      987 * Tweak – enable keyboard shortcuts in prettyPhoto.
      988 * Tweak – Add classes to item meta.
      989 * Tweak – Use is_purchasable to determine if a variation cart button is needed, and potentially show empty_price_html.
      990 * Tweak – new woocommerce_cart_taxes_total filter.
      991 * Tweak – new wc_cart_totals_taxes_total_html() function.
      992 * Tweak – Use API request URL for mijireh and PayPal callbacks.
      993 * Tweak – move variation data to tooltip in order items meta box.
      994 * Tweak – Store variation data for order items added through the admin.
      995 * Tweak – Billing Address > Billing Details text. We take more than address in this section.
      996 * Tweak – Delete terms transient during recount.
      997 * Refactor – jshint javascript files.
      998 * Localisation – add Bangladeshi currency and symbol.
      999 * Localisation – Bangladeshi states (districts).
      1000 * Localisation – Croatian currency symbol.
      1001
      1002 = 2.1.5 – 06/03/2014 =
      1003 * Fix – Prevent notices on new plain text email parameter for BACS and Cheque gateways
      1004 * Fix – Fixed issue where variation prices were hidden when variation stock management wasn’t set
      1005 * Fix – Discounts fixed_product are now properly multiplied by quantity
      1006 * Fix – Fixed bulk edit % increase and decrease
      1007 * Fix – Extra check for access_expires when getting downloadable files
      1008 * Fix – get_related method fixed tags OR query not excluding product ID
      1009 * Tweak – Fallback for when add ons page is not loading
      1010 * Tweak – Hide price suffix in admin panel lists
      1011
      1012 = 2.1.4 – 05/03/2014 =
      1013 * Fix – Prevent duplicate loading of functions files
      1014 * Fix – Fixed breaking timeline for reports
      1015 * Fix – Category widget ordering
      1016 * Fix – BACS and Cheque gateway emails now have a plain text flag
      1017 * Fix – wc_get_product_ids_on_sale will never return 0
      1018 * Fix – Prevent errors upon comments when order is in trash
      1019 * Fix – Reviews widget now links to proper review anchor
      1020 * Fix – Added support for permalinks containing a query string in wc_get_endpoint_url
      1021 * Fix – Variable product add file button works after adding a new variation
      1022 * Fix – Resolved issue where styles didn’t get compiled properly
      1023 * Fix – Changed the save order so email data is correct for manual orders
      1024 * Fix – Later hooking in for template redirect
      1025 * Fix – Reverted load order change for language files and provided proper context
      1026 * Fix – Made woocommerce_update_cart_action_cart_updated a filter which can return true or false to recalc totals
      1027 * Fix – Updated sync logic to exclude hidden and out of stock variations from the price display
      1028 * Fix – Changed set_stock to only make a variable product out of stock if all variations are stock managed to resync prices after stock changes
      1029 * Fix – Use woocommerce_notify_no_stock_amount not 0 in variable class sync method
      1030 * Fix – Suppress errors in download handler by silencing ob_flush and flush calls
      1031 * Fix – load_textdomain first from WP_LANG_DIR before load_plugin_textdomain
      1032 * Tweak – get_states method now returning false instead of array for countries without states
      1033 * Tweak – Improved shipping language strings
      1034 * Tweak – Remove admin check around global po translation file loading
      1035 * Tweak – Improved styles for tab views
      1036 * Refactor – Hardened code base and fixed strict standards notices
      1037
      1038 = 2.1.3 – 27/02/2014 =
      1039 * Fix – Use correct thresholds to calculate out of stock number in dashboard widget
      1040 * Fix – Admin screen strings sanitised to work with Chinese characters
      1041 * Fix – REST API OAuth signature fixed when using filter params
      1042 * Fix – Ensure shipping address data for customers is updated if only shipping to billing address
      1043 * Fix – Fixed sprintf missing parameter in customer-new-account.php template
      1044 * Fix – Ampersand character properly outputted in plain text emails
      1045 * Fix – Stack the password reset fields on smaller screens
      1046 * Fix – Bulk edit options now reflect on all variations
      1047 * Fix – Prevent notices when country has states but no states are specified in cart
      1048 * Fix – Make my-account/view-order use the correct template file
      1049 * Fix – Prevent session warnings when WordPress logs out
      1050 * Fix – Prevent spaces in file names from breaking product thumbnails
      1051 * Fix – Resolved issue where download permissions where not granted in some cases upon order complete
      1052 * Fix – Prevent IE cursor from being stuck in loading animation
      1053 * Fix – Ensure wc_get_product_ids_on_sale returns array of ints, not strings
      1054 * Fix – Prevent rating stars from wrapping in IE
      1055 * Fix – Rating stars properly aligned in small screens
      1056 * Fix – Handle get_rate_code when no matching rate is found
      1057 * Fix – Cleaned noticed that might show when tax rates left empty
      1058 * Fix – Prevented warning when you have hide shipping methods until address entered selected in CoD
      1059 * Fix – Better URL detection for subdirectory installs in get_woocommerce_api_url
      1060 * Fix – Transient names are now md5 hashed so they don’t exceed max length
      1061 * Fix – Fixed searching for orders and speed improvements there
      1062 * Fix – «Show children of current category only» option working again in Product Category widget
      1063 * Fix – Order search by SKU can now return multiple results again
      1064 * Fix – Fixed alignment of radio button in settings API
      1065 * Fix – Layered nav widget now shows terms again when using list OR
      1066 * Fix – Prevent multiple attempts at cancelling actions on orders
      1067 * Fix – Fixes in reporting for variations
      1068 * Fix – My Accounts downloads section now shows files names
      1069 * Fix – Improved code to log in via email address
      1070 * Fix – When guest checkout is enabled, manual made admin orders can be paid without logging in
      1071 * Fix – Fix product counts when subcategories are displayed
      1072 * Fix – Fixed Relevanssi conflicts
      1073 * Fix – Fixed issue with Mijireh incorrectly rounding shipping totals
      1074 * Fix – Shipping class selection will be hidden for virtual variations
      1075 * Fix – Prevent product percentage based coupons to stack discounts
      1076 * Tweak – Added United Arab Emirates Dirham currency
      1077 * Tweak – Enforce a static base for product permalink structures to prevent 404 issues
      1078 * Tweak – Introducing woocommerce_get_username_from_email filter in login processing method
      1079 * Tweak – Trash pages swapped for endpoints instead of force delete
      1080 * Tweak – Flip default status of price_trim_zeros (defaults to true now)
      1081 * Tweak – Performance improvements for My Account view with a lot of available downloads
      1082 * Tweak – Introduces woocommerce_return_to_shop_redirect filter
      1083 * Tweak – Improved tax rounding, to calculate an accurate tax total
      1084 * Tweak – Introduced failsafes to prevent actions trying to take place on removed products
      1085 * Tweak – Permalinks enabled data in REST API
      1086 * Tweak – Filters to restrict granting/revoking access to files
      1087 * Tweak – Added Canadian address format
      1088 * Refactor – Multiple docblock updates
      1089 * Refactor – Multiple code standards improvements
      1090 * Refactor – Changed all text strings without explicit domain, to use the ‘woocommerce’ text domain
      1091 * Refactor – Speed improvements in various places
      1092
      1093 = 2.1.2 – 13/02/2014 =
      1094 * Fix – Removed nl2br function from plain text email-order-items email template
      1095 * Fix – Made static string translatable in email-order-items email template
      1096 * Fix – Added missing third parameter to _doing_it_wrong call
      1097 * Fix – Sidebar in reports screen does now fit big numbers (long strings)
      1098 * Fix – Report stock icon properly set up
      1099 * Fix – Removed manual checks for AJAX requests, relying on DOING_AJAX constant now
      1100 * Fix – Checkout get_value now returns null if no value is set, default can be used as fallback
      1101 * Fix – Variation download url now cleaned via wc_clean instead of esc_url_raw
      1102 * Fix – Wrap billing and shipping fields with a div/class to prevent field order issues
      1103 * Fix – Fix line total display for order fees in admin panel order view page
      1104 * Fix – Restored multiple image selection for product gallery
      1105 * Fix – Update schemas before DBDELTA to fix mysql errors on update
      1106 * Fix – Italian address formatting fix
      1107 * Fix – Set countries as an array by default in the shipping abstract
      1108 * Fix – Fixed term counts when terms span taxonomies
      1109 * Fix – Fixed saving of fee tax total
      1110 * Fix – Fixed «Shipping via» label in PayPal
      1111 * Tweak – Tweak the order of checks in bulk_and_quick_edit_save_post to make it more efficient on autosave
      1112 * Tweak – Always set order billing email address when user is logged in, if no email is provided
      1113 * Refactor – Removed obsolete view order shortcode class
      1114 * Localization – Multiple localization updates
      1115
      1116 = 2.1.1 – 12/02/2014 =
      1117 * Feature – Show notice if template files are out of date for themes including WooCommerce template files
      1118 * Feature – Introducing supporting is_wc_endpoint_url function
      1119 * Fix – During install, register all post types and endpoints so that the rewrite rules are correctly generated.
      1120 * Fix – Allow line breaks in customer addresses on order details page
      1121 * Fix – Fixed all language country codes to reflect WordPress standards
      1122 * Fix – Payment gateway section links work in lower and upper caps texts
      1123 * Fix – Prevents nonce notice when removing item from cart
      1124 * Fix – Hide empty categories in product_categories shortcode
      1125 * Fix – Fixed Twenty Thirteen single product page layout
      1126 * Fix – Fix saving of checkboxes (off state) in widgets API
      1127 * Fix – Proper password validation in user register on the My Account page
      1128 * Fix – When add_to_cart is called, ensure the correct product_id is set for variations
      1129 * Fix – Restored Italian translation files
      1130 * Fix – Ensure stock status is updated. Prevents new products being hidden when the option to hide out of stock products is enabled
      1131 * Fix – Fix manual order calculation when using non-standard decimal points
      1132 * Tweak – Added Croatian Kuna currency
      1133 * Tweak – Throw a non-fatal notice when file trying to be included as template doesn’t exist
      1134 * Tweak – Add versions to all scripts + styles to ensure browser cache is cleared
      1135 * Tweak – Added tinymce buttons relevant to the short description
      1136 * Refactor – Removed unused change password template and shortcode class
      1137 * Refactor – Several function dockblocks improved
      1138 * Refactor – Stripped out some unused variables
      1139
      1140 = 2.1.0 – 10/02/2014 =
      1141 * Feature – New REST API
      1142 * Feature – Define whether prices should be shown incl. or excl. of tax, and add an optional suffix.
      1143 * Feature – Show grouped or itemized taxes during checkout.
      1144 * Feature – Split frontend styles into separate appearance/layout stylesheets and removed the enable/disable option.
      1145 * Feature – Added woocommerce-smallscreen.css to optimise default layout on handheld devices.
      1146 * Feature – Bulk edit increase / decrease variation prices by fixed or percentage values
      1147 * Feature – Admin action to link past orders of the same email address to a new user.
      1148 * Feature – Account edit page for editing profile data such as email.
      1149 * Feature – Customer list reports.
      1150 * Feature – Reports – New design, export csvs, more data.
      1151 * Feature – Ability to link past orders to a customer (before they registered).
      1152 * Feature – Authorize option for paypal standard.
      1153 * Feature – Separate options for countries you can ship to and sell to.
      1154 * Feature – BACS supports multiple account details.
      1155 * Feature – PayPal PDT support (as alternative to IPN).
      1156 * Feature – Handling for password protected products.
      1157 * Feature – Schema markup selector for downloadables.
      1158 * Feature – woocommerce_get_featured_product_ids function.
      1159 * Feature – WC_DELIMITER to customise the pipes for attributes
      1160 * Feature – Standardized, default credit card form for gateways to use if they support ‘default_credit_card_form’.
      1161 * Feature – Coupon usage limits per user (using email + ID).
      1162 * Feature – Option to limit reviews to purchasers.
      1163 * Feature – Option to install missing WooCommerce pages from tools page.
      1164 * Feature – New notices API for adding errors/notices
      1165 * Feature – Compatible with WordPress 3.8 default theme ‘TwentyFourteen’.
      1166 * Feature – Added is_store_notice_showing conditional.
      1167 * Feature – Allow gateways to change the checkout place order button text on selection.
      1168 * Tweak – Added pagination to tax rate screens.
      1169 * Tweak – Added filter to check the ‘Create account’ checkbox on checkout by default.
      1170 * Tweak – Update CPT parameters for ‘product_variation’ and ‘shop_coupon’ to be no longer public.
      1171 * Tweak – COD processing instead of on-hold.
      1172 * Tweak – Added filter to explicitly hide terms agreement checkbox.
      1173 * Tweak – New System Status report layout, now plugin list is better visually and very better to read.
      1174 * Tweak – content-widget-product.php template for product lists inside core widgets.
      1175 * Tweak – Shipping is now renamed to Shipping and Handling on checkout.
      1176 * Tweak – Select all/none for countries in admin.
      1177 * Tweak – Handling for multiselect fields on checkout, and a filter for third party handling.
      1178 * Tweak – Made scripts/styles use protocol-relative URLs.
      1179 * Tweak – Revised shiptobilling functionality on the checkout. «ship to different address» o

    • Hola amigos estoy buscando un plugin para WordPress o Woocommerce que me permita vender entradas y poder hacerlas nominativas (nombre, apellidos, email, dni).

      ¿Conoceis alguno?, un saludo.

    Hola Martin Bruno,

    Primero verifica que tengas activada la opción de enviar notificaciones en la pestaña de «Emails» en la configuración de WooCommerce. (http://docs.woothemes.com/document/email-faq)

    Por defecto WooCommerce envía mail con la función core de WP wp_mail(), ¿Te llegan otros email de tu Sitio Web, como notificaciones? Si esto tampoco funcionan, yo contactaría con tu Hosting para comprobar que no sea un tema de limitación de envíos de email o algún tema parecido.

    Espero que te ayude,

    Javier.

    • Buenas, actualmente estoy trabajando con una tienda online y me gustaría cambiar el diseño que tienen los mails de woocommerce, sinceramente no se muy bien como hacerlo y tampoco me quiero poner a toquetear mucho sin saber.

      – Ya copie las plantillas php a la carpeta de mi tema.

      – Busco cambiar el texto que viene por defecto, (texto en castellano que no esta en la plantilla php y que por lo tanto no estoy seguro de donde está para poder sustituirlo).

      – Me interesaría, aunque no es algo que tampoco necesario, cambiar la plantilla del mail a alguna más interesante, como por ejemplo algo así. (http://graphicmail.com.es/plantillas-email-newsletter), añadiendo mis redes sociales, alguna imagen con diseño bonito etc. El enlace que he puesto solo es para ejemplos, puedo buscar plantillas en otro lugar si eso hace que sea mas adecuado para woocommerce

      http://www.biomum.es

      Muchas gracias por la ayuda!!!!

    • Hola a todos, me está ocurriendo algo extraño cuando aplico cupones de descuento en woocommerce y no veo que a nadie más le ocurra.

      Cuando aplico un cupón, por ejemplo del 5% sobre el total del carrito lo hace correctamente en la página del carro de compra y en la del checkout, pero cuando finalizo la compra esa cantidad de descuento aparece modificada en la página resumen del pedido, y en el email que se envía al cliente.

      Aclarar que realmente al cliente se le hace el descuento correctamente pero al aparecer un numero erróneo puede generar confusiones y malos entendidos.

      He hecho muchos números y es como si al descuento sobre el total del carrito después le sumara la diferencia entre los IVAS de antes y después de hacer el descuento. No se si me estoy explicando bien, perdonad.

      Muchas gracias por adelantado, no suelo preguntar pero es que esta vez me está volviendo loco el asunto.

      Saludos

    Iniciador del debate WebSolutions ABA

    (@websolutions-aba)

    Solucionado,a medias,pero suficiente.Tras el pago el estado del pedido en Woocommerce continúa pendiente de pago,pero por lo menos se envían email a cliente y administrador de forma automática,que es lo que me preocupaba de cara a generar confianza al cliente.

    Simplemente añadí el siguiente código al archivo funtions.php del tema activo:

    // Workaround for the mysterious bug in Woocommerce that prevents order emails
    // from being sent.

    add_action( ‘woocommerce_thankyou’, ‘order_email_workaround’ );

    function order_email_workaround ($order_id) {
    global $woocommerce;
    $mailer = $woocommerce->mailer();
    // Email customer with order-processing receipt
    $email = $mailer->emails[‘WC_Email_Customer_Processing_Order’];
    $email->trigger( $order_id );
    // Email admin with new order email
    $email = $mailer->emails[‘WC_Email_New_Order’];
    $email->trigger( $order_id );
    }

    add_action( ‘woocommerce_payment_complete’, ‘order_complete_email_workaround’ );

    function order_complete_email_workaround ($order_id) {
    global $woocommerce;
    $mailer = $woocommerce->mailer();
    $email = $mailer->emails[‘WC_Email_Customer_Completed_order’];
    $email->trigger( $order_id );
    }

    • Buenas tardes
      Tengo instalada WP 4.1.1 con Woocommerce 2.3.5 y «Pasarela de pago CECABANK». El problema es el siguiente: al realizar un pedido, no sé envia ningún email ni al administrador ni al cliente. En el cms de wordpress aparece el pedido con el estado «pendiente». Es raro porque el proceso de pago se ha completado.Manualmente puedo modificar estado y enviar los correos.

      No sé si sabréis por qué ocurre esto. Muchas gracias. Un saludo

    • Usando WooCommerce, para vender instrumentales únicas a grupos que las quieran usar en sus temas, uno de los primeros problemas es que mediante Paypal Sandbox el proceso de compra queda en Espera.

      Pero ese no es el problema (sé que puede suceder por usar un correo de facturación distinto al de Paypal, y también creo que en Paypal normal esto no sucederá). Tengo que marcar el pedido como completado, y entonces envía los enlaces de descarga al email, etc.

      Configurado como producto «Virtual», «Descargable», límite de 1 descarga del archivo, gestión de Stock activada y a sólo una unidad en Stock, mi intención es que sólo se venda 1 vez y el artículo quede como Vendido.

      Pero al finalizar la compra y realizar la descarga. El producto sigue en Stock. He probado con varios productos de prueba, pero pasa lo mismo en todos.

      He imaginado que es debido a que es «Virtual», y que por ello no atiende a que se agote el stock… Pero espero que no sea así.

      Muchas gracias por su atención. Saludos.

    • Hola a todos, tengo montado un ecommerce con woocommerce pero este no envía los emails al efectuar la compra, además el contact form7 tampoco envía los correos. La web está subida al servidor.

      Sabeis a que puede ser debido?

      Gracias

    • Buenas a todos,
      He montado una pequeña tienda con Woocommerce que ha demostrado funcionar correctamente hasta que realicé un pedido de prueba, pero real, y observé que el cliente no recibía ningún email de confirmación de pedido.

      Entrando en las opciones del pedido hay una zona en la parte superior derecha que permite reenviar emails. Al utilizar por ejemplo la acción de enviar un email para el estado «Procesando tu pedido» recibo el siguiente mensaje de error por parte de mi hosting:

      [midominio.com] [Wed Nov 26 08:16:21 2014] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: post.php, referer: http://midominio.com/wp-admin/post.php?post=1026&action=edit
      Error 500: Script Execution Failure

      Me he puesto en contacto con soporte de Hosting. Ellos mismos reprodujeron el error pero no supieron resolverlo.

      Estoy usando WP 4.0.1 y Woocommerce 2.2.8. Gracias al foro ya he probado cosas como desactivar todos los plugins menos el de woocommerce, he establecido a 96M el límite de memoria de WP y asignado permisos 755 a varios ficheros post.php. Nada de esto ha funcionado.

      Agradecería que alguien pudiera encaminarme porque ahora mismo estoy perdido.

    Moderador José Arcos

    (@josearcos)

    El camino más rápido es un email de verificación, puedes hacerlo con este plugin: woocommerce email verification.
    Espero que te ayude.

    • Hola.

      Estoy creando una tienda online con el plugin Woocommerce y el tema Virtue. He seleccionado que todo aquel que quiera comprar debe primero registrarse en la página, para lo cual se le asigna por defecto el perfil «customer» de Woocommerce.

      Vengo observando lo que parece ser nuevos usuarios que se registran en mi página a modo de «spam». Claro, resulta que Woocommerce sólo solicita una dirección de email y una contraseña sin ninguna confirmación posterior desde el email para darse de alta, como podéis ver en el siguiente enlace de mi web:

      http://www.slonya.es/mi-cuenta/

      Me gustaría saber si existe un plugin, o cómo debo editar la plantilla [woocommerce_my_account] para poder exigir más datos a los usuarios a la hora de registrarse, como pudieran ser sus nombres y apellidos y su dirección, o exigirles una confirmación de su alta por medio de un enlace enviado a su email, de tal forma que yo pudiera eliminar los que no confirmen su alta.

      Muchas gracias por adelantado!

    • Hola a todos/as

      Me avisa un cliente que al realizar un pedido, poner sus datos y seleccionar método de pago, la web se queda cargando. No le llega ningún email de pedido.

      A mi tampoco me llega el aviso del pedido, aunque si voy a la administración de pedidos de woocommerce sí me aparece el pedido.

      He mirado si es por culpa de algún plugin pero ya no sé qué más hacer. Parece estar todo correcto.

      ¿Alguna idea de qué puede dar este fallo?

      Versión de woocommerce: 2.2.7

    Iniciador del debate chrilow

    (@chrilow)

    <?php
    
    // Buscador de primera letra
    
    add_filter('posts_search', 'search_title');
    
    function search_title($search) {
    
      preg_match('/letra-([^%]+)/', $search, $m);
    
      if (isset($m[1])) {
    
        if($m[1] == '09') return " AND wp_posts.post_title REGEXP '^[0-9]' AND (wp_posts.post_password = '') ";
    
        return " AND wp_posts.post_title LIKE '$m[1]%' AND (wp_posts.post_password = '') ";
    
      } else {
    
        return $search;
    
      }
    
    }
    
    /*= Load Files
    
     *=============================================================================*/
    
    // Load the functions
    
    require_once( trailingslashit(get_template_directory()) . 'functions/helpers.php' );
    
    require_once( trailingslashit( get_template_directory() ) . 'functions/plugins-compat.php' );
    
    require_once( trailingslashit( get_template_directory() ) . 'functions/video-functions.php' );
    
    // Load the widgets
    
    require_once( trailingslashit( get_template_directory() ) . 'widgets/widget-posts.php' );
    
    require_once( trailingslashit( get_template_directory() ) . 'widgets/widget-related-posts.php' ); 
    
    require_once( trailingslashit( get_template_directory() ) . 'widgets/widget-user-bio.php' ); 
    
    require_once( trailingslashit( get_template_directory() ) . 'widgets/widget-single-post-stats.php' ); 
    
    require_once( trailingslashit( get_template_directory() ) . 'widgets/widget-comments.php' ); 
    
    require_once( trailingslashit( get_template_directory() ) . 'widgets/widget-ad.php' ); 
    
    require_once( trailingslashit( get_template_directory() ) . 'widgets/widget-tweets/widget-tweets.php' ); 
    
    // Load the admin functions
    
    if(is_admin()) {
    
    	require_once( trailingslashit( get_template_directory() ). 'admin/panel.php');
    
    	require_once( trailingslashit( get_template_directory() ). 'admin/forms.php');
    
    	require_once( trailingslashit( get_template_directory() ) . 'admin/admin.php' );
    
    }
    
    // Load the extentions
    
    require_once( trailingslashit( get_template_directory() ) . 'extensions/dp-post-likes.php' );
    
    require_once( trailingslashit( get_template_directory() ) . 'extensions/dp-jplayer.php' );
    
    /*= Theme Setup
    
     *=============================================================================*/
    
    /**
    
     * Theme Feature: Content Width
    
     *
    
     * Sets up the content width value based on the theme's design.
    
     * @see dp_content_width() for template-specific adjustments.
    
     */
    
    if(!isset($content_width))
    
    	$content_width = 620;
    
    /**
    
     * Adjusts content_width value for specific.
    
     *
    
     * @since deTube 1.4
    
     *
    
     * @return void
    
     */
    
    function dp_content_width() {
    
    	global $content_width;
    
    	if ( is_page_template('page-template-full-width.php'))
    
    		$content_width = 950;
    
    	elseif(is_singular()) {
    
    		global $post;
    
    		$video_layout = get_post_meta($post->ID, 'dp_video_layout', true);
    
    		if($video_layout == 'full-width')
    
    			$content_width = 950;
    
    	}
    
    }
    
    add_action( 'template_redirect', 'dp_content_width' );
    
    add_action( 'after_setup_theme', 'theme_setup' );
    
    function theme_setup() {
    
    	// Add default posts and comments RSS feed links to <head>.
    
    	add_theme_support( 'automatic-feed-links' );
    
    	// Translation
    
    	load_theme_textdomain( 'dp', get_template_directory() . '/languages' );
    
    	$locale = get_locale();
    
    	$locale_file = get_template_directory() . "/languages/$locale.php";
    
    	if ( is_readable( $locale_file ) )
    
    		require_once( $locale_file );
    
    	// Register Nav Menus
    
    	register_nav_menus(array(
    
    		'main' => __('Main Navigation', 'dp'),
    
    		'footer' => __('Footer Navigation', 'dp')
    
    	));
    
    	// Register Sidebars
    
    	register_sidebar(array(
    
    		'name' => __('Main Sidebar', 'dp'),
    
    		'id' => 'main',
    
    		'description' => __('This is the most generic sidebar, If a page does not specify the sidebar, or specify the sidebar but the specified sidebar is empty, this sidebar will be used.', 'dp'),
    
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
    
    		'after_widget' => '</div>',
    
    		'before_title' => '<div class="widget-header"><h3 class="widget-title">',
    
    		'after_title' => '</h3></div>',
    
    	));
    
    	register_sidebar(array(
    
    		'name' => __('Home Sidebar', 'dp'),
    
    		'id' => 'home',
    
    		'description' => __('This sidebar will displayed on homepage. If you leave this sidebar empty, the "Main Sidebar" will be used.', 'dp'),
    
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
    
    		'after_widget' => '</div>',
    
    		'before_title' => '<div class="widget-header"><h3 class="widget-title">',
    
    		'after_title' => '</h3></div>',
    
    	));
    
    	register_sidebar(array(
    
    		'name' => __('Category Sidebar', 'dp'),
    
    		'id' => 'category',
    
    		'description' => __('This sidebar will displayed on category archive pages. If you leave this sidebar empty, the "Main Sidebar" will be used.', 'dp'),
    
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
    
    		'after_widget' => '</div>',
    
    		'before_title' => '<div class="widget-header"><h3 class="widget-title">',
    
    		'after_title' => '</h3></div>',
    
    	));
    
    	register_sidebar(array(
    
    		'name' => __('Single Post Sidebar', 'dp'),
    
    		'id' => 'single-post',
    
    		'description' => __('This sidebar will displayed on single post pages. If you leave this sidebar empty, the "Main Sidebar" will be used.', 'dp'),
    
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
    
    		'after_widget' => '</div>',
    
    		'before_title' => '<div class="widget-header"><h3 class="widget-title">',
    
    		'after_title' => '</h3></div>',
    
    	));
    
    	register_sidebar(array(
    
    		'name' => __('Single Video Sidebar', 'dp'),
    
    		'id' => 'single-video',
    
    		'description' => __('This sidebar will displayed on single video pages. If you leave this sidebar empty, the "Main Sidebar" will be used.', 'dp'),
    
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
    
    		'after_widget' => '</div>',
    
    		'before_title' => '<div class="widget-header"><h3 class="widget-title">',
    
    		'after_title' => '</h3></div>',
    
    	));
    
    	register_sidebar(array(
    
    		'name' => __('Page Sidebar', 'dp'),
    
    		'id' => 'page',
    
    		'description' => __('This sidebar will displayed on all WordPress construct of pages. If you leave this sidebar empty, the "Main Sidebar" will be used.', 'dp'),
    
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
    
    		'after_widget' => '</div>',
    
    		'before_title' => '<div class="widget-header"><h3 class="widget-title">',
    
    		'after_title' => '</h3></div>',
    
    	));
    
    	register_sidebar(array(
    
    		'name' => __('Author Sidebar', 'dp'),
    
    		'id' => 'author',
    
    		'description' => __('This sidebar will displayed on author archive pages. If you leave this sidebar empty, the "Main Sidebar" will be used.', 'dp'),
    
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
    
    		'after_widget' => '</div>',
    
    		'before_title' => '<div class="widget-header"><h3 class="widget-title">',
    
    		'after_title' => '</h3></div>',
    
    	));
    
    	register_sidebar(array(
    
    		'name' => __('Likes Page Sidebar', 'dp'),
    
    		'id' => 'likes-page',
    
    		'description' => __('This sidebar will displayed on likes page. If you leave this sidebar empty, the "Main Sidebar" will be used.', 'dp'),
    
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
    
    		'after_widget' => '</div>',
    
    		'before_title' => '<div class="widget-header"><h3 class="widget-title">',
    
    		'after_title' => '</h3></div>',
    
    	));
    
    	$footbar_layout = get_option('dp_footbar_layout', 'c3');
    
    	if($footbar_layout == 'c4s1') {
    
    		for($i=1;$i<=5;$i++) {
    
    			register_sidebar(array(
    
    				'name' => __('Footbar', 'dp').$i,
    
    				'id' => 'footbar-'.$i,
    
    				'description' => __( 'An optional widget area for your site footer', 'dp' ),
    
    				'before_widget' => '<div id="%1$s" class="widget %2$s">',
    
    				'after_widget' => '</div>',
    
    				'before_title' => '<div class="widget-header"><h3 class="widget-title">',
    
    				'after_title' => '</h3></div>',
    
    			));
    
    		}
    
    	} else {
    
    		register_sidebar(array(
    
    			'name' => __('Footbar', 'dp'),
    
    			'id' => 'footbar',
    
    			'description' => __( 'An optional widget area for your site footer', 'dp' ),
    
    			'before_widget' => '<div id="%1$s" class="widget %2$s">',
    
    			'after_widget' => '</div>',
    
    			'before_title' => '<div class="widget-header"><h3 class="widget-title">',
    
    			'after_title' => '</h3></div>',
    
    		));
    
    	}
    
    	if(function_exists('is_buddypress')) {
    
    		register_sidebar(array(
    
    			'name' => __('BuddyPress Sidebar', 'dp'),
    
    			'id' => 'buddypress',
    
    			'description' => __('This sidebar will displayed on BuddyPress pages.', 'dp'),
    
    			'before_widget' => '<div id="%1$s" class="widget %2$s">',
    
    			'after_widget' => '</div>',
    
    			'before_title' => '<div class="widget-header"><h3 class="widget-title">',
    
    			'after_title' => '</h3></div>',
    
    		));
    
    	}
    
    	if(function_exists('is_bbpress')) {
    
    		register_sidebar(array(
    
    			'name' => __('bbPress Sidebar', 'dp'),
    
    			'id' => 'bbpress',
    
    			'description' => __('This sidebar will displayed on bbPress pages.', 'dp'),
    
    			'before_widget' => '<div id="%1$s" class="widget %2$s">',
    
    			'after_widget' => '</div>',
    
    			'before_title' => '<div class="widget-header"><h3 class="widget-title">',
    
    			'after_title' => '</h3></div>',
    
    		));
    
    	}
    
    	if(function_exists('is_woocommerce')) {
    
    		register_sidebar(array(
    
    			'name' => __('WooCommerce Sidebar', 'dp'),
    
    			'id' => 'woocommerce',
    
    			'description' => __('This sidebar will displayed on WooCommerce pages.', 'dp'),
    
    			'before_widget' => '<div id="%1$s" class="widget %2$s">',
    
    			'after_widget' => '</div>',
    
    			'before_title' => '<div class="widget-header"><h3 class="widget-title">',
    
    			'after_title' => '</h3></div>',
    
    		));
    
    	}
    
    	/* Add Post Thumbail Support & Add Image Size */
    
    	add_theme_support( 'post-thumbnails' );
    
    	set_post_thumbnail_size( 150, 150, true );	
    
    	add_image_size( 'custom-small', 160, 90, true );
    
    	add_image_size( 'custom-medium', 320, 180, true );
    
    	add_image_size( 'custom-large', 640, 360, true );
    
    	add_image_size( 'custom-full', 960, 540, true );
    
    	// Add Semantic Markup Support
    
    	add_theme_support( 'html5' );
    
    	// Add Post Formats Support
    
    	add_theme_support('post-formats', array( 'video'));
    
    	/* Add Editor Style */
    
    	// add_editor_style();
    
    }
    
    /*= Scripts & Styles
    
     *=============================================================================*/
    
    /**
    
     * Register all scripts and styles we needed
    
     */
    
    add_action('init', 'dp_register_scripts');
    
    function dp_register_scripts() {
    
    	if (is_admin())
    
    		return;
    
    	$protocol = is_ssl() ? 'https' : 'http';
    
    	// Scripts
    
    	wp_register_script('modernizr', get_template_directory_uri().'/js/modernizr.min.js', array('jquery'), '2.6.2');
    
    	wp_register_script('jquery-easing', get_template_directory_uri().'/js/jquery.easing.js', array('jquery'), '1.3', false);
    
    	wp_register_script('jquery-jplayer', get_template_directory_uri() . '/js/jquery.jplayer.min.js', array('jquery'), '2.4.0', false);
    
    	wp_register_script('jquery-carousel', get_template_directory_uri().'/js/jquery.jcarousel.js', array('jquery'), '0.3.0', true);
    
    	wp_register_script('jquery-fitvids', get_template_directory_uri().'/js/jquery.fitvids.js', array('jquery'), '1.0', true);
    
    	wp_register_script('jquery-plugins', get_template_directory_uri().'/js/jquery.plugins.min.js', array('jquery'), '1.4.6', false);
    
    	wp_register_script('theme', get_template_directory_uri().'/js/theme.js', array('jquery'), '1.4.6', true);
    
    }
    
    /**
    
     * Load common scripts. Other scripts we will load them only when needed. 
    
     * If you are a developer and want to find where are load other scripts,
    
     * try to searching 'wp_enqueue_script' function, we use it to load all scripts on admin footer.
    
     */
    
    add_action('wp_enqueue_scripts', 'dp_enqueue_scripts', 10);
    
    function dp_enqueue_scripts() {
    
    	if(is_admin())
    
    		return false;
    
    	$protocol = is_ssl() ? 'https' : 'http';
    
    	/* Load common scripts on all pages */
    
    	wp_enqueue_script('modernizr'); 
    
    	wp_enqueue_script('jquery-plugins');
    
    	wp_enqueue_script('jquery-masonry' );
    
    	wp_enqueue_script('jquery-fitvids' );
    
    	wp_enqueue_script('theme');
    
    	/* Load script with the comment form if it is necessary */
    
    	if( is_singular() && get_option( 'thread_comments' ) ) 
    
    		wp_enqueue_script( 'comment-reply' );
    
    	// Load Styles
    
    	wp_enqueue_style('dp-fonts', $protocol.'://fonts.googleapis.com/css?family=Arimo:400,700|Droid+Serif:400,700|Open+Sans:600,700');
    
    	wp_enqueue_style('dp-style', get_stylesheet_uri(), '', '1.4.3');
    
    	if(get_option('dp_responsive'))
    
    		wp_enqueue_style('dp-responsive', get_stylesheet_directory_uri().'/responsive.css', 'dp-style', '1.4.3');
    
    }
    
    /**
    
     * Embed scripts into the header
    
     *
    
     * We embed scripts to the head usually in order to define variables 
    
     * or these scripts execution in the head rather than in the footer.
    
     */
    
    add_action('wp_head', 'dp_head_scripts', 0);
    
    function dp_head_scripts() { 
    
    ?>
    
    <script type="text/javascript">
    
    var ajaxurl = '<?php echo admin_url('ajax.php'); ?>',
    
    	theme_ajaxurl = '<?php echo get_template_directory_uri().'/ajax.php'; ?>',
    
    	ajaxerror = "<?php echo wp_kses_stripslashes(__("Something\'s error. Please try again later!", 'dp')); ?>";
    
    </script>
    
    <?php }
    
    /**
    
     * Prepare scripts for ajax calls when needed
    
     *
    
     * @since 1.4
    
     */
    
    add_action('the_post', 'dp_prepare_scripts', 10);
    
    function dp_prepare_scripts($query) {
    
    	if(is_admin())
    
    		return false;
    
    	global $post;
    
    	$code = trim(get_post_meta($post->ID, 'dp_video_code', true));
    
    	if(has_shortcode($code, 'jplayer'))
    
    		wp_enqueue_script('jquery-jplayer');
    
    	$library = apply_filters( 'wp_video_shortcode_library', 'mediaelement' );	
    
    	if(has_shortcode($code, 'video') && 'mediaelement' === $library && did_action( 'init' ) ) {
    
    		wp_enqueue_style( 'wp-mediaelement' );
    
    		wp_enqueue_script( 'wp-mediaelement' );
    
    	}
    
    }
    
    /**
    
     * Get post views by 'WP Postviews' plugin
    
     */
    
    function dp_get_post_views($post_id = '') {
    
    	global $post;
    
    	if(!$post_id)
    
    		$post_id = $post->ID;
    
    	$views = get_post_meta($post_id, 'views', true);
    
    	$views = absint($views);
    
    	//$views = number_format_i18n($views);
    
    	$views = short_number($views);
    
    	return $views;
    
    }
    
    /*= Custom Hacks
    
     *=====================================================================*/
    
    /**
    
     * Change the labels of WordPress built-in post type 'post'
    
     * to custom labels based on user's settings.
    
     */
    
    function dp_post_object_labels() {
    
    	$custom_labels = get_option('dp_post_labels');
    
    	if(!empty($custom_labels)) {
    
    		global $wp_post_types;
    
    		$labels = &$wp_post_types['post']->labels;
    
    		foreach($custom_labels as $key => $label) {
    
    			if(!empty($label))
    
    				$labels->$key = $label;
    
    		}
    
    	}
    
    }
    
    function dp_post_menu_labels() {
    
    	global $menu;
    
    	global $submenu;
    
    	$custom_labels = get_option('dp_post_labels');
    
    	if(!empty($custom_labels['menu_name'])) {
    
    		$menu[5][0] = $custom_labels['menu_name'];
    
    		$submenu['edit.php'][5][0] = $custom_labels['menu_name'];
    
    	}
    
    	if(!empty($custom_labels['add_new']))
    
    		$submenu['edit.php'][10][0] = $custom_labels['add_new'];
    
    }
    
    if(get_option('dp_post_labels_status')) {
    
    	add_action( 'init', 'dp_post_object_labels' );
    
    	add_action( 'admin_menu', 'dp_post_menu_labels' );
    
    }
    
    /** 
    
     * Custom Gravatar 
    
     */
    
    add_filter( 'avatar_defaults', 'dp_custom_gravatar' );
    
    function dp_custom_gravatar( $avatar_defaults ) {
    
        $avatar = get_template_directory_uri() . '/images/gravatar.png';
    
        $avatar_defaults[$avatar] = 'Custom Gravatar (/images/gravatar.png)';
    
        return $avatar_defaults;
    
    }
    
    /**
    
     * Custom RSS Feed Link 
    
     */
    
    add_filter('feed_link', 'dp_custom_feed_link', 10, 2);
    
    function dp_custom_feed_link($output, $feed) {
    
    	if($url = get_option('dp_rss_url'))
    
    		return $url;
    
    	return $output;
    
    }
    
    /** 
    
     * Custom Login Page 
    
     */
    
    add_filter('login_headerurl', 'dp_login_url');
    
    add_filter('login_headertitle', 'dp_login_title');
    
    add_action('login_head', 'dp_login_logo');
    
    function dp_login_url() {
    
    	return home_url();
    
    }
    
    function dp_login_title() {
    
    	return get_bloginfo('name');
    
    }
    
    function dp_login_logo() {
    
    	if($login_logo = get_option('dp_login_logo')) {
    
    		echo '<style type="text/css">
    
    			.login h1 a{background-image:url('.$login_logo.') !important;}
    
    		</style>';
    
    	}
    
    }
    
    /** 
    
     * Custom User Contact Methods
    
     */
    
    add_filter( 'user_contactmethods', 'dp_custom_user_contactmethods');
    
    function dp_custom_user_contactmethods($methods) {
    
    	// Add custom contact methods
    
    	$new_methods = array(
    
    		'twitter' => __('Twitter', 'dp'),
    
    		'facebook' => __('Facebook', 'dp'),
    
    		'location' => __('Location', 'dp')
    
    	);
    
    	return $new_methods + $methods;
    
    }
    
    // Get queried user id
    
    function dp_get_queried_user_id() {
    
    	global $authordata;
    
    	if(isset( $authordata->ID )){
    
    		$user_id = $authordata->ID;
    
    	} else {
    
    		$user = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
    
    		$user_id = $user->ID;
    
    	}
    
    	return $user_id;
    
    }
    
    // Add Public Variables
    
    add_filter('query_vars', 'dp_custom_query_vars');
    
    function dp_custom_query_vars($query_vars) {
    
    	$query_vars[] = 'filter';
    
    	$query_vars[] = 'views_timing';
    
    	return $query_vars;
    
    }
    
    /**
    
     * Reset and parse query args based passed $args
    
     *
    
     * @since deTube 1.0
    
     */
    
    function dp_parse_query_args($args) {
    
    	$defaults = array(
    
    		'post_type' => 'post',
    
    		'ignore_sticky_posts' => true,
    
    		'orderby' => 'date',
    
    		'order' => 'desc',
    
    		'cat' => '',
    
    		'tax_query' => '',
    
    		'taxonomies' => array(),
    
    		'meta_key' => '',
    
    		'post__in' => '',
    
    		'current_cat' => '',
    
    		'current_author' => ''
    
    	);
    
    	$args = wp_parse_args($args, $defaults);
    
    	// extract($args);
    
    	// Set post_type
    
    	if($args['post_type']=='all') {
    
    		$post_types = get_post_types(array('public'=>true), 'names');
    
    		unset($post_types['page']);
    
    		unset($post_types['attachment']);
    
    		$args['post_type'] = $post_types;
    
    	}
    
    	// Set post__in, ignore other arguments and return
    
    	if(!empty($args['post__in']) && !is_array($args['post__in'])) {
    
    		$args['post__in'] = explode(',', $args['post__in']);
    
    		return $args; 
    
    	}
    
    	// Set tax_query
    
    	$taxes = array_filter($args['taxonomies']);
    
    	if(!empty($taxes)) {
    
    		foreach($taxes as $tax=>$terms) {
    
    			$args['tax_query']['relation'] = 'AND';
    
    			if($tax=='post_format' && ($terms=='-1' || $terms=='standard')) {
    
    				$post_formats = get_theme_support('post-formats');
    
    				$terms = array();
    
    				foreach ($post_formats[0] as $format) {
    
    					$terms[] = 'post-format-'.$format;
    
    				}
    
    				$args['tax_query'][] = array(
    
    					'taxonomy' => $tax,
    
    					'field' => 'slug',
    
    					'terms' => $terms,
    
    					'operator' => 'NOT IN'
    
    				);
    
    			} elseif($tax == 'post_tag') {
    
    				if(!is_array($terms))
    
    					$terms = explode(',', trim($terms));
    
    				$args['tax_query'][] = array(
    
    					'taxonomy' => $tax,
    
    					'field' => 'slug',
    
    					'terms' => $terms,
    
    					'operator' => 'IN'
    
    				);
    
    			} else {
    
    				$args['tax_query'][] = array(
    
    					'taxonomy' => $tax,
    
    					'field' => 'id',
    
    					'terms' => (array)$terms,
    
    					'operator' => 'IN'
    
    				);
    
    			}
    
    		}
    
    	}
    
    	// Set 'author' to current author id on author archive page if 'current_author' is true
    
    	if(!empty($args['current_author']) && is_author())
    
    		$args['author'] = dp_get_queried_user_id();
    
    	// Set 'cat' to current cat id on category archive page if 'current_cat' is true
    
    	if(!empty($args['current_cat']) && is_category())
    
    		$args['cat'] = get_queried_object_id();
    
    	return $args;
    
    }
    
    // Filter to "pre_get_posts" to change query vars
    
    add_action( 'pre_get_posts', 'dp_custom_get_posts' );
    
    function dp_custom_get_posts( $query ) {
    
    	if(is_admin())
    
    		return;
    
    	$orderby = $query->get('orderby');
    
    	$order = $query->get('order');
    
    	// If no 'orderby' specified, get first sort type from selected sort types
    
    	$selected_sort_types = dp_selected_sort_types();
    
    	if(is_main_query() && !empty($selected_sort_types) && empty($orderby)) {
    
    		$_sort_types = array_keys($selected_sort_types);
    
    		$orderby = $_sort_types[0];
    
    		$query->set('orderby', $orderby);
    
    	}
    
    	// Reset query vars based orderby parameter
    
    	if($orderby == 'comments') {
    
    		$query->set('orderby', 'comment_count');
    
    	} 
    
    	elseif($orderby == 'views') {	
    
    		$query->set('orderby', 'meta_value_num');
    
    		$query->set('meta_key', 'views');
    
    		// The arguments for BAW Post Views Count plugin
    
    		if(function_exists('baw_pvc_main')) {
    
    			global $timings;
    
    			$views_timing = $query->get('views_timing') ? $query->get('views_timing') : 'all';
    
    			$date = $views_timing == 'all' ? '' : '-'. date( $timings[$views_timing] );
    
    			$meta_key = apply_filters( 'baw_count_views_meta_key', '_count-views_' . $views_timing . $date, $views_timing, $date );
    
    			$query->set('meta_key', $meta_key);
    
    		}
    
    	} 
    
    	elseif($orderby == 'likes') {	
    
    		$query->set('orderby', 'meta_value_num');
    
    		$query->set('meta_key', 'likes');
    
    	} 
    
    	elseif($orderby == 'title' && !$order) {
    
    		// If order by title, and no order specified, set "ASC" as default order.
    
    		$query->set('order', 'ASC');
    
    	}
    
    	// Only display posts on search results page
    
    	if (is_search() && $query->is_main_query())
    
    		$query->set('post_type', 'post');
    
    	// Make tax_query support "post-format-standard"
    
    	$tax_query = $query->get('tax_query');
    
    	if(!empty($tax_query)) {
    
    		foreach($tax_query as $index => $single_tax_query) {
    
    			if(empty($single_tax_query['terms']))
    
    				continue;
    
    			$in_post_formats = (array)$single_tax_query['terms'];
    
    			if($single_tax_query['taxonomy'] == 'post_format'
    
    			&& $single_tax_query['field'] == 'slug'
    
    			&& in_array('post-format-standard', $in_post_formats)) {
    
    				// Get reverse operator
    
    				$reverse_operator = 'IN';
    
    				if(empty($single_tax_query['operator']) || $single_tax_query['operator'] == 'IN')
    
    					$reverse_operator = 'NOT IN';
    
    				elseif($single_tax_query['operator'] == 'AND')
    
    					break;
    
    				// Get "not in post formats"
    
    				$post_formats = get_theme_support('post-formats');
    
    				$all_post_formats = array();
    
    				if(is_array( $post_formats[0])) {
    
    					$all_post_formats = array();
    
    					foreach($post_formats[0] as $post_format)
    
    						$all_post_formats[] = 'post-format-'.$post_format;
    
    				}
    
    				$not_in_post_formats = array_diff($all_post_formats, $in_post_formats);
    
    				// Reset post_format in tax_query
    
    				$query->query_vars['tax_query'][$index] = array(
    
    					'taxonomy' => 'post_format',
    
    					'field' => 'slug',
    
    					'terms' => $not_in_post_formats,
    
    					'operator' => $reverse_operator
    
    				);
    
    			}
    
    		}
    
    	}
    
    	return $query;
    
    }
    
    /* Filters that allow shortcodes in Text Widgets */
    
    add_filter('widget_text', 'shortcode_unautop');
    
    add_filter('widget_text', 'do_shortcode');
    
    /* Enable oEmbed in Text/HTML Widgets */
    
    add_filter( 'widget_text', array( $wp_embed, 'run_shortcode' ), 8 );
    
    add_filter( 'widget_text', array( $wp_embed, 'autoembed'), 8 );
    
    /* Filters that allow shortcodes in term description */
    
    add_filter( 'term_description', 'do_shortcode' );
    
    /*= Custom Coding Ready
    
     *=============================================================================*/
    
    /**
    
     * Add Custom Head Code
    
     * 
    
     * @since 1.0
    
     */
    
    add_action('wp_head', 'dp_custom_head_code', 999);
    
    function dp_custom_head_code() {
    
    	$code = get_option('dp_head_code');
    
    	if($code)
    
    		echo stripslashes($code);
    
    }
    
    /** 
    
     * Add Custom Footer Code
    
     *
    
     * @since 1.0
    
     */
    
    add_action('wp_footer', 'dp_custom_footer_code', 999);
    
    function dp_custom_footer_code() {
    
    	$code = get_option('dp_footer_code');
    
    	if($code)
    
    		echo stripslashes($code);
    
    }
    
    /*= Template Functions
    
     *=============================================================================*/
    
    /**
    
     * Creates a nicely formatted and more specific title element text for output
    
     * in head of document, based on current view.
    
     *
    
     * @since deTube 1.4
    
     *
    
     * @param string $title Default title text for current view.
    
     * @param string $sep Optional separator.
    
     * @return string Filtered title.
    
     */
    
    function dp_doc_title( $title, $sep ) {
    
    	global $paged, $page;
    
    	if ( is_feed() )
    
    		return $title;
    
    	// Add the site name.
    
    	$title .= get_bloginfo( 'name' );
    
    	// Add the site description for the home/front page.
    
    	$site_description = get_bloginfo( 'description', 'display' );
    
    	if ( $site_description && ( is_home() || is_front_page() ) )
    
    		$title = "$title $sep $site_description";
    
    	// Add a page number if necessary.
    
    	if ( $paged >= 2 || $page >= 2 )
    
    		$title = "$title $sep " . sprintf( __( 'Page %s', 'twentythirteen' ), max( $paged, $page ) );
    
    	return $title;
    
    }
    
    add_filter( 'wp_title', 'dp_doc_title', 10, 2 ); 
    
    /**
    
     * Get page description
    
     *
    
     * @since 1.2.3
    
     */
    
    function dp_get_doc_desc() {
    
    	$description = '';
    
    	if (is_home()) {
    
    		$description = get_bloginfo( 'description' );
    
    	}
    
    	elseif (is_singular()) {
    
    		if (is_front_page())
    
    			$description = get_bloginfo( 'description' );
    
    		else {
    
    			$description = get_post_field( 'post_excerpt', get_queried_object_id() );
    
    			if(empty($description) && function_exists('mb_strimwidth')) {
    
    				$content = get_post_field( 'post_content', get_queried_object_id() );
    
    				$content = strip_shortcodes($content);
    
    				$content = strip_tags($content);
    
    				$description = mb_strimwidth($content, 0, 200, '');
    
    			}
    
    		}
    
    	}
    
    	elseif ( is_archive() ) {
    
    		if ( is_author() ) {
    
    			$description = get_the_author_meta( 'description', get_query_var( 'author' ) );
    
    		}
    
    		elseif ( is_category() || is_tag() || is_tax() )
    
    			$description = term_description( '', get_query_var( 'taxonomy' ) );
    
    		elseif ( is_post_type_archive() ) {
    
    			$post_type = get_post_type_object( get_query_var( 'post_type' ) );
    
    			if ( isset( $post_type->description ) )
    
    				$description = $post_type->description;
    
    		}
    
    	}
    
    	return apply_filters( 'dp_get_doc_desc', $description );
    
    }
    
    /**
    
     * Meta description
    
     */
    
    function dp_meta_description() {
    
    	$description = dp_get_doc_desc();
    
    	if ( !empty( $description ) )
    
    		$description = '<meta name="description" content="' . str_replace( array( "\r", "\n", "\t" ), '', esc_attr( strip_tags( $description ) ) ) . '" />' . "\n";
    
    	echo apply_filters( 'dp_meta_description', $description );
    
    }
    
    /**
    
     * Generates meta keywords/tags for the site.
    
     */
    
    function dp_meta_keywords() {
    
    	$keywords = '';
    
    	if ( is_singular() && !is_preview() ) {
    
    		$post = get_queried_object();
    
    		$taxonomies = get_object_taxonomies( $post->post_type );
    
    		if ( is_array( $taxonomies ) ) {
    
    			foreach ( $taxonomies as $tax ) {
    
    				if ( $terms = get_the_term_list( get_queried_object_id(), $tax, '', ', ', '' ) )
    
    					$keywords[] = $terms;
    
    			}
    
    			if ( !empty( $keywords ) )
    
    				$keywords = join( ', ', $keywords );
    
    		}
    
    	}
    
    	if(!empty($keywords))
    
    		$keywords = '<meta name="keywords" content="' . esc_attr( strip_tags( $keywords ) ) . '" />' . "\n";
    
    	echo apply_filters( 'dp_meta_keywords', $keywords );
    
    } 
    
    /**
    
     * Get Video Thumbnail URL
    
     *
    
     * @param string $size Optional. Image size. Defaults to 'custom-medium';.
    
     */ 
    
    function dp_thumb_url($size = 'custom-medium', $default = '', $post_id = null, $echo = false){
    
    	global $post;
    
    	if(!$post_id)
    
    		$post_id = $post->ID;
    
    	if(!$size)
    
    		$size == 'custom-medium';
    
    	/* Check if this video has a feature image */
    
    	if(has_post_thumbnail() && $thumb = wp_get_attachment_image_src(get_post_thumbnail_id($post_id), $size))
    
    		$thumb_url = $thumb[0];
    
    	/* If no feature image, try to get thumbnail by "Video Thumbnails" plugin */
    
    	if(empty($thumb_url) && function_exists('get_video_thumbnail')) {
    
    		$video_thumbnail = get_video_thumbnail($post_id);
    
    		if(!is_wp_error($video_thumbnail))
    
    			$thumb_url = $video_thumbnail;
    
    	}
    
    	/* If this is a video by jplayer, try to get thumbnail from video_posts */
    
    	if(empty($thumb_url) && $poster = get_post_meta($post_id, 'dp_video_poster', true))
    
    		$thumb_url = $poster;
    
    	/* If still no image or is wp error, define default image */
    
    	if(empty($thumb_url) || is_wp_error($thumb_url)) {
    
    		if($default === false || $default === 0)
    
    			return false;
    
    		$thumb_url = !empty($default) ? $default : get_template_directory_uri().'/images/nothumb.png';
    
    	}
    
    	if($echo)
    
    		echo $thumb_url;
    
    	else
    
    		return $thumb_url;
    
    } 
    
    /**
    
     * Display Video Thumbnail HTML
    
     *
    
     * @param int $size Optional. Image size. Defaults to 'custom-medium';.
    
     */
    
    function dp_thumb_html($size = 'custom-medium', $default = '', $post_id = null, $echo = true) {
    
    	global $post;
    
    	if(!$post_id)
    
    		$post_id = $post->ID;
    
    	if(!$size)
    
    		$size == 'custom-medium';
    
    	// Get thumb url
    
    	$thumb_url = dp_thumb_url($size, $default, $post_id, false);
    
    	$html = '
    
    	<div class="thumb">
    
    		<a class="clip-link" data-id="'.$post->ID.'" title="'.esc_attr(get_the_title($post_id)).'" href="'.get_permalink($post_id).'">
    
    			<span class="clip">
    
    				<img src="'.$thumb_url.'" width="120" height="170"   alt="'.esc_attr(get_the_title($post_id)).'" /><span class="vertical-align"></span>
    
    			</span>
    
    			<span class="overlay"></span>
    
    		</a>
    
    	</div>';
    
    	if($echo)
    
    		echo $html;
    
    	else
    
    		return $html;
    
    } 
    
    /**
    
     * Display post excerpt
    
     *
    
     * @since 1.2.3
    
     */
    
    function dp_excerpt($length = 220, $echo = true){
    
    	global $post;
    
    	$excerpt = strip_shortcodes($post->post_excerpt);
    
    	if(!$excerpt)
    
    		$excerpt = mb_strimwidth(strip_tags(strip_shortcodes(get_the_content(''))), 0, $length, '...');
    
    	if($echo)
    
    		echo $excerpt;
    
    	else
    
    		return $excerpt;
    
    }
    
    /**
    
     * Output a Section Box
    
     * 
    
     * @since deTube 1.0
    
     */
    
    function dp_section_box($args = array()) {
    
    	$defaults = array(
    
    		'post_type' => 'post',
    
    		'cat' => '',
    
    		'taxonomies' => array(),
    
    		'view' => 'grid-small',
    
    		'title' => '',
    
    		'link' => '',
    
    		'post__in' => '',
    
    		'posts_per_page' => '',
    
    		'hide_if_empty' => false
    
    	);
    
    	$args = wp_parse_args($args, $defaults);
    
    	extract($args);
    
    	$posts_per_page = absint($posts_per_page);
    
    	// Set default posts number if no specified
    
    	if(empty($posts_per_page)) {
    
    		if($view == 'grid-mini')
    
    			$posts_per_page = 8;
    
    		elseif($view == 'grid-small')
    
    			$posts_per_page = 6;
    
    		elseif($view == 'grid-medium')
    
    			$posts_per_page = 4;
    
    		elseif($view == 'list-small')
    
    			$posts_per_page = 3;
    
    		elseif($view == 'list-medium')
    
    			$posts_per_page = 2;
    
    		elseif($view == 'list-large')
    
    			$posts_per_page = 1;
    
    	}
    
    	$args['posts_per_page'] = $posts_per_page;
    
    	$args = dp_parse_query_args($args);
    
    	$query = new WP_Query($args);
    
    	// Output nothing if there is no posts
    
    	if(!$query->have_posts() && $hide_if_empty)
    
    		return;
    
    	// Output content before section
    
    	if(!empty($before))
    
    		echo '<div class="section-box section-before rich-content">'. do_shortcode(wp_kses_stripslashes($before)).'</div><!-- end .section-box -->';
    
    	// Section box begin
    
    	echo '<div class="section-box">';
    
    	global $section_view;	
    
    	$section_view = $view;
    
    	// Get term name as title
    
    	$term = '';
    
    	$cat = '';
    
    	if(!empty($taxonomies['category'])) 
    
    		$cat = $taxonomies['category'];
    
    	if($cat)
    
    		$term = get_term($cat, 'category');
    
    	if(empty($title) && $term)
    
    		$title = $term->name;
    
    	if(empty($link) && $term)
    
    		$link = get_term_link($term, 'category');
    
    	$title = '<span class="name">'.$title.'</span>';
    
    	// Output section header
    
    	echo '<div class="section-header"><h2 class="section-title">'.$title.'</h2>'.$more.'</div>';
    
    	// Output section content
    
    	echo '<div class="section-content '.$view.'"><div class="nag cf">';
    
    	while ($query->have_posts()) : $query->the_post();
    
    		get_template_part('item-video');
    
    	endwhile;
    
    	wp_reset_postdata();
    
    	echo '</div></div><!-- end .section-content -->';
    
    	// End section box
    
    	echo '</div><!-- end .section-box -->';
    
    	// Output content after section
    
    	if(!empty($after))
    
    		echo '<div class="section-box section-after rich-content">'. do_shortcode(wp_kses_stripslashes($after)).'</div><!-- end .section-box -->';
    
    }
    
    /**
    
     * Output Likes page button
    
     * 
    
     * @since deTube 1.4
    
     */
    
    function dp_likes_page_button() {	
    
    	if(get_option('dp_header_likes') && $likes_page_id = get_option('dp_post_likes_page')) {
    
    		$dp_post_likes = get_option('dp_post_likes');
    
    		$login_required = !empty($dp_post_likes['login_required']) ? true : false;
    
    		if(!is_user_logged_in() && $login_required)
    
    			return false;
    
    		echo '<a class="btn btn-likes btn-red" href="'.get_permalink($likes_page_id).'">'.get_the_title($likes_page_id).'</a>';
    
    	}
    
    }
    
    /**
    
     * Output Account button
    
     * 
    
     * @since deTube 1.4
    
     */
    
    function dp_account_button() { 
    
    	if(!is_user_logged_in() || !get_option('dp_header_account'))
    
    		return;
    
    	$user_id = get_current_user_id();
    
    	$current_user = wp_get_current_user();
    
    	$profile_url = get_author_posts_url($user_id);
    
    	$edit_profile_url  = get_edit_profile_url($user_id);
    
    	$current_url = get_current_url(); ?>
    
    	<div id="account-nav" class="user-nav">
    
    		<a class="dropdown-handle" href="<?php echo $profile_url; ?>">
    
    			<?php echo get_avatar( $user_id, 32 ); ?>
    
    			<span class="display-name btn">
    
    				<span class="arrow-down"><?php echo $current_user->display_name; ?></span> 
    
    				<i class="mini-arrow-down"></i>
    
    			</span>
    
    		</a>
    
    		<div class="dropdown-content">
    
    			<ul class="dropdown-content-inner">
    
    				<li><a class="profile-link" href="<?php echo $profile_url; ?>"><?php _e('Profile', 'dp'); ?></a></li>
    
    				<li><a class="account-link" href="<?php echo $edit_profile_url; ?>"><?php _e('Account', 'dp'); ?></a></li>
    
    				<li><a class="logout-link" href="<?php echo esc_url(wp_logout_url($current_url)); ?>"><?php _e('Log out', 'dp'); ?></a></li>
    
    			</ul>
    
    		</div>
    
    	</div><!-- end #account-nav -->
    
    <?php }
    
    /**
    
     * Output Sign up button
    
     * 
    
     * @since deTube 1.4
    
     */
    
    function dp_signup_button() { 
    
    	if(!is_user_logged_in() && get_option('users_can_register') && get_option('dp_header_signup')) {
    
    		echo '<a class="btn btn-green btn-signup" href="'.site_url('wp-login.php?action=register', 'login').'">'.__('Sign up', 'dp').'</a>';
    
    	}
    
    	return;
    
    }
    
    /**
    
     * Output Log in button
    
     * 
    
     * @since deTube 1.4
    
     */
    
    function dp_login_button() {
    
    	if(is_user_logged_in() || !get_option('dp_header_login'))
    
    		return; ?>
    
    	<div id="login-nav" class="user-nav">
    
    			<div class="dropdown">
    
    				<a class="dropdown-handle btn btn-black btn-login" href="<?php echo wp_login_url(); ?>"><?php _e('Log In', 'dp'); ?></a>
    
    				<div class="dropdown-content"><div class="dropdown-content-inner">
    
    					<?php wp_login_form(); ?>
    
    				</div></div>
    
    			</div>
    
    		</div><!-- end #login-nav -->
    
    <?php }
    
    /**
    
     * Output AddThis Button Code
    
     * 
    
     * @since deTube 1.0
    
     */
    
    function dp_addthis($args = array()) { 
    
    	$defaults = array(
    
    		'post_id' => 0,
    
    		'url' => '',
    
    		'title' => ''
    
    	);
    
    	$args = wp_parse_args($args, $defaults);
    
    	extract($args);
    
    	if(empty($url))
    
    		$url = wp_get_shortlink($post_id, 'post'); 
    
    	if(empty($title) && $post_id)
    
    		$title = get_the_title($post_id);
    
    	?>
    
    	<?php 
    
    		$params = array();
    
    		if($url) 
    
    			$params[] = "addthis:url='".esc_url($url)."'";
    
    		if($title) 
    
    			$params[] = "addthis:title='".esc_attr($title)."'";
    
    	?>
    
    	<div class="addthis_toolbox addthis_default_style" <?php echo implode(' ', $params); ?>>
    
    		<ul>
    
    			<li><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a></li>
    
    			<li><a class="addthis_button_tweet"></a></li>
    
    			<li><a class="addthis_button_google_plusone" g:plusone:size="medium"></a></li>
    
    			<li><a class="addthis_button_pinterest_pinit"></a></li>
    
    			<li><a class="addthis_counter addthis_pill_style"></a></li>
    
    		</ul>
    
    	</div>
    
    <?php } 
    
    // Load AddThis js file in footer once
    
    add_action('wp_footer', 'dp_addthis_js', 1);
    
    function dp_addthis_js() {
    
    	if(!get_option('dp_addthis'))
    
    		return;
    
    	$protocol = is_ssl() ? 'https' : 'http';
    
    	$pubid = get_option('dp_addthis_pubid');
    
    	$file = $protocol.'://s7.addthis.com/js/300/addthis_widget.js';
    
    	$file .= !empty($pubid) ? '#pubid='.$pubid : '';
    
    	wp_enqueue_script('addthis', $file, '', null, true);
    
    }
    
    function dp_post_actions($post_id){ ?>
    
    	<div class="entry-actions">
    
    		<?php dp_like_post($post_id); ?>
    
    		<?php if(get_option('dp_addthis')) { ?>
    
    			<div class="dropdown dp-share">
    
    				<a class="dropdown-handle" href="#"><?php _e('Share', 'dp'); ?></a>
    
    				<div class="dropdown-content">
    
    					<?php dp_addthis(array('post_id'=>$post_id)); ?>
    
    				</div>
    
    		</div>
    
    		<?php } ?>
    
    	</div>
    
    <?php }
    
    /**
    
     * Get post stats(views/comments/likes)
    
     *
    
     * @since deTube 1.0
    
     */
    
    function dp_get_post_stats($pid = '') {
    
    	global $post;
    
    	if(!$pid)
    
    		$pid = $post->ID;
    
    	if(!$pid)
    
    		return;
    
    	$views = sprintf(__('%s <span class="suffix">Views</span>', 'dp'), '<i class="count">'.dp_get_post_views($pid).'</i>');
    
    	$comments = sprintf(__('%s <span class="suffix">Comments</span>', 'dp'), '<i class="count">'.get_comments_number($pid).'</i>');
    
    	$likes = sprintf(__('%s <span class="suffix">Likes</span>', 'dp'), '<i class="count" data-pid="'.$pid.'">'.dp_get_post_likes($pid).'</i>');
    
    	$liked = dp_is_user_liked_post($pid) ? ' liked': '';
    
    	$stats = '<span class="views">'.$views.'</span>';
    
    	$stats .= '<span class="comments">'.$comments.'</span>';
    
    	$stats .= '<span class="dp-post-likes likes'.$liked.'">'.$likes.'</span>';
    
    	return $stats;
    
    }
    
    /**
    
     * Related Posts
    
     *
    
     * @since 1.0
    
     */
    
    function dp_related_posts($args = '') {
    
    	global $post;
    
    	$query_args = array();
    
    	$defaults = array(
    
    		'view' => 'grid-mini',
    
    		'number' => 0,
    
    		'fields' => '' // object, html or leave it blank
    
    	);
    
    	$args = wp_parse_args($args, $defaults);
    
    	extract($args);
    
    	// Only displayed on singular post pages
    
    	if(!is_singular())
    
    		return;
    
    	// Check limited number
    
    	if(!$number)
    
    		return;
    
    	// Check taxonomies
    
    	$taxes = get_post_taxonomies($post->ID);
    
    	if(empty($taxes))
    
    		return;
    
    	$taxes = array_unique(array_merge(array('post_tag', 'category'), $taxes));
    
    	$tax_query = array();
    
    	$in_tax_query_array = array();
    
    	$and_tax_query_array = array();
    
    	foreach($taxes as $tax) {
    
    		if($tax == 'post_format') {
    
    			// Post format
    
    			$post_format = get_post_format($post->ID);
    
    			if(!$post_format) $post_format = 'standard';
    
    			$post_format_query_array = array(
    
    				'taxonomy' => 'post_format',
    
    				'field' => 'slug',
    
    				'terms' => 'post-format-'.$post_format,
    
    				'operator' => 'IN'
    
    			);
    
    			continue;
    
    		}
    
    		$terms = get_the_terms($post->ID, $tax);
    
    		if(empty($terms))
    
    			continue;
    
    		$term_ids = array();
    
    		foreach($terms as $term)
    
    			$term_ids[] = $term->term_id;
    
    		$in_tax_query_array[$tax] = array(
    
    			'taxonomy' => $tax,
    
    			'field' => 'id',
    
    			'terms' => $term_ids,
    
    			'operator' => 'IN'
    
    		);
    
    		$and_tax_query_array[$tax] = array(
    
    			'taxonomy' => $tax,
    
    			'field' => 'id',
    
    			'terms' => $term_ids,
    
    			'operator' => 'AND'
    
    		);
    
    	}
    
    	if(empty($in_tax_query_array) && empty($and_tax_query_array))
    
    		return;		
    
    	$query_args = array(
    
    		'post_type' => get_post_type($post->ID),
    
    		'ignore_sticky_posts' => true, 
    
    		'posts_per_page' => $number
    
    	);
    
    	$current_post_id = $post->ID;
    
    	$found_posts = array();
    
    	// Multiple Taxonomy Query: relation = AND, operator = AND
    
    	$query_args['tax_query'] = $and_tax_query_array;
    
    	$query_args['tax_query'][] = $post_format_query_array;
    
    	$query_args['tax_query']['relation'] = 'AND';
    
    	$query_args['post__not_in'] = array($post->ID);
    
    	$related = new WP_Query($query_args); 
    
    	foreach($related->posts as $post)
    
    		$found_posts[] = $post->ID;
    
    	// Multiple Taxonomy Query: relation = AND, operator = IN
    
    	if(count($found_posts) < $number) {
    
    		$query_args['tax_query'] = $in_tax_query_array;
    
    		$query_args['tax_query'][] = $post_format_query_array;
    
    		$query_args['tax_query']['relation'] = 'AND';
    
    		$query_args['post__not_in'] = array_merge(array($current_post_id), $found_posts);
    
    		$related = new WP_Query($query_args); 
    
    		foreach($related->posts as $post)
    
    			$found_posts[] = $post->ID;
    
    	}
    
    	$post_format_query = array(
    
    		'taxonomy' => 'post_format',
    
    		'field' => 'slug',
    
    		'terms' => get_post_format(),
    
    		'operator' => 'IN'
    
    	);
    
    	// Foreach Each Taxonomy Query: operator = AND
    
    	if(count($found_posts) < $number) {
    
    		foreach($and_tax_query_array as $and_tax_query) {
    
    			$query_args['tax_query'] = array($and_tax_query);
    
    			$query_args['tax_query'][] = $post_format_query_array;
    
    			$query_args['tax_query']['relation'] = 'AND';
    
    			$query_args['post__not_in'] = array_merge(array($current_post_id), $found_posts);
    
    			$related = new WP_Query($query_args);
    
    			foreach($related->posts as $post)
    
    				$found_posts[] = $post->ID;
    
    			if(count($found_posts) > $number)
    
    				break;
    
    		}
    
    	}
    
    	// Foreach Each Taxonomy Query: operator = IN
    
    	if(count($found_posts) < $number) {
    
    		foreach($in_tax_query_array as $in_tax_query) {
    
    			$query_args['tax_query'] = array($in_tax_query);
    
    			$query_args['tax_query'][] = $post_format_query_array;
    
    			$query_args['tax_query']['relation'] = 'AND';
    
    			$query_args['post__not_in'] = array_merge(array($current_post_id), $found_posts);
    
    			$related = new WP_Query($query_args);
    
    			foreach($related->posts as $post)
    
    				$found_posts[] = $post->ID;
    
    			if(count($found_posts) > $number)
    
    				break;
    
    		}
    
    	}
    
    	if(empty($found_posts))
    
    		return;
    
    	$query_args['tax_query'] = '';
    
    	$query_args['post__in'] = $found_posts;
    
    	$related = new WP_Query($query_args);
    
    	if($fields == 'object')
    
    		return $related;
    
    	if(!empty($args['template']) && is_callable($args['template'])) {
    
    		call_user_func($args['template'], $related);
    
    		return;
    
    	}
    
    	?>
    
    	<div class="section-box related-posts">
    
    		<div class="section-header"><h3 class="section-title"><?php _e('You may also like', 'dp') ?></h3></div>
    
    		<div class="section-content <?php echo $view; ?>"><div class="nag cf">
    
    			<?php if( $related->have_posts() ) : while( $related->have_posts() ) : $related->the_post(); 
    
    			global $post;
    
    			global $section_view;
    
    			$section_view = 'grid-mini';
    
    			get_template_part('item-video');
    
    			endwhile; endif; wp_reset_query(); ?>
    
    		</div></div>
    
    	</div><!-- end .related-posts -->
    
    <?php }
    
    /**
    
     * Custom Comment Form
    
     *
    
     * @since 1.0
    
     */
    
    function dp_comment_form( $args = array(), $post_id = null ) {
    
    	global $id;
    
    	if ( null === $post_id )
    
    		$post_id = $id;
    
    	else
    
    		$id = $post_id;
    
    	$commenter = wp_get_current_commenter();
    
    	$user = wp_get_current_user();
    
    	$user_identity = ! empty( $user->ID ) ? $user->display_name : '';
    
    	$req = get_option( 'require_name_email' );
    
    	$aria_req = ( $req ? " aria-required='true'" : '' );
    
    	$fields =  array(
    
    		'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name', 'dp' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) .
    
    		            '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>',
    
    		'email'  => '<p class="comment-form-email"><label for="email">' . __( 'Email', 'dp' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) .
    
    		            '<input id="email" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>',
    
    		'url'    => '<p class="comment-form-url"><label for="url">' . __( 'Website', 'dp' ) . '</label>' .
    
    		            '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>',
    
    	);
    
    	$required_text = sprintf( ' ' . __('Required fields are marked %s', 'dp'), '<span class="required">*</span>' );
    
    	$defaults = array(
    
    		'fields'               => apply_filters( 'comment_form_default_fields', $fields ),
    
    		'comment_field'        => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun', 'dp') . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>',
    
    		'must_log_in'          => '<p class="must-log-in">' .  sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',
    
    		'logged_in_as'         => '<p class="logged-in-as">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>', 'dp' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',
    
    		'comment_notes_before' => '<p class="comment-notes">' . __( 'Your email address will not be published.', 'dp' ) . ( $req ? $required_text : '' ) . '</p>',
    
    		'comment_notes_after'  => '<p class="form-allowed-tags">' . sprintf( __( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s', 'dp' ), ' <code>' . allowed_tags() . '</code>' ) . '</p>',
    
    		'id_form'              => 'commentform',
    
    		'id_submit'            => 'submit',
    
    		'title_reply'          => __( 'Leave a Reply', 'dp' ),
    
    		'title_reply_to'       => __( 'Leave a Reply to %s', 'dp' ),
    
    		'cancel_reply_link'    => __( 'Cancel reply', 'dp' ),
    
    		'label_submit'         => __( 'Post Comment', 'dp' ),
    
    	);
    
    	$args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) );
    
    	?>
    
    		<?php if ( comments_open() ) : ?>
    
    			<?php do_action( 'comment_form_before' ); ?>
    
    			<div id="respond" class="cf">
    
    				<div  class="section-header"><h3 id="reply-title" class="section-title"><?php comment_form_title( $args['title_reply'], $args['title_reply_to'] ); ?> <small><?php cancel_comment_reply_link( $args['cancel_reply_link'] ); ?></small></h3></div>
    
    				<?php if ( get_option( 'comment_registration' ) && !is_user_logged_in() ) : ?>
    
    					<?php echo $args['must_log_in']; ?>
    
    					<?php do_action( 'comment_form_must_log_in_after' ); ?>
    
    				<?php else : ?>
    
    					<form action="<?php echo site_url( '/wp-comments-post.php' ); ?>" method="post" id="<?php echo esc_attr( $args['id_form'] ); ?>">
    
    						<?php do_action( 'comment_form_top' ); ?>
    
    						<?php if ( is_user_logged_in() ) : ?>
    
    							<?php echo apply_filters( 'comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity ); ?>
    
    							<?php do_action( 'comment_form_logged_in_after', $commenter, $user_identity ); ?>
    
    						<?php else : ?>
    
    							<?php echo $args['comment_notes_before']; ?>
    
    							<?php
    
    							do_action( 'comment_form_before_fields' );
    
    							foreach ( (array) $args['fields'] as $name => $field ) {
    
    								echo apply_filters( "comment_form_field_{$name}", $field ) . "\n";
    
    							}
    
    							do_action( 'comment_form_after_fields' );
    
    							?>
    
    						<?php endif; ?>
    
    						<?php echo apply_filters( 'comment_form_field_comment', $args['comment_field'] ); ?>
    
    						<?php echo $args['comment_notes_after']; ?>
    
    						<p class="form-submit">
    
    							<input name="submit" class="btn btn-black" type="submit" id="<?php echo esc_attr( $args['id_submit'] ); ?>" value="<?php echo esc_attr( $args['label_submit'] ); ?>" />
    
    							<?php comment_id_fields( $post_id ); ?>
    
    						</p>
    
    						<?php do_action( 'comment_form', $post_id ); ?>
    
    					</form>
    
    				<?php endif; ?>
    
    			</div><!-- #respond -->
    
    			<?php do_action( 'comment_form_after' ); ?>
    
    		<?php else : ?>
    
    			<?php do_action( 'comment_form_comments_closed' ); ?>
    
    		<?php endif; ?>
    
    	<?php
    
    } 
    
    /**
    
     * Custom Comment Callback
    
     *
    
     * @since 1.0
    
     */
    
    function dp_comment_callback( $comment, $args, $depth ) {
    
    	$GLOBALS['comment'] = $comment;
    
    ?>
    
    	<li <?php comment_class('cf'); ?> id="comment-<?php comment_ID() ?>">
    
    		<div id="comment-div-<?php comment_ID() ?>" class="comment-div cf">
    
    		<div class="comment-inner">
    
    			<?php if ($args['avatar_size'] != 0) echo '<div class="comment-avatar">'.get_avatar( $comment, $args['avatar_size'] ).'</div>'; ?>
    
    			<div class="comment-meta">
    
    				<span class="comment-author"><?php printf(__('<cite class="fn">%s</cite>', 'dp'), get_comment_author_link()) ?></span>
    
    				<a class="comment-time" href="<?php echo '#comment-'.$comment->comment_ID; ?>"><?php printf(__('%s ago', 'dp'), relative_time(get_comment_time('U', true))); ?></a>
    
    				<?php edit_comment_link(__('Edit', 'dp'),' <span class="sep">/</span> ','' ); ?>
    
    			</div>
    
    			<div class="comment-content">
    
    				<?php if ($comment->comment_approved == '0') : ?>
    
    					<p class="comment-awaiting-moderation"><?php _e('Your comment is awaiting moderation.', 'dp') ?></p>
    
    				<?php endif; ?>
    
    				<?php comment_text(); ?>
    
    			</div>
    
    			<div class="comment-actions">
    
    				<?php comment_reply_link(array_merge( $args, array('add_below' => 'comment-div', 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
    
    			</div>
    
    		</div>
    
    		</div><!-- end .comment-div -->
    
    <?php }
    
    /**
    
     * Custom Ping callback
    
     *
    
     * @since deTube 1.0
    
     */
    
    function dp_ping_callback($comment, $args, $depth ) { ?>
    
    	<li id="comment-<?php comment_ID(); ?>" <?php comment_class(); ?>>
    
    		<?php comment_author_link(); ?> <span class="meta"><?php comment_date(); ?></span>
    
    <?php 
    
    }
    
    /* Add 'Lost password' link to loginform */
    
    add_filter('login_form_middle', 'lost_password', 10, 2);
    
    function lost_password($html, $args) {
    
    	return '<a class="lost-password" href="'.esc_url( wp_lostpassword_url() ).'">'.__('Lost password?', 'dp').'</a>';
    
    }
    
    /**
    
     * Get views timings
    
     */
    
    function dp_views_timings() {
    
    	$views_timings = array( 
    
    		'all' => __( 'All', 'dp' ),
    
    		'day' => __( 'Day', 'dp' ),
    
    		'week' => __( 'Week', 'dp' ),
    
    		'month' => __( 'Month', 'dp' ), 
    
    		'year' => __( 'Year', 'dp' )
    
    	);
    
    	return $views_timings;
    
    }
    
    /**
    
     * Get supported sort types
    
     */
    
    function dp_supported_sort_types() {
    
    	$types = array(
    
    		'date' => array(
    
    			'label' => __('Date', 'dp'),
    
    			'title' => __('Sort by Date', 'dp')
    
    		),
    
    		'title' => array(
    
    			'label' => __('Title', 'dp'),
    
    			'title' => __('Sort by Title', 'dp')
    
    		),
    
    		'views' => array(
    
    			'label' => __('Views', 'dp'),
    
    			'title' => __('Sort by Views', 'dp')
    
    		),
    
    		'likes' => array(
    
    			'label' => __('Likes', 'dp'),
    
    			'title' => __('Sort by Likes', 'dp')
    
    		),
    
    		'comments' => array(
    
    			'label' => __('Comments', 'dp'),
    
    			'title' => __('Sort by Comments', 'dp')
    
    		),
    
    		'rand' => array(
    
    			'label' => __('Random', 'dp'),
    
    			'title' => __('Sort Randomly', 'dp')
    
    		)
    
    	);
    
    	return apply_filters('dp_supported_sort_types', $types);
    
    }
    
    /**
    
     * Get selected sort types
    
     */
    
    function dp_selected_sort_types() {
    
    	$selected_types = get_option('dp_sort_types');
    
    	if(empty($selected_types))
    
    		return array();
    
    	$supported_types = dp_supported_sort_types();
    
    	foreach($selected_types as $key => $value)
    
    		$selected_types[$key] = $supported_types[$key];
    
    	return apply_filters('dp_selected_sort_types', $selected_types);
    
    }
    
    /**
    
     * Get supported vie
Viendo 15 resultados - del 301 al 315 (de un total de 323)