AutoMySQLBackup with a basic configuration will create Daily, Weekly and Monthly backups of one or more of your MySQL databases from one or more of your MySQL servers.
- Ubuntu server
- MySQL
| <?php | |
| /** | |
| * Get other templates (e.g. product attributes) passing attributes and including the file. | |
| * | |
| * @access public | |
| * @param mixed $template_name | |
| * @param array $args (default: array()) | |
| * @param string $template_path (default: '') | |
| * @param string $default_path (default: '') | |
| * @return void */ |
| /** | |
| * returns taxonomy lists that have children with checkboxes | |
| * | |
| */ | |
| function get_subject_list($taxonomy){ | |
| // Sets the taxonomy to pull a list of terms from. | |
| // Throws them into a nifty object for referencing and counting | |
| $terms = get_terms($taxonomy,array('parent' => 0)); | |
| if ($terms) { |
| .my-fa-facebook:before { | |
| content: "\f09a"; | |
| } | |
| .my-fa-facebook-square:before { | |
| content: "\f082"; | |
| } | |
| .my-fa-flickr:before { | |
| content: "\f16e"; | |
| } | |
| .my-fa-google-plus-square:before { |
| <?php | |
| /** | |
| * This changes logging to only log fatal errors. This file should go in your mu-plugins directory. | |
| */ | |
| // Set the error logging to only log fatal errors | |
| error_reporting( E_ERROR ); | |
| // Optional: change the location of your error log, it might be wise to put it outside your WP content dir. | |
| // If you don't change it, the default place for this log is debug.log in your WP_CONTENT_DIR. |
| class WP_Query_Geo extends WP_Query { | |
| private $lat = NULL; | |
| private $lng = NULL; | |
| private $distance = NULL; | |
| /** | |
| * Constructor - adds necessary filters to extend Query hooks | |
| */ | |
| public function __construct( $args = array() ) { | |
| // Extract Latitude |
| <?php | |
| /** | |
| * Recursively get taxonomy and its children | |
| * | |
| * @param string $taxonomy | |
| * @param int $parent - parent term id | |
| * @return array | |
| */ | |
| function get_taxonomy_hierarchy( $taxonomy, $parent = 0 ) { |
This is a basic custom Gutenberg block. Files explained below.
block.js — We register Custom Gutenberg block here.editor.css _ Block CSS for the editor.style.css — Block CSS for the front end.index.php — Enqueue block's assets for editor and the front end.| <?php | |
| function bit_crp_add_fields( $fields, $post_id ) { | |
| global $wpdb; | |
| $match_title = strip_tags( get_the_title( $post_id ) ); | |
| $match_content = bit_get_the_matcher($post_id); | |
| $field_score = ", ( ( MATCH($wpdb->posts.post_title) AGAINST ('%s') *5 ) + ( MATCH($wpdb->postmeta.meta_value) AGAINST ('%s') *10 ) ) as score "; | |
| $field_score = $wpdb->prepare( $field_score, $match_title, $match_content ) ; |