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( 'hide_empty=0' ); | |
| $terms = get_terms( 'my-taxonomy', $args ); | |
| if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) { | |
| $count = count( $terms ); | |
| $i = 0; | |
| $term_list = '<p class="term-list">Tags: '; | |
| foreach ( $terms as $term ) { | |
| $i++; | |
| $term_list .= '<a href="' . esc_url( get_term_link( $term ) ) . '" alt="' . esc_attr( sprintf( __( 'View all post filed under - %s -', 'my_localization_domain' ), $term->name ) ) . '">' . $term->name . '</a>'; |
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 | |
| add_action( 'genesis_before_sidebar_widget_area', 'qr_remove_default_sidebar' ); | |
| function qr_remove_default_sidebar() { | |
| if ( get_post_type() == 'my-cpt' ) { // set CPT here | |
| remove_action( 'genesis_sidebar', 'ss_do_sidebar' ); | |
| remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); | |
| add_action( 'genesis_sidebar', 'qr_add_cpt_sidebar' ); | |
| } | |
| } | |
| function qr_add_cpt_sidebar() { |
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 | |
| $img_url = 'http://someurl.com/image.jpg'; | |
| if ( !empty( $img_url ) ) { | |
| $tmp_file = download_url( $img_url, 10 ); | |
| if ( !is_wp_error( $tmp_file ) ) { | |
| $size = getimagesize( $tmp_file ); | |
| $img_width = $size[0]; | |
| $img_height = $size[1]; |
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 | |
| // Embed gist without JavaScript in WordPress | |
| wp_embed_register_handler( 'gist', '/https?:\/\/gist\.github\.com\/([a-z0-9\/]+)([\?\#]file[=-].*)?/i', 'qr_embed_gist' ); | |
| function qr_embed_gist( $matches, $attr, $url, $rawattr ) { | |
| if(empty($matches[1])){$matches[1]=null;} | |
| if(empty($matches[2])){$matches[2]=null;} // Query single file | |
| $file = wp_remote_get( esc_url_raw( 'https://gist.github.com/' . esc_attr($matches[1]) . '.json' ) ); | |
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 | |
| /* Based on: https://wordpress.org/plugins/comment-reply-email-notification/ */ | |
| add_action('wp_insert_comment', 'qr_comment_notification', 99, 2); | |
| add_action('wp_set_comment_status','qr_comment_status_update', 99, 2); | |
| add_filter('wp_mail_content_type', function($contentType) { return 'text/html'; }); | |
| /** | |
| * Sends an email notification when a comment receives a reply | |
| * @param int $commentId The comment ID |
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
| <?xml version='1.0' encoding='UTF-8'?> | |
| <!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'> | |
| <properties> | |
| <entry key="config.default">./conf/default.xml</entry> | |
| <!-- DataBase MariaDB --> | |
| <entry key='database.driver'>com.mysql.jdbc.Driver</entry> | |
| <entry key='database.url'>jdbc:mysql://[HOST]:3306/[DATABASE]?useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry> | |
| <entry key='database.user'>[USER]</entry> |
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
| server { | |
| listen 80; | |
| listen [::]:80; | |
| server_name domain.com; | |
| location / { | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Forwarded-Host $host; | |
| proxy_set_header X-Forwarded-Server $host; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
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
| // Amazon SES (AWS) instead php mail. | |
| add_action( 'phpmailer_init', 'qr_aws_ses_smtp' ); | |
| function qr_aws_ses_smtp( $phpmailer ) { | |
| $phpmailer->isSMTP(); | |
| $phpmailer->Host = 'email-smtp.us-east-1.amazonaws.com'; | |
| $phpmailer->SMTPAuth = true; | |
| $phpmailer->Port = 25; | |
| $phpmailer->Username = 'AWS SES Credentials - username'; | |
| $phpmailer->Password = 'AWS SES Credentials - password'; | |
| $phpmailer->SMTPSecure = 'tls'; |
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: SEO Custom Meta-Robots | |
| Plugin URI: https://qrokes.com/ | |
| Plugin Description: SEO Custom Meta Robots | |
| Plugin Version: 1.0 | |
| Plugin Date: | |
| Plugin Author: QROkes | |
| Plugin Author URI: https://qrokes.com/ | |
| Plugin License: GPLv3 |
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 | |
| /* | |
| File: qa-plugin/webinoly-custom/qa-plugin.php | |
| Description: Anti SPAM Registration Plugin for Question2Answer | |
| This program is free software; you can redistribute it and/or | |
| modify it under the terms of the GNU General Public License | |
| as published by the Free Software Foundation; either version 2 | |
| of the License, or (at your option) any later version. |