REDROOM
PHP 8.0.30
Path:
Logout
Edit File
Size: 1.33 KB
Close
/home/certprox/zang.certproxywizard.com/wp/wp-content/plugins/auto-post-thumbnail/src/Utils/Helpers.php
Text
Base64
<?php /** * Helper utilities. * * @package AutoPostThumbnail */ namespace AutoPostThumbnail\Utils; /** * Helper utility methods. */ class Helpers { /** * Resolve font path from font name. * * @param string $font_name Font name. * * @return string Font path */ public static function resolve_font_path( $font_name ) { $font = WAPT_PLUGIN_DIR . '/fonts/' . $font_name; if ( file_exists( $font ) ) { return $font; } $upload_dir = wp_upload_dir(); $upload_font_path = $upload_dir['basedir'] . '/apt_fonts/' . $font_name; if ( file_exists( $upload_font_path ) ) { return $upload_font_path; } return WAPT_PLUGIN_DIR . '/fonts/arial.ttf'; } /** * Get the upsell URL. * * @param string $utm_campaign The UTM campaign. * @return string */ public static function get_upsell_url( $utm_campaign ) { return tsdk_translate_link( tsdk_utmify( 'https://themeisle.com/plugins/auto-featured-image/upgrade', $utm_campaign, 'apt' ) ); } /** * Get a random post title. * * @return string */ public static function get_random_post_title() { $posts = get_posts( [ 'numberposts' => 10 ] ); if ( ! empty( $posts ) ) { $post = $posts[ wp_rand( 0, count( $posts ) - 1 ) ]; $txt = $post->post_title; } else { $txt = __( 'Sample Post Title', 'auto-post-thumbnail' ); } return $txt; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 2
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Helpers.php
1.33 KB
lrw-r--r--
2026-04-02 07:27:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Sanitization.php
4.48 KB
lrw-r--r--
2026-04-02 07:27:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).