The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
18 views

Constant for 'barebones' update of Wordpress

I feel slightly stupid asking this, but I could have sworn I stumbled across a constant that could be added to wp-config.php so that, when you update your Wordpress installation, it only updates ...
-1
votes
1answer
38 views

Notice: Use of undefined constant - assumed ' ' [closed]

Thanks in advance for your help. I am getting this error in my WordPress theme: Notice: Use of undefined constant - assumed ' ' in .../themes/theme/homepage.php on line 10 Here is the ...
0
votes
0answers
15 views

Change Theme Location for Multiste's single Blog

I want to change the directory, where the theme is located for only one Blog in the Multiste. the other ones shall keep as they are. I found a snippet which does that for uploads: ...
0
votes
1answer
168 views

Notice: Use of undefined constant Redux_TEXT_DOMAIN - assumed 'Redux_TEXT_DOMAIN'

I am building my first Wordpress site, I just downloaded and installed v3.9.1. I bought a theme (rustik3) and I am trying to install it, but I am running into these errors produced by WP_DEBUG: ...
1
vote
0answers
46 views

URL for images folder on Multisite

I am developing a theme locally on a local multisite installation and trying to change the default gravitar with the following function: function custom_gravitar ($avatar_defaults) { $myavatar = ...
1
vote
1answer
30 views

Calling directories to load in wordpress

I have a wordpress install, with two sub folders "assets" and "functions" these folders contain important files for the wordpress theme. What would be the best way to load these files I've tried ...
0
votes
1answer
348 views

get plugin directory url

I am trying to use SMOF Options Framework in a plugin and i have this problem. SMOOF use this constants to get theme directory url: if( !defined('ADMIN_PATH') ) define( 'ADMIN_PATH', ...
0
votes
1answer
38 views

Update the value of a constant

I have a file containing all the constants used in the plugin. For example, I have a variable in one of my file define('APPOINTMENTS_DEFAULT_ENABLE_PAYPAL', 1); I have a checkbox in admin area where ...
0
votes
0answers
104 views

Notice: Use of undefined constant - assumed ' '

I turned on debug mode and see the following in my header: Notice: Use of undefined constant - assumed ' ' I'm using the following function in header.php: <?php if ( is_user_logged_in() ) { ...
0
votes
0answers
74 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 ...
0
votes
2answers
2k views

Synchronizing Two WordPress Sites Content

I've googled a lot, and I do have found answers at WordPress SE and at stackoverflow.com. However, the answers are somewhat incomplete or doesn't work at all. Here I'll explain my problem in detail, ...
3
votes
1answer
760 views

What should I use instead of WP_CONTENT_DIR and WP_PLUGIN_DIR?

The WordPress documentation for Determining Plugin and Content Directories states that: WordPress makes use of the following constants when determining the path to the content and plugin ...
0
votes
1answer
159 views

Define constant for one plugin in mu-plugin

I'm trying to define the constant ACF_Lite as true so that the interface of the Advanced Custom Fields plugin is hidden on all of my multisite subsites except the parent. For clarity and ...
0
votes
1answer
203 views

Get WP Install Directory

I have a theme which - I was quite proud of myself! - I designed to be installed in wp sites where wp is on root level. Then half my users installed the theme on a mysite.com*/wordpress/* ! ...and ...
0
votes
1answer
250 views

Get variable value based on string constant

In my plugin I define a constant as follows: define('DEFAULT_NUM', 5); I also define a constant representing the name by which I want to refer to this number: define('DEFAULT_NUM_NAME', ...
-2
votes
2answers
347 views

Checking for existence of constants before defining them

I am seeing many plugins use the following format for defining their constant: /* Set the constant path to the plugin's javascript directory. */ if( !defined( 'MY_ETS_JS' ) ) define( 'MY_ETS_JS', ...
0
votes
1answer
74 views

Can't Access Constant from within Included File

First of all, I'm completely sure I'm being an idiot on this one - but an hour of scratching my head and searching this site has still left me perplexed. I'm trying to access a constant that's ...
1
vote
2answers
1k views

Accessing site's root from themes folder

Having some troubles with a PHP script I am trying to build. I need to access the a file which is located in the root folder of my Wordpress install: wordpress-root/live-config.php Problem is, my ...
2
votes
1answer
576 views

Use theme constants in plugin?

I'm creating a plugin version of the Roots Theme function additions - to make it a bit more portable, but have run into a snag. Part of what Roots does is add htaccess rules based on the current ...
0
votes
1answer
84 views

Insert functions-defined constant into get_tags code

I'm using the below code from WordPress' get_tags Function Reference page $tags = get_tags(); $html = '<div class="post_tags">'; foreach ($tags as $tag){ $tag_link = ...
0
votes
1answer
220 views

Many Single Sites, One Plugin directory - adjust plugins_url()

[this is not a Multisite question] Update: this question is a logical impossibility, or a mind loop if you will, check update bellow. The technique is laid out here in WPEngineer. It allows ...
0
votes
1answer
438 views

ABSPATH in Windows

I'm having a a pain in the head using the ABSPATH constant in Windows. Addressing files and folders in Windows is usually done using the \ (forward-slash) character while for Linux the character would ...
1
vote
1answer
125 views

wp_enqueue_script & constants?

I'm enqueuing a script: wp_enqueue_script('my-script', MY_SCRIPTS."/my-script.js"); How to get MY_SCRIPTS const working in this context? I know this works: $template_dir = ...
0
votes
2answers
411 views

How can I append blog_id to … echo [functions-defined-constant]?

I use 'constants' a lot. I set them in functions.php like define('mytheme_town', 'Orlando'); and then call them into the theme <?php echo mytheme_town ; ?>. It's simple and easy. But I need ...
1
vote
1answer
959 views

Using the ABSPATH constant - What files need to be loaded before use?

I need to make use of the ABSPATH constant but need to know what WP files I need to include so I can make use of it. Thanks a lot!
3
votes
2answers
2k views

Turn Off Automatic Trash Deletion?

I have a client who wants to use the trash feature, but keep items in there indefinitely (I have no idea why, but they insist on it). From reading this codex article on the trash status, I see that ...
5
votes
2answers
2k views

BLOG_ID_CURRENT_SITE vs. SITE_ID_CURRENT_SITE in WordPress Multisite?

I've been trying to figure out why we have the constants BLOG_ID_CURRENT_SITE and SITE_ID_CURRENT_SITE (vs. hardcoding them to be equal to 1), what exactly the differences are, and when either of them ...