From ac93ed4d29dd85409fb4c0cd9c2af266e90777c1 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sat, 19 Oct 2024 10:04:14 +0200 Subject: initial commit --- WP/plugin-deploy-script-for-wp-org.php | 44 ++++++++++++++++++++++++++++++++++ WP/search-by-title-with-wp-query.php | 11 +++++++++ 2 files changed, 55 insertions(+) create mode 100644 WP/plugin-deploy-script-for-wp-org.php create mode 100644 WP/search-by-title-with-wp-query.php (limited to 'WP') diff --git a/WP/plugin-deploy-script-for-wp-org.php b/WP/plugin-deploy-script-for-wp-org.php new file mode 100644 index 0000000..3b66d49 --- /dev/null +++ b/WP/plugin-deploy-script-for-wp-org.php @@ -0,0 +1,44 @@ +#!/usr/bin/env php + +version); + +// commit +exec("svn commit -m 'updating to v{$composer->version}'"); + +// clean up files +unlink("$pluginSourcePath/$zipFilename"); +exec("rm -rf $svnDestinationPath/$zipFilename"); # feeling dangerous diff --git a/WP/search-by-title-with-wp-query.php b/WP/search-by-title-with-wp-query.php new file mode 100644 index 0000000..418f057 --- /dev/null +++ b/WP/search-by-title-with-wp-query.php @@ -0,0 +1,11 @@ +get('title_like')) { + global $wpdb; + $where .= " AND {$wpdb->posts}.post_title LIKE '" . esc_sql($wpdb->esc_like($title)) . "'"; + } + + return $where; +}, 10, 2); -- cgit v1.2.3