function kkthemes_post_view($featured_items = false) { // Posts grid beans_add_attribute('beans_post', 'class', 'tm-post-grid uk-grid uk-grid-medium'); beans_add_attribute('beans_post_image', 'class', 'uk-width-medium-1-2'); beans_wrap_markup('beans_post_header', 'kkthemes_post_preview', 'div', array('class' => 'tm-post-preview uk-width-medium-1-2')); if (is_featured_item() || $featured_items) { //More button beans_add_attribute('beans_post_more_link', 'class', 'uk-button uk-button-large uk-margin-top'); } else { // Post title beans_add_attribute('beans_post_title', 'class', 'uk-h2'); } // Post content beans_remove_action('beans_post_content'); beans_remove_markup('beans_post_body'); add_action('kkthemes_post_preview_append_markup', 'the_content'); // Auto generate summary of Post content and read more button beans_add_smart_action('the_content', 'kkthemes_post_content'); // Post meta beans_remove_action('beans_post_meta_tags'); beans_remove_action('beans_post_meta_categories'); // Post image beans_modify_action('beans_post_image', 'beans_post_header_before_markup', 'beans_post_image'); }
function bench_index_setup_document() { //Layout if (beans_get_layout() == 'c') { beans_remove_attribute('beans_primary', 'class', 'uk-width-large-7-10'); } // Posts grid beans_add_attribute('beans_content', 'class', 'tm-posts-grid uk-grid uk-grid-width-small-1-2 uk-grid-width-medium-1-3'); beans_add_attribute('beans_content', 'data-uk-grid-margin', ''); beans_add_attribute('beans_content', 'data-uk-grid-match', "{target:'.uk-panel'}"); beans_wrap_inner_markup('beans_post', 'bench_post_panel', 'div', array('class' => 'uk-panel uk-panel-box')); // Post content beans_remove_attribute('beans_content', 'class', 'tm-centered-content'); // Post article beans_remove_attribute('beans_post', 'class', 'uk-article'); // Post meta beans_remove_action('beans_post_meta'); beans_remove_action('beans_post_meta_tags'); beans_modify_action('beans_post_meta_categories', 'beans_post_header', null, 7); beans_remove_output('beans_post_meta_categories_prefix'); beans_add_attribute('beans_post_meta_categories', 'class', 'tm-post-category'); // Post image beans_modify_action('beans_post_image', 'beans_post_header_before_markup', 'beans_post_image'); // Post title beans_add_attribute('beans_post_title', 'class', 'uk-margin-small-top uk-h3'); // Post more link //beans_add_attribute( 'beans_post_more_link', 'class', 'uk-button uk-button-small' ); // Posts pagination beans_modify_action_hook('beans_posts_pagination', 'beans_content_after_markup'); }
function tbr_blog_setup() { beans_remove_attribute('beans_body', 'class'); beans_add_attribute('beans_body', 'class', 'tm-blog'); beans_remove_action('beans_post_meta'); beans_remove_action('beans_post_meta_tags'); beans_remove_attribute('beans_post', 'class'); beans_add_attribute('beans_post', 'class', 'uk-article'); beans_modify_action('beans_post_meta_date', 'tm-item-inner_prepend_markup'); beans_modify_action('beans_post_meta_categories', 'tm_item_inner_prepend_markup', null, 7); beans_remove_markup('beans_primary'); beans_remove_markup('beans_post_body'); beans_remove_markup('beans_post_header'); beans_remove_markup('beans_post_content'); beans_add_attribute('beans_main_grid', 'class', 'uk-grid-width-1-1 uk-grid-width-small-1-2 uk-grid-width-medium-1-3'); beans_add_attribute('beans_main_grid', 'data-uk-grid', '{gutter: 20, controls: \'#js-blog-filters\'}'); beans_remove_attribute('beans_main_grid', 'data-uk-grid-margin'); beans_replace_attribute('beans_post', 'class', 'uk-article', 'tm-item'); beans_modify_markup('beans_post', 'div'); beans_wrap_inner_markup('beans_post', 'tm_item_inner', 'div', array('class' => 'uk-panel uk-panel-box uk-panel-box-secondary')); beans_add_attribute('beans_post_title', 'class', 'uk-margin-small-top'); beans_add_attribute('beans_post_more_link', 'class', 'uk-button uk-button-secondary'); beans_replace_attribute('beans_next_icon_more_link', 'class', 'uk-icon-angle-double-right', 'uk-icon-arrow-circle-o-right'); beans_replace_attribute('beans_post_meta_categories', 'class', 'uk-text-small uk-text-muted uk-clearfix', 'tm-topic uk-button uk-button-tertiary uk-button-mini'); beans_add_attribute('beans_widget_content_sidebar_primary_recent-posts', 'class', 'tm-list-style1'); beans_add_attribute('beans_widget_content_categories', 'class', 'tm-list-style1'); }
function flipster_index_setup_document() { // Posts grid beans_add_attribute('beans_content', 'class', 'tm-posts-grid uk-grid uk-grid-width-small-1-2 uk-grid-width-medium-1-2'); beans_add_attribute('beans_content', 'data-uk-grid-margin', ''); beans_add_attribute('beans_content', 'data-uk-grid-match', "{target:'.uk-panel'}"); beans_wrap_inner_markup('beans_post', 'flipster_post_panel', 'div', array('class' => 'uk-panel uk-panel-box')); // Post content beans_remove_attribute('beans_content', 'class', 'tm-centered-content'); // Post article beans_remove_attribute('beans_post', 'class', 'uk-article'); // Post meta beans_remove_action('beans_post_meta_tags'); // Post image beans_modify_action('beans_post_image', 'beans_post_header_before_markup', 'beans_post_image'); // Post title beans_add_attribute('beans_post_title', 'class', 'uk-margin-small-top uk-h2'); // Remove the post content. beans_remove_action('beans_post_content'); // Post more link beans_add_attribute('beans_post_more_link', 'class', 'uk-button uk-button-primary uk-button-small'); // Posts pagination beans_modify_action_hook('beans_posts_pagination', 'beans_content_after_markup'); }
/** * Replace an action. * * This function replaces an action registered using {@see beans_add_action()} or * {@see beans_add_smart_action()}. Each optional argument must be set to NULL to keep * the orginal value. * * While {@see beans_modify_action()} will keep the original value registered, this function * will overwrite the original action. If the action is reset using {@see beans_reset_action()}, * the replaced values will be used. * * @since 1.0.0 * * @param string $id The action ID. * @param string $hook Optional. The name of the new action to which the $callback is hooked. * Use NULL to keep the original value. * @param callback $callback Optional. The name of the new function you wish to be called. * Use NULL to keep the original value. * @param int $priority Optional. The new priority. * Use NULL to keep the original value. * @param int $args Optional. The new number of arguments the function accepts. * Use NULL to keep the original value. * * @return bool Will always return true. */ function beans_replace_action($id, $hook = null, $callback = null, $priority = null, $args = null) { $action = array('hook' => $hook, 'callback' => $callback, 'priority' => $priority, 'args' => $args); // Set and get the latest replaced. $action = _beans_merge_action($id, array_filter($action), 'replaced'); // Set and get the latest added. $action = _beans_merge_action($id, $action, 'added'); return beans_modify_action($id, $hook, $callback, $priority, $args); }