Step 1: Visit Dashboard > Choose Server > Security
Add New Rule
Globally Open Port, port 2040 (or your port)
Protocal: TCP
| <?php | |
| /** | |
| * Rewrites Class | |
| * | |
| * @package CodetotTheme | |
| * @author codetot | |
| * @since 0.0.1 | |
| */ | |
| namespace CODETOT\Theme; |
| [06-Jan-2024 16:29:06 UTC] INFO: Delete product 188: delete gallery attachment id 189 | |
| [06-Jan-2024 16:29:06 UTC] INFO: Delete product 188: delete gallery attachment id 190 | |
| [06-Jan-2024 16:29:06 UTC] INFO: Delete product 188: delete gallery attachment id 191 | |
| [06-Jan-2024 16:29:06 UTC] INFO: Delete product 188: delete gallery attachment id 192 | |
| [06-Jan-2024 16:29:06 UTC] INFO: Delete product 188: delete gallery attachment id 193 | |
| [06-Jan-2024 16:29:06 UTC] INFO: Delete product 188: delete gallery attachment id 194 | |
| [06-Jan-2024 16:29:06 UTC] INFO: Delete product 188: delete gallery attachment id 195 | |
| [06-Jan-2024 16:29:06 UTC] INFO: Delete product 188: delete gallery attachment id 196 | |
| [06-Jan-2024 16:29:06 UTC] INFO: Delete product 188: delete gallery attachment id 197 | |
| [06-Jan-2024 16:29:06 UTC] INFO: Delete product 188: delete video attachment id 235 |
| <?php | |
| // Step 1: Copy all Google Sheets' row and process to only number with commas | |
| // It looks like | |
| // 197 | |
| // 112 | |
| // 256 | |
| // https://www.browserling.com/tools/text-rows-to-columns | |
| // Step 2: Open with any IDE such like Visual Studio Code to remove all whitespace, eg: "192 ,91" => "192,91" | |
| // Step 3: Place a term ids list replace $$raw_term_ids to remove it. |
| <?php | |
| /** Drafting **/ | |
| add_filter('the_content', 'codetot_lazyload_home_sections', 1000); | |
| function codetot_lazyload_home_sections( $content ) { | |
| $front_page_id = get_option('page_on_front'); | |
| if ( ! is_page( $front_page_id ) ) { | |
| return $content; | |
| } | |
| <?php | |
| function get_yoast_seo_category_meta_title( $object_id) { | |
| global $wpdb; | |
| $table_name = $wpdb->prefix . 'yoast_indexable'; | |
| $result = $wpdb->get_row( $wpdb->prepare("SELECT title FROM $table_name WHERE `object_id` = '%s' AND `object_sub_type` = 'category';", $object_id), ARRAY_A ); | |
| return $result['title'] ?? 'None'; |
| # For Apache, Litespeed | |
| <Files ~ "\.(pdf|doc|docx|xls|xlsx|ppt|pptx)$"> | |
| Header set X-Robots-Tag "noindex, nofollow" | |
| </Files> |
| <?php | |
| /** | |
| * WP PHP Coding Standards | |
| * | |
| * @package CodingStandards | |
| * @author codetot | |
| **/ | |
| // To start a new PHP file, append phpDocs | |
| /** |
| <?php | |
| /** Sample escape output for WordPress theme | |
| * @author codetot | |
| * @package codeStandard | |
| **/ | |
| ?> | |
| <?php // Simple escape html // ?> | |
| <h2 class="product-card__title"><?php echo esc_html( $title ); ?></h2> |
| <?php | |
| add_filter('rank_math/json_ld', 'codetot_product_rich_snippet_schema', 100); | |
| /** | |
| * Fix RankMath missing `AggregateRating` on product category schema | |
| * | |
| * @author codetot | |
| */ | |
| function codetot_product_rich_snippet_schema( $data ) { |