View php-block-styles.php
This file contains 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 some default block editor styles for this block. | |
*/ | |
function hd_testimonials_register_testimonials_block_styles() { | |
// add the small image style. | |
register_block_style( | |
'core/heading', // name of your block | |
array( |
View deploy.yml
This file contains 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
# Kinsta Deployment through Github Actions for Bedrock/Sage. | |
# | |
# Placed at: .github/workflow/deploy.yml | |
# | |
# Process should be studied from code, but some quick brief: | |
# - runs composer / sage installation | |
# - moves correct `.env.*` file for multiple configs | |
# - uses rsync to sync files, uses /.rsyncignore file to exclude whatever should not be there | |
# - symlinks uploads folder and symlink release folder to kinsta public hostname | |
# - if you want to clear cache, please uncomment the last job |
View write-log.php
This file contains 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: TechiePress Write Error Log Function | |
*/ | |
if (!function_exists('write_log')) { | |
function write_log ( $log ) { | |
if ( true === WP_DEBUG ) { | |
if ( is_array( $log ) || is_object( $log ) ) { | |
error_log( print_r( $log, true ) ); |
View wp-admin-bar-tweaks.php
This file contains 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
Disable the WordPress Admin Bar for all Users and Visitors | |
Turn off the toolbar with one simple line. | |
view plain | |
/* | |
* Disable the WordPress Admin Bar for all Users and Visitors | |
*/ | |
remove_action( 'init', '_wp_admin_bar_init' ); | |
^ top | |
Enable the WordPress Admin Bar for admins only |
View Troubleshoot Post Meta Value
This file contains 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 | |
/** | |
* Show Post Meta in a metabox | |
*/ | |
add_action( 'add_meta_boxes', 'wpdocs_register_meta_boxes' ); | |
function wpdocs_register_meta_boxes() { | |
add_meta_box( | |
'meta-box-id', |
View CF7 Form Trap
This file contains 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: CF7 Form Trap | |
* Plugin URI: https://github.com/yttechiepress/cf7-trap-api | |
* Author: Techiepress | |
* Author URI: https://github.com/yttechiepress/cf7-trap-api | |
* Description: Get CF7 Data and send to API | |
* Version: 0.1.0 | |
* License: GPL2 | |
* License URL: http://www.gnu.org/licenses/gpl-2.0.txt |
View WordPress 5.7 Robots API
This file contains 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 meta for robots. | |
// remove_filter( 'wp_robots', 'wp_robots_max_image_preview_large' ); | |
// Replace the values in the meta robot tag. | |
add_filter( 'wp_robots', 'techiepress_wp_robots_max_image_preview_large' ); | |
// Remove the image preview and add follow to robots | |
function techiepress_wp_robots_max_image_preview_large( $robots ) { | |
$robots['max-image-preview'] = false; | |
$robots['follow'] = true; |
View example-wp-list-table.php
This file contains 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: Paulund WP List Table Example | |
* Description: An example of how to use the WP_List_Table class to display data in your WordPress Admin area | |
* Plugin URI: http://www.paulund.co.uk | |
* Author: Paul Underwood | |
* Author URI: http://www.paulund.co.uk | |
* Version: 1.0 | |
* License: GPL2 | |
*/ |
View Change-Kuwait-Currency-for-WooCommerce.php
This file contains 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: Change Kuwaiti Currency in WooCommerce | |
* Plugin URI: https://github.com/yttechiepress/kuwaiti-currency | |
* Author: TechiePress | |
* Author URI: https://github.com/yttechiepress/kuwaiti-currency | |
* Description: Change Currencies in WooCommerce | |
* Version: 0.1.0 | |
* License: GPL2 | |
* License URL: http://www.gnu.org/licenses/gpl-2.0.txt |
NewerOlder