Questions tagged [core]

Core is the conventional name for WordPress as it is distributed, so excluding all plugins and themes (even those by Automattic or WordPress.org itself). In principle, all questions on this site are about the possibilities of core.

Filter by
Sorted by
Tagged with
1
vote
0answers
17 views

approach to pass additional parameter in post URL

I am trying to automatically pass an additional parameter whenever the post is saved as Draft or Published. When a post is saved as Draft or Published, the URL is updated to /wp-admin/post.php?post=...
0
votes
1answer
27 views

wp_insert_post always returns 0 on one site, extensive testing done, can't get to the bottom

I have two sites. One, a fresh install, the other an existing site with errors/white screen of death on the wp-admin/post-new.php screen. I've disabled all of the active plugins, and enabled a default ...
0
votes
2answers
24 views

Updating wordpress from my Linux distro's repository

I installed wordpress with apt, which ties in a lot of directories, so I suspect that using the built-in core update tool will break the installation; but wordfence constantly demands that I update ...
0
votes
0answers
17 views

How to override core/paragraph onChange handler

Below is the code, in this case it replacing the original core/paragraph with RichText and removes the original core/paragraph setting panel. How can I override only onChange handler of core/paragraph ...
2
votes
0answers
54 views

No longer able to attach S3 bucket files to emails being sent by WordPress due to PHPMailer security update

I've been trying to track down why my s3 bucket files are no longer being attached to automated emails being sent out by WordPress (using the Gravity Forms Entry Automation plugin). I've been able to ...
1
vote
1answer
37 views

WP Core: Where are terms populated for the admin edit screen?

I am trying to understand how the Admin Tables are populated (for posts, users, plugins...). With Terms/Taxonomies I am confused. In the /wp-admin/edit-tags.php file everything is normal until we ...
0
votes
1answer
37 views

Avoiding ACF get_field and returning to core Wordpress function

