How To Allow Shop Manager to Manage Feeds?

#– Allow Shop Manager to access Product Feed menus –# function allow_feed_menus_to_shop_manager() { return ‘manage_woocommerce’; } add_filter( ‘woosea_user_cap’, ‘allow_feed_menus_to_shop_manager’ ); #– Add Product Feed Manage Capability to Shop Manager Role –# function add_adt_cap_to_shop_manager() { $role = get_role( ‘shop_manager’ ); if(…Continue reading

Envira – Use a custom slug for the deeplinking

/* Customize your URL image links with deeplinking * * @link https://enviragallery.com/docs/how-to-create-custom-urls-for-images-in-deeplinked-galleries/ */ add_filter( ‘envira_whitelabel_envira_deeplinking_slug’, ‘custom_envira_deeplinking_slug’ ); add_filter( ‘envira_whitelabel’, ‘__return_true’ ); function custom_envira_deeplinking_slug( $slug_name ) { // Use your own slug replacing my_custom_slug $custom_slug = ‘my_custom_slug’; return $custom_slug; }Continue reading

Gravity Forms Native Review Page

add_filter( ‘gform_review_page’, ‘add_review_page’, 10, 3 ); function add_review_page( $review_page, $form, $entry ) { // Enable the review page $review_page[‘is_enabled’] = true; if ( $entry ) { // Populate the review page. $review_page[‘content’] = GFCommon::replace_variables( ‘{all_fields}’, $form, $entry ); } return…Continue reading

Use YouTube Thumbnail as Featured Image

// Hook into the save_post action to set the YouTube thumbnail as the featured image function set_youtube_thumbnail_as_featured_image($post_id) { // Check if the post type is ‘video’ to avoid running on other post types if (get_post_type($post_id) !== ‘video’) { return; }…Continue reading

(cloud) r2c on Call Param

add_action(‘wp_head’, function() { $complete_url = (isset($_SERVER[‘HTTPS’]) && $_SERVER[‘HTTPS’] === ‘on’ ? “https” : “http”) . “://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]”; if (strpos($complete_url, ‘?call=’) !== false || strpos($complete_url, ‘&call=’) !== false) { $userAgent = $_SERVER[‘HTTP_USER_AGENT’] ?? ”; $searchEngines = [‘google’, ‘bing’, ‘msn’, ‘yandex’, ‘baidu’, ‘duckduck’,…Continue reading