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.
241
questions
0
votes
1
answer
93
views
What Generated Classes and IDs That Is Always Used On All Themes?
Just wondering if there is a way to get a complete list of wordpress generated css classes and ids that is always automatically assigned to any themes.
I've read here, but it seem not list them ...
1
vote
1
answer
4k
views
wordpress update will overwrite files changes?
I edit function.php and page.php files for my custom use, everything is fine, but i have query that if wordpress will update then it will overwrite all the files and changes made ??
0
votes
1
answer
1k
views
how does the rendering works?
i am trying to get a rough idea about how Wordpress renders the final content, built-in and plugin content. Rendering means to me, manipulating direct or indirect(delay via ajax,..) the DOM.
To keep ...
0
votes
2
answers
734
views
Display Custom Column in CPT Taxonomy
I am trying to add a column to one of my custom post types, but only on the edit taxonomy page.
I have a taxonomy registered called "event-categories" for my custom post type "events".
I can ...
5
votes
2
answers
826
views
Passing a hardcoded page/post ID into `get_post`
I see people using this to pull in page content on their home pages, remove specific categories from archives etc.. e.g.
$post = get_post( 5 );
Someone suggested this was bad practice. Why is it bad ...
2
votes
0
answers
531
views
Hook before & after plugin / core update
I'm working on a maintenance plugin for my website and I want to enable it before plugin/core upgrade starts and disable it after plugin/upgrade ends.
Any ideas ? Thanks! :)
PS: all I know is I can ...
0
votes
0
answers
110
views
Change the functionality of wordpress users module in admin
I want to restrict wordpress admin to view all users in user list.
For say, I have created custom roles (company users, employee). A company user type role can have multiple employees.
I want ...
2
votes
2
answers
156
views
Why use while over if in single wordpress posts?
Why is while() used instead of say if() here:
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'single' ); ?>
<?php ...
2
votes
1
answer
925
views
Changing a WordPress core function without hacking core
I am looking to change one line within a core function. The function is wp_allow_comment() located within /wp-includes/comment.php
function wp_allow_comment($commentdata) {
global $wpdb;
extract($...
0
votes
1
answer
105
views
Why There Is No "get content by ID" Function
When i need to get content of a post with ID, I'm always using this function :
function getContentByID($id)
{
//http://wordpress.stackexchange.com/questions/9667/get-wordpress-post-content-by-post-id
...
2
votes
2
answers
9k
views
Conditional tag is_page with a custom post type
Accordingly to the is_page documentation, supplying the slug as an argument WP can tell me whether the current page is the one represented by the slug. Perhaps I am using the wrong slug?
However I ...
0
votes
1
answer
278
views
How to change value in wp-include/taxonomy.php without exchanging the Wordpress-core
I had the problem that tags of private posts didn't show up in a widget tag-cloud even if the user is logged in. The reason seems to be the value of "post_status" in the function ...
1
vote
1
answer
429
views
Extending WP_Widget throws error when Monster Widget used
I wanted to override the output for the core Recent Comments Widget. I extended WP_Widget_Recent_Comments made the changes needed and it displays exactly how I want. However, I have now tested the ...
6
votes
1
answer
303
views
Managing WP Core & Plugin Updates for Clients
I'd like to know how you go about managing WP Core & Plugin updates for clients? It's a service my web company would like to start offering but we are unsure of the best solution.
Let me provide ...
0
votes
0
answers
254
views
Upacking the package... stalls, but installs plugin
I have been searching high and low for the correct solution to my problem. I have found many searches relating to this, but can not find a solution...
Here is the Updated Video to see what happens ?
...
1
vote
2
answers
766
views
Wordpress and a secondary database?
I have to achieve something on which I don't know how to approach it.
Base of the issue:
There's a bunch of data in another DB that I have to import into WP which so far wasn't possible due to them ...
0
votes
2
answers
2k
views
Override default password nag in Wordpress
For some reason my default password nag is playing up on a big multi-user site I've setup. Pretty sure it's got to do with the New User Approve and Gravity Forms User Rego combo that I'm using.
...
1
vote
1
answer
504
views
What's the purpose / logic of split_the_query in WP_Query->get_posts
In the get_posts method of WP_Query, there's a section relating to split_the_query
The logic of split_the_query is
$split_the_query = ( $old_request == $this->request && "$wpdb->posts....
4
votes
1
answer
189
views
Why are double-periods ("..") invalid in a Wordpress image filename?
ms-files.php contains the following code fragment:
$file = rtrim( BLOGUPLOADDIR, '/' ) . '/' . str_replace( '..', '', $_GET[ 'file' ] );
if ( !is_file( $file ) ) {
status_header( 404 );
die( '...
5
votes
1
answer
3k
views
Slow wp_term_relationships query
I'm running a large WP instance (currently has 28,000+ posts in custom types) and have been experiencing some odd slowdowns. Upon analyzing the MySQL slow query log, one of the problem queries is:
...
2
votes
1
answer
1k
views
Is this plugin being loaded before file.php, subsequently not allowing me to use certain functions?
I'm trying to use get_home_path() in my plugin, however, I get a call to undefined function fatal error (running Wordpress 3.8).
I believe this would imply that my plugin is being loaded before wp-...
0
votes
1
answer
95
views
Usage of var keyword in the core
I've noticed many of the classes throughout the core declare member variables with the var keyword YET in the comments (written above the variable) it's declared as being a private access. The PHP ...
0
votes
1
answer
212
views
Cannot redeclare wp_update_core()
I think it's right after the WordPress update, we can't access the wp-admin to log in anymore.
Fatal error: Cannot redeclare wp_update_core() (previously declared in C:\DWASFiles\Sites\pyromaitre\...
0
votes
0
answers
104
views
Making Site A Use Site B's wp-content Folder
I'm trying to synchronize two WordPress sites and on my way I've faced few challenges. One of the challenges is to either synchronize the wp-content folder of two sites or make one site use the wp-...
0
votes
1
answer
3k
views
How to add a forward slash to the end of wordpress home?
I have a wordpress site - domain.com/tickets
domain.com redirects to another site - this will be fixed soon but will redirect for a few more months.
So when I go into WP settings I put in domain.com/...
7
votes
4
answers
12k
views
“Unexpected error” on update requests
It needs connectivity to wordpress.org and is timing out. I am behind a corporate firewall. I have never had this issue come up before in previous versions. Why does themes.php need access to ...
10
votes
4
answers
9k
views
How to disable core and plugin updates
Is there any way to disable core and plugin updates? I am modifying a plugin and bit of WordPress Core (I know its a sin to do so), but can't help it.
3
votes
1
answer
127
views
What's $GLOBALS['wp_settings']['media']['embeds']?
In wp-admin/options-media.php, there are a few lines that go:
<?php if ( isset( $GLOBALS['wp_settings']['media']['embeds'] ) ) : ?>
<h3 class="title"><?php _e('Embeds') ?></h3>...
3
votes
0
answers
724
views
How do I set a custom WordPress update repository?
I'm co-authoring a white paper on utilising WordPress as a foundation for a web-app, I would like to change the repository that the core WordPress updates from, the latest additions of automatic ...
7
votes
2
answers
1k
views
What is a "protected" post status?
I noticed in the register_post_status function in core that there is an arg for 'protected'.
The following post statuses: 'future', 'draft', and 'pending' all have this set to true.
I'm not talking ...
0
votes
1
answer
169
views
Script dependencies for post.js
I have already got the built in meta boxes displaying on the front, but some of them require the accompanying wp-admin/js/post.js to function correctly. I'd rather not rewrite anything here and just ...
1
vote
1
answer
2k
views
Loading WP core Thickbox through frontend
Looking through some of the top Google results, this question has been answered a number of times, but the answers given don't seem to be working in my WP 3.6 install.
One solution given is this:
...
5
votes
3
answers
11k
views
HowTo: Add Class to Sidebar Widget List-Items
The newest version of Bootstrap (v3.0) adds a new List Group component which has the following structure:
<ul class="list-group">
<li class="list-group-item">Cras justo odio</li>
...
3
votes
1
answer
1k
views
Best way to extends core classes in theme?
I need to add functions to my WP_User objects, to be used like this :
<?php
// in my templates :
$user = new User($id);
$user->sendHelloWorldEmail();
// in my functions.php
class User extends ...
4
votes
2
answers
940
views
Rewriting a core function?
As I understand it, it's possible to overwrite core functions in wordpress, without touching the core itself, which is of obvious benefit.
Now, certain functions are 'pluggable', but not all of them....
0
votes
1
answer
1k
views
Location of core code for database connection and get_header
I understand WP well enough to create a custom theme at a basic level, but have no experience with the core code. I've also just finished a book on basic php and mysql coding.
I'd like to look 'under ...
7
votes
2
answers
2k
views
Clarification on filters and hooks
I am about to start my first WordPress project and I have the task of moving customized core code that override the core into separate functions/files (this way it'll be easier to maintain when we ...
0
votes
1
answer
2k
views
Why does wp_links still exist in the db schema?
I understand that links used to be a big thing when Wordpress came out and during the blog rise, but the link feature is so underused nowadays that as of version 3.5 it is hidden by default (thus ...
0
votes
1
answer
76
views
Which file renders the "Edit Gallery" Settings page?
I was looking for a tutorial on adding options to the "Edit Gallery" page. In the hopes of adding some GUI inputs that would result in the generated [gallery] short-code having custom attributes.
I ...
0
votes
2
answers
5k
views
What's causing this error? "Warning: Invalid argument"
I noticed today that my error logs are littered with this information. I'm not quite sure what's causing it. Has anyone seen this before?
[Mon Mar 25 17:24:23 2013] [error] [client] PHP Warning: ...
0
votes
2
answers
104
views
Possible to add a statement to a core file?
I would like to add one line to a wp core file. Basically on the 'edit.php' page, just right above
<?php
include('./admin-footer.php');
I would like to add an php include statement...
include('...
2
votes
2
answers
4k
views
Disable feeds for specific custom post types
I want to remove the feeds for specific custom post types. Most recommended methods are not clean. There seems to be a option called $args->feeds but this does not work within the ...
0
votes
1
answer
320
views
Dismiss Admin Pointer Temporarily
I have a custom meta field for a page that contains a future date. I'm wanting to make sure this is always a future date and have decided the best way to do so is by creating an admin pointer if the ...
2
votes
1
answer
53
views
How can i know when i can execute what functions of wordpress?
I like to do a bunch of stuff only on homepage and archive pages
i am working with the genesis framework (not really matters i guess)
if( is_singular() ) {
wp_die('functions.php');
}
add_action(...
0
votes
1
answer
491
views
How to remove a settings section from the Theme Customization API preview pane?
I am currently working on a theme that uses the Wordpress Customization API and I need to remove some pre-existing sections from the customization preview pane. Is there somewhere like a global ...
6
votes
3
answers
4k
views
Are the WordPress Core CSS styles really all nessesary?
On WordPress Codex there are these CSS styles listed. It's a quite big list of styles, but it seems they are doubled unnecessary.
It says:
Each Theme should have these or similar styles in its ...
4
votes
1
answer
3k
views
Changing subdir multisite install to subdir core directory structure
Now that WordPress 3.5 is supposed to work with core files in subdirectory, I decided to move my local development setup (subdirectory multisite) to that configuration.
Fast forward and what I have ...
1
vote
1
answer
149
views
Conditional hook based on the core function that is calling it
In a Multisite, I'm applying the filter get_blogs_of_user to sort the "My Sites" admin bar menu, where the sites are listed by blogname:
What happens is that I'd like another order elsewhere, where ...
6
votes
2
answers
240
views
How do I use the WP image functions in a page template?
Wordpress has tons of mature code for image editing on the admin side, but I would like to provide a form inside of a custom page template for my visitors to drag and drop, crop and save a thumbnail ...
0
votes
2
answers
176
views
WordPress auto update for core but use local package
I have several local WordPress dev environments but, for the moment, a very very slow internet connection. The WordPress auto updater for core is very convenient, but would it possible for it to use ...