Esempio n. 1
1
function kkthemes_homepage_setup_document()
{
    beans_add_smart_action('beans_header_after_markup', 'kkthemes_site_title_tag');
    beans_add_smart_action('beans_content_after_markup', 'kkthemes_homepage_contents');
    kkthemes_post_view(true);
    //change this to manually output post loop when more post types are there.
    beans_add_filter('beans_loop_query_args[_main]', 'kkthemes_theme_home_query_args');
    //remove pagination
    beans_remove_action('beans_posts_pagination');
}
Esempio n. 2
1
{
    return the_date('d M, Y', '<span class="uk-text-muted uk-text-small uk-margin-left">', '</span>');
}
// Remove categories prefix
add_action('beans_post_meta_categories_prefix_output', 'tbr_categories_prefix');
function tbr_categories_prefix()
{
    return;
}
// Modify the "Previous" post navigation text.
add_filter('beans_previous_text_post_navigation_output', 'beans_child_previous_text_post_navigation');
function beans_child_previous_text_post_navigation()
{
    if ($post = get_previous_post()) {
        $text = $post->post_title;
    }
    return '<strong class="uk-display-block">Previous post </strong>' . $text;
}
// Modify the "Next" post navigation text.
add_filter('beans_next_text_post_navigation_output', 'beans_child_next_text_post_navigation');
function beans_child_next_text_post_navigation($text)
{
    if ($post = get_next_post()) {
        $text = $post->post_title;
    }
    return '<strong class="uk-display-block">Next post </strong>' . $text;
}
// Set the default layout to content only.
beans_add_filter('beans_layout', 'c_sp');
// Load Beans
beans_load_document();
Esempio n. 3
0
            <symbol id="dribbble-icon" viewBox="0 0 50 50">
                <title>Dribble Icon</title>
                <path d="M25.0002551,0 C11.1927551,0 0.000255102041,11.1925 0.000255102041,25 C0.000255102041,38.8075 11.1927551,50 25.0002551,50 C38.8077551,50 50.0002551,38.8075 50.0002551,25 C50.0002551,11.1925 38.8077551,0 25.0002551,0 L25.0002551,0 L25.0002551,0 Z" id="ball" fill="#EA4C89"></path>
                <path d="M25.0002551,-0.000510204082 C11.1927551,-0.000510204082 0.000255102041,11.1919898 0.000255102041,24.9994898 C0.000255102041,38.8069898 11.1927551,49.9994898 25.0002551,49.9994898 C38.8077551,49.9994898 50.0002551,38.8069898 50.0002551,24.9994898 C50.0002551,11.1919898 38.8077551,-0.000510204082 25.0002551,-0.000510204082 L25.0002551,-0.000510204082 L25.0002551,-0.000510204082 Z M25.0002551,3.6219898 C30.4465051,3.6219898 35.4177551,5.6594898 39.1927551,9.0119898 C36.4190051,12.6707398 32.2052551,15.1069898 27.9827551,16.7557398 C25.6815051,12.5457398 22.8477551,8.1069898 19.9640051,4.2182398 C21.5777551,3.8282398 23.2640051,3.6219898 25.0002551,3.6219898 L25.0002551,3.6219898 L25.0002551,3.6219898 Z M15.9052551,5.6482398 C18.6915051,9.8169898 21.3915051,13.6832398 23.8590051,18.0594898 C17.6202551,19.6757398 10.5727551,20.6457398 4.0615051,20.6619898 C5.4340051,14.0019898 9.9077551,8.4719898 15.9052551,5.6482398 L15.9052551,5.6482398 L15.9052551,5.6482398 Z M41.5640051,11.4844898 C44.5465051,15.1332398 46.3427551,19.7869898 46.3777551,24.8582398 C41.4327551,23.8844898 36.5140051,23.6282398 31.5077551,24.1332398 C30.9440051,22.7294898 30.2627551,21.3969898 29.6090051,19.9582398 C33.9252551,18.2169898 38.5402551,15.2369898 41.5640051,11.4844898 L41.5640051,11.4844898 L41.5640051,11.4844898 Z M25.5952551,21.3669898 C26.1302551,22.5057398 26.7502551,23.7119898 27.3315051,24.9457398 C20.3690051,28.0157398 12.9640051,32.1182398 9.1190051,39.3107398 C5.7027551,35.5219898 3.6227551,30.5019898 3.6227551,24.9994898 C3.6227551,24.7907398 3.6265051,24.5819898 3.6327551,24.3744898 C11.0890051,24.3382398 18.4077551,23.4057398 25.5952551,21.3669898 L25.5952551,21.3669898 L25.5952551,21.3669898 Z M36.8915051,27.1957398 C39.9990051,27.1857398 43.2102551,27.6194898 46.1115051,28.3832398 C45.1627551,34.3532398 41.7402551,39.5019898 36.9277551,42.7419898 C35.7802551,37.5232398 34.6865051,32.5294898 32.7527551,27.4944898 C34.0865051,27.2957398 35.4790051,27.1994898 36.8915051,27.1957398 L36.8915051,27.1957398 L36.8915051,27.1957398 Z M28.7965051,28.4719898 C30.7677551,33.5619898 32.3140051,39.1994898 33.3515051,44.6857398 C30.7852551,45.7757398 27.9640051,46.3782398 25.0002551,46.3782398 C20.0565051,46.3782398 15.5040051,44.6982398 11.8827551,41.8794898 C15.7540051,35.5982398 21.7502551,30.8457398 28.7965051,28.4719898 L28.7965051,28.4719898 L28.7965051,28.4719898 Z" id="ball-lines" fill="#C32361"></path>
            </symbol>
            <symbol id="github-icon" viewBox="0 0 50 50" fill="#161614">
                <title>Github Icon</title>
                <path d="M0,25.633467 C0,36.9584555 7.1625894,46.5651047 17.0969029,49.954576 C18.3477086,50.1906116 18.8035237,49.3991056 18.8035237,48.719323 C18.8035237,48.1119247 18.7820375,46.4990147 18.7697597,44.3605321 C11.8158937,45.9089257 10.3486909,40.9238537 10.3486909,40.9238537 C9.21145523,37.9623936 7.57236256,37.1740347 7.57236256,37.1740347 C5.30249547,35.5847282 7.74425243,35.6161996 7.74425243,35.6161996 C10.2535376,35.7971603 11.5734062,38.2582249 11.5734062,38.2582249 C13.8033703,42.1748424 17.4253353,41.0434451 18.8495657,40.3872661 C19.0767059,38.7318697 19.7228276,37.6020459 20.4364775,36.9616026 C14.8853556,36.314865 9.04877375,34.1150132 9.04877375,24.2927848 C9.04877375,21.494976 10.0233279,19.2054306 11.6225176,17.4147071 C11.3646828,16.766396 10.5067682,14.1589893 11.8680745,10.6310438 C11.8680745,10.6310438 13.9660518,9.9418198 18.7421345,13.2589069 C20.73575,12.6892743 22.875165,12.4060315 25.0007674,12.3950166 C27.124835,12.4060315 29.2627152,12.6892743 31.2594002,13.2589069 C36.0324135,9.9418198 38.1273213,10.6310438 38.1273213,10.6310438 C39.4916971,14.1589893 38.6337825,16.766396 38.3774824,17.4147071 C39.9797416,19.2054306 40.9466221,21.494976 40.9466221,24.2927848 C40.9466221,34.1401903 35.1008318,36.3069972 29.5328279,36.9411462 C30.4291108,37.7326523 31.2287056,39.2967816 31.2287056,41.688609 C31.2287056,45.1142725 31.198011,47.8790363 31.198011,48.719323 C31.198011,49.4053999 31.6492219,50.2032002 32.9169097,49.9530025 C42.8435495,46.5556633 50,36.9553083 50,25.633467 C50,11.4760513 38.8056724,0 24.9976979,0 C11.1943276,0 0,11.4760513 0,25.633467 Z" id="octocat"></path>
            </symbol>
        </defs>
    </svg>
