tylersticka, to wordpress
@tylersticka@social.lol avatar

I still have all of these issues with WordPress and portable patterns: https://cloudfour.com/thinks/wordpress-blocks-portable-patterns-and-pain-points/

But, it’s really heartening to see what the @enhance_dev project is doing to break down those barriers, as detailed here by @ryanbethel: https://begin.com/blog/posts/2024-05-03-portable-ssr-components

(I’ve updated my article to include a link.)

andyfragen, to wordpress
@andyfragen@wptoots.social avatar

Rollback Auto-Updates for #WordPress has just been committed. https://core.trac.wordpress.org/changeset/58128

This completes the last piece for ensuring that plugin updates will not result in a WSOD on your site.

salcode, to wordpress
@salcode@phpc.social avatar

I'll be speaking at @WordcampMontclair on June 1, 2024 with an "Introduction to Unit Tests".

I'm looking forward to catching up with old #WordPress friends and meeting new ones.

The schedule isn't finalized, but you can see a preview of the sessions at https://montclair.wordcamp.org/2024/sessions/

#WordCamp

alexstandiford, to wordpress
@alexstandiford@fosstodon.org avatar

So, I built Siren's documentation portal, and the entire site is built using WordPress and the full-site editor. It's my first complete build using FSE, so I wrote up a reflection on it.

TL;DR It's REALLY gettin' good, y'all.

https://alexstandiford.com/articles/blog-posts/i-built-a-knowledge-base-using-the-block-editor-and-whoa

Edent, to HowTo
@Edent@mastodon.social avatar

🆕 blog! “link rel="alternate" type="text/plain"”

Hot on the heels of yesterday's post, I've now made all of this blog available in text-only mode. Simply append .txt to the URl of any page and you'll get back the contents in plain UTF-8 text. No formatting, no images (although you can see the alt text), no nothing! Front page https://shkspr.mobi/blog/.txt This blog […]

👀 Read more: https://shkspr.mobi/blog/2024/05/link-relalternate-typetext-plain/

#HowTo #php #WordPress

blog, to HowTo
@blog@shkspr.mobi avatar

link rel="alternate" type="text/plain"
https://shkspr.mobi/blog/2024/05/link-relalternate-typetext-plain/

Hot on the heels of yesterday's post, I've now made all of this blog available in text-only mode.

Simply append .txt to the URl of any page and you'll get back the contents in plain UTF-8 text. No formatting, no images (although you can see the alt text), no nothing!

This was slightly tricky to get right! While there might be an easier way to do it, here's how I got it to work.

Firstly, when someone requests /whatever.txt, WordPress is going to 404 - because that page doesn't exist. So, my theme's functions.php, detects any URls which end in .txt and redirects it to a different template.

//  Theme Switcheradd_filter( "template_include", "custom_theme_switch" );function custom_theme_switch( $template ) {    //  What was requested?    $requested_url = $_SERVER["REQUEST_URI"];    //  Check if the URL ends with .txt    if ( substr( $requested_url, -4 ) === ".txt")  {            //  Get the path to the custom template        $custom_template = get_template_directory() . "/templates/txt-template.php";        //  Check if the custom template exists        if ( file_exists( $custom_template ) ) {            return $custom_template;        }    }    //  Return the default template    return $template;}

The txt-template.php file is more complex. It takes the requested URl, strips off the .txt, matches it against the WordPress rewrite rules, and then constructs the WP_Query which would have been run if the .txt wasn't there.

//  Run the query for the URl requested$requested_url = $_SERVER['REQUEST_URI'];    // This will be /whatever$blog_details = wp_parse_url( home_url() );  // Get the blog's domain to construct a full URl$query = get_query_for_url(     $blog_details["scheme"] . "://" . $blog_details["host"] . substr( $requested_url, 0, -4 ));function get_query_for_url( $url ) {    //  Get all the rewrite rules    global $wp_rewrite;    //  Get the WordPress site URL path    $site_path = parse_url( get_site_url(), PHP_URL_PATH ) . "/";    //  Parse the requested URL    $url_parts = parse_url( $url );    //  Remove the domain and site path from the URL    //  For example, change `https://example.com/blog/2024/04/test` to just `2024/04/test`    $url_path = isset( $url_parts['path'] ) ? str_replace( $site_path, '', $url_parts['path'] ) : '';    //  Match the URL against WordPress rewrite rules    $rewrite_rules = $wp_rewrite->wp_rewrite_rules();    $matched_rule = false;    foreach ( $rewrite_rules as $pattern => $query ) {        if ( preg_match( "#^$pattern#", $url_path, $matches ) ) {            $matched_rule = $query;            break;        }    }    //  Replace each occurrence of $matches[N] with the corresponding value    foreach ( $matches as $key => $value ) {        $matched_rule = str_replace( "$matches[{$key}]", $value, $matched_rule );    }    //  Turn the query string into a WordPress query    $query_params = array();    parse_str(        parse_url( $matched_rule, PHP_URL_QUERY),         $query_params    );    //  Construct a new WP_Query object using the extracted query parameters    $query = new WP_Query($query_params);    //  Return the result of the query    return $query;}

From there, it's a case of iterating over the posts returned by the query. You can see the full code on my GitLab.

https://shkspr.mobi/blog/2024/05/link-relalternate-typetext-plain/

to3k, to Blog
@to3k@tomaszdunia.pl avatar

For my #blog, I also observed this problem. This is not very disturbing, but after publishing information about the new post, the site temporarily stops working and throws the error of exceeding the #MySQL query limit, because the blog is based, of course, on #Wordpress.
via #unknowNews
https://news.itsfoss.com/mastodon-link-problem/

