Inject the following script to your PHP file
function my_enqueue_scripts() {
wp_enqueue_script( 'phq', '/your/path/to/script.js', [ 'jquery', 'underscore', 'wp-util' ], '1.0', true );
}| <?php | |
| namespace ShyimCron; | |
| use Shopware\Components\Plugin; | |
| use Shopware\Components\Plugin\Context\InstallContext; | |
| use Shopware\Components\Plugin\Context\UninstallContext; | |
| class ShyimCron extends Plugin { | |
| public static function getSubscribedEvents() |
| <?php | |
| # RegEx For Eval Removal: \s+(eval\(base64.*?\))\); | |
| exit; | |
| function back_to_for_slash($str) { | |
| return str_replace('\\', '/', $str); | |
| } | |
| $current_dir = back_to_for_slash(dirname(__FILE__) . '/public_html'); | |
| $directory = $current_dir; |
| <?php | |
| /** | |
| * Access parent class private member from child class | |
| * @param $class $this|object | |
| * @param $property string | |
| * @param $cache bool | |
| * @return mixed | |
| */ | |
| $cacheStorage = []; |
| <?php | |
| /* | |
| * Dependent Plugin Activation/Deactivation | |
| * | |
| * Sources: | |
| * 1. https://pippinsplugins.com/checking-dependent-plugin-active/ | |
| * 2. http://10up.com/blog/2012/wordpress-plug-in-self-deactivation/ | |
| * | |
| */ |
| <?php | |
| /* | |
| * Set the following constants in wp-config.php. | |
| * These should be added somewhere BEFORE the constant ABSPATH is defined. | |
| * | |
| * Author: Chad Butler | |
| * Author URI: https://butlerblog.com | |
| * | |
| * For more information and instructions, see: https://b.utler.co/Y3 |
| /** | |
| * Register Custom myCRED Hook | |
| * @since 1.0 | |
| * @version 1.0 | |
| */ | |
| add_filter( 'mycred_setup_hooks', 'Learndash_myCRED_Hook' ); | |
| function Learndash_myCRED_Hook( $installed ) { | |
| $installed['hook_learndash'] = array( | |
| 'title' => __( 'LearnDash', 'mycred' ), |
| <?php | |
| /** | |
| * Plugin Name: Retroactive License Emails for EDD Software Licensing | |
| * Plugin URI: http://themeofthecrop.com | |
| * Description: Send an email with the license key to customers when retroactively generating licenses with Easy Digital Download's Software Licensing. | |
| * Version: 0.0.1 | |
| * Author: Theme of the Crop | |
| * Author URI: http://themeofthecrop.com | |
| * License: GNU General Public License v2.0 or later | |
| * License URI: http://www.gnu.org/licenses/gpl-2.0.html |
| <?php | |
| //Call this with the shown parameters (make sure $time and $end are integers and in Unix timestamp format!) | |
| //Get a link that will open a new event in Google Calendar with those details pre-filled | |
| function make_google_calendar_link($name, $begin, $end, $location, $details) { | |
| $params = array('&dates=', '/', '&details=', '&location=', '&sf=true&output=xml'); | |
| $url = 'https://www.google.com/calendar/render?action=TEMPLATE&text='; | |
| $arg_list = func_get_args(); | |
| for ($i = 0; $i < count($arg_list); $i++) { | |
| $current = $arg_list[$i]; |