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
| .in-sub-panel #customize-theme-controls .customize-pane-child.current-panel-parent, | |
| #customize-theme-controls .customize-pane-child.current-section-parent { | |
| -webkit-transform: translateX(-100%); | |
| -ms-transform: translateX(-100%); | |
| transform: translateX(-100%); | |
| } |
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 | |
| /** | |
| * The header for our theme | |
| * | |
| * This is the template that displays all of the <head> section and everything up until <div id="content"> | |
| * | |
| * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials | |
| * | |
| * @package WordPress | |
| * @subpackage Twenty_Seventeen |
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
| add_action('pre_user_query','yoursite_pre_user_query'); | |
| function yoursite_pre_user_query($user_search) { | |
| $roles = wp_get_current_user(); | |
| if ( in_array( 'shop_manager', (array) $roles->roles ) ) { | |
| global $wpdb; | |
| $user_search->query_where = | |
| str_replace('WHERE 1=1', | |
| "WHERE 1=1 AND {$wpdb->users}.ID IN ( | |
| SELECT {$wpdb->usermeta}.user_id FROM $wpdb->usermeta | |
| WHERE {$wpdb->usermeta}.meta_key = '{$wpdb->prefix}capabilities' |
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 my_blog_number_title($titletag) { | |
| if( is_paged() ) { | |
| global $wp_query; | |
| $pagenum = $wp_query->query_vars['paged']; | |
| $new_title = $titletag.' Page '.$pagenum; | |
| $titletag = str_replace($titletag, $new_title ,$titletag); | |
| return $titletag; | |
| } | |
| } | |
| add_filter('wp_render_title_tag_filter','custom_wp_render_title_tag'); |
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 WP_Widget_NANE_Recent_Posts extends WP_Widget { | |
| public function __construct() { | |
| $widget_ops = array('classname' => 'widget_recent_entries', 'description' => __( "Your site’s most recent Posts.", "textdomain") ); | |
| parent::__construct('recent-posts', __('Recent Posts', 'textdomain'), $widget_ops, 'textdomain'); | |
| $this->alt_option_name = 'widget_recent_entries'; | |
| add_action( 'save_post', array($this, 'flush_widget_cache') ); | |
| add_action( 'deleted_post', array($this, 'flush_widget_cache') ); |
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
| <ul> | |
| <?php | |
| $query_args = new WP_Query( | |
| array( | |
| 'post_type' => 'attachment', | |
| 'posts_per_page' => -1, | |
| ) | |
| ); | |
| if ( $query_args->have_posts() ) { | |
| while ( $query_args->have_posts() ) : $query_args->the_post(); |
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
| $(document).ready(function(){ | |
| $('a').each(function() { | |
| if( | |
| $(this).attr('target') == '_blank' || | |
| $(this).attr('rel') == 'noopener' || | |
| $(this).attr('rel') == 'noreferrer' ) { | |
| $(this).attr('rel', 'noopener noreferrer'); | |
| } | |
| }); | |
| }); |
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
| add_filter('template_include', 'my_function_name', PHP_INT_MAX, 2 ); | |
| function my_function_name( $template ) { | |
| if(is_page('about')){ | |
| $template = dirname( __FILE__ ) . '/templates/about.php'; | |
| } | |
| return $template; | |
| } |
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 se_comment_moderation_recipients( $emails, $comment_id ) { | |
| $emails = array( '[email protected]' ); | |
| return $emails; | |
| } | |
| add_filter( 'comment_moderation_recipients', 'se_comment_moderation_recipients', 11, 2 ); | |
| add_filter( 'comment_notification_recipients', 'se_comment_moderation_recipients', 11, 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
| function admin_css() { | |
| echo '<style> | |
| .focus-on #wpcontent { | |
| margin-left:0; | |
| width:100%; | |
| } | |
| . .focus-on ##wpbody-content .metabox-holder{ | |
| width:100%; | |
| } | |
| .focus-on #poststuff #post-body.columns-2 { |