<? }


// Set the default layout to content only.
beans_add_filter( 'beans_default_layout', 'c' );


// Add the top ad section
add_action( 'beans_main_before_markup', 'tbr_top_ads' );

function tbr_top_ads() { ?>
  <div class="tm-top tm-media-block">
    <?php echo bsa_pro_ad_space('1'); ?>
  </div>
<? }


// Add the bottom ad section
add_action( 'beans_primary_menu_before_markup', 'tbr_mobile_menu_link' );
Esempio n. 4
0
 *
 * @return string The modified widget content.
 */
function beans_modify_widget_count($content)
{
    $count = beans_output('beans_widget_count', '$1');
    if (beans_get('dropdown', beans_get_widget('options')) == true) {
        $output = $count;
    } else {
        $output = beans_open_markup('beans_widget_count', 'span', 'class=tm-count');
        $output .= $count;
        $output .= beans_close_markup('beans_widget_count', 'span');
    }
    // Keep closing tag to avoid overwriting the inline JavaScript.
    return preg_replace('#>((\\s|&nbsp;)\\((.*)\\))#', '>' . $output, $content);
}
beans_add_filter('beans_widget_content_categories_output', 'beans_remove_widget_dropdown_label');
beans_add_filter('beans_widget_content_archives_output', 'beans_remove_widget_dropdown_label');
/**
 * Modify widget dropdown label.
 *
 * @since 1.0.0
 *
 * @param string $content The widget content.
 *
 * @return string The modified widget content.
 */
function beans_remove_widget_dropdown_label($content)
{
    return preg_replace('#<label([^>]*)class="screen-reader-text"(.*?)>(.*?)</label>#', '', $content);
}
Esempio n. 5
0
 /**
  * Initialize action.
  */
 public function init($action)
 {
     beans_add_filter($this->id . '_attributes', array($this, $action));
 }
Esempio n. 6
0
/**
 * Remove markup.
 *
 * This function will automatically remove the opening and the closing HTML tag. If the markup is self-closed,
 * the HTML tag will be removed accordingly.
 *
 * The "data-markup-id" is added as a HTML attribute if the development mode is enabled. This makes it very
 * easy to find the content ID when inspecting an element in a web browser.
 *
 * @since 1.0.0
 *
 * @param string $id             The markup ID.
 * @param bool   $remove_actions Optional. Whether elements attached to a markup should be removed or not. This must be used
 * with absolute caution.
 *
 * @return bool Will always return true.
 */
function beans_remove_markup($id, $remove_actions = false)
{
    if ($remove_actions) {
        return beans_add_filter($id . '_markup', null);
    }
    return beans_add_filter($id . '_markup', false);
}