roblen, to wordpress German
@roblen@microblog.at avatar

Möchte in #WordPress mehr Fotos posten. Dafür brauche ich ein wenig mehr Übersicht im Media Manager. Ein Fotoalbum Plugin bräuchte es nicht. So eine Art Dateimanager Plugin wie https://devowl.io/wordpress-real-media-library wäre interessant. Habt ihr Tipps, was sinnvoll wäre?

sirber, to php
@sirber@fosstodon.org avatar

I'm starting a 22h course on C#.
outside is dying...

mobileatom, to javascript
@mobileatom@me.dm avatar

Explore our article: Frontend Madness: SPAs, MPAs, PWAs, Decoupled, Hybrid, Monolithic, Libraries, Frameworks! WTF for your PHP backend? https://symfonystation.mobileatom.net/Frontend-Madness-JS-PHP-Backend

symfonystation, to javascript
@symfonystation@newsletter.mobileatom.net avatar
mobileatom, to wordpress
@mobileatom@flipboard.com avatar

Integrating SvelteKit with headless WordPress. #WordPress

https://kinsta.com/blog/wordpress-sveltekit/?utm_source=flipboard&utm_medium=activitypub

Posted into Blog me! @blog

mobileatom, to wordpress
@mobileatom@me.dm avatar

Seven talks about blocks, block themes, and beyond at WordCamp Europe 2024.
https://gutenbergtimes.com/seven-talks-about-blocks-block-themes-and-beyond-at-wordcamp-europe-2024/ #WordPress

Edent, to wordpress
@Edent@mastodon.social avatar

🆕 blog! “A completely plaintext WordPress Theme”

This is a silly idea. But it works. I saw Dan Q wondering about plaintext WordPress themes - so I made one. This is what this blog looks like using it: The Code You only need two files. An index.php and a style.css. The CSS file can be empty, but it needs to exist - […]

👀 Read more: https://shkspr.mobi/blog/2024/05/a-completely-plaintext-wordpress-theme/

cmyrland, to norge Norwegian Bokmål
@cmyrland@tutoteket.no avatar

Er det noen Wordpress-smartinger der ute? Jeg vil ha en indeks-liste som er omvendt kronologisk, altså at eldste innlegg vises først, og nyeste sist.

Føler at det burde vært så enkelt som å ha en knapp som heter "invert list", men det finner jeg ikke..

Halp?

pablolarah, to wordpress
@pablolarah@mastodon.social avatar
klausgesprochen, to wordpress German
@klausgesprochen@social.tchncs.de avatar

Ich glaube, ich habe gerade meine dämlichen 5 Minuten.

Wie kann ich bei #Wordpress im #Gutenberg-Editor geschütze Leerzeichen einfügen?

Umschalten auf HTML-Bearbeitung,   einfügen und zurück zur visuellen Bearbeitung kann doch wohl nicht die Lösung sein?

davidbisset, to wordpress
@davidbisset@phpc.social avatar
mobileatom, to wordpress
@mobileatom@flipboard.com avatar

Hackers Exploiting LiteSpeed Cache Bug to Gain Full Control of WordPress Sites.

https://thehackernews.com/2024/05/hackers-exploiting-litespeed-cache-bug.html?utm_source=flipboard&utm_medium=activitypub

Posted into Blog me! @blog

rhyswynne, to wordpress
@rhyswynne@toot.wales avatar

NEW BLOG POST:

Can WordPress run id Software's classic 1993 FPS shooter Doom? Of course it can, here's how I did it using WordPress Playground.

Sorry if you were busy today....

https://dwinrhys.com/2024/05/08/can-wordpress-run-doom-of-course-it-can-heres-how/

#wordpress #doom #canitrundoom

Edent, to wordpress
@Edent@mastodon.social avatar

I keep getting TrackBack spam in .
But, what's weird, is that the domains don't exist!

This is a typical one. A nonsensical and non-existent domain - R9NpK.com

I can't understand how these are submitted, nor what their goal is.

tomw, to wordpress
@tomw@mastodon.social avatar

I think @dbushell is correct that modern , at least the way they want you to do it, is a "CSS-in-JSON-in-HTML-comments-in-a-PHP-file" mess.

Luckily you can just ignore full site editing and the not-quite-React nonsense and continue to happily write themes in PHP/HTML/CSS.

https://dbushell.com/2024/05/07/modern-wordpress-themes-yikes/

splorp, to wordpress
@splorp@mastodon.social avatar

The latest update to my Comment for now contains over 55,000 terms and phrases to help keep your comment threads tidy.

https://github.com/splorp/wordpress-comment-blacklist

Edent, to wordpress
@Edent@mastodon.social avatar
parigotmanchot, to wordpress French
@parigotmanchot@mastodon.social avatar

#Shaarli: WPCode keeps reappearing as a malware after deleting | WordPress.org - Options à insérer dans le fichier wp-config (racine d'une installation de WordPress) pour empêcher la modification des fichiers via l'éditeur interne et désactiver l'ajout d'extensions.

Contexte : un hackeur a réussit à faire en sorte que l'extension WP Code s'installe automatiquement même si on efface ladite extens… : https://wordpress.org/support/topic/wpcode-keeps-reappearing-as-a-malware-after-deleting/#post-17115537 #wordpress #injection #extension #malware #hack

  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • megavids
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • provamag3
  • tester
  • Leos
  • JUstTest
  • All magazines