This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( | |
'blocksy:pro:post-types-extra:custom:collect-fields', | |
function ($fields, $post_type) { | |
if ($post_type !== 'post') { | |
return $fields; | |
} | |
$fields['test'] = __('Test Label', 'blocksy'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( | |
'blocksy:header:logo:image-id', | |
function ($image_id) { | |
// Other attachment ID | |
return 45; | |
} | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Blocksy\DbVersioning; | |
class V200 { | |
public function migrate() { | |
$this->migrate_color_palette(); | |
$this->migrate_sale_badge(); | |
$this->migrate_woocommerce_extra_features(); | |
$this->migrate_single_product(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Blocksy; | |
/** | |
* Theme Update | |
* | |
* @copyright 2019-present Creative Themes | |
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License | |
* @package Blocksy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener('DOMContentLoaded', () => { | |
ctEvents.on('blocksy:frontend:init', () => { | |
if (document.querySelector('.quick-view-modal')) { | |
elementorFrontend.init() | |
} | |
}) | |
}) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('template_redirect', function () { | |
if (is_search() && isset($_GET['s'])) { | |
$current_url = wp_parse_str(wp_parse_url(blocksy_current_url())['query'], $query_args); | |
unset($query_args['s']); | |
wp_redirect(add_query_arg( | |
$query_args, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( | |
'blocksy:archive:render-card-layers', | |
function ($layers, $prefix, $featured_image_args) { | |
$post_id = get_the_ID(); | |
if ( | |
get_post_type($post_id) !== 'blogger-template' | |
|| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( | |
'blocksy:post-meta:author:author-avatar-url', | |
function ($url) { | |
$user_id = get_the_author_meta('ID'); | |
$custom_profile_image = get_user_meta($user_id, 'custom_profile_image', true); | |
if (! $custom_profile_image) { | |
return $url; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ctEvents.on('blocksy:micro-popups:open', (popupId, popup) => { | |
console.log('here open popup', popupId, popup) | |
}) | |
ctEvents.on('blocksy:micro-popups:close', (popupId, popup) => { | |
console.log('here close popup', popupId, popup) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Change Theme by IP Address | |
Description: Changes the WordPress theme depending on the visitor's IP address | |
*/ | |
add_filter('template', 'ct_change_theme'); | |
add_filter('option_template', 'ct_change_theme'); | |
add_filter('option_stylesheet', 'ct_change_theme'); |