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 workflow = wp.media({ | |
| title: 'Select the images', | |
| // use multiple: false to disable multiple selection | |
| multiple: 'add', | |
| button: { | |
| text: 'Add selected images' | |
| }, | |
| 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
| <?php | |
| __ | |
| _e | |
| _ex | |
| esc_attr__ | |
| esc_attr_e | |
| esc_attr_x | |
| esc_html__ | |
| esc_html_e | |
| esc_html_x |
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
| [^\w]_[_|e]\( |
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 | |
| /* | |
| Register Fonts | |
| */ | |
| function studio_fonts_url() { | |
| $font_url = ''; | |
| /* | |
| Translators: If there are characters in your language that are not supported | |
| by chosen font(s), translate this to 'off'. Do not translate into your own language. |
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
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
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 | |
| function wp_class_register_mb() { | |
| add_meta_box( | |
| 'wpclass-mb', // unique id | |
| esc_html__( 'WP Class Metabox', 'text-domain' ), // metabox title | |
| 'wp_class_mb_cb', // metabox callback | |
| array('post','page'), // screen name [string|array] | |
| 'side', // context | |
| 'high' // priority | |
| ); |
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
| // Code written by Me and | |
| // doc written by Zafree [http://github.com/zafree] vai :D | |
| // Get Siblings | |
| // It is a simple function to get all child from parent | |
| // Feel free to use it like a Pro |
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 | |
| /* | |
| Plugin Name: Rewrite Rule Tutorials | |
| */ | |
| add_action( 'init', 'pmg_rewrite_add_rewrites' ); | |
| function pmg_rewrite_add_rewrites() | |
| { | |
| add_rewrite_endpoint( 'json', EP_PERMALINK ); | |
| add_rewrite_rule( |
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
| <!-- START header.php --> | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <!-- Other head stuff lives here --> | |
| <?php wp_head(); ?> | |
| </head> | |
| <body> | |
| <?php | |
| if ( is_page_template( 'special-page-template-name.php' ) ) : |