run
$ composer update
$ composer phpcs-configset
$ composer run-phpcs:theme (for themes) or run-phpcs:plugin (for plugins)
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(class_exists('MeprUtils')) { | |
| $user = MeprUtils::get_currentuserinfo(); | |
| if($user !== false && isset($user->ID)) { | |
| //Returns an array of Membership ID's that the current user is active on | |
| //Can also use 'products' or 'transactions' as the argument type | |
| $active_prodcuts = $user->active_product_subscriptions('ids'); | |
| if(!empty($active_prodcuts)) { |
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 | |
| global $wpdb; | |
| $result = $wpdb->get_results("SELECT * FROM `$table` WHERE `user_id` = $user_id $extend AND MONTH(created) = MONTH(CURRENT_DATE()) | |
| AND YEAR(created) = YEAR(CURRENT_DATE()) order by id DESC" ); | |
| //created being a nave of a date column 2019-04-10 19:03:43 |
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
| Steps for exporting images: | |
| 1. Click V first and then click the Image u want to export | |
| 2. you will see the layer and just beside that layer u will see eye.... now gently Click Alt + that eye... this will make everything dissappear except that particular layer.... | |
| 3. Click Ctrl + A (this will select all the layer) | |
| 4. Click Ctrl + Shift + C (This will copy) | |
| 5. Click Ctrl + N (this will open a new canvas of the particular image size) | |
| 6. Click Ctrl + V = Boom the image only | |
| 7. Click Ctrl + Shift + Alt + S (this will save it in Jpg or Png) | |
| 8. Go back to the main Psd ... again click Alt + eye on the same layer and it will reappear everything | |
| 9. Click Ctrl + D (tp deselect) |
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
| var data = { | |
| 'action': 'update_resume_viewed', | |
| 'post_id': post_id, | |
| 'user_id': user_id, | |
| dataType : 'json', | |
| } | |
| jQuery.post(jobifySettings.ajaxurl, data, function(response) { | |
| console.log(response.success); | |
| console.log(response['success']); | |
| console.log(response); |
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( 'save_post', 'cpm_resume_manager_save_resume', 10, 2 ); | |
| function cpm_resume_manager_save_resume($post_id, $post) { | |
| if ( empty( $post_id ) || empty( $post ) || empty( $_POST ) ) return; | |
| if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return; | |
| if ( is_int( wp_is_post_revision( $post ) ) ) return; | |
| if ( is_int( wp_is_post_autosave( $post ) ) ) return; | |
| if ( $post->post_type != 'resume' ) return; | |
| } |
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
| <VirtualHost *:80> | |
| DocumentRoot "/var/www/html/first-wordpress/sub-domani" | |
| ServerName local.wordpress.com.au | |
| ErrorLog "/private/var/log/apache2/wordpress-error_log" | |
| CustomLog "/private/var/log/apache2/wordpress-access_log" common | |
| <Directory /var/www/html/first-wordpress/sub-domani> | |
| Require all granted | |
| Options Includes FollowSymLinks Indexes |
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
| xhost +local: |
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 | |
| //triggers before checkout form is submited but order will be created. | |
| add_action( 'woocommerce_checkout_update_order_meta', 'cpm_woocommerce_checkout_update', 10, 2 ); | |
| function cpm_woocommerce_checkout_update($order_id, $data) { | |
| /*write ur code*/ | |
| } |
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 | |
| $items_per_page = 2; | |
| $page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1; | |
| $offset = ( $page * $items_per_page ) - $items_per_page; | |
| $query = 'SELECT * FROM '.$table_name; | |
| $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; | |
| $total = $wpdb->get_var( $total_query ); |