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 | |
| // ALWAYS run dry run first | |
| $scan_results = clean_orphaned_acf_meta( true ); | |
| // Review results | |
| error_log( 'Found ' . $scan_results['count'] . ' orphaned entries' ); | |
| // Only proceed after manual review | |
| if ( $scan_results['count'] > 0 && $scan_results['count'] < 1000 ) { | |
| // Reasonable number, safe to clean |
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 | |
| define('DEV_MODE', true); | |
| add_action('wp_enqueue_scripts', function() { | |
| if (DEV_MODE) { | |
| wp_register_script('unique_name', get_template_directory_uri() . 'assets/js/init.js', array('jquery'), '1.0', true); | |
| wp_register_style('unique_name', get_template_directory_uri() . 'assets/css/uuid.css', array(), '1.0', 'all'); | |
| } else { | |
| wp_register_script('unique_name', get_template_directory_uri() . 'build/js/uuid.min.js', array('jquery'), '1.0', true); |
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 | |
| exec('php ../js/run.php > js/uuid.min.js'); | |
| exec('sass ../scss/uuid.scss css/uuid.min.css --style compressed'); |
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 | |
| ob_start(); | |
| include 'utils.mjs'; | |
| include 'module1.mjs'; | |
| include 'module2.mjs'; | |
| include 'module3.mjs'; | |
| $data = ob_get_clean(); |
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
| var UUID = UUID || {}; | |
| var $ = jQuery || {}; | |
| UUID.pluginURL = 'https://example.com/wp-content/themes/uuid/'; | |
| UUID.loadModules = function () | |
| { | |
| if (this.pluginURL) { | |
| var jsURL = this.pluginURL + 'assets/js/'; | |
| this.require(jsURL + 'utils.mjs'); |
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 | |
| if (!class_exists('Admin_User_Caps')) { | |
| class Admin_User_Caps | |
| { | |
| function __construct() | |
| { | |
| add_action('admin_init', array($this, 'extend_user_profile')); | |
| } |
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
| (function($) { | |
| $(document).on('change', '.acf-postbox [id^="acf-field"]', function(e) { | |
| e.preventDefault(); | |
| var permalink = $('#sample-permalink a').attr('href'); | |
| if (!sessionStorage.getItem(permalink)) { | |
| sessionStorage.setItem('permalink', permalink); | |
| } | |
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 | |
| $class_name = 'demo'; | |
| if (!empty($block['className'])) { | |
| $class_name .= ' ' . $block['className']; | |
| } | |
| if (!empty($block['align'])) { | |
| $class_name .= ' align' . $block['align']; |
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 | |
| // Single page to display each restaurant. | |
| get_header(); | |
| ?> | |
| <main id="site-content" role="main"> | |
| <div class="page type-page status-publish hentry"> | |
| <div class="post-inner thin"> | |
| <div class="entry-content"> | |
| <?php |
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 | |
| /** | |
| * Template Name: Add Restaurant | |
| * Template Post Type: page | |
| * | |
| * @package WordPress | |
| * @subpackage Twenty_Twenty | |
| * @since Twenty Twenty 1.0 | |
| */ |
NewerOlder