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 | |
| $args = array( | |
| 'label' => '', // Text in Label | |
| 'class' => '', | |
| 'style' => '', | |
| 'wrapper_class' => '', | |
| 'value' => '', // if empty, retrieved from post meta where id is the meta_key | |
| 'id' => '', // required | |
| 'name' => '', //name will set from id if empty |
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: ACF Before Title | |
| Description: Adds a choice "High (before title) to ACF field groups position drop-down" | |
| Author: Pierre Dargham | |
| Author URI: https://github.com/pierre-dargham/ | |
| Version: 1.0 | |
| */ |
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
| //Just a random file for loading your posts to see that the infinite scroll works. | |
| <?php get_header(); ?> | |
| <div class="col-md-6 col-md-offset-3"> | |
| <div class="post-container"> | |
| <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> | |
| <div class="page-header post"> | |
| <h1><?php the_title(); ?></h1> | |
| <p><?php the_excerpt(); ?></p> | |
| </div> |
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 | |
| /** | |
| * Allow custom actions in our AMP template. | |
| */ | |
| function jr3_amp_add_custom_actions() { | |
| add_filter( 'the_content', 'jr3_amp_add_featured_image' ); | |
| } | |
| add_action( 'pre_amp_render_post', 'jr3_amp_add_custom_actions' ); | |
| /** |
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 (isset($_POST['button'])) | |
| { | |
| $code = $_POST['code']; | |
| # Creating the array | |
| $data = array( | |
| 'description' => 'description for your gist', | |
| 'public' => 1, | |
| 'files' => array( |
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 custom_modify_get_avatar($args, $id_or_email) { | |
| $avatar_att_id = get_user_meta( get_current_user_id(), '_avatar_att_id', true ); | |
| if($avatar_att_id) { | |
| $avatar_att_url = wp_get_attachment_image_src($avatar_att_id, array($args['width'], $args['height'])); | |
| if ( !empty($avatar_att_url) ) { | |
| $args['url'] = $avatar_att_url[0]; | |
| } | |
| } | |
| return $args; |
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 remove_cssjs_ver( $src ) { | |
| if( strpos( $src, '?ver=' ) ) | |
| $src = remove_query_arg( 'ver', $src ); | |
| return $src; | |
| } | |
| add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 ); | |
| add_filter( 'script_loader_src', 'remove_cssjs_ver', 10, 2 ); |
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: Old Plugin main file | |
| Description: Rename Old plugin main file (i.e. index.php) to `plugin-slug.php` | |
| Version: 0.1.0 | |
| Author: Arūnas Liuiza | |
| Author URI: http://arunas.co | |
| License: GPL2 | |
| */ |
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: Where am I? | |
| * Description: Adds the current server name and WordPress path to the admin footer. | |
| * Version: 2015.07.04 | |
| * Author: toscho | |
| * Author URI: http://wpkrauts.com/ | |
| * License: MIT | |
| * License URI: http://opensource.org/licenses/MIT | |
| */ | |
| add_filter( 'admin_footer_text', function( $text ) { |
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
| remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
| remove_action( 'wp_print_styles', 'print_emoji_styles' ); |
NewerOlder