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 | |
| // Identify directories | |
| $source = __DIR__ . "/wordpress"; | |
| $destination = __DIR__; | |
| // Cycle through all source files | |
| function move_all($source, $destination) { | |
| if (is_dir($source)) { | |
| // Make the destination directory if not exist | |
| @mkdir($destination); |
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 myTest() { | |
| // Save default function | |
| var defaultSend = wp.media.editor.send.attachment; | |
| // new send function | |
| wp.media.editor.send.attachment = function( props, attachment) { | |
| // If not image, return default function | |
| if ( 'image' !== attachment.type ) | |
| return defaultSend( props, attachment) |
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
| jQuery(function($) { | |
| $(document).ready(function(){ | |
| $('#insert-my-media').click(open_media_window); | |
| }); | |
| function open_media_window() { | |
| if (this.window === undefined) { | |
| this.window = wp.media({ | |
| title: 'Insert a media', | |
| library: {type: 'image'}, |
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
| export const countries = [ | |
| { | |
| "name": "Afghanistan", | |
| "code": "AF" | |
| }, | |
| { | |
| "name": "Åland Islands", | |
| "code": "AX" | |
| }, | |
| { |