function slb_subscriber_column_data( $column, $post_id ) { // setup our return text $output = ''; switch( $column ) { case 'title': // get the custom name data $fname = ...
0
votes
2answers
54 views

Use wp_head hook on template page

I try to use the hook wp_head on a template page but this does not work add_action('wp_head', 'to_head'); function to_head(){ //do stuff } I placed this code on a template part what is called by ...
0
votes
1answer
51 views

Timezone is wrong when picking city (Copenhagen)

The timezone-setting (in 'Settings' >> 'Generel' >> 'Timezone'), seems to be ignored. I've set it to be 'Copenhagen' (value: Europe/Copenhagen). But the servers time is still 1 hour ahead ...
0
votes
1answer
14 views

Login cookies blocked after customizing hashing method

I get the following error when trying to login: Error: Cookies are blocked due to unexpected output. I customized the wordpress core functions wp_hash_password() and wp_check_password() to use SHA1 ...
2
votes
1answer
92 views

Question about the template-loader.php file

I am studying the WP code and have a doubt regarding the end of the /wp-includes/template-loader.php file, which handles the template that must be loaded for a certain URL request. if($template = ...
1
vote
1answer
21 views

What is the WP_Internal_Pointers core class?

The documentation does not explain it very well and I would like to understand what it is and why it exists.
0
votes
0answers
13 views

Error while localizing communityEventsData in script-loader.php

I'm getting an error in my logs: NOTICE: PHP message: PHP Warning: Cannot assign an empty string to a string offset in /usr/share/nginx/wp/wp-includes/class.wp-scripts.php on line 492 So I got the ...
1
vote
0answers
22 views

Use register_setting() in a loop

I try to use the function register_setting() in a loop but the settings are not set. This is my code <?php add_action( 'admin_init', function() { $registerSettings = array ( '...
0
votes
0answers
48 views

Internal Redirections?

I'm facing too many redirections issue with the REST API, and only with it, GUI works like a charm. I used cloudflare as a CDN. When I disable Cloudflare, REST API is working, else not. I was testing ...
0
votes
1answer
147 views

Update a core option from plugin settings page

I'm trying to update a core WordPress option, image_default_link_type, from my plugin's settings page, but WordPress is refusing to update it. The options registered by the plugin itself are updated. ...
0
votes
1answer
81 views

Rebuilding core image block

I am trying to rebuild core/image block to add extra link in the caption, which would be a link to the extended description of object in the image on another page. This requires both modifying block ...
0
votes
0answers
9 views

how do i check which products do not have external image attached

i have uploaded 2500 products to wordpress. each product has mutliple variations. i uploaded a csv that contained a list of tite, and cdn urls. now the majority of the products have a cdn url and ...
0
votes
0answers
500 views

Cross-Origin Read Blocking (CORB) blocked cross-origin response

I'm experiencing a strange behavior on one of the Wordpress sites I maintain (https://www.delscookingtwist.com/) whereby a video won't play. All that shows up is a black rectangle with the controls (...
0
votes
0answers
244 views

Extending core Gutenberg block - Apply dynamic style in editor from block props

The docs lays out how to apply styles in the front end via hook: function addBackgroundColorStyle( props ) { return lodash.assign( props, { style: { backgroundColor: 'red' } } ); } wp.hooks....
0
votes
0answers
10 views

Combine no class shipping with class shipping

I have the following case which I'm trying to solve. Most of my items I'm selling on my Wordpress site are no class specified and I use the following formula to calculate shipping: 10 + ( 9.99 * [qty] ...
0
votes
0answers
37 views

modifying default quote block HTML output

I would like to change HTML which "qoute" block produces: instead <blockquote> <p>text</p> <cite>text</cite> </blockquote> I would like this HTML ...
1
vote
1answer
26 views

Check for security updates

Is there any option to check all my plugins, core and themes on a website for security issues? Example: For the Wordpress core I can check my current Version: get_bloginfo( 'version' ), for updates: ...
0
votes
1answer
96 views

IP Address Whitelist to Allow WordPress Core Auto Updates

I'm working on a site based on a server with quite strict firewall rules. It won't allow anything running on the site to connect an external server unless its IP address is explicitly whitelisted. ...
0
votes
1answer
16 views

How to edit the <body> Tags within the image file URLs?

At present, my image files appear within the following URL structure: www.example.com/wp-content/uploads/year/month/image-file-name.jpg These image files, contain the following Body Tag <body ...
0
votes
0answers
25 views

How to change current category to another in wordpress

I am new to PHP. Please help me to achieve the below scenario. I am trying to achieve this from the last 3 days. I've two categories in my WordPress dashboard named "Available (id:3)" and &...
-1
votes
1answer
26 views

What is the first action or filter executed by wordpress?

To mesure performance of a wordpress website i need what is the first filter or action executed by wordpress ? it seems that index.php is the input file of server, there is a way to add a global time ...
0
votes
1answer
86 views

Load WordPress core but with specific plugins

I am looking for a way to create a custom PHP file, where WordPress core is loaded, but only with specific plugins activated. <?php require_once '../../wp-load.php'; // load specific plugins // ...
0
votes
1answer
37 views

How can precision be improved for the debug log timestamp?

Sometimes, I write info to the debug log to diagnose problems. While working on a performance problem, resolution to hours:minutes:seconds is not enough. I'd like to get to milliseconds, but haven't ...
0
votes
0answers
51 views

Cannot update WordPress Core via admin dashboard

I have a WP multisite that I am no longer able to run core updates via the admin dashboard. It used to work just fine back in the WP 4.* days, but stopped working the last couple of updates and the ...
0
votes
1answer
94 views

Can mediaelement-and-play core JS be dequeued?

I'd like to understand what is the purpose of the WordPress core javascript file /wp-includes/js/mediaelement/mediaelement-and-player.min.js I am asking that because it weighs 136KBytes and I'd like ...
0
votes
1answer
92 views

WP-CLI: detect altered core files and restore them automatically

I know that there is a command to verify the integrity of the core files: $ wp core verify-checksums In case a file is corrupted or altered, is there any WP-CLI command to automatically restore all ...
1
vote
0answers
591 views

How to display post categories within the Latest Posts block?

I'm trying to display the category/categories from each post within the Latest Posts block in the WordPress editor. This post seems to provide some solutions, however I am unsure how to use this ...
0
votes
1answer
101 views

How to get theme's info from wordpress.org/themes using api.wordpress.org?

i am trying to get the html code of the description of a few themes from WordPress, i know this is possible to achieve in codecanyon, but can't get the hang of it in wordpress.org, i've read the api....
0
votes
1answer
284 views

the_posts_pagination() function returns missing page numbering on some blog pages

I have a very strange issue that I am struggling to debug without amending the core function. On page 1 of the blog archive it shows page numbers: 1, 2, 4 (page 3 is missing). On page 2 and 3 the ...
1
vote
1answer
395 views

Huge debug.log because of "undefined offset in media.php"

Recently debug.log (WP 5.3.2) grew to 17GB because of tons of entries like this: [17-Jan-2020 16:29:01 UTC] PHP Notice: Undefined offset: 1 in /wp-includes/media.php on line 790 [17-Jan-2020 16:29:...
1
vote
0answers
30 views

Isn't requiring a file before it's loaded by WordPress itself a symptom of bad code? [closed]

There's a lot of if( !function_exists(... { require ABSPATH . '/file.php in the industry. We didn't crash, the world still lives, yet I wonder - isn't this one of the worst things you can do in an ...
11
votes
3answers
5k views

WordPress 5.3 update causes media library file upload to break - Cannot convert undefined or null to object

So after updating to WP 5.3 I can no longer use the file upload to choose files to add. I get the following error: Uncaught TypeError: Cannot convert undefined or null to object at g.cleanup (...
2
votes
0answers
462 views

Gutenberg List Extension Block

I'm trying to extend the default Gutenberg unordered list that renders like this; <ul> <li>Item 1</li> <li>Item 2</li> </ul> To something like this when ...
0
votes
1answer
223 views

What is a rock solid development and deployment workflow? [closed]

I am looking for a modern, reliable, solid rock development workflow for Wordpress, but most articles only explain individual parts. Some talk about very specific aspects like the way of deployment, ...
2
votes
1answer
8k views

How to remove X-Frame-Options: SAMEORIGIN" from WordPress?

I want to temporarily remove X-Frame-Options: SAMEORIGIN and need to allow all domains. I have already tried the following ways. Removing send_frame_options_header from ./wp-includes/default-filters....
1
vote
4answers
419 views

Remove annoying WP Adminbar CSS

I am trying to remove the annoying WP Admin bar css. <style type="text/css" media="screen"> html { margin-top: 32px !important; } * html body { margin-top: 32px !important; } @media screen and (...
0
votes
2answers
218 views

Wordpress Heartbeat API cannot parse data

I want to use WP-API heartbeat to open a connection to two displays and have them reflect what the other is saying with each send and tick. It used to work when the heartbeat API came out in 3.6 - ...
0
votes
0answers
109 views

wp-cli core install --skip-email and --skip-config flags not working on MAMP unknown parameter

This command wp core multisite-install --url="dev3.XXXXXXX.wp" --title="XXXX" --admin_user="XXXXXadmin" --admin_password="XXXXX123" --admin_email="XXXX@XXXX.com" --skip-email --skip-config Creates ...
0
votes
1answer
409 views

wp-cli core install unknown: fatal: file /etc/postfix/main.cf: parameter mail_owner: user postfix has same user ID as _postfix

I'm trying to setup two wordpress virtual hosts on my macbook using a shell script composer and wp-cli. The first virtual host has been working perfectly. When I run the script for the 2nd virtual ...
2
votes
1answer
65 views

How does WP detect format type (and can I make use of this)?

When I make a post with a theme that supports (all) post formats, WordPress will suggest the format type it thinks best fits my post. How does it do this? Is it possible to leverage this in, say, my ...
0
votes
1answer
17 views

Integrate separate web app inside wordpress [closed]

I want to integrate a wordpress installation with a third party application, it's an online football game simulation. Is it possible to wrap it inside my wordpress installation, but with a separate ...
2
votes
1answer
75 views

What is the criteria for pluggable functions?

Why are certain functions pluggable (overrideable) in WordPress core and others not? (I note on the Codex page regarding Pluggable Functions no more are to be added in favour of filter usage.) But ...
0
votes
0answers
55 views

How wordpress core include search.php with $_GET['s']?

I want to include custom_search.php when there is $_GET['my_s']. As you know, if we type on a search field, WordPress core includes search.php file because WP Core get $_GET['s'] as query var. How ...
0
votes
2answers
401 views

Is the root index.php file part of the Core?

The contents of the /index.php is as follows: /** * Tells WordPress to load the WordPress theme and output it. * * @var bool */ define('WP_USE_THEMES', true); /** Loads the WordPress Environment ...

1
2 3 4 5