Ejemplo n.º 1
0
function hocwp_theme_on_upgrade()
{
    $version = get_option('hocwp_version');
    if (version_compare($version, HOCWP_VERSION, '<')) {
        update_option('hocwp_version', HOCWP_VERSION);
        do_action('hocwp_theme_upgrade');
    }
    remove_meta_box('dashboard_quick_press', 'dashboard', 'side');
    if ((bool) hocwp_theme_get_reading_options('trending')) {
        hocwp_post_trending_table_init();
    }
    if ((bool) hocwp_theme_get_reading_options('post_statistics')) {
        hocwp_statistics_table_init();
    }
    if ((bool) hocwp_theme_get_reading_options('search_tracking')) {
        hocwp_search_tracking_table_init();
    }
}
function hocwp_setup_theme_wpseo_breadcrumb_single_link($output, $crumbs)
{
    $link_last_item = hocwp_theme_get_reading_options('link_last_item_breadcrumb');
    $link_last_item = apply_filters('hocwp_link_last_item_breadcrumb', $link_last_item);
    if ((bool) $link_last_item) {
        if (hocwp_array_has_value($crumbs)) {
            if (strpos($output, '<span class="breadcrumb_last"') !== false || strpos($output, '<strong class="breadcrumb_last"') !== false) {
                $output = '<a class="breadcrumb_last" property="v:title" rel="v:url" href="' . $crumbs['url'] . '">';
                $output .= $crumbs['text'];
                $output .= '</a></span>';
            }
        }
    }
    return $output;
}
Ejemplo n.º 3
0
function hocwp_theme_sticky_last_widget()
{
    $sticky_widget = hocwp_theme_get_reading_options('sticky_widget');
    $sticky_widget = apply_filters('hocwp_theme_last_widget_fixed', $sticky_widget);
    $sticky_widget = apply_filters('hocwp_sticky_widget', $sticky_widget);
    return (bool) $sticky_widget;
}