<?php global $smof_data; $gallery = cshero_get_shortcode_from_content('gallery'); $object = new stdClass(); $object->columns = '3'; $object->link = 'post'; $object->ids = array(); if ($gallery) { $object = cshero_extra_shortcode('gallery', $gallery, $object); } $gallery_ids = $object->ids; $gallery_ns = $object->columns; $gallery_ns = 1 / $gallery_ns * 100; wp_enqueue_script('masonry-pkgd'); wp_register_script('portfolio-details-fixed', get_template_directory_uri() . '/js/portfolio.details.fixed.js', array(), '1.0.0'); wp_localize_script('portfolio-details-fixed', 'portfolio', array('ns' => $gallery_ns)); wp_enqueue_script('portfolio-details-fixed'); //option theme $about_title = $smof_data['portfolio_about_title']; $show_description = $smof_data['portfolio_show_description']; $excerpt_length = $smof_data['portfolio_excerpt_length']; $show_custom_field = $smof_data['portfolio_show_custom_field']; $icon_custom_field = $smof_data['portfolio_custom_field_icon']; $text_custom_field = $smof_data['portfolio_custom_field_title']; $show_date = $smof_data['portfolio_show_date']; $icon_date = $smof_data['portfolio_date_icon']; $text_date = $smof_data['portfolio_date_title']; $show_category = $smof_data['portfolio_show_category']; $icon_category = $smof_data['portfolio_category_icon']; $text_category = $smof_data['portfolio_category_title'];
function cshero_grab_ids_from_gallery() { global $post; $gallery = cshero_get_shortcode_from_content('gallery'); $object = new stdClass(); $object->columns = '3'; $object->link = 'post'; $object->ids = array(); if ($gallery) { $object = cshero_extra_shortcode('gallery', $gallery, $object); } return $object; }