This file contains 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 | |
/* | |
* ----------------------------------------------------------------------------- | |
* Advanced Custom Fields Modifications | |
* ----------------------------------------------------------------------------- | |
*/ | |
// Only the style is working, the script is not, it might introduce bugs, but it less likely as the scroll is always active in the textarea. | |
function PREFIX_apply_acf_modifications() { | |
?> |
This file contains 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
// Helpers - TO DELETE IN PROD -- Tudor | |
body.single-post::before { | |
position: fixed; | |
right: 0; | |
bottom: 0; | |
padding: 5px 10px; | |
background-color: rgba(0, 0, 0, 0.7); | |
color: #fff; | |
font-size: 12px; | |
z-index: 9999; |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Background Image Example</title> | |
<style> | |
.image-container { | |
background-image: url(triangle.png), linear-gradient(to bottom, #422039b8, #422039b8), url(bg.jpg); | |
background-blend-mode: soft-light, multiply, normal; | |
background-size: contain, auto, cover; | |
background-repeat: no-repeat, no-repeat, no-repeat; |
This file contains 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 | |
// @snippet Duplicate posts and pages without plugins | |
// @author Misha Rudrastyh | |
// @url https://rudrastyh.com/wordpress/duplicate-post.html | |
// Add the duplicate link to action list for post_row_actions | |
// for "post" and custom post types | |
add_filter( 'post_row_actions', 'rd_duplicate_post_link', 10, 2 ); | |
// for "page" post type |
This file contains 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 | |
// Disabling the editing of an ACF field | |
add_filter('acf/load_field', 'my_acf_load_field'); | |
function my_acf_load_field($field) { | |
// Check if the field is named "event_id" | |
if ($field['name'] == 'event_id') { | |
// Set the "readonly" attribute to true | |
$field['readonly'] = true; | |
} |
This file contains 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: Advanced Custom Fields: Gutenberg Blocks | |
* Plugin URI: https://www.n7studios.co.uk | |
* Version: 1.0.0 | |
* Author: n7 Studios | |
* Author URI: https://www.n7studios.co.uk | |
* Description: Example code to register Advanced Custom Field Groups as Blocks. Requires ACF 5.8+ | |
*/ |