id
stringlengths 40
40
| text
stringlengths 29
2.03k
| original_text
stringlengths 3
154k
| subdomain
stringclasses 20
values | metadata
dict | emb
listlengths 1.02k
1.02k
|
---|---|---|---|---|---|
e77264ec1822a346eaa670c174c75810acef04e9 | Wordpress Stackexchange
Q: If Custom Field is empty don't display div I'm looking for a better way to hide a div when a custom field is empty. I've figured out how to hide the div but I have quite a few custom fields and I'd rather not write the code for each one.
(Note: I am using the Advanced Custom Fields plugin.)
So basically I want to hide the section title if the the field underneath it is empty.
Thanks
<div class="section-title">Services for Individuals</div>
<div class="section-text">
<?php the_field('services_for_individuals') ?>
</div>
</div>
<div class="section-title-business">Services for Businesses</div>
<div class="section-text">
<?php the_field('services_for_businesses') ?>
</div>
</div>
</div>
<?php
$value = get_field( "services_for_businesses" );
if ( $value ) {
echo $value;
} else {
?>
<style type="text/css">
.section-title-business {
display:none; }
</style>
<?php
}
?>
A: Try this:
<?php
$business_services = get_field( "services_for_businesses" );
//etc...
?>
<div class="section-title">Services for Individuals</div>
<div class="section-text">
<?php the_field('services_for_individuals') ?>
</div>
<?php if ( $business_services ) : ?>
<div class="section-title-business">Services for Businesses</div>
<div class="section-text">
<?php echo $business_services; ?>
</div>
</div>
<?php endif; ?>
</div>
Further abstract the code to meet your needs if you have more than one field to show or hide.
| Q: If Custom Field is empty don't display div I'm looking for a better way to hide a div when a custom field is empty. I've figured out how to hide the div but I have quite a few custom fields and I'd rather not write the code for each one.
(Note: I am using the Advanced Custom Fields plugin.)
So basically I want to hide the section title if the the field underneath it is empty.
Thanks
<div class="section-title">Services for Individuals</div>
<div class="section-text">
<?php the_field('services_for_individuals') ?>
</div>
</div>
<div class="section-title-business">Services for Businesses</div>
<div class="section-text">
<?php the_field('services_for_businesses') ?>
</div>
</div>
</div>
<?php
$value = get_field( "services_for_businesses" );
if ( $value ) {
echo $value;
} else {
?>
<style type="text/css">
.section-title-business {
display:none; }
</style>
<?php
}
?>
A: Try this:
<?php
$business_services = get_field( "services_for_businesses" );
//etc...
?>
<div class="section-title">Services for Individuals</div>
<div class="section-text">
<?php the_field('services_for_individuals') ?>
</div>
<?php if ( $business_services ) : ?>
<div class="section-title-business">Services for Businesses</div>
<div class="section-text">
<?php echo $business_services; ?>
</div>
</div>
<?php endif; ?>
</div>
Further abstract the code to meet your needs if you have more than one field to show or hide.
| wordpress | {
"language": "en",
"length": 191,
"provenance": "stackexchange_00019.jsonl.gz:463964",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/220730"
} | [
0.0294952392578125,
0.01180267333984375,
0.009521484375,
-0.05255126953125,
0.007110595703125,
-0.003818511962890625,
0.00036025047302246094,
-0.03289794921875,
0.04388427734375,
-0.020477294921875,
-0.07550048828125,
0.01611328125,
-0.06927490234375,
-0.0173492431640625,
-0.0009469985961914062,
-0.08343505859375,
0.00600433349609375,
0.0238189697265625,
0.03302001953125,
-0.0032711029052734375,
0.0061798095703125,
-0.0151519775390625,
0.00675201416015625,
-0.0063323974609375,
0.01079559326171875,
-0.08770751953125,
0.1085205078125,
-0.0022563934326171875,
0.016021728515625,
-0.0293731689453125,
0.022735595703125,
-0.00498199462890625,
0.008941650390625,
0.00848388671875,
0.0173797607421875,
0.044189453125,
0.01593017578125,
0.00505828857421875,
0.055084228515625,
-0.0269775390625,
0.032623291015625,
-0.02459716796875,
-0.00681304931640625,
0.002471923828125,
0.00494384765625,
-0.02398681640625,
0.043853759765625,
-0.044830322265625,
0.004451751708984375,
0.0003883838653564453,
0.01611328125,
-0.005397796630859375,
0.0152587890625,
0.039031982421875,
-0.0171051025390625,
0.00917816162109375,
-0.036285400390625,
0.0123443603515625,
0.0209197998046875,
0.0277557373046875,
0.00033664703369140625,
-0.023895263671875,
0.003528594970703125,
-0.0298614501953125,
-0.0283355712890625,
0.00470733642578125,
-0.02301025390625,
0.0220184326171875,
-0.0164031982421875,
-0.049835205078125,
-0.0003628730773925781,
-0.00469970703125,
-0.0179443359375,
-0.014892578125,
-0.064453125,
-0.0038738250732421875,
0.013885498046875,
-0.0672607421875,
0.00630950927734375,
-0.006511688232421875,
-0.01617431640625,
0.0040435791015625,
-0.007762908935546875,
-0.0010623931884765625,
-0.0006418228149414062,
0.01495361328125,
-0.0224151611328125,
-0.00905609130859375,
0.04461669921875,
0.000598907470703125,
0.0171966552734375,
-0.0022830963134765625,
0.0140838623046875,
0.0224456787109375,
0.021820068359375,
-0.05419921875,
0.0261993408203125,
0.06988525390625,
-0.0389404296875,
-0.01558685302734375,
-0.0061187744140625,
-0.02301025390625,
-0.0239715576171875,
-0.0233154296875,
-0.0030193328857421875,
0.0228729248046875,
-0.01026153564453125,
-0.034637451171875,
0.006710052490234375,
0.024261474609375,
-0.00862884521484375,
-0.020111083984375,
0.004497528076171875,
0.01515960693359375,
-0.0516357421875,
-0.043670654296875,
-0.0304412841796875,
-0.0308837890625,
0.001506805419921875,
-0.043182373046875,
0.0141754150390625,
0.020477294921875,
0.026519775390625,
-0.01473236083984375,
-0.0015344619750976562,
0.0124969482421875,
-0.0233917236328125,
-0.0469970703125,
0.036712646484375,
-0.0201873779296875,
-0.051177978515625,
0.01068115234375,
0.07183837890625,
0.0216217041015625,
0.031219482421875,
-0.00811767578125,
0.03094482421875,
-0.0288848876953125,
-0.002101898193359375,
-0.01192474365234375,
0.032562255859375,
0.01215362548828125,
0.00846099853515625,
-0.0159912109375,
-0.039093017578125,
-0.02569580078125,
0.0286102294921875,
0.043243408203125,
-0.0276947021484375,
-0.033111572265625,
-0.0012083053588867188,
0.0258331298828125,
0.060272216796875,
0.004955291748046875,
-0.022186279296875,
0.03448486328125,
0.04412841796875,
-0.004730224609375,
-0.09185791015625,
-0.034210205078125,
0.05108642578125,
0.0074310302734375,
0.0292510986328125,
-0.03619384765625,
-0.034698486328125,
-0.045013427734375,
-0.07415771484375,
-0.01352691650390625,
0.016632080078125,
-0.032867431640625,
0.050262451171875,
-0.0323486328125,
0.025482177734375,
-0.01001739501953125,
-0.00646209716796875,
0.017822265625,
-0.01178741455078125,
0.038909912109375,
0.039794921875,
-0.02349853515625,
-0.056610107421875,
-0.0516357421875,
0.06427001953125,
-0.0276947021484375,
-0.061004638671875,
0.056793212890625,
-0.00901031494140625,
0.042755126953125,
0.01224517822265625,
0.00460052490234375,
0.045257568359375,
0.032623291015625,
-0.058502197265625,
-0.03460693359375,
0.022735595703125,
0.008392333984375,
-0.03125,
-0.032257080078125,
0.0028362274169921875,
0.025726318359375,
0.0025482177734375,
-0.01611328125,
-0.0188446044921875,
0.012786865234375,
-0.0079498291015625,
-0.04168701171875,
0.003604888916015625,
0.01123809814453125,
-0.0460205078125,
0.02349853515625,
0.0273590087890625,
0.01186370849609375,
-0.03265380859375,
0.006977081298828125,
0.01305389404296875,
-0.03179931640625,
0.01045989990234375,
0.0447998046875,
-0.0008454322814941406,
0.0084381103515625,
-0.004604339599609375,
-0.006046295166015625,
-0.003780364990234375,
0.019195556640625,
0.030426025390625,
-0.00524139404296875,
0.004878997802734375,
-0.00592041015625,
0.06134033203125,
-0.0125885009765625,
0.06524658203125,
0.00616455078125,
0.08367919921875,
0.0298919677734375,
-0.07196044921875,
-0.004970550537109375,
-0.031768798828125,
-0.04168701171875,
-0.031585693359375,
0.07147216796875,
0.019561767578125,
0.0081939697265625,
-0.025299072265625,
-0.000659942626953125,
0.07391357421875,
0.00597381591796875,
0.0141754150390625,
-0.0032863616943359375,
-0.034912109375,
-0.015106201171875,
0.00817108154296875,
0.0217132568359375,
0.026214599609375,
0.01068878173828125,
0.0137786865234375,
0.020965576171875,
-0.04083251953125,
-0.052825927734375,
0.038665771484375,
-0.039581298828125,
0.036651611328125,
-0.037994384765625,
-0.0238037109375,
-0.0036869049072265625,
0.036895751953125,
0.016632080078125,
0.019378662109375,
0.017974853515625,
-0.031585693359375,
0.01226806640625,
0.0175933837890625,
-0.01904296875,
-0.002834320068359375,
0.004047393798828125,
0.00118255615234375,
0.012115478515625,
-0.0487060546875,
0.00618743896484375,
0.00609588623046875,
-0.008453369140625,
-0.0137786865234375,
0.01971435546875,
-0.05609130859375,
-0.0223846435546875,
0.01097869873046875,
0.019683837890625,
-0.018890380859375,
0.0068206787109375,
0.0239410400390625,
-0.007663726806640625,
0.01348114013671875,
0.0063629150390625,
-0.020416259765625,
0.043426513671875,
0.004650115966796875,
-0.03948974609375,
-0.0175933837890625,
-0.028411865234375,
0.04473876953125,
-0.03509521484375,
0.00812530517578125,
0.055511474609375,
-0.0116119384765625,
0.0207977294921875,
-0.0011644363403320312,
-0.0296173095703125,
0.0077056884765625,
0.01454925537109375,
0.0159149169921875,
-0.0283966064453125,
0.006824493408203125,
0.05462646484375,
0.0335693359375,
0.04876708984375,
-0.0188751220703125,
-0.037933349609375,
-0.0159759521484375,
0.030181884765625,
-0.0498046875,
-0.03692626953125,
-0.0166015625,
-0.04632568359375,
-0.02398681640625,
0.002162933349609375,
-0.037109375,
0.0220184326171875,
0.03619384765625,
0.01038360595703125,
-0.03924560546875,
-0.0189208984375,
-0.06732177734375,
-0.074462890625,
-0.061431884765625,
0.036102294921875,
-0.00653839111328125,
0.0128021240234375,
-0.0031070709228515625,
0.0728759765625,
0.014984130859375,
-0.006591796875,
0.0053863525390625,
-0.02178955078125,
0.00742340087890625,
0.02484130859375,
-0.039886474609375,
-0.006771087646484375,
0.0014972686767578125,
0.003086090087890625,
-0.0022735595703125,
-0.0281219482421875,
0.0284576416015625,
-0.021484375,
-0.0193939208984375,
0.01318359375,
-0.0046539306640625,
0.052093505859375,
0.039215087890625,
0.040985107421875,
0.0352783203125,
-0.01006317138671875,
-0.051788330078125,
-0.00669097900390625,
-0.053497314453125,
0.04815673828125,
0.038116455078125,
-0.0113525390625,
-0.000012516975402832031,
0.03643798828125,
-0.01123046875,
0.02301025390625,
-0.0293731689453125,
0.00001239776611328125,
0.042144775390625,
0.00933837890625,
-0.00899505615234375,
0.0174407958984375,
0.05340576171875,
-0.01172637939453125,
0.00818634033203125,
0.01277923583984375,
0.0005121231079101562,
0.0162200927734375,
-0.05572509765625,
-0.0204620361328125,
-0.0321044921875,
0.050140380859375,
-0.00897216796875,
0.01203155517578125,
-0.0229034423828125,
-0.01812744140625,
0.00638580322265625,
0.0753173828125,
-0.0772705078125,
0.0017499923706054688,
0.04241943359375,
0.0135650634765625,
-0.0088348388671875,
-0.00585174560546875,
-0.08367919921875,
-0.01520538330078125,
-0.1224365234375,
0.04412841796875,
-0.005767822265625,
-0.02618408203125,
-0.0223541259765625,
0.005359649658203125,
-0.069580078125,
-0.0390625,
0.0031528472900390625,
0.00455474853515625,
0.0196533203125,
0.0029296875,
-0.018035888671875,
0.011383056640625,
0.013031005859375,
-0.050201416015625,
-0.0297698974609375,
-0.0006122589111328125,
0.01154327392578125,
-0.01416015625,
-0.006801605224609375,
-0.0079803466796875,
-0.00838470458984375,
0.0125732421875,
0.01285552978515625,
-0.01541900634765625,
0.01445770263671875,
-0.01155853271484375,
0.01020050048828125,
0.0369873046875,
0.01514434814453125,
-0.01397705078125,
-0.0122833251953125,
-0.011810302734375,
-0.032012939453125,
0.007511138916015625,
-0.026885986328125,
-0.004192352294921875,
0.0027980804443359375,
-0.0228424072265625,
0.007587432861328125,
-0.0171661376953125,
-0.0230255126953125,
0.0011043548583984375,
-0.03533935546875,
0.03277587890625,
-0.010345458984375,
-0.0170440673828125,
0.033905029296875,
0.004650115966796875,
-0.014373779296875,
0.0006842613220214844,
0.01004791259765625,
0.0229339599609375,
-0.018890380859375,
-0.0175628662109375,
0.01015472412109375,
0.04034423828125,
0.03131103515625,
0.01230621337890625,
-0.0071563720703125,
-0.04876708984375,
0.060821533203125,
0.00499725341796875,
0.000033915042877197266,
0.01482391357421875,
0.0751953125,
-0.01221466064453125,
-0.0302276611328125,
0.01514434814453125,
-0.0303497314453125,
-0.04193115234375,
0.02520751953125,
-0.002468109130859375,
0.00901031494140625,
0.0194244384765625,
-0.0057220458984375,
-0.0224151611328125,
-0.003025054931640625,
-0.0001856088638305664,
0.006778717041015625,
-0.01239013671875,
0.041900634765625,
0.034942626953125,
0.032623291015625,
-0.0023345947265625,
0.008544921875,
0.038238525390625,
-0.007366180419921875,
-0.04443359375,
-0.039215087890625,
-0.01525115966796875,
-0.0011014938354492188,
-0.00888824462890625,
0.00408172607421875,
-0.017181396484375,
-0.0196075439453125,
0.046539306640625,
-0.004364013671875,
-0.055999755859375,
0.007389068603515625,
-0.004375457763671875,
0.047698974609375,
0.00991058349609375,
0.01238250732421875,
0.01361083984375,
0.0161590576171875,
0.01100921630859375,
0.017669677734375,
0.0005130767822265625,
0.035919189453125,
-0.01464080810546875,
-0.007770538330078125,
0.0458984375,
-0.0164642333984375,
-0.033843994140625,
0.057525634765625,
0.058441162109375,
-0.0229034423828125,
-0.034515380859375,
0.047210693359375,
0.047943115234375,
0.002719879150390625,
0.0210418701171875,
0.0013980865478515625,
-0.016815185546875,
-0.01204681396484375,
-0.01399993896484375,
-0.032012939453125,
-0.069580078125,
0.040618896484375,
0.05096435546875,
-0.0013227462768554688,
0.023406982421875,
-0.005340576171875,
0.02276611328125,
-0.031402587890625,
0.048095703125,
0.0235443115234375,
-0.042724609375,
-0.031280517578125,
0.038909912109375,
0.040557861328125,
-0.0008649826049804688,
-0.004474639892578125,
0.0002872943878173828,
0.0012617111206054688,
0.003414154052734375,
0.012054443359375,
-0.04449462890625,
0.0080413818359375,
0.0135955810546875,
0.00811004638671875,
0.0127410888671875,
-0.0008435249328613281,
-0.058685302734375,
-0.043670654296875,
0.0004131793975830078,
-0.006900787353515625,
0.0106353759765625,
-0.058929443359375,
0.009185791015625,
-0.04412841796875,
0.0309600830078125,
-0.06243896484375,
0.011749267578125,
0.041412353515625,
0.042205810546875,
-0.07586669921875,
0.0306549072265625,
-0.025909423828125,
0.002716064453125,
-0.07696533203125,
-0.07733154296875,
-0.034698486328125,
-0.0045166015625,
0.043243408203125,
0.01812744140625,
0.01206207275390625,
-0.058563232421875,
-0.02783203125,
0.00778961181640625,
0.043182373046875,
0.035736083984375,
-0.0026645660400390625,
0.0689697265625,
0.02996826171875,
0.03485107421875,
0.0301971435546875,
0.0340576171875,
-0.01049041748046875,
-0.0211029052734375,
0.010284423828125,
-0.06719970703125,
-0.034393310546875,
-0.0160064697265625,
-0.009002685546875,
0.041046142578125,
-0.0028820037841796875,
-0.008270263671875,
-0.0098419189453125,
0.0148162841796875,
0.0022716522216796875,
-0.0187530517578125,
0.0159454345703125,
0.037322998046875,
0.008453369140625,
-0.0179595947265625,
-0.0165863037109375,
0.0001850128173828125,
0.00928497314453125,
-0.07232666015625,
0.077880859375,
0.0157012939453125,
0.044830322265625,
-0.00896453857421875,
-0.011993408203125,
0.03448486328125,
0.01044464111328125,
-0.041412353515625,
0.0057525634765625,
-0.003787994384765625,
-0.0163421630859375,
0.03875732421875,
0.0028705596923828125,
-0.01111602783203125,
0.00464630126953125,
0.048675537109375,
-0.00981903076171875,
0.007663726806640625,
0.04681396484375,
0.0033550262451171875,
0.024139404296875,
0.064208984375,
0.061309814453125,
-0.1103515625,
-0.00521087646484375,
-0.009765625,
-0.01261138916015625,
0.03131103515625,
-0.00498199462890625,
-0.00005453824996948242,
-0.0219573974609375,
0.01371002197265625,
0.01215362548828125,
-0.0109405517578125,
0.00487518310546875,
-0.007640838623046875,
-0.0134735107421875,
-0.0167236328125,
0.0307769775390625,
0.00540924072265625,
-0.03717041015625,
0.003047943115234375,
0.00916290283203125,
-0.01148223876953125,
0.0011730194091796875,
-0.0073089599609375,
0.014404296875,
-0.043365478515625,
-0.09625244140625,
-0.028350830078125,
-0.01227569580078125,
-0.02911376953125,
0.027618408203125,
0.00826263427734375,
0.0024623870849609375,
0.048095703125,
-0.0185546875,
0.01788330078125,
0.01097869873046875,
-0.050537109375,
-0.01678466796875,
-0.0367431640625,
0.0076751708984375,
0.04180908203125,
-0.06121826171875,
0.0283355712890625,
0.00423431396484375,
-0.0118255615234375,
-0.015869140625,
-0.00888824462890625,
0.049896240234375,
0.003780364990234375,
-0.043243408203125,
0.00835418701171875,
0.02001953125,
-0.01055145263671875,
0.0014867782592773438,
0.03961181640625,
-0.055389404296875,
-0.01537322998046875,
0.0061492919921875,
-0.01529693603515625,
-0.00789642333984375,
-0.0077056884765625,
-0.08184814453125,
0.09259033203125,
0.025177001953125,
0.025726318359375,
-0.02203369140625,
0.0209808349609375,
-0.03375244140625,
0.0019378662109375,
-0.0009675025939941406,
0.01078033447265625,
-0.0203094482421875,
0.01885986328125,
0.025848388671875,
-0.0011968612670898438,
0.0275421142578125,
0.00980377197265625,
-0.0494384765625,
-0.0008702278137207031,
-0.0078125,
0.002429962158203125,
0.01514434814453125,
0.01018524169921875,
0.006687164306640625,
0.031280517578125,
-0.0020885467529296875,
0.029022216796875,
0.0113525390625,
-0.041839599609375,
0.0136871337890625,
-0.041229248046875,
-0.0263824462890625,
0.0279998779296875,
0.014892578125,
0.0426025390625,
-0.006366729736328125,
0.0247344970703125,
-0.006595611572265625,
-0.01384735107421875,
0.032318115234375,
-0.03851318359375,
-0.0090484619140625,
0.043701171875,
0.04803466796875,
-0.0770263671875,
-0.0005064010620117188,
-0.036590576171875,
0.051971435546875,
0.00514984130859375,
0.02947998046875,
0.060577392578125,
0.0193634033203125,
0.0748291015625,
0.0159454345703125,
0.0268096923828125,
-0.00215911865234375,
0.0201416015625,
-0.0204925537109375,
-0.0084991455078125,
0.00414276123046875,
-0.015472412109375,
0.0433349609375,
0.021942138671875,
-0.01407623291015625,
-0.02337646484375,
0.01345062255859375,
0.020233154296875,
0.016387939453125,
-0.004955291748046875,
-0.074951171875,
-0.0281524658203125,
0.0225372314453125,
0.053741455078125,
-0.0413818359375,
0.0031642913818359375,
0.041900634765625,
0.0267333984375,
-0.002223968505859375,
-0.01131439208984375,
-0.0266265869140625,
-0.003936767578125,
-0.047760009765625,
0.00940704345703125,
-0.0006618499755859375,
0.057952880859375,
0.0478515625,
0.017608642578125,
-0.0031299591064453125,
-0.026397705078125,
0.0274505615234375,
-0.039337158203125,
0.03546142578125,
-0.0380859375,
-0.0103759765625,
0.006069183349609375,
0.03167724609375,
0.0147552490234375,
0.025787353515625,
0.0205078125,
0.01311492919921875,
0.019317626953125,
0.0257415771484375,
0.01123046875,
-0.004131317138671875,
-0.01251220703125,
0.016876220703125,
0.005062103271484375,
-0.025238037109375,
0.004985809326171875,
-0.02642822265625,
0.0010442733764648438,
-0.0066375732421875,
0.0306854248046875,
-0.0214385986328125,
0.0279693603515625,
0.0096893310546875,
-0.0231781005859375,
-0.0014553070068359375,
-0.0035381317138671875,
0.051849365234375,
0.021148681640625,
-0.00934600830078125,
-0.007965087890625,
0.00799560546875,
-0.0263824462890625,
-0.0222015380859375,
0.0236663818359375,
-0.0185394287109375,
0.02276611328125,
0.0249176025390625,
0.024658203125,
-0.02886962890625,
-0.0147857666015625,
0.014923095703125,
-0.005290985107421875,
0.037109375,
0.019866943359375,
-0.049652099609375,
-0.033966064453125,
-0.018951416015625,
0.037384033203125,
-0.0084686279296875,
0.0572509765625,
-0.0169677734375,
0.030609130859375,
-0.04205322265625,
0.01690673828125,
-0.03204345703125,
-0.035064697265625,
0.051483154296875,
0.008270263671875,
0.0028171539306640625,
-0.004486083984375,
-0.040863037109375,
0.00437164306640625,
0.037353515625,
-0.04638671875,
0.0150604248046875,
0.0299224853515625,
0.01277923583984375,
-0.03277587890625,
-0.029571533203125,
-0.031494140625,
-0.019866943359375,
-0.0171356201171875,
-0.010009765625,
0.0214385986328125,
-0.002197265625,
-0.0310516357421875,
0.00818634033203125,
0.00789642333984375,
-0.0259552001953125,
0.0229949951171875,
-0.0372314453125,
0.031402587890625,
0.0242767333984375,
0.0251617431640625,
-0.032928466796875,
-0.0562744140625,
-0.0261383056640625,
0.031707763671875,
-0.017822265625,
0.0153656005859375,
-0.021636962890625,
0.0276947021484375,
-0.009735107421875,
0.01532745361328125,
0.0020751953125,
-0.0263519287109375,
0.0024738311767578125,
0.007427215576171875,
-0.03289794921875,
-0.00012803077697753906,
-0.0313720703125,
-0.033966064453125,
-0.020904541015625,
0.015472412109375,
0.02362060546875,
0.0157623291015625,
-0.0119781494140625,
-0.04327392578125,
-0.0226287841796875,
0.000202178955078125,
-0.0192108154296875,
-0.0118408203125,
0.0094146728515625,
-0.01352691650390625,
0.0169677734375,
-0.05169677734375,
0.0589599609375,
0.0194549560546875,
0.044281005859375,
-0.0174102783203125,
0.007404327392578125,
0.0249176025390625,
0.0196075439453125,
0.04681396484375,
0.0120849609375,
0.03997802734375,
-0.01355743408203125,
-0.0137939453125,
-0.01006317138671875,
-0.0002034902572631836,
0.038116455078125,
-0.0280303955078125,
-0.0247039794921875,
-0.023162841796875,
-0.013427734375,
-0.0012350082397460938,
0.0259552001953125,
0.03363037109375,
0.0007472038269042969,
-0.07879638671875,
0.0103607177734375,
-0.03594970703125,
-0.01617431640625,
-0.045166015625,
-0.078369140625,
0.07757568359375,
0.002368927001953125,
-0.0274505615234375,
-0.035736083984375,
-0.01273345947265625,
-0.024932861328125,
0.061614990234375,
0.0017337799072265625,
-0.0391845703125,
-0.0110321044921875,
0.045379638671875,
-0.0025348663330078125,
0.019989013671875,
-0.00020015239715576172,
0.0168304443359375,
-0.0933837890625,
-0.022735595703125,
-0.0572509765625,
-0.01727294921875,
-0.0027065277099609375,
0.006317138671875,
0.0012254714965820312,
0.0156707763671875,
-0.028106689453125,
-0.060699462890625,
0.0014085769653320312,
0.00934600830078125,
0.02581787109375,
-0.007183074951171875,
-0.033294677734375,
-0.036468505859375,
0.058929443359375,
-0.01202392578125,
0.020751953125,
0.016021728515625,
-0.009918212890625,
-0.007534027099609375,
-0.015777587890625,
-0.0153350830078125,
0.021636962890625,
-0.07342529296875,
-0.02520751953125,
0.013214111328125,
-0.0034503936767578125,
-0.00724029541015625,
0.0250701904296875,
-0.029052734375,
-0.0258941650390625,
0.0021038055419921875,
-0.0061492919921875,
-0.0545654296875,
0.02703857421875,
0.0447998046875,
-0.037017822265625,
-0.0192413330078125,
-0.00716400146484375,
-0.01114654541015625,
0.007965087890625,
-0.021759033203125,
-0.032684326171875,
-0.0848388671875,
0.01099395751953125,
0.046295166015625,
-0.03509521484375,
0.06878662109375,
-0.0273284912109375,
-0.0138092041015625,
-0.058074951171875,
-0.01009368896484375,
0.0257568359375,
-0.0170440673828125,
-0.03533935546875,
0.00995635986328125,
0.049530029296875,
0.01593017578125,
-0.0264129638671875,
0.0986328125,
-0.00235748291015625,
0.0237274169921875,
0.01439666748046875,
0.0035305023193359375,
0.06256103515625,
-0.005664825439453125,
-0.01273345947265625,
-0.0029754638671875,
-0.0232696533203125,
-0.0950927734375,
0.05029296875,
-0.0015230178833007812,
0.029937744140625,
0.039947509765625
]
|
de1d455730c8d18a1ee1394aedb3921283ee6105 | Wordpress Stackexchange
Q: What is a good way to pass a variable from add_action to a Theme? Inside functions.php:
add_action('init','my_action');
function my_action() {
if($dontknow) {
$passme = "yes";
} else {
$passme = "no";
}
}
Inside index.php of the current theme:
echo $passme;
Is there a global to use for this purpose? Shall I use add_option (this is not a good idea for each request I guess)? Shall I use a custom global variable?
Is there a better / usual / standard way to do this?
A: It really depends on the use case. Anything that writes to the DB is probably overkill. Globals are messy. You could set a constant. You could turn the function into a class method, and create an additional method to return the variable. You could only check $passme when it's needed, instead of init.
| Q: What is a good way to pass a variable from add_action to a Theme? Inside functions.php:
add_action('init','my_action');
function my_action() {
if($dontknow) {
$passme = "yes";
} else {
$passme = "no";
}
}
Inside index.php of the current theme:
echo $passme;
Is there a global to use for this purpose? Shall I use add_option (this is not a good idea for each request I guess)? Shall I use a custom global variable?
Is there a better / usual / standard way to do this?
A: It really depends on the use case. Anything that writes to the DB is probably overkill. Globals are messy. You could set a constant. You could turn the function into a class method, and create an additional method to return the variable. You could only check $passme when it's needed, instead of init.
A: Use an object to keep the value of the variable and a custom action to print it out.
In your theme’s functions.php, create a class, or better: move the class to a separate file.
class PassCheck
{
private $passed = 'no';
public function check()
{
if ( is_user_logged_in() )
$this->passed = 'yes';
}
public function print_pass()
{
echo $this->passed;
}
}
Then register the callbacks:
$passcheck = new PassCheck;
add_action( 'init', [ $passcheck, 'check' ] );
add_action( 'print_pass', [ $passcheck, 'print_pass' ] );
And in your template just call the proper action:
do_action( 'print_pass' );
This way, the template has no static dependency on the class: if you ever decide to remove the class or to register a completely different callback for that action, the theme will not break.
You can also move the check() callback to another action (like wp_loaded) or separate it out into another class later.
As a rule of thumb: templates (views) should be decoupled from business logic as much as possible. They shouldn't know class or function names. This isn't completely possible in WordPress’ architecture, but still a good regulative idea.
A: Without more details it hard to judge, but it feels like you have written my_action wrong, and it tries to do too many things.
The init hook should be used just for initializing whatever you need, you should not precompute values in it. This should be done only when the need arises.
You should just have a function called print_pass and call it wherever you need it.
Doing too much on the init hook violates the principal of delaying code execution as much as possible. In this case the init hook will execute your passme logic even when handling admin in which that value is not needed.
As for @toshco's answer, yes if you have some logic that might be better described with objects then print_pass should probably be a method in the class, but the wordpress hook system is functional in nature, and there is no need to go OOP when functional approach will be good enough. Functional is just more readable in the way the wordpress hook system works.
A: Though you are asking about global variables, I think it worth adding that if you are just checking and setting this value once (as it seems like you might be) and it is not going to change later, it actually may make more sense just to use a constant instead of using a variable at all.
if ( ($thischeck) && ($thatcheck) ) {$dontknow = true;} else {$dontknow = false;}
define('DONTKNOW',$dontknow);
add_action('init','my_action');
function my_action() {
if (DONTKNOW) {$passme = "yes";}
else {$passme = "no";}
}
Because really, a 'static variable' is a basically a constant anyway.
| wordpress | {
"language": "en",
"length": 594,
"provenance": "stackexchange_00019.jsonl.gz:464000",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/220907"
} | [
0.045654296875,
-0.0304412841796875,
-0.0204315185546875,
-0.045379638671875,
-0.0005059242248535156,
-0.036163330078125,
0.04791259765625,
0.0199432373046875,
0.025115966796875,
0.0026378631591796875,
0.003826141357421875,
0.016021728515625,
-0.0258636474609375,
-0.031524658203125,
-0.007373809814453125,
-0.0003955364227294922,
0.039794921875,
-0.002826690673828125,
0.0738525390625,
0.0178985595703125,
0.0080108642578125,
0.043701171875,
0.0474853515625,
-0.0033321380615234375,
0.04461669921875,
0.0008859634399414062,
0.029144287109375,
-0.0059051513671875,
0.038787841796875,
0.013641357421875,
0.03302001953125,
-0.062255859375,
0.017303466796875,
-0.00102996826171875,
0.0271759033203125,
0.03192138671875,
-0.00030303001403808594,
0.0120849609375,
0.02215576171875,
0.02227783203125,
0.053497314453125,
-0.039398193359375,
-0.0223236083984375,
0.0153045654296875,
-0.0007152557373046875,
-0.055633544921875,
0.08282470703125,
-0.01390838623046875,
-0.0391845703125,
-0.0164031982421875,
0.01727294921875,
0.040863037109375,
0.04119873046875,
0.01474761962890625,
0.0179901123046875,
0.03204345703125,
-0.028411865234375,
-0.004512786865234375,
0.041290283203125,
0.044586181640625,
-0.01934814453125,
-0.0377197265625,
0.0071868896484375,
-0.071533203125,
0.045013427734375,
0.014862060546875,
-0.0268096923828125,
0.025787353515625,
-0.03173828125,
0.060302734375,
0.03302001953125,
-0.057342529296875,
-0.0169677734375,
-0.0206756591796875,
-0.01110076904296875,
0.003192901611328125,
0.0191497802734375,
-0.0145721435546875,
-0.0087738037109375,
0.0093536376953125,
-0.04144287109375,
-0.0020542144775390625,
-0.023895263671875,
-0.0185699462890625,
-0.01654052734375,
-0.00601959228515625,
-0.03009033203125,
0.01049041748046875,
-0.0111541748046875,
-0.059356689453125,
-0.0265655517578125,
-0.001712799072265625,
-0.0224609375,
-0.0284881591796875,
-0.0306243896484375,
-0.026153564453125,
0.018768310546875,
0.02752685546875,
0.030792236328125,
0.03863525390625,
0.01010894775390625,
-0.051116943359375,
0.04571533203125,
-0.043426513671875,
-0.01059722900390625,
0.078125,
0.0296783447265625,
0.031280517578125,
-0.005207061767578125,
-0.0043182373046875,
0.00969696044921875,
-0.046966552734375,
-0.00244903564453125,
-0.005252838134765625,
0.004032135009765625,
-0.0178985595703125,
-0.044097900390625,
0.0384521484375,
-0.002971649169921875,
0.0206298828125,
-0.031341552734375,
-0.028778076171875,
0.007434844970703125,
0.04351806640625,
-0.007770538330078125,
-0.026885986328125,
-0.0176544189453125,
0.0139617919921875,
0.0068817138671875,
0.037933349609375,
-0.0460205078125,
0.0257568359375,
0.07489013671875,
-0.006847381591796875,
-0.0274505615234375,
-0.041015625,
0.0295257568359375,
0.003612518310546875,
0.0270843505859375,
-0.0038852691650390625,
-0.010467529296875,
-0.037384033203125,
-0.01078033447265625,
-0.0003712177276611328,
0.00018393993377685547,
0.037445068359375,
0.0029449462890625,
0.0100250244140625,
-0.00679779052734375,
-0.05322265625,
0.06634521484375,
-0.10009765625,
-0.004238128662109375,
0.039459228515625,
-0.0013647079467773438,
0.0654296875,
-0.02032470703125,
0.03369140625,
-0.0168609619140625,
0.045745849609375,
-0.0124969482421875,
-0.00638580322265625,
0.00682830810546875,
-0.0005097389221191406,
-0.0340576171875,
-0.012115478515625,
0.02862548828125,
-0.0007314682006835938,
0.00424957275390625,
0.00937652587890625,
-0.020050048828125,
0.031341552734375,
0.037628173828125,
-0.0006275177001953125,
-0.0156097412109375,
-0.005523681640625,
-0.0145263671875,
0.019622802734375,
0.042205810546875,
-0.0306243896484375,
-0.0153045654296875,
-0.02935791015625,
0.0679931640625,
-0.0069732666015625,
-0.041839599609375,
0.03436279296875,
-0.01556396484375,
-0.005950927734375,
0.01413726806640625,
-0.007114410400390625,
0.02593994140625,
0.0255279541015625,
-0.0504150390625,
-0.0024509429931640625,
-0.0171966552734375,
-0.0029277801513671875,
0.0249786376953125,
0.0020580291748046875,
-0.005889892578125,
0.023345947265625,
0.041351318359375,
-0.0015211105346679688,
0.03704833984375,
-0.0185699462890625,
0.027191162109375,
-0.00612640380859375,
0.0168914794921875,
0.00469970703125,
-0.0299835205078125,
-0.0016508102416992188,
0.02850341796875,
0.006481170654296875,
-0.020355224609375,
-0.034210205078125,
-0.0108489990234375,
0.033599853515625,
-0.0216064453125,
0.0157470703125,
0.007843017578125,
0.00865936279296875,
0.03546142578125,
-0.0176849365234375,
0.0120849609375,
0.004924774169921875,
0.0122528076171875,
-0.00493621826171875,
-0.0273284912109375,
-0.01300811767578125,
-0.04296875,
0.0147857666015625,
-0.0694580078125,
0.050811767578125,
-0.01444244384765625,
0.00006777048110961914,
-0.018890380859375,
-0.0269775390625,
-0.03369140625,
-0.0826416015625,
0.00423431396484375,
0.055938720703125,
0.038299560546875,
0.01512908935546875,
0.004657745361328125,
-0.004482269287109375,
0.066162109375,
-0.0278167724609375,
0.0035037994384765625,
-0.0036449432373046875,
-0.01493072509765625,
0.00661468505859375,
-0.03741455078125,
-0.0164031982421875,
0.0235595703125,
-0.0902099609375,
-0.024505615234375,
0.05108642578125,
-0.02593994140625,
-0.03753662109375,
-0.00811767578125,
-0.01372528076171875,
0.018035888671875,
-0.0238800048828125,
-0.03546142578125,
0.00434112548828125,
0.025848388671875,
-0.03497314453125,
-0.025604248046875,
-0.04864501953125,
-0.0200653076171875,
0.003810882568359375,
0.045928955078125,
-0.05206298828125,
-0.01837158203125,
0.0093994140625,
0.04229736328125,
-0.0361328125,
-0.0155487060546875,
0.0013933181762695312,
-0.036468505859375,
-0.00785064697265625,
-0.0173492431640625,
0.0254058837890625,
-0.02099609375,
-0.0184173583984375,
0.00930023193359375,
0.00910186767578125,
0.007411956787109375,
-0.02392578125,
0.05560302734375,
0.007038116455078125,
0.051177978515625,
-0.0282745361328125,
-0.0439453125,
0.045257568359375,
-0.014862060546875,
-0.06939697265625,
0.01220703125,
0.01233673095703125,
0.0223388671875,
-0.01739501953125,
0.006160736083984375,
0.032806396484375,
-0.030853271484375,
0.0156402587890625,
-0.0097808837890625,
-0.0179595947265625,
-0.0136260986328125,
-0.0026836395263671875,
-0.0111083984375,
-0.04510498046875,
-0.0210723876953125,
-0.0016679763793945312,
0.0278778076171875,
0.0129241943359375,
0.0330810546875,
-0.034454345703125,
0.0016202926635742188,
0.018157958984375,
-0.04901123046875,
-0.0204010009765625,
0.031494140625,
-0.08648681640625,
0.019287109375,
-0.0210723876953125,
-0.051177978515625,
-0.037109375,
0.032684326171875,
-0.0008511543273925781,
0.0145263671875,
-0.026641845703125,
-0.029937744140625,
-0.04052734375,
-0.0458984375,
-0.01049041748046875,
0.0178375244140625,
0.0125274658203125,
-0.021697998046875,
0.1016845703125,
0.0035858154296875,
-0.023468017578125,
0.01085662841796875,
-0.04986572265625,
0.0222320556640625,
0.0184173583984375,
0.01806640625,
-0.05316162109375,
-0.017425537109375,
0.007709503173828125,
0.046630859375,
-0.01485443115234375,
0.0037708282470703125,
-0.0184326171875,
-0.005207061767578125,
0.035369873046875,
0.01239013671875,
0.05914306640625,
0.021148681640625,
-0.0195159912109375,
0.00698089599609375,
-0.05755615234375,
-0.0163726806640625,
0.01165008544921875,
-0.031036376953125,
0.0088348388671875,
0.05010986328125,
-0.03216552734375,
0.0016803741455078125,
-0.0220184326171875,
-0.021697998046875,
0.004547119140625,
-0.0070037841796875,
-0.0036907196044921875,
0.0099639892578125,
-0.02056884765625,
-0.01261138916015625,
0.0159912109375,
0.0030994415283203125,
-0.02691650390625,
0.026153564453125,
0.0017499923706054688,
0.00213623046875,
-0.0096893310546875,
0.0117645263671875,
-0.019012451171875,
-0.022186279296875,
0.0204620361328125,
0.0119781494140625,
0.038909912109375,
-0.00418853759765625,
-0.0159454345703125,
0.02569580078125,
0.05938720703125,
-0.041046142578125,
-0.0250091552734375,
0.0230560302734375,
0.033203125,
-0.0545654296875,
-0.046539306640625,
-0.0238037109375,
-0.012054443359375,
-0.033050537109375,
-0.0293731689453125,
-0.017181396484375,
-0.01116943359375,
-0.01441192626953125,
0.00041985511779785156,
-0.0209197998046875,
-0.03680419921875,
0.0372314453125,
-0.04248046875,
0.0197601318359375,
-0.00434112548828125,
-0.01947021484375,
-0.01715087890625,
-0.01873779296875,
-0.033721923828125,
-0.039093017578125,
-0.011322021484375,
-0.04559326171875,
0.06146240234375,
0.046356201171875,
-0.056488037109375,
-0.005321502685546875,
0.0233306884765625,
-0.0046234130859375,
0.0240936279296875,
0.00954437255859375,
0.01479339599609375,
0.00399017333984375,
-0.0289154052734375,
-0.00647735595703125,
-0.03350830078125,
-0.037445068359375,
0.012115478515625,
-0.0250091552734375,
-0.0163726806640625,
-0.00234222412109375,
-0.08514404296875,
0.04083251953125,
-0.02679443359375,
-0.0416259765625,
-0.0288543701171875,
0.0175933837890625,
0.01141357421875,
-0.00684356689453125,
0.02099609375,
-0.0276947021484375,
-0.02850341796875,
0.01136016845703125,
-0.0164031982421875,
-0.0008320808410644531,
-0.00152587890625,
0.062255859375,
0.0277099609375,
-0.0133209228515625,
0.04010009765625,
0.00670623779296875,
0.0279998779296875,
-0.0193939208984375,
0.00738525390625,
-0.01324462890625,
-0.01312255859375,
0.0100250244140625,
-0.0177459716796875,
-0.0037631988525390625,
-0.034576416015625,
0.0462646484375,
0.0280609130859375,
0.01030731201171875,
-0.01097869873046875,
0.0176849365234375,
0.02886962890625,
-0.02618408203125,
-0.056121826171875,
0.0010557174682617188,
-0.040252685546875,
0.037078857421875,
-0.0279693603515625,
0.08648681640625,
-0.033966064453125,
-0.0118408203125,
0.007450103759765625,
-0.0240478515625,
0.01220703125,
0.02301025390625,
-0.004878997802734375,
-0.00980377197265625,
-0.03533935546875,
0.0277099609375,
0.0248565673828125,
0.004261016845703125,
-0.0212860107421875,
0.048065185546875,
0.00725555419921875,
0.00811004638671875,
0.01384735107421875,
-0.013763427734375,
0.034881591796875,
-0.005878448486328125,
-0.0276031494140625,
-0.04083251953125,
0.011993408203125,
0.0654296875,
0.01459503173828125,
0.0265655517578125,
0.038665771484375,
-0.0086517333984375,
-0.011566162109375,
0.024383544921875,
0.0079498291015625,
-0.0064849853515625,
-0.014434814453125,
0.03900146484375,
-0.00777435302734375,
-0.0019969940185546875,
0.0268096923828125,
0.0167388916015625,
-0.0146942138671875,
0.0200042724609375,
-0.00899505615234375,
-0.011627197265625,
0.0236663818359375,
0.0194854736328125,
0.045013427734375,
-0.0384521484375,
-0.0183563232421875,
0.0244293212890625,
0.0213775634765625,
-0.016143798828125,
-0.001758575439453125,
0.02777099609375,
0.007030487060546875,
-0.004039764404296875,
-0.004360198974609375,
0.00946807861328125,
0.0005335807800292969,
-0.01428985595703125,
0.01483917236328125,
0.0015497207641601562,
-0.02825927734375,
-0.01277923583984375,
0.001522064208984375,
0.0175628662109375,
-0.01316070556640625,
0.038482666015625,
-0.0266876220703125,
0.01090240478515625,
0.0119781494140625,
-0.01206207275390625,
0.0318603515625,
-0.050872802734375,
-0.055755615234375,
0.00017261505126953125,
0.00887298583984375,
-0.0231475830078125,
-0.0199127197265625,
-0.04931640625,
0.0108642578125,
-0.01360321044921875,
0.031829833984375,
-0.01163482666015625,
-0.005584716796875,
0.00609588623046875,
-0.02044677734375,
-0.003017425537109375,
-0.0028858184814453125,
0.0667724609375,
0.01068878173828125,
-0.042449951171875,
0.002620697021484375,
-0.029998779296875,
-0.00986480712890625,
-0.047210693359375,
-0.04559326171875,
-0.053375244140625,
-0.0030574798583984375,
-0.046173095703125,
0.0032825469970703125,
-0.032684326171875,
0.0207672119140625,
0.0007109642028808594,
0.039703369140625,
0.010162353515625,
0.0258026123046875,
0.033660888671875,
0.037353515625,
-0.00931549072265625,
0.0005998611450195312,
0.037261962890625,
0.0277862548828125,
-0.020660400390625,
-0.0165863037109375,
0.0028858184814453125,
0.00910186767578125,
-0.0010728836059570312,
-0.0030155181884765625,
0.029266357421875,
-0.0181121826171875,
0.038970947265625,
-0.0183258056640625,
0.00804901123046875,
-0.004093170166015625,
0.0117034912109375,
-0.009613037109375,
-0.0033416748046875,
-0.006439208984375,
-0.01305389404296875,
0.03173828125,
-0.033172607421875,
-0.048370361328125,
-0.0163116455078125,
0.01253509521484375,
0.042999267578125,
-0.01337432861328125,
0.0029392242431640625,
-0.01522064208984375,
-0.07073974609375,
0.070556640625,
0.1279296875,
0.031402587890625,
0.091796875,
-0.022247314453125,
0.02679443359375,
0.070556640625,
0.0217132568359375,
-0.0408935546875,
-0.0345458984375,
0.0275726318359375,
0.01407623291015625,
-0.0156402587890625,
0.01629638671875,
-0.01425933837890625,
0.05462646484375,
0.057281494140625,
0.09149169921875,
-0.10015869140625,
0.024017333984375,
0.0204925537109375,
-0.0202484130859375,
0.01800537109375,
-0.000004470348358154297,
-0.01297760009765625,
-0.026092529296875,
0.035797119140625,
-0.010467529296875,
-0.0209808349609375,
0.022674560546875,
0.006984710693359375,
-0.003376007080078125,
0.00041937828063964844,
-0.0161590576171875,
-0.0010280609130859375,
-0.006191253662109375,
0.01192474365234375,
0.0246734619140625,
0.01163482666015625,
-0.033233642578125,
0.0210723876953125,
-0.0272369384765625,
-0.01125335693359375,
-0.052215576171875,
-0.013763427734375,
-0.0035800933837890625,
-0.0086517333984375,
-0.0250396728515625,
0.004360198974609375,
0.0242767333984375,
0.0256195068359375,
-0.006710052490234375,
-0.005947113037109375,
0.004180908203125,
0.00928497314453125,
-0.0118255615234375,
-0.020294189453125,
0.01168060302734375,
0.044647216796875,
-0.0276947021484375,
0.021209716796875,
-0.004489898681640625,
-0.021240234375,
-0.003997802734375,
-0.0122222900390625,
0.068359375,
-0.057464599609375,
-0.0100860595703125,
0.00858306884765625,
-0.02642822265625,
0.01332855224609375,
0.022125244140625,
0.038818359375,
-0.0194549560546875,
-0.0200653076171875,
0.0298919677734375,
-0.037994384765625,
-0.010589599609375,
0.037994384765625,
-0.036712646484375,
0.0888671875,
0.0096282958984375,
-0.0155181884765625,
-0.026336669921875,
0.06475830078125,
-0.01043701171875,
0.04559326171875,
-0.048675537109375,
0.06610107421875,
0.0301513671875,
0.039276123046875,
-0.01456451416015625,
0.01102447509765625,
0.0277862548828125,
-0.01059722900390625,
0.06329345703125,
0.00962066650390625,
0.00383758544921875,
-0.004791259765625,
0.03460693359375,
0.0199127197265625,
-0.0281524658203125,
0.011749267578125,
0.041534423828125,
-0.0006732940673828125,
0.05792236328125,
-0.007312774658203125,
0.037872314453125,
-0.0304412841796875,
0.03936767578125,
0.06378173828125,
-0.042236328125,
-0.09027099609375,
-0.01378631591796875,
0.0088348388671875,
-0.06475830078125,
0.006748199462890625,
0.0023403167724609375,
0.0246734619140625,
-0.01357269287109375,
0.04705810546875,
-0.0228271484375,
0.004749298095703125,
-0.034332275390625,
-0.005706787109375,
0.018829345703125,
-0.032867431640625,
0.0106048583984375,
0.053253173828125,
0.014739990234375,
0.002201080322265625,
0.0124664306640625,
0.01263427734375,
0.006298065185546875,
0.01363372802734375,
0.06573486328125,
0.037506103515625,
0.034698486328125,
-0.032470703125,
-0.0119781494140625,
0.0484619140625,
0.08642578125,
-0.042388916015625,
0.00800323486328125,
0.00447845458984375,
0.026031494140625,
0.00862884521484375,
-0.01303863525390625,
0.03533935546875,
0.01398468017578125,
0.0294647216796875,
-0.04296875,
0.033355712890625,
0.0307159423828125,
-0.005374908447265625,
-0.006481170654296875,
0.04632568359375,
-0.05047607421875,
0.044708251953125,
-0.06597900390625,
0.0121917724609375,
0.0216217041015625,
0.0623779296875,
0.022216796875,
0.051239013671875,
-0.0007872581481933594,
-0.0274200439453125,
-0.041412353515625,
0.026519775390625,
0.0166473388671875,
0.023223876953125,
-0.0635986328125,
-0.006137847900390625,
0.0206451416015625,
0.03643798828125,
-0.00844573974609375,
0.04693603515625,
0.0262298583984375,
0.043914794921875,
0.02789306640625,
-0.003997802734375,
0.0274810791015625,
-0.0215606689453125,
0.034576416015625,
-0.03759765625,
-0.002948760986328125,
-0.0416259765625,
-0.0282440185546875,
-0.021209716796875,
0.01181793212890625,
-0.00368499755859375,
-0.006572723388671875,
-0.0004620552062988281,
-0.0018301010131835938,
-0.05218505859375,
0.011566162109375,
-0.004222869873046875,
0.08905029296875,
0.0194244384765625,
-0.006267547607421875,
0.002437591552734375,
-0.00986480712890625,
-0.04534912109375,
0.01280975341796875,
0.03802490234375,
-0.01377105712890625,
0.0165557861328125,
0.0340576171875,
0.004489898681640625,
-0.0057830810546875,
0.03546142578125,
-0.0310516357421875,
0.00913238525390625,
0.0721435546875,
0.0135345458984375,
0.01043701171875,
-0.007259368896484375,
-0.002643585205078125,
0.052276611328125,
0.042022705078125,
-0.019134521484375,
-0.00943756103515625,
0.0616455078125,
-0.00396728515625,
0.04376220703125,
-0.00975799560546875,
0.0125579833984375,
0.033782958984375,
0.050384521484375,
0.0139617919921875,
-0.039947509765625,
-0.0328369140625,
0.03948974609375,
0.0008130073547363281,
-0.0311431884765625,
0.007419586181640625,
0.0023326873779296875,
0.01605224609375,
0.006072998046875,
0.0760498046875,
0.015899658203125,
-0.03692626953125,
-0.0262603759765625,
0.0200042724609375,
0.02252197265625,
0.058563232421875,
-0.027191162109375,
0.0052490234375,
-0.003711700439453125,
0.0268096923828125,
0.004627227783203125,
0.050323486328125,
-0.0457763671875,
0.007732391357421875,
-0.0309906005859375,
-0.0201568603515625,
-0.004222869873046875,
-0.028076171875,
0.034149169921875,
-0.0138092041015625,
0.03985595703125,
0.004894256591796875,
-0.007781982421875,
-0.0005311965942382812,
0.026947021484375,
0.0802001953125,
0.03338623046875,
0.02105712890625,
-0.01108551025390625,
0.01123809814453125,
-0.0140380859375,
-0.035675048828125,
-0.03802490234375,
-0.045745849609375,
0.007694244384765625,
0.0229034423828125,
-0.027618408203125,
-0.0293731689453125,
-0.054046630859375,
0.032867431640625,
0.043121337890625,
-0.00981903076171875,
-0.034454345703125,
0.000036656856536865234,
-0.0290679931640625,
0.055633544921875,
-0.001377105712890625,
-0.006378173828125,
0.0005259513854980469,
0.005199432373046875,
-0.05413818359375,
-0.01776123046875,
-0.031982421875,
-0.0019159317016601562,
-0.0219268798828125,
0.015899658203125,
0.04901123046875,
-0.003253936767578125,
-0.01161956787109375,
0.0173797607421875,
0.005702972412109375,
0.060760498046875,
-0.082763671875,
-0.036651611328125,
0.0296630859375,
-0.0195159912109375,
-0.0227813720703125,
-0.050628662109375,
0.01197052001953125,
-0.07098388671875,
0.0081634521484375,
-0.01128387451171875,
-0.0195770263671875,
0.003032684326171875,
-0.0498046875,
-0.08245849609375,
0.031494140625,
-0.0027179718017578125,
-0.047943115234375,
-0.040252685546875,
-0.00698089599609375,
0.004985809326171875,
0.0014429092407226562,
-0.011322021484375,
-0.0309295654296875,
-0.044525146484375,
0.0234222412109375,
0.004913330078125,
0.0185546875,
0.012542724609375,
0.0197906494140625,
-0.029541015625,
0.002399444580078125,
-0.0035991668701171875,
-0.045654296875,
0.020965576171875,
-0.0218048095703125,
0.04571533203125,
0.04742431640625,
-0.025848388671875,
0.01302337646484375,
-0.0011529922485351562,
-0.012176513671875,
-0.007656097412109375,
-0.039459228515625,
-0.0080718994140625,
-0.0085601806640625,
0.050567626953125,
0.0240325927734375,
0.00830078125,
-0.0167694091796875,
0.033416748046875,
0.0016050338745117188,
-0.06787109375,
0.01445770263671875,
0.031341552734375,
-0.0413818359375,
-0.0175018310546875,
0.007293701171875,
0.005096435546875,
0.0094451904296875,
0.006626129150390625,
-0.0074462890625,
-0.0005202293395996094,
0.049163818359375,
0.01097869873046875,
-0.047332763671875,
-0.07061767578125,
0.061370849609375,
-0.031585693359375,
0.005161285400390625,
0.0219879150390625,
0.03729248046875,
0.0216217041015625,
0.0589599609375,
0.0158538818359375,
0.04669189453125,
-0.06427001953125,
-0.0172882080078125,
0.005096435546875,
0.0372314453125,
-0.030731201171875,
-0.035430908203125,
-0.0204620361328125,
0.0245819091796875,
-0.0175933837890625,
0.02862548828125,
-0.002410888671875,
0.021575927734375,
0.00830841064453125,
0.06048583984375,
-0.039703369140625,
0.01934814453125,
-0.01812744140625,
0.0022735595703125,
-0.01009368896484375,
0.020477294921875,
0.057525634765625,
-0.060333251953125,
-0.0005674362182617188,
0.004695892333984375,
0.017242431640625,
-0.05352783203125,
0.03570556640625,
-0.0109100341796875,
0.019439697265625,
0.035308837890625
]
|
a13e6a44b457a07edad5ef8c88f6ddaecf43ba7c | Wordpress Stackexchange
Q: Create a table in custom plugin on the activating it? I'm trying to create a custom plugin where I want create a table when the plugin gets activated. I have tried the following code but it is not creating the table in the database
function create_plugin_database_table() {
global $wpdb;
$table_name = $wpdb->prefix . 'sandbox';
$sql = "CREATE TABLE $table_name (
id mediumint(9) unsigned NOT NULL AUTO_INCREMENT,
title varchar(50) NOT NULL,
structure longtext NOT NULL,
author longtext NOT NULL,
PRIMARY KEY (id)
);";
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
dbDelta( $sql );
}
register_activation_hook( __FILE__, 'create_plugin_database_table' );
A: This code works for me :
function installer(){
include('installer.php');
}
register_activation_hook(__file__, 'installer');
Then installer.php :
global $wpdb;
$table_name = $wpdb->prefix . "my_products";
$my_products_db_version = '1.0.0';
$charset_collate = $wpdb->get_charset_collate();
if ( $wpdb->get_var("SHOW TABLES LIKE '{$table_name}'") != $table_name ) {
$sql = "CREATE TABLE $table_name (
ID mediumint(9) NOT NULL AUTO_INCREMENT,
`product-model` text NOT NULL,
`product-name` text NOT NULL,
`product-description` int(9) NOT NULL,
PRIMARY KEY (ID)
) $charset_collate;";
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
dbDelta($sql);
add_option('my_db_version', $my_products_db_version);
}
| Q: Create a table in custom plugin on the activating it? I'm trying to create a custom plugin where I want create a table when the plugin gets activated. I have tried the following code but it is not creating the table in the database
function create_plugin_database_table() {
global $wpdb;
$table_name = $wpdb->prefix . 'sandbox';
$sql = "CREATE TABLE $table_name (
id mediumint(9) unsigned NOT NULL AUTO_INCREMENT,
title varchar(50) NOT NULL,
structure longtext NOT NULL,
author longtext NOT NULL,
PRIMARY KEY (id)
);";
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
dbDelta( $sql );
}
register_activation_hook( __FILE__, 'create_plugin_database_table' );
A: This code works for me :
function installer(){
include('installer.php');
}
register_activation_hook(__file__, 'installer');
Then installer.php :
global $wpdb;
$table_name = $wpdb->prefix . "my_products";
$my_products_db_version = '1.0.0';
$charset_collate = $wpdb->get_charset_collate();
if ( $wpdb->get_var("SHOW TABLES LIKE '{$table_name}'") != $table_name ) {
$sql = "CREATE TABLE $table_name (
ID mediumint(9) NOT NULL AUTO_INCREMENT,
`product-model` text NOT NULL,
`product-name` text NOT NULL,
`product-description` int(9) NOT NULL,
PRIMARY KEY (ID)
) $charset_collate;";
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
dbDelta($sql);
add_option('my_db_version', $my_products_db_version);
}
A: You have to include wpadmin/upgrade-functions.php file to create a table
example
function create_plugin_database_table()
{
global $table_prefix, $wpdb;
$tblname = 'pin';
$wp_track_table = $table_prefix . "$tblname ";
#Check to see if the table exists already, if not, then create it
if($wpdb->get_var( "show tables like '$wp_track_table'" ) != $wp_track_table)
{
$sql = "CREATE TABLE `". $wp_track_table . "` ( ";
$sql .= " `id` int(11) NOT NULL auto_increment, ";
$sql .= " `pincode` int(128) NOT NULL, ";
$sql .= " PRIMARY KEY `order_id` (`id`) ";
$sql .= ") ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; ";
require_once( ABSPATH . '/wp-admin/includes/upgrade.php' );
dbDelta($sql);
}
}
register_activation_hook( __FILE__, 'create_plugin_database_table' );
A: function astro_plugin_table_install() {
global $wpdb;
global $charset_collate;
$table_name = $wpdb->prefix . 'pin';
$sql = "CREATE TABLE IF NOT EXISTS $table_name (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`pincode` bignit(128) DEFAULT NOT NULL,
PRIMARY KEY (`id`)
)$charset_collate;";
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
dbDelta( $sql );
}
register_activation_hook(__FILE__,'astro_plugin_table_install');
| wordpress | {
"language": "en",
"length": 321,
"provenance": "stackexchange_00019.jsonl.gz:464010",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/220935"
} | [
-0.0084228515625,
0.0189056396484375,
-0.041961669921875,
-0.03369140625,
0.040679931640625,
-0.01262664794921875,
0.0011110305786132812,
0.0166015625,
-0.0433349609375,
0.037628173828125,
-0.00597381591796875,
0.00830078125,
-0.040313720703125,
-0.0244903564453125,
-0.0076751708984375,
-0.043731689453125,
0.042022705078125,
-0.01861572265625,
0.036834716796875,
-0.0251617431640625,
0.0333251953125,
0.0079803466796875,
0.017852783203125,
0.0498046875,
0.014739990234375,
-0.06396484375,
0.07843017578125,
-0.028839111328125,
0.0531005859375,
-0.0038127899169921875,
0.0290069580078125,
-0.038848876953125,
-0.01160430908203125,
0.0149383544921875,
0.035186767578125,
0.005123138427734375,
0.05615234375,
-0.00014781951904296875,
0.02899169921875,
0.0235137939453125,
0.0523681640625,
-0.0263671875,
0.00344085693359375,
-0.0004398822784423828,
-0.003467559814453125,
-0.044830322265625,
0.06304931640625,
-0.0265045166015625,
0.02752685546875,
-0.020538330078125,
-0.00861358642578125,
0.039093017578125,
0.003940582275390625,
-0.050750732421875,
-0.01012420654296875,
0.01024627685546875,
-0.025482177734375,
0.0279541015625,
0.00445556640625,
0.054443359375,
0.00798797607421875,
0.0274200439453125,
-0.01483154296875,
-0.01557159423828125,
0.02239990234375,
0.015625,
0.044921875,
0.0187530517578125,
-0.0174407958984375,
-0.002193450927734375,
0.0020885467529296875,
-0.0188140869140625,
0.0015344619750976562,
-0.001667022705078125,
-0.0240478515625,
0.0001455545425415039,
0.030242919921875,
0.0007171630859375,
-0.008575439453125,
0.0019931793212890625,
0.007717132568359375,
0.0218353271484375,
0.01213836669921875,
-0.048492431640625,
0.01331329345703125,
-0.013946533203125,
-0.00907135009765625,
-0.02105712890625,
0.013427734375,
-0.004741668701171875,
0.002223968505859375,
0.004482269287109375,
-0.0013341903686523438,
0.0213165283203125,
-0.0178680419921875,
-0.0223846435546875,
0.0229339599609375,
0.048126220703125,
-0.02410888671875,
0.04083251953125,
0.0185089111328125,
-0.054229736328125,
0.07843017578125,
-0.05224609375,
0.0177001953125,
0.03900146484375,
-0.0194244384765625,
-0.06109619140625,
0.0207672119140625,
0.00440216064453125,
0.0036296844482421875,
0.0158843994140625,
-0.0213165283203125,
-0.031951904296875,
-0.015655517578125,
0.01535797119140625,
-0.037445068359375,
-0.0015411376953125,
0.00804901123046875,
-0.011566162109375,
-0.020355224609375,
0.0024662017822265625,
-0.055267333984375,
-0.001522064208984375,
-0.007274627685546875,
-0.049774169921875,
0.004978179931640625,
0.0552978515625,
-0.0648193359375,
-0.01012420654296875,
-0.01953125,
0.041839599609375,
0.10455322265625,
0.07110595703125,
0.00846099853515625,
0.0124359130859375,
0.039520263671875,
0.0203399658203125,
-0.0000064373016357421875,
0.01450347900390625,
0.00405120849609375,
-0.005687713623046875,
0.01491546630859375,
-0.0277557373046875,
-0.05023193359375,
0.0133056640625,
0.0105438232421875,
0.0052032470703125,
-0.0361328125,
-0.0416259765625,
-0.022918701171875,
-0.002628326416015625,
0.01410675048828125,
-0.0011615753173828125,
0.00742340087890625,
-0.0179901123046875,
-0.01264190673828125,
-0.0010099411010742188,
0.00904083251953125,
0.01148223876953125,
0.005214691162109375,
-0.03228759765625,
-0.030548095703125,
-0.052093505859375,
-0.0723876953125,
0.031036376953125,
-0.019287109375,
0.007472991943359375,
0.03094482421875,
0.0362548828125,
-0.00861358642578125,
0.0092620849609375,
0.058135986328125,
0.023193359375,
0.002780914306640625,
0.023284912109375,
-0.03704833984375,
-0.040924072265625,
0.0667724609375,
-0.022491455078125,
-0.032501220703125,
-0.0176239013671875,
0.04986572265625,
-0.0185394287109375,
-0.053192138671875,
0.0521240234375,
0.00023937225341796875,
0.08319091796875,
0.025726318359375,
0.022216796875,
-0.0127716064453125,
-0.0179443359375,
-0.06146240234375,
0.059112548828125,
0.00004786252975463867,
-0.059417724609375,
-0.00373077392578125,
-0.037506103515625,
-0.0156707763671875,
0.007038116455078125,
-0.0275421142578125,
0.00569915771484375,
-0.01190948486328125,
0.005615234375,
-0.06695556640625,
0.01454925537109375,
-0.0243072509765625,
0.038299560546875,
0.0186767578125,
0.0167999267578125,
0.0098419189453125,
0.01422119140625,
-0.01531219482421875,
-0.020721435546875,
-0.0267333984375,
0.0031185150146484375,
-0.01526641845703125,
0.0751953125,
0.0026035308837890625,
0.057159423828125,
0.01157379150390625,
-0.034027099609375,
0.0307769775390625,
-0.0011682510375976562,
0.00881195068359375,
0.000052928924560546875,
-0.006343841552734375,
0.006999969482421875,
0.05718994140625,
-0.007549285888671875,
0.08349609375,
0.00040650367736816406,
0.04193115234375,
0.0204620361328125,
-0.0294189453125,
-0.0092010498046875,
-0.006805419921875,
-0.0826416015625,
0.004146575927734375,
0.061187744140625,
0.0338134765625,
-0.0002218484878540039,
-0.020477294921875,
0.01004791259765625,
0.037017822265625,
-0.0301513671875,
-0.004375457763671875,
0.00852203369140625,
-0.0008497238159179688,
0.061279296875,
-0.01678466796875,
0.0190582275390625,
-0.00617218017578125,
-0.019256591796875,
-0.0172119140625,
0.04541015625,
-0.055572509765625,
-0.0400390625,
0.026092529296875,
-0.01416778564453125,
-0.00021147727966308594,
-0.03033447265625,
0.0229339599609375,
-0.032379150390625,
-0.0014209747314453125,
0.01216888427734375,
0.040771484375,
0.0355224609375,
-0.02728271484375,
0.00115966796875,
0.0206756591796875,
0.029022216796875,
-0.01244354248046875,
-0.023223876953125,
-0.0312347412109375,
-0.0225067138671875,
-0.05712890625,
0.04107666015625,
0.03143310546875,
-0.0294952392578125,
-0.0016546249389648438,
0.012359619140625,
-0.052276611328125,
-0.0227508544921875,
0.019134521484375,
-0.03631591796875,
-0.0261688232421875,
0.013580322265625,
-0.052398681640625,
-0.0262603759765625,
0.020233154296875,
-0.00868988037109375,
-0.043853759765625,
0.00667572021484375,
-0.00807952880859375,
-0.0283355712890625,
0.0684814453125,
-0.0285186767578125,
0.018280029296875,
-0.02032470703125,
0.0572509765625,
0.060394287109375,
-0.014617919921875,
-0.01312255859375,
-0.000014007091522216797,
-0.010467529296875,
0.0241546630859375,
-0.0055389404296875,
-0.023681640625,
-0.0286407470703125,
-0.0253753662109375,
0.0147857666015625,
0.036773681640625,
0.08587646484375,
0.00856781005859375,
-0.04022216796875,
0.026763916015625,
0.069091796875,
-0.032073974609375,
-0.07586669921875,
-0.0042724609375,
-0.00519561767578125,
0.0301971435546875,
-0.018707275390625,
-0.00418853759765625,
-0.00872802734375,
-0.0168914794921875,
0.0174102783203125,
-0.060302734375,
-0.0298919677734375,
0.01119232177734375,
-0.063720703125,
-0.03814697265625,
-0.017486572265625,
0.01306915283203125,
0.00847625732421875,
-0.01160430908203125,
0.01145172119140625,
-0.03009033203125,
-0.041778564453125,
-0.02508544921875,
-0.04345703125,
0.0194244384765625,
-0.0129547119140625,
0.0194244384765625,
-0.0328369140625,
0.0037479400634765625,
0.00791168212890625,
0.04339599609375,
0.0253448486328125,
-0.03460693359375,
-0.0112457275390625,
0.03082275390625,
0.037628173828125,
0.035858154296875,
0.01332855224609375,
-0.03802490234375,
0.0296478271484375,
0.02069091796875,
-0.03570556640625,
0.01140594482421875,
-0.0103302001953125,
-0.0130462646484375,
-0.0196075439453125,
-0.0259246826171875,
0.0088043212890625,
0.006130218505859375,
0.016815185546875,
0.046630859375,
0.0299835205078125,
0.0271759033203125,
0.00290679931640625,
-0.0127410888671875,
-0.0024013519287109375,
0.0155792236328125,
-0.04449462890625,
0.06939697265625,
-0.0207366943359375,
-0.0250701904296875,
0.0191802978515625,
-0.01415252685546875,
0.0250244140625,
-0.07000732421875,
-0.0106201171875,
-0.047332763671875,
0.02459716796875,
-0.023406982421875,
-0.0008797645568847656,
-0.00550079345703125,
-0.0105133056640625,
0.0164947509765625,
0.069091796875,
-0.031707763671875,
-0.01160430908203125,
0.01038360595703125,
0.0176239013671875,
-0.0418701171875,
-0.02508544921875,
-0.05926513671875,
-0.00021910667419433594,
-0.0540771484375,
0.0002605915069580078,
-0.003025054931640625,
-0.046966552734375,
0.010467529296875,
0.00030231475830078125,
-0.024627685546875,
-0.026885986328125,
0.045562744140625,
-0.0098419189453125,
-0.0055999755859375,
0.032958984375,
-0.0259552001953125,
0.0158843994140625,
-0.02679443359375,
0.006046295166015625,
-0.06915283203125,
-0.00843048095703125,
-0.033538818359375,
0.0277862548828125,
0.00677490234375,
0.03900146484375,
-0.0269012451171875,
0.038604736328125,
0.01380157470703125,
0.016204833984375,
0.007556915283203125,
0.020416259765625,
-0.031341552734375,
-0.0295257568359375,
0.01294708251953125,
-0.061187744140625,
-0.01377105712890625,
-0.051361083984375,
0.018524169921875,
0.020965576171875,
-0.0297393798828125,
0.035552978515625,
-0.038543701171875,
0.0009965896606445312,
-0.009552001953125,
-0.0157012939453125,
-0.01149749755859375,
0.0122222900390625,
-0.04632568359375,
0.0207977294921875,
-0.0006909370422363281,
-0.01451873779296875,
0.048370361328125,
-0.0193634033203125,
-0.0255889892578125,
0.01523590087890625,
0.07586669921875,
0.0220947265625,
-0.00870513916015625,
-0.042388916015625,
0.00943756103515625,
0.048858642578125,
0.03240966796875,
0.016937255859375,
0.01383209228515625,
-0.045074462890625,
0.06280517578125,
0.03985595703125,
-0.0157928466796875,
0.00769805908203125,
0.038543701171875,
-0.0010166168212890625,
-0.0288848876953125,
0.0169677734375,
-0.01207733154296875,
0.0007386207580566406,
0.0477294921875,
-0.0104522705078125,
-0.003940582275390625,
-0.03118896484375,
0.01178741455078125,
-0.0027866363525390625,
-0.0117950439453125,
-0.029541015625,
-0.037109375,
0.022918701171875,
0.003215789794921875,
-0.0235748291015625,
-0.00803375244140625,
0.00504302978515625,
-0.01038360595703125,
-0.03680419921875,
0.0233001708984375,
-0.00614166259765625,
0.035858154296875,
-0.0198211669921875,
0.034942626953125,
0.02984619140625,
0.003570556640625,
-0.035400390625,
-0.01229095458984375,
0.057159423828125,
0.00616455078125,
-0.0275726318359375,
0.01187896728515625,
-0.0310211181640625,
-0.0017042160034179688,
0.011138916015625,
0.0033588409423828125,
0.01580810546875,
0.0260009765625,
-0.0110321044921875,
-0.003040313720703125,
-0.0272369384765625,
0.031646728515625,
-0.0311431884765625,
-0.0016698837280273438,
0.0092926025390625,
-0.0243377685546875,
-0.0196685791015625,
0.058624267578125,
-0.0073089599609375,
0.01337432861328125,
-0.005771636962890625,
0.06707763671875,
0.06243896484375,
0.042724609375,
0.00201416015625,
-0.0250396728515625,
-0.01399993896484375,
0.029632568359375,
-0.034912109375,
-0.05206298828125,
-0.0223541259765625,
0.016265869140625,
0.060882568359375,
-0.044708251953125,
-0.02764892578125,
0.035797119140625,
-0.0298004150390625,
-0.0073699951171875,
0.032623291015625,
-0.005527496337890625,
-0.06146240234375,
-0.02783203125,
0.0144500732421875,
0.041595458984375,
-0.0215606689453125,
-0.0206298828125,
-0.0120391845703125,
-0.051727294921875,
0.0310211181640625,
-0.026336669921875,
0.02252197265625,
0.004032135009765625,
-0.021942138671875,
-0.0008306503295898438,
-0.030426025390625,
-0.0445556640625,
0.043609619140625,
0.019012451171875,
-0.0067291259765625,
-0.00290679931640625,
0.01226043701171875,
-0.035919189453125,
0.04345703125,
-0.0198516845703125,
-0.0205535888671875,
-0.036651611328125,
0.0222320556640625,
0.034698486328125,
0.0283660888671875,
0.020233154296875,
-0.032257080078125,
0.0097808837890625,
-0.045196533203125,
-0.0112152099609375,
-0.01934814453125,
-0.0291748046875,
-0.01186370849609375,
-0.0018968582153320312,
-0.003345489501953125,
0.002490997314453125,
-0.0193023681640625,
-0.0157318115234375,
0.00487518310546875,
0.00560760498046875,
-0.02471923828125,
-0.01036834716796875,
0.05413818359375,
-0.0020904541015625,
0.0689697265625,
0.0233612060546875,
0.025054931640625,
-0.0108795166015625,
-0.0241546630859375,
0.0146942138671875,
-0.006343841552734375,
-0.00893402099609375,
-0.01629638671875,
-0.021148681640625,
-0.04150390625,
0.0006170272827148438,
-0.0116729736328125,
0.0196380615234375,
-0.0002613067626953125,
-0.0007534027099609375,
-0.0014667510986328125,
0.035736083984375,
0.00794219970703125,
0.0264892578125,
0.0263214111328125,
-0.078125,
-0.0187835693359375,
-0.006412506103515625,
0.036529541015625,
0.045501708984375,
-0.07281494140625,
0.007144927978515625,
0.053070068359375,
-0.0684814453125,
0.08349609375,
0.05267333984375,
0.006008148193359375,
0.03338623046875,
-0.007045745849609375,
0.0046539306640625,
-0.005786895751953125,
-0.0102081298828125,
0.0006256103515625,
-0.0216217041015625,
0.06829833984375,
0.01375579833984375,
-0.0241241455078125,
0.083984375,
-0.03118896484375,
0.0278778076171875,
0.06536865234375,
0.052215576171875,
-0.10565185546875,
0.0213470458984375,
0.003963470458984375,
-0.023834228515625,
0.033935546875,
-0.0055389404296875,
-0.00946807861328125,
0.00904083251953125,
0.0096893310546875,
0.006679534912109375,
-0.031951904296875,
0.00005078315734863281,
0.023834228515625,
-0.0199432373046875,
-0.007537841796875,
-0.00019919872283935547,
0.0091400146484375,
0.01163482666015625,
0.0032329559326171875,
-0.0202178955078125,
0.0190277099609375,
0.003955841064453125,
0.0262451171875,
0.0150604248046875,
0.006420135498046875,
-0.0205535888671875,
0.054534912109375,
-0.0259857177734375,
-0.0096588134765625,
0.01187896728515625,
-0.017913818359375,
0.04034423828125,
0.050750732421875,
-0.02532958984375,
0.013702392578125,
0.0244140625,
0.01216888427734375,
-0.01219940185546875,
-0.0010290145874023438,
-0.006801605224609375,
0.0084991455078125,
-0.0200347900390625,
-0.0015745162963867188,
-0.048187255859375,
0.01432037353515625,
-0.0024852752685546875,
0.00725555419921875,
0.04205322265625,
0.0305023193359375,
-0.0517578125,
0.018310546875,
-0.03778076171875,
0.0036067962646484375,
0.0013141632080078125,
0.00982666015625,
-0.05438232421875,
-0.00872039794921875,
0.01090240478515625,
-0.01049041748046875,
-0.02459716796875,
0.0129852294921875,
-0.039764404296875,
0.07598876953125,
-0.0190582275390625,
-0.01953125,
0.0220947265625,
0.038421630859375,
-0.0288543701171875,
0.005664825439453125,
-0.04364013671875,
0.0179290771484375,
-0.015625,
0.0648193359375,
-0.039031982421875,
-0.0022106170654296875,
0.023834228515625,
0.01561737060546875,
0.050018310546875,
0.0160064697265625,
0.0174560546875,
-0.004268646240234375,
-0.007572174072265625,
-0.03338623046875,
-0.05804443359375,
0.0275115966796875,
-0.005733489990234375,
0.03912353515625,
0.048919677734375,
-0.01155853271484375,
0.0306396484375,
0.0232696533203125,
-0.03167724609375,
0.0286865234375,
0.0257110595703125,
0.0245819091796875,
-0.036102294921875,
-0.005306243896484375,
0.0231170654296875,
-0.030426025390625,
-0.012451171875,
-0.030059814453125,
0.001605987548828125,
0.037200927734375,
0.0191192626953125,
-0.0018978118896484375,
-0.003200531005859375,
-0.0246429443359375,
0.0377197265625,
-0.00273895263671875,
-0.01094818115234375,
0.033660888671875,
0.0186309814453125,
-0.049285888671875,
0.0167236328125,
-0.01166534423828125,
0.005229949951171875,
0.0033016204833984375,
0.03619384765625,
0.00965118408203125,
0.0084075927734375,
-0.0312042236328125,
0.01520538330078125,
0.01096343994140625,
0.04302978515625,
-0.043060302734375,
-0.023345947265625,
0.005237579345703125,
-0.006870269775390625,
0.004360198974609375,
-0.0024852752685546875,
0.006343841552734375,
0.05767822265625,
0.046234130859375,
-0.01532745361328125,
0.0123291015625,
0.011322021484375,
0.0006923675537109375,
0.0002015829086303711,
-0.006259918212890625,
-0.015655517578125,
0.0121612548828125,
-0.01157379150390625,
0.004009246826171875,
0.01393890380859375,
0.0210113525390625,
-0.004558563232421875,
0.03717041015625,
-0.004100799560546875,
-0.004680633544921875,
-0.040557861328125,
0.026214599609375,
0.03216552734375,
0.045166015625,
-0.044952392578125,
-0.005275726318359375,
0.02630615234375,
0.04376220703125,
-0.016876220703125,
0.048095703125,
0.036285400390625,
0.024566650390625,
0.006046295166015625,
0.00301361083984375,
0.036834716796875,
-0.03216552734375,
-0.0188446044921875,
-0.047119140625,
0.031402587890625,
0.01023101806640625,
0.0293426513671875,
0.0065155029296875,
0.045745849609375,
-0.01416778564453125,
-0.0190582275390625,
0.03857421875,
0.0003688335418701172,
-0.0068206787109375,
0.01727294921875,
-0.024078369140625,
0.015594482421875,
0.0002428293228149414,
-0.0252838134765625,
-0.00360870361328125,
-0.01715087890625,
-0.0243377685546875,
-0.004352569580078125,
0.032257080078125,
-0.0243988037109375,
0.047576904296875,
0.0004067420959472656,
0.027984619140625,
0.00438690185546875,
-0.043304443359375,
0.01203155517578125,
0.027679443359375,
0.03582763671875,
0.029693603515625,
0.011138916015625,
0.004932403564453125,
0.0207672119140625,
0.01522064208984375,
-0.014190673828125,
0.07415771484375,
-0.041229248046875,
0.0089263916015625,
-0.0018796920776367188,
-0.0017194747924804688,
-0.0161285400390625,
-0.00925445556640625,
0.0399169921875,
0.0006661415100097656,
-0.018798828125,
-0.00975799560546875,
-0.034881591796875,
0.0025463104248046875,
0.03863525390625,
-0.00457000732421875,
-0.0284423828125,
0.0148773193359375,
0.047882080078125,
0.0154571533203125,
-0.010162353515625,
-0.01885986328125,
-0.01491546630859375,
-0.010894775390625,
-0.00554656982421875,
0.030181884765625,
0.034088134765625,
0.016082763671875,
0.0291748046875,
-0.006465911865234375,
-0.0020122528076171875,
0.0160980224609375,
-0.035491943359375,
0.03424072265625,
0.03662109375,
-0.025238037109375,
-0.006198883056640625,
0.0006771087646484375,
-0.0249786376953125,
-0.0143890380859375,
0.0221405029296875,
0.0301361083984375,
-0.0006680488586425781,
0.001007080078125,
0.046875,
0.048431396484375,
0.05377197265625,
-0.0149078369140625,
0.01885986328125,
0.054107666015625,
0.001483917236328125,
0.009918212890625,
-0.035308837890625,
-0.037139892578125,
-0.05572509765625,
0.003612518310546875,
0.01442718505859375,
-0.0303802490234375,
-0.006252288818359375,
-0.052703857421875,
0.0450439453125,
0.032470703125,
-0.0010967254638671875,
-0.09808349609375,
0.043792724609375,
-0.004955291748046875,
0.10003662109375,
-0.0234375,
0.0015811920166015625,
0.003841400146484375,
0.0226593017578125,
-0.0225372314453125,
-0.0357666015625,
-0.01393890380859375,
0.039642333984375,
-0.01200103759765625,
0.020782470703125,
0.0081634521484375,
-0.0163116455078125,
-0.0272369384765625,
0.043212890625,
0.0198974609375,
0.07861328125,
0.0494384765625,
-0.006198883056640625,
0.0634765625,
-0.048309326171875,
-0.041656494140625,
-0.10040283203125,
0.01025390625,
-0.15087890625,
-0.0137939453125,
-0.035614013671875,
0.032806396484375,
0.040740966796875,
-0.0233306884765625,
-0.0633544921875,
0.032623291015625,
-0.0211639404296875,
-0.029266357421875,
-0.02874755859375,
-0.01468658447265625,
-0.021087646484375,
0.0604248046875,
0.00017380714416503906,
-0.0272216796875,
-0.022308349609375,
0.0477294921875,
-0.006237030029296875,
0.0029754638671875,
0.01824951171875,
0.0023365020751953125,
-0.07305908203125,
-0.0172271728515625,
-0.018157958984375,
-0.010040283203125,
0.01348876953125,
-0.003253936767578125,
-0.003345489501953125,
0.0271453857421875,
-0.01065826416015625,
-0.05487060546875,
-0.01580810546875,
-0.0440673828125,
-0.01126861572265625,
-0.0811767578125,
-0.002567291259765625,
-0.019683837890625,
0.040252685546875,
0.0165863037109375,
0.00537872314453125,
-0.0277862548828125,
-0.03173828125,
-0.043914794921875,
-0.01129150390625,
-0.031402587890625,
0.00943756103515625,
-0.07373046875,
0.00600433349609375,
0.0098419189453125,
-0.005275726318359375,
-0.00888824462890625,
0.056732177734375,
-0.00193023681640625,
-0.0015745162963867188,
0.06280517578125,
-0.0270843505859375,
-0.0236968994140625,
-0.02947998046875,
0.0279388427734375,
-0.0266876220703125,
-0.05047607421875,
-0.000027120113372802734,
0.0232391357421875,
-0.0394287109375,
-0.0288238525390625,
-0.0198516845703125,
-0.00732421875,
0.007274627685546875,
0.033843994140625,
-0.01056671142578125,
-0.02130126953125,
-0.022064208984375,
0.0035228729248046875,
-0.005306243896484375,
0.0263214111328125,
-0.020599365234375,
0.018035888671875,
-0.0228118896484375,
0.0771484375,
0.011077880859375,
0.08001708984375,
0.00936126708984375,
-0.050628662109375,
-0.0257110595703125,
0.0247955322265625,
0.016937255859375,
-0.0266571044921875,
0.0140228271484375,
-0.0165252685546875,
-0.00606536865234375,
-0.032958984375,
-0.01220703125,
-0.045440673828125,
-0.0033969879150390625,
-0.041748046875,
-0.0138092041015625,
0.0190887451171875
]
|
3e791e7725173caf03789b8238ceb22829cff145 | Wordpress Stackexchange
Q: How to get the active theme's slug? I'm able to get certain info about the active theme using wp_get_theme(). For example:
$theme = wp_get_theme();
echo $theme->get( 'TextDomain' ); // twentyfifteen
echo $theme->get( 'ThemeURI' ); // https://wordpress.org/themes/twentyfifteen/
Is there a way to get the theme's slug? In this case it'd be twentyfifteen. Please note the theme's slug isn't always the same as the theme's text domain. I'd also like to avoid performing string replacement on the theme's URL if possible.
Ref: https://codex.wordpress.org/Function_Reference/wp_get_theme
A: You can get the slug in the options table, stored under the name stylesheet.
echo get_option('stylesheet');
| Q: How to get the active theme's slug? I'm able to get certain info about the active theme using wp_get_theme(). For example:
$theme = wp_get_theme();
echo $theme->get( 'TextDomain' ); // twentyfifteen
echo $theme->get( 'ThemeURI' ); // https://wordpress.org/themes/twentyfifteen/
Is there a way to get the theme's slug? In this case it'd be twentyfifteen. Please note the theme's slug isn't always the same as the theme's text domain. I'd also like to avoid performing string replacement on the theme's URL if possible.
Ref: https://codex.wordpress.org/Function_Reference/wp_get_theme
A: You can get the slug in the options table, stored under the name stylesheet.
echo get_option('stylesheet');
A: Short Answer: get_stylesheet();
There is technically no 'slug' value for a theme. The name of a given theme's directory is what you want.
get_template();
…will return the directory name of your theme, or the parent theme in the case that your current theme is a child theme.
get_option('stylesheet');
Will ALWAYS return the directory name of your active theme, whether or not it is a child theme.
get_stylesheet();
Will ALWAYS return the directory name of your active theme, whether or not it is a child theme. This function is essentially a wrapper for get_option('stylesheet');, except that it also applies a 'stylesheet' filter.
function get_stylesheet() {
/**
* Filters the name of current stylesheet.
*
* @since 1.5.0
*
* @param string $stylesheet Name of the current stylesheet.
*/
return apply_filters( 'stylesheet', get_option( 'stylesheet' ) );
}
I'm not sure what the 'stylesheet' filter does. Looks like it might have something to do with the customizer.
In the vast majority of cases, these three functions would do the same thing, but get_stylesheet(); seems like the safest bet.
A: wp_get_theme gets a WP_Theme object for a theme.
$theme = wp_get_theme();
if ( 'Conj' === $theme->name || 'conj' === $theme->template ) {
// Do something...
}
A: I found the closest thing to the theme's slug is the theme's directory name. This can be found using get_template():
echo get_template(); // twentyfifteen
Ref: https://codex.wordpress.org/Function_Reference/get_template
A: wp_get_active_and_valid_themes()
i found this in wp-settings.php
// Load the functions for the active theme, for both parent and child theme if applicable.
foreach ( wp_get_active_and_valid_themes() as $theme ) {
if ( file_exists( $theme . '/functions.php' ) ) {
include $theme . '/functions.php';
}
}
A: Yo can get it by get_template_directory_uri()
| wordpress | {
"language": "en",
"length": 381,
"provenance": "stackexchange_00019.jsonl.gz:464011",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/220942"
} | [
-0.00519561767578125,
-0.013214111328125,
-0.01441192626953125,
-0.02154541015625,
0.006954193115234375,
-0.01099395751953125,
0.03839111328125,
0.0191802978515625,
0.004932403564453125,
0.021331787109375,
0.01335906982421875,
-0.00765228271484375,
-0.003269195556640625,
-0.03814697265625,
-0.00222015380859375,
-0.0125885009765625,
0.04010009765625,
-0.05072021484375,
-0.00799560546875,
-0.0106201171875,
-0.00786590576171875,
0.0250091552734375,
-0.0014677047729492188,
0.08123779296875,
0.050994873046875,
-0.048583984375,
0.08831787109375,
-0.02069091796875,
0.05181884765625,
-0.01983642578125,
0.038818359375,
-0.0276336669921875,
0.00237274169921875,
0.009246826171875,
0.034332275390625,
0.004756927490234375,
0.0290374755859375,
0.0009546279907226562,
0.0211334228515625,
0.0157012939453125,
0.0166473388671875,
0.01218414306640625,
-0.0006966590881347656,
0.0290985107421875,
-0.0123291015625,
-0.05352783203125,
0.0078582763671875,
-0.052459716796875,
0.01361846923828125,
0.042022705078125,
0.0245819091796875,
0.017364501953125,
0.03594970703125,
-0.019195556640625,
-0.01258087158203125,
-0.0246734619140625,
-0.006061553955078125,
0.0281219482421875,
0.026824951171875,
-0.06317138671875,
-0.0462646484375,
-0.0036029815673828125,
0.042266845703125,
0.029327392578125,
0.01122283935546875,
0.0149688720703125,
-0.00644683837890625,
0.0262298583984375,
-0.037017822265625,
0.0016984939575195312,
-0.00003165006637573242,
-0.037017822265625,
0.044281005859375,
-0.0105133056640625,
-0.0035247802734375,
-0.044830322265625,
-0.02349853515625,
-0.03265380859375,
0.05224609375,
-0.01345062255859375,
0.0013723373413085938,
-0.04486083984375,
-0.0482177734375,
0.01055908203125,
0.004425048828125,
0.034637451171875,
-0.01204681396484375,
-0.027069091796875,
-0.0239105224609375,
-0.0246429443359375,
-0.02532958984375,
-0.00463104248046875,
-0.0150299072265625,
-0.004535675048828125,
-0.0203857421875,
-0.0194549560546875,
0.042388916015625,
0.0270233154296875,
0.0034198760986328125,
-0.0012531280517578125,
-0.0025005340576171875,
-0.058624267578125,
0.0277557373046875,
-0.0243682861328125,
-0.00470733642578125,
0.0439453125,
0.0287017822265625,
0.03582763671875,
0.0032253265380859375,
0.004596710205078125,
0.003948211669921875,
-0.02008056640625,
0.007770538330078125,
-0.0202178955078125,
-0.024200439453125,
0.03228759765625,
-0.006305694580078125,
-0.0032978057861328125,
0.004848480224609375,
0.00553131103515625,
0.0240020751953125,
0.04815673828125,
0.0298614501953125,
-0.045928955078125,
-0.0374755859375,
-0.0233917236328125,
-0.033050537109375,
-0.06719970703125,
0.0396728515625,
0.01044464111328125,
-0.0281524658203125,
0.003459930419921875,
0.011444091796875,
0.005985260009765625,
-0.01129913330078125,
-0.0182647705078125,
-0.01483154296875,
0.021148681640625,
-0.004085540771484375,
-0.0193328857421875,
0.0237274169921875,
-0.00826263427734375,
0.00972747802734375,
-0.0016384124755859375,
0.00383758544921875,
-0.0020923614501953125,
0.01319122314453125,
0.0280914306640625,
-0.0204925537109375,
-0.02191162109375,
0.02398681640625,
-0.02960205078125,
0.00677490234375,
0.039764404296875,
-0.01531982421875,
0.0090484619140625,
0.00437164306640625,
-0.00905609130859375,
0.0135955810546875,
-0.02362060546875,
-0.004451751708984375,
-0.0090179443359375,
0.01325225830078125,
0.0126495361328125,
-0.0039005279541015625,
0.00809478759765625,
0.0108184814453125,
-0.0005068778991699219,
0.0133514404296875,
-0.00989532470703125,
0.0175323486328125,
-0.0027675628662109375,
0.02337646484375,
0.0208587646484375,
0.003383636474609375,
0.03057861328125,
0.019622802734375,
0.00984954833984375,
0.0291595458984375,
0.02392578125,
0.0113983154296875,
-0.01285552978515625,
0.059295654296875,
-0.0139007568359375,
-0.02618408203125,
0.016845703125,
0.0126953125,
0.035888671875,
0.0037555694580078125,
0.0102996826171875,
-0.0098419189453125,
0.00890350341796875,
-0.041473388671875,
0.01410675048828125,
0.00923919677734375,
0.003936767578125,
-0.0182647705078125,
0.023223876953125,
-0.01305389404296875,
-0.034027099609375,
-0.0039215087890625,
0.005832672119140625,
0.006031036376953125,
-0.0225677490234375,
-0.040863037109375,
-0.0139923095703125,
-0.00978851318359375,
0.04510498046875,
0.01412200927734375,
0.0265960693359375,
-0.00873565673828125,
-0.0186920166015625,
-0.00676727294921875,
0.0033016204833984375,
-0.0196380615234375,
0.03253173828125,
0.0060882568359375,
-0.01163482666015625,
-0.01416778564453125,
0.01203155517578125,
-0.03271484375,
0.01457977294921875,
-0.046722412109375,
0.013214111328125,
0.0178680419921875,
0.00011581182479858398,
-0.0172271728515625,
-0.0178375244140625,
0.0056304931640625,
0.00873565673828125,
-0.01509857177734375,
0.034332275390625,
0.05169677734375,
0.01529693603515625,
-0.04620361328125,
0.0099639892578125,
0.01251220703125,
-0.01302337646484375,
-0.0101470947265625,
0.0389404296875,
0.047637939453125,
0.051055908203125,
-0.00257110595703125,
-0.04412841796875,
0.06866455078125,
-0.061798095703125,
0.0037822723388671875,
-0.0286407470703125,
0.019622802734375,
0.056671142578125,
0.00710296630859375,
0.0188446044921875,
0.005340576171875,
0.045257568359375,
-0.00569915771484375,
0.03668212890625,
-0.00571441650390625,
-0.007770538330078125,
-0.032379150390625,
0.0268402099609375,
0.0113983154296875,
-0.00247955322265625,
-0.0224151611328125,
-0.01454925537109375,
0.0002589225769042969,
0.02294921875,
-0.01123046875,
-0.01274871826171875,
-0.04791259765625,
0.0129241943359375,
0.02899169921875,
0.0281982421875,
-0.0034160614013671875,
0.054534912109375,
-0.01239013671875,
-0.0027923583984375,
-0.0087432861328125,
-0.00556182861328125,
-0.029693603515625,
0.02154541015625,
-0.039093017578125,
0.01087188720703125,
-0.0020046234130859375,
-0.0143280029296875,
-0.0176544189453125,
-0.07318115234375,
0.0236358642578125,
-0.0136260986328125,
0.0269012451171875,
0.022491455078125,
0.0174102783203125,
0.0662841796875,
-0.025604248046875,
0.056793212890625,
-0.003124237060546875,
0.00435638427734375,
0.08355712890625,
-0.00620269775390625,
0.016357421875,
0.00238800048828125,
0.057220458984375,
0.040496826171875,
-0.0163421630859375,
0.0014019012451171875,
0.00757598876953125,
-0.06689453125,
-0.0230255126953125,
0.01493072509765625,
-0.0104217529296875,
-0.0003032684326171875,
-0.072021484375,
0.047149658203125,
0.0201873779296875,
-0.0179443359375,
0.00618743896484375,
-0.03741455078125,
-0.0181121826171875,
-0.0080413818359375,
-0.112548828125,
-0.07135009765625,
0.00240325927734375,
-0.07977294921875,
-0.00916290283203125,
-0.036102294921875,
-0.052032470703125,
0.01313018798828125,
-0.0119781494140625,
0.001140594482421875,
0.022064208984375,
-0.032928466796875,
-0.0909423828125,
-0.065673828125,
-0.10333251953125,
-0.0305633544921875,
-0.01340484619140625,
0.0120391845703125,
-0.0021648406982421875,
0.0311737060546875,
-0.003406524658203125,
-0.0191650390625,
-0.0014171600341796875,
0.047943115234375,
0.002285003662109375,
-0.006084442138671875,
0.0048370361328125,
-0.031829833984375,
0.004116058349609375,
0.00353240966796875,
-0.002597808837890625,
0.017242431640625,
-0.0022029876708984375,
-0.006256103515625,
-0.01146697998046875,
-0.031890869140625,
-0.0016679763793945312,
0.06280517578125,
0.0201416015625,
-0.050872802734375,
0.037078857421875,
-0.058807373046875,
-0.03350830078125,
-0.02874755859375,
-0.0582275390625,
0.0572509765625,
0.035064697265625,
0.0104827880859375,
-0.00684356689453125,
0.01490020751953125,
0.007633209228515625,
0.001556396484375,
0.0110931396484375,
-0.0174102783203125,
0.07470703125,
0.000015676021575927734,
-0.007720947265625,
-0.028289794921875,
0.02099609375,
-0.01277923583984375,
0.025146484375,
0.005313873291015625,
0.0269012451171875,
-0.013885498046875,
0.02252197265625,
-0.04290771484375,
-0.046783447265625,
0.045318603515625,
-0.004119873046875,
0.0018529891967773438,
-0.00804901123046875,
-0.0280609130859375,
0.0036449432373046875,
0.08856201171875,
-0.02569580078125,
-0.0251007080078125,
-0.0034465789794921875,
0.01219940185546875,
0.00469207763671875,
-0.0036373138427734375,
-0.0159454345703125,
-0.015716552734375,
-0.11334228515625,
0.004673004150390625,
-0.011566162109375,
-0.037139892578125,
-0.0022563934326171875,
0.0226898193359375,
-0.0655517578125,
-0.0423583984375,
0.049041748046875,
-0.0211334228515625,
0.0166778564453125,
0.033447265625,
-0.005207061767578125,
0.018402099609375,
-0.04547119140625,
-0.0004911422729492188,
-0.05072021484375,
-0.01122283935546875,
0.02044677734375,
0.0384521484375,
0.005645751953125,
-0.015380859375,
0.0142822265625,
0.048919677734375,
0.0167999267578125,
0.08001708984375,
0.0083160400390625,
0.0046539306640625,
0.038726806640625,
-0.0153045654296875,
0.039947509765625,
-0.0189056396484375,
-0.007450103759765625,
-0.018829345703125,
-0.06353759765625,
-0.00820159912109375,
-0.01461029052734375,
0.01511383056640625,
0.03558349609375,
-0.035675048828125,
0.007801055908203125,
0.0175628662109375,
0.0204620361328125,
0.01190185546875,
-0.010101318359375,
0.00635528564453125,
0.034515380859375,
0.01432037353515625,
0.0902099609375,
0.01824951171875,
0.0009369850158691406,
-0.0110015869140625,
0.1021728515625,
0.00159454345703125,
-0.050201416015625,
-0.043548583984375,
-0.0168914794921875,
0.048065185546875,
0.0232391357421875,
0.00586700439453125,
0.020751953125,
-0.048431396484375,
0.04425048828125,
0.031463623046875,
-0.043914794921875,
-0.0184478759765625,
0.038055419921875,
0.006427764892578125,
0.0018177032470703125,
-0.03192138671875,
-0.036590576171875,
0.0797119140625,
0.0193634033203125,
-0.04345703125,
-0.0049591064453125,
-0.03912353515625,
0.053131103515625,
-0.01360321044921875,
0.05645751953125,
-0.06475830078125,
-0.0552978515625,
0.007205963134765625,
-0.00634002685546875,
0.04974365234375,
0.031219482421875,
-0.0134429931640625,
0.07537841796875,
0.045013427734375,
0.0031528472900390625,
-0.02740478515625,
0.004459381103515625,
-0.0189361572265625,
0.0211639404296875,
-0.0087738037109375,
0.00421142578125,
-0.019805908203125,
-0.00853729248046875,
0.047821044921875,
-0.0276947021484375,
-0.06317138671875,
-0.032379150390625,
-0.00646209716796875,
0.06494140625,
0.046295166015625,
-0.01010894775390625,
0.0362548828125,
0.040740966796875,
-0.0213623046875,
-0.026641845703125,
-0.034332275390625,
0.0228118896484375,
-0.05780029296875,
0.004650115966796875,
-0.0171051025390625,
-0.0120391845703125,
-0.00014030933380126953,
0.033233642578125,
-0.01197052001953125,
0.0218353271484375,
-0.006046295166015625,
-0.03369140625,
-0.0301971435546875,
0.041290283203125,
0.02349853515625,
-0.0302734375,
0.02178955078125,
0.00429534912109375,
0.04046630859375,
-0.017974853515625,
0.0210723876953125,
0.01751708984375,
0.03619384765625,
-0.0237579345703125,
-0.045989990234375,
0.0325927734375,
-0.0194549560546875,
-0.0011644363403320312,
-0.0014858245849609375,
-0.01013946533203125,
-0.01468658447265625,
-0.007259368896484375,
0.026031494140625,
0.025726318359375,
0.002475738525390625,
-0.0206756591796875,
0.039093017578125,
-0.003936767578125,
0.004032135009765625,
0.07366943359375,
-0.0556640625,
0.0142669677734375,
0.031707763671875,
-0.04791259765625,
-0.01274871826171875,
0.0027446746826171875,
-0.074951171875,
-0.035003662109375,
-0.0168609619140625,
-0.0172576904296875,
0.054107666015625,
-0.0023040771484375,
0.05072021484375,
-0.025360107421875,
-0.04541015625,
-0.006725311279296875,
-0.00567626953125,
0.057159423828125,
0.0184478759765625,
-0.04345703125,
0.041015625,
-0.04534912109375,
0.023193359375,
0.040283203125,
-0.05596923828125,
-0.005504608154296875,
-0.0670166015625,
0.0024585723876953125,
0.01910400390625,
0.009063720703125,
-0.007503509521484375,
-0.01629638671875,
0.0224761962890625,
0.027069091796875,
0.0477294921875,
0.009490966796875,
0.041717529296875,
0.0027484893798828125,
-0.009765625,
0.01171875,
0.004703521728515625,
-0.026947021484375,
-0.001953125,
-0.0156707763671875,
-0.01383209228515625,
0.005023956298828125,
0.00891876220703125,
0.0173492431640625,
0.0095367431640625,
0.04974365234375,
0.00934600830078125,
0.005687713623046875,
-0.0225830078125,
0.01256561279296875,
-0.02642822265625,
0.024932861328125,
-0.0304718017578125,
-0.0293121337890625,
0.0145263671875,
-0.04022216796875,
-0.0240478515625,
0.005771636962890625,
0.0168914794921875,
0.00908660888671875,
-0.024932861328125,
0.00382232666015625,
0.04315185546875,
-0.0576171875,
0.08489990234375,
0.07098388671875,
0.00571441650390625,
0.0258331298828125,
-0.002368927001953125,
0.0021305084228515625,
-0.025360107421875,
0.0100555419921875,
-0.016998291015625,
-0.0025959014892578125,
0.047760009765625,
0.017364501953125,
-0.008270263671875,
0.0394287109375,
-0.01800537109375,
-0.01139068603515625,
0.03607177734375,
0.058197021484375,
-0.0278167724609375,
-0.01097869873046875,
0.038909912109375,
-0.0246734619140625,
-0.0232696533203125,
0.005767822265625,
-0.006443023681640625,
0.007080078125,
0.04266357421875,
-0.033599853515625,
0.0013523101806640625,
0.0247650146484375,
-0.0276641845703125,
-0.0166015625,
-0.001495361328125,
0.035736083984375,
0.00466156005859375,
-0.0110931396484375,
-0.026763916015625,
0.0197601318359375,
-0.0288238525390625,
-0.03570556640625,
-0.01114654541015625,
-0.0162506103515625,
0.0023784637451171875,
-0.0197601318359375,
0.026275634765625,
-0.0292205810546875,
0.036102294921875,
0.03289794921875,
0.006927490234375,
0.01457977294921875,
0.058319091796875,
-0.0206298828125,
0.01522064208984375,
0.0233154296875,
-0.00921630859375,
0.0169830322265625,
-0.00331878662109375,
0.01776123046875,
0.01190185546875,
-0.007144927978515625,
0.00659942626953125,
-0.01214599609375,
0.001842498779296875,
-0.016571044921875,
-0.0185699462890625,
0.0806884765625,
-0.04052734375,
-0.020782470703125,
0.0294342041015625,
0.0293731689453125,
-0.01397705078125,
0.0032176971435546875,
0.04931640625,
-0.029571533203125,
0.004192352294921875,
0.0236358642578125,
0.01197052001953125,
-0.0275421142578125,
-0.0020923614501953125,
-0.054473876953125,
0.09161376953125,
-0.016510009765625,
0.033843994140625,
0.0229339599609375,
0.039947509765625,
-0.0216217041015625,
0.01212310791015625,
-0.040557861328125,
0.047210693359375,
-0.001605987548828125,
0.031646728515625,
-0.038543701171875,
0.0176239013671875,
0.0026092529296875,
-0.01947021484375,
0.05938720703125,
0.0119171142578125,
-0.01529693603515625,
0.00030040740966796875,
0.07525634765625,
0.0210113525390625,
-0.0225677490234375,
0.0343017578125,
0.006275177001953125,
0.050567626953125,
0.044464111328125,
-0.06500244140625,
0.0192413330078125,
-0.018463134765625,
-0.0123291015625,
0.04052734375,
0.00041484832763671875,
0.004268646240234375,
0.03546142578125,
-0.00922393798828125,
-0.035400390625,
0.0169525146484375,
0.028717041015625,
-0.042999267578125,
-0.0124664306640625,
0.06964111328125,
0.05242919921875,
-0.04278564453125,
-0.01189422607421875,
-0.03778076171875,
0.050445556640625,
0.012939453125,
-0.018035888671875,
-0.0171051025390625,
0.0037364959716796875,
0.0132293701171875,
-0.0272674560546875,
-0.024871826171875,
0.0244293212890625,
-0.0131072998046875,
0.05987548828125,
0.016387939453125,
0.033538818359375,
-0.037811279296875,
0.00977325439453125,
0.0174560546875,
0.06304931640625,
-0.047088623046875,
-0.041473388671875,
0.025054931640625,
-0.0114898681640625,
-0.0189666748046875,
0.01006317138671875,
-0.0044097900390625,
-0.008514404296875,
0.02032470703125,
-0.059478759765625,
-0.01111602783203125,
0.046478271484375,
0.022186279296875,
-0.01465606689453125,
0.002254486083984375,
-0.00372314453125,
-0.0216522216796875,
-0.047393798828125,
0.00914764404296875,
0.0154876708984375,
0.046630859375,
0.006389617919921875,
0.05682373046875,
-0.0064697265625,
-0.0184783935546875,
-0.0128021240234375,
0.02459716796875,
0.0065155029296875,
0.0016269683837890625,
-0.02655029296875,
-0.0014886856079101562,
-0.0029239654541015625,
0.0382080078125,
0.06878662109375,
-0.048858642578125,
0.01396942138671875,
-0.003017425537109375,
-0.034027099609375,
0.005481719970703125,
0.0031871795654296875,
-0.00833892822265625,
0.057769775390625,
-0.0313720703125,
0.0372314453125,
0.0029964447021484375,
-0.0204010009765625,
-0.0262451171875,
-0.0200958251953125,
0.07623291015625,
-0.0034084320068359375,
0.026580810546875,
0.011688232421875,
0.032989501953125,
0.006877899169921875,
0.004322052001953125,
-0.068603515625,
0.026641845703125,
-0.0859375,
-0.004177093505859375,
-0.045257568359375,
-0.037139892578125,
0.01369476318359375,
0.04400634765625,
-0.0021686553955078125,
-0.002872467041015625,
-0.0212249755859375,
-0.0225372314453125,
0.01172637939453125,
0.0189666748046875,
0.0020313262939453125,
0.037353515625,
0.0189056396484375,
0.007419586181640625,
-0.036956787109375,
-0.02587890625,
-0.0016765594482421875,
0.0304107666015625,
-0.01299285888671875,
0.050048828125,
-0.005615234375,
0.0018606185913085938,
-0.00933074951171875,
0.004238128662109375,
-0.0203704833984375,
-0.02838134765625,
0.0321044921875,
-0.0265960693359375,
-0.01050567626953125,
-0.0033283233642578125,
-0.08026123046875,
-0.0148468017578125,
0.04339599609375,
0.0021991729736328125,
0.0007557868957519531,
-0.005931854248046875,
0.03082275390625,
-0.006923675537109375,
0.01515960693359375,
-0.033660888671875,
-0.0677490234375,
-0.033294677734375,
0.0226287841796875,
-0.01311492919921875,
0.019775390625,
-0.002964019775390625,
0.0022830963134765625,
-0.01910400390625,
-0.0302734375,
0.01296234130859375,
0.01446533203125,
-0.0084228515625,
0.0220794677734375,
-0.0208282470703125,
-0.01312255859375,
0.049468994140625,
-0.0031337738037109375,
0.040924072265625,
-0.004779815673828125,
0.060333251953125,
0.0294647216796875,
-0.00884246826171875,
0.0295867919921875,
-0.0182037353515625,
0.033294677734375,
-0.0283203125,
-0.0005426406860351562,
0.0133514404296875,
0.0237884521484375,
0.0228118896484375,
-0.07763671875,
-0.00901031494140625,
-0.048065185546875,
-0.011260986328125,
0.04736328125,
-0.0234222412109375,
0.033660888671875,
-0.00391387939453125,
-0.0105743408203125,
0.0284423828125,
-0.0164794921875,
-0.00852203369140625,
-0.0145263671875,
-0.017547607421875,
0.046173095703125,
-0.0160980224609375,
0.0213775634765625,
-0.0015239715576171875,
0.0003707408905029297,
-0.044677734375,
0.00860595703125,
-0.0029315948486328125,
0.0013523101806640625,
0.00887298583984375,
0.005035400390625,
0.06829833984375,
-0.0160675048828125,
-0.038177490234375,
-0.009521484375,
-0.02764892578125,
0.048370361328125,
-0.07220458984375,
-0.00350189208984375,
0.06622314453125,
-0.02142333984375,
-0.041229248046875,
-0.06103515625,
-0.0022029876708984375,
-0.0220794677734375,
0.0201873779296875,
-0.01349639892578125,
-0.031341552734375,
-0.00949859619140625,
-0.050872802734375,
-0.049774169921875,
0.042999267578125,
-0.00909423828125,
-0.036651611328125,
-0.07049560546875,
0.02581787109375,
0.0287628173828125,
-0.038330078125,
-0.031768798828125,
-0.0231475830078125,
-0.05023193359375,
0.021942138671875,
0.0214385986328125,
0.0179901123046875,
-0.0007371902465820312,
0.049957275390625,
-0.0634765625,
0.03387451171875,
-0.003871917724609375,
0.0028705596923828125,
0.011444091796875,
-0.015869140625,
0.0027828216552734375,
0.0401611328125,
-0.03875732421875,
-0.0360107421875,
-0.025115966796875,
-0.0044708251953125,
-0.0309295654296875,
-0.041595458984375,
-0.026214599609375,
-0.007843017578125,
0.0631103515625,
0.0728759765625,
0.003910064697265625,
-0.02593994140625,
-0.08563232421875,
0.0009021759033203125,
-0.05340576171875,
0.01041412353515625,
0.07391357421875,
-0.1077880859375,
0.0169677734375,
0.013916015625,
-0.0013456344604492188,
-0.0034046173095703125,
-0.00771331787109375,
-0.028472900390625,
-0.0001798868179321289,
-0.0297088623046875,
-0.0107269287109375,
-0.039031982421875,
-0.0521240234375,
0.050262451171875,
-0.0163726806640625,
0.0239715576171875,
-0.022186279296875,
0.05322265625,
0.036163330078125,
-0.01392364501953125,
-0.0169677734375,
-0.00670623779296875,
-0.01058197021484375,
0.01128387451171875,
-0.01056671142578125,
0.026092529296875,
-0.0030994415283203125,
-0.014739990234375,
-0.0035381317138671875,
0.0151214599609375,
-0.0008473396301269531,
0.005558013916015625,
-0.00012874603271484375,
-0.002361297607421875,
-0.007076263427734375,
0.0291595458984375,
0.004215240478515625,
0.053924560546875,
0.01239013671875,
0.05352783203125,
-0.0163116455078125,
-0.02783203125,
0.0108795166015625,
-0.063720703125,
0.0006384849548339844,
-0.003047943115234375,
0.0007200241088867188,
-0.0277252197265625,
0.01132965087890625,
0.0015277862548828125,
0.005767822265625,
0.0181427001953125
]
|
db6c038a0900bcdefcd544d7dcd77115b51b132e | Wordpress Stackexchange
Q: Does something like is_rest() exist I am starting a bit with the REST API. If I am not completly mislead, the init action hook is also executed when its a REST API request. Now, I want to execute some code only, when it is not a REST API request.
So I was looking for a command like is_rest() in order to do something like
<?php
if( ! is_rest() ) echo 'no-rest-request';
?>
But I couldn't find something like this. Is there a is_rest() out there?
A: Two options here really,
*
*Check if REST_REQUEST is defined.
*Hook into rest_api_init where you wanted to hook into init.
| Q: Does something like is_rest() exist I am starting a bit with the REST API. If I am not completly mislead, the init action hook is also executed when its a REST API request. Now, I want to execute some code only, when it is not a REST API request.
So I was looking for a command like is_rest() in order to do something like
<?php
if( ! is_rest() ) echo 'no-rest-request';
?>
But I couldn't find something like this. Is there a is_rest() out there?
A: Two options here really,
*
*Check if REST_REQUEST is defined.
*Hook into rest_api_init where you wanted to hook into init.
A: If you need it after init has fired:
defined('REST_REQUEST') && REST_REQUEST
If you need it before init, there are two ways:
Use wp_is_json_request() (Introduced in WordPress 5.0), or try to infer if it's a REST Request through the URL. Detecting the URL will vary whether the site is using permalinks or plain permalinks.
WooCommerce does it like this, and it's a good solution:
function is_rest_api_request() {
if ( empty( $_SERVER['REQUEST_URI'] ) ) {
// Probably a CLI request
return false;
}
$rest_prefix = trailingslashit( rest_get_url_prefix() );
$is_rest_api_request = strpos( $_SERVER['REQUEST_URI'], $rest_prefix ) !== false;
return apply_filters( 'is_rest_api_request', $is_rest_api_request );
}
A: To solve this problem I wrote a simple custom function based on the assumption that if the URI being requested falls under the WordPress site's Rest API URL, then it follows that it's a Rest API request.
Whether it's a valid endpoint, or authenticated, is not for this function to determine. The question is this: is the URL a potential Rest API url?
function isRestUrl() {
$bIsRest = false;
if ( function_exists( 'rest_url' ) && !empty( $_SERVER[ 'REQUEST_URI' ] ) ) {
$sRestUrlBase = get_rest_url( get_current_blog_id(), '/' );
$sRestPath = trim( parse_url( $sRestUrlBase, PHP_URL_PATH ), '/' );
$sRequestPath = trim( $_SERVER[ 'REQUEST_URI' ], '/' );
$bIsRest = ( strpos( $sRequestPath, $sRestPath ) === 0 );
}
return $bIsRest;
}
If your $_SERVER['REQUEST_URI'] isn't properly populated, this function will still return false, regardless.
There is no hard-coding of the URL so if you for some reason change your API URL base, this will adapt.
A: Maybe not right, but I ended up with
if (strpos($_SERVER[ 'REQUEST_URI' ], '/wp-json/') !== false) {
// Cool API stuff here
}
Feel free to let me know if this isn't right. Trying to make a helpful plugin starter to eventually share: https://gitlab.com/ripp.io/wordpress/plugin-starter
A: It's a good point by @Milo, the REST_REQUEST constant is defined as true, within rest_api_loaded() if $GLOBALS['wp']->query_vars['rest_route'] is non-empty.
It's hooked into parse_request via:
add_action( 'parse_request', 'rest_api_loaded' );
but parse_request fires later than init - See for example the Codex here.
There was a suggestion (by Daniel Bachhuber) in ticket #34373 regarding WP_Query::is_rest(), but it was postponed/cancelled.
A: Just stumbled over the same problem and wrote a simple function is_rest that allows you to check if the current request is a WP REST API request.
<?php
if ( !function_exists( 'is_rest' ) ) {
/**
* Checks if the current request is a WP REST API request.
*
* Case #1: After WP_REST_Request initialisation
* Case #2: Support "plain" permalink settings and check if `rest_route` starts with `/`
* Case #3: It can happen that WP_Rewrite is not yet initialized,
* so do this (wp-settings.php)
* Case #4: URL Path begins with wp-json/ (your REST prefix)
* Also supports WP installations in subfolders
*
* @returns boolean
* @author matzeeable
*/
function is_rest() {
if (defined('REST_REQUEST') && REST_REQUEST // (#1)
|| isset($_GET['rest_route']) // (#2)
&& strpos( $_GET['rest_route'], '/', 0 ) === 0)
return true;
// (#3)
global $wp_rewrite;
if ($wp_rewrite === null) $wp_rewrite = new WP_Rewrite();
// (#4)
$rest_url = wp_parse_url( trailingslashit( rest_url( ) ) );
$current_url = wp_parse_url( add_query_arg( array( ) ) );
return strpos( $current_url['path'] ?? '/', $rest_url['path'], 0 ) === 0;
}
}
References:
*
*https://gist.github.com/matzeeable/dfd82239f48c2fedef25141e48c8dc30
*https://twitter.com/matzeeable/status/1052967482737258496
A: You can use wp_is_json_request() like below:
if ( wp_is_json_request() ) {
// do you stuff here
}
Make sure that you set Accepts or Content-Type as application/json otherwise wp_is_json_request() will return false.
More Documentation: https://developer.wordpress.org/reference/functions/wp_is_json_request/
| wordpress | {
"language": "en",
"length": 682,
"provenance": "stackexchange_00019.jsonl.gz:464086",
"question_score": "28",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/221202"
} | [
-0.006153106689453125,
0.0037021636962890625,
-0.0234527587890625,
0.0219573974609375,
-0.0022144317626953125,
-0.022216796875,
0.04248046875,
-0.0185089111328125,
-0.0171966552734375,
0.008270263671875,
-0.0201416015625,
0.033172607421875,
-0.06982421875,
-0.0124969482421875,
-0.006244659423828125,
-0.04217529296875,
0.0255126953125,
0.0005578994750976562,
0.022491455078125,
-0.029266357421875,
0.0154876708984375,
-0.0159454345703125,
0.0196533203125,
0.09332275390625,
0.024932861328125,
-0.00753021240234375,
0.0117034912109375,
-0.02374267578125,
0.01477813720703125,
-0.00431060791015625,
0.0202789306640625,
-0.0170135498046875,
0.0139312744140625,
0.04412841796875,
-0.032470703125,
0.028106689453125,
-0.01552581787109375,
0.0227203369140625,
0.0098724365234375,
0.0151519775390625,
0.030242919921875,
-0.0226287841796875,
0.0247039794921875,
-0.0303192138671875,
0.007411956787109375,
0.0192718505859375,
0.004627227783203125,
-0.030181884765625,
0.0261383056640625,
0.0020694732666015625,
0.0052642822265625,
-0.002849578857421875,
-0.00861358642578125,
0.0188751220703125,
-0.0171661376953125,
0.005863189697265625,
0.026123046875,
-0.0484619140625,
0.048828125,
-0.053314208984375,
-0.056549072265625,
-0.06658935546875,
0.0654296875,
-0.00942230224609375,
0.047882080078125,
-0.021636962890625,
-0.00656890869140625,
0.03558349609375,
-0.034210205078125,
0.0531005859375,
0.0311279296875,
-0.040740966796875,
0.0007905960083007812,
0.01507568359375,
-0.04632568359375,
-0.051544189453125,
0.04449462890625,
-0.0389404296875,
0.01169586181640625,
0.0081939697265625,
-0.0006518363952636719,
0.0015115737915039062,
0.0230712890625,
-0.03289794921875,
0.0086822509765625,
-0.0215911865234375,
-0.0095062255859375,
0.00514984130859375,
-0.024688720703125,
0.0016298294067382812,
-0.02130126953125,
-0.03973388671875,
-0.00960540771484375,
-0.0006275177001953125,
0.003986358642578125,
-0.0084686279296875,
0.008636474609375,
-0.03668212890625,
0.01551055908203125,
-0.00695037841796875,
0.049530029296875,
-0.05609130859375,
0.055389404296875,
0.00025343894958496094,
0.025604248046875,
0.0216522216796875,
0.00806427001953125,
-0.046356201171875,
0.0207061767578125,
-0.005725860595703125,
-0.032989501953125,
0.071533203125,
-0.0005106925964355469,
0.045135498046875,
-0.050048828125,
-0.0445556640625,
-0.048675537109375,
-0.0013484954833984375,
-0.03515625,
0.027740478515625,
0.00576019287109375,
0.0155029296875,
0.046478271484375,
0.0060272216796875,
0.01189422607421875,
0.029937744140625,
-0.00913238525390625,
-0.050811767578125,
-0.007808685302734375,
0.0223541259765625,
0.007568359375,
0.038482666015625,
-0.0129852294921875,
-0.04156494140625,
-0.06341552734375,
-0.0033550262451171875,
0.03363037109375,
0.0193939208984375,
0.0167236328125,
0.0030231475830078125,
0.026702880859375,
-0.041778564453125,
-0.0204010009765625,
0.0271148681640625,
-0.0001786947250366211,
0.0027408599853515625,
0.02178955078125,
0.003215789794921875,
0.006591796875,
-0.02044677734375,
-0.0177459716796875,
0.0175933837890625,
0.0015010833740234375,
0.006824493408203125,
0.02764892578125,
0.00873565673828125,
0.02044677734375,
0.00223541259765625,
-0.0059661865234375,
0.01450347900390625,
-0.01202392578125,
-0.053375244140625,
-0.02935791015625,
-0.050872802734375,
-0.048614501953125,
0.05657958984375,
-0.0190277099609375,
0.00960540771484375,
0.015106201171875,
0.023651123046875,
0.0150909423828125,
0.0174560546875,
0.0123443603515625,
0.01331329345703125,
-0.005069732666015625,
-0.0204925537109375,
0.0009431838989257812,
0.0174407958984375,
0.0256500244140625,
-0.0053863525390625,
-0.01380157470703125,
-0.03436279296875,
0.0277099609375,
-0.0005054473876953125,
-0.06353759765625,
0.08843994140625,
0.0014886856079101562,
0.0765380859375,
-0.002716064453125,
-0.0082244873046875,
0.03558349609375,
0.047943115234375,
0.03271484375,
0.00927734375,
-0.0113067626953125,
-0.0789794921875,
0.01125335693359375,
-0.0169677734375,
-0.0281829833984375,
0.0164337158203125,
-0.01056671142578125,
0.00994110107421875,
-0.022979736328125,
-0.0067291259765625,
-0.07220458984375,
-0.0256500244140625,
-0.0186920166015625,
0.0250244140625,
-0.020751953125,
0.01338958740234375,
-0.00962066650390625,
0.00122833251953125,
0.0012989044189453125,
-0.0096282958984375,
0.01239013671875,
0.030975341796875,
-0.02691650390625,
-0.007770538330078125,
-0.029449462890625,
0.031097412109375,
-0.0304718017578125,
0.0259857177734375,
-0.0278472900390625,
0.0069580078125,
0.039703369140625,
-0.01430511474609375,
0.0196533203125,
-0.0217132568359375,
0.0882568359375,
-0.00737762451171875,
0.057373046875,
-0.01102447509765625,
0.04534912109375,
0.01526641845703125,
-0.0284881591796875,
-0.0262908935546875,
-0.00850677490234375,
-0.06207275390625,
0.01068878173828125,
0.0635986328125,
0.0299224853515625,
0.060699462890625,
-0.01343536376953125,
-0.02069091796875,
0.06365966796875,
-0.024932861328125,
0.00714874267578125,
-0.0297393798828125,
-0.023590087890625,
-0.0084991455078125,
-0.0015306472778320312,
0.02215576171875,
0.0285186767578125,
-0.0015630722045898438,
-0.007354736328125,
0.0400390625,
-0.035430908203125,
-0.061431884765625,
0.01311492919921875,
-0.01155853271484375,
0.030303955078125,
-0.0285491943359375,
-0.043731689453125,
0.007904052734375,
-0.004253387451171875,
0.004352569580078125,
0.017974853515625,
0.040679931640625,
-0.0008020401000976562,
-0.0118865966796875,
0.007572174072265625,
0.0134124755859375,
-0.0043487548828125,
0.090087890625,
0.059417724609375,
0.0115966796875,
-0.0282135009765625,
-0.04083251953125,
-0.014739990234375,
0.054656982421875,
-0.03753662109375,
-0.0025234222412109375,
-0.0165252685546875,
-0.0164337158203125,
-0.0174713134765625,
-0.0296783447265625,
0.026641845703125,
-0.020050048828125,
0.053680419921875,
0.03167724609375,
0.0474853515625,
0.0174560546875,
-0.0176849365234375,
0.058441162109375,
-0.01318359375,
-0.0222625732421875,
-0.060760498046875,
-0.0017852783203125,
0.0246124267578125,
-0.02490234375,
-0.01082611083984375,
0.05816650390625,
-0.004207611083984375,
-0.0020046234130859375,
0.0089874267578125,
-0.045135498046875,
0.0059661865234375,
0.003376007080078125,
-0.00858306884765625,
-0.03173828125,
-0.0240325927734375,
0.03314208984375,
0.0200042724609375,
0.052215576171875,
-0.0010967254638671875,
-0.03564453125,
0.0007834434509277344,
0.00911712646484375,
-0.043487548828125,
-0.080078125,
0.067138671875,
-0.016510009765625,
0.01274871826171875,
-0.005558013916015625,
-0.0126495361328125,
-0.041259765625,
0.002964019775390625,
-0.021484375,
0.0040283203125,
-0.021026611328125,
0.0076446533203125,
-0.01702880859375,
-0.031890869140625,
0.03472900390625,
0.01300811767578125,
0.0119781494140625,
0.00467681884765625,
0.07061767578125,
0.0022869110107421875,
-0.0305633544921875,
0.026397705078125,
-0.0141754150390625,
-0.00464630126953125,
0.035186767578125,
0.009185791015625,
0.0004277229309082031,
-0.0185089111328125,
0.01290130615234375,
0.02081298828125,
0.003021240234375,
-0.0250091552734375,
-0.017242431640625,
-0.0195465087890625,
-0.017425537109375,
-0.0058746337890625,
0.0667724609375,
0.0247344970703125,
-0.041046142578125,
0.01448822021484375,
-0.055572509765625,
-0.0249481201171875,
0.00905609130859375,
-0.048492431640625,
0.00012385845184326172,
0.01161956787109375,
-0.004314422607421875,
0.00331878662109375,
0.00817108154296875,
-0.01415252685546875,
-0.0171661376953125,
0.006076812744140625,
-0.01291656494140625,
0.004604339599609375,
-0.012176513671875,
-0.0231475830078125,
-0.004238128662109375,
0.04852294921875,
0.0009131431579589844,
-0.061248779296875,
-0.00788116455078125,
-0.0066986083984375,
-0.01904296875,
-0.0096893310546875,
-0.065185546875,
0.0310821533203125,
0.0225982666015625,
0.032806396484375,
0.03509521484375,
-0.001983642578125,
-0.01285552978515625,
-0.004375457763671875,
0.0269622802734375,
-0.018585205078125,
-0.0256805419921875,
-0.004863739013671875,
0.0166473388671875,
-0.0240325927734375,
-0.0164947509765625,
-0.0007653236389160156,
-0.00506591796875,
-0.01174163818359375,
-0.005283355712890625,
-0.00005441904067993164,
-0.0195465087890625,
-0.0092010498046875,
-0.01556396484375,
0.0253448486328125,
-0.016204833984375,
0.01181793212890625,
-0.069091796875,
-0.00885772705078125,
-0.007293701171875,
-0.004611968994140625,
-0.044769287109375,
0.0198974609375,
-0.07647705078125,
-0.060577392578125,
-0.009429931640625,
-0.0670166015625,
0.0604248046875,
0.052581787109375,
-0.03619384765625,
0.01444244384765625,
0.0335693359375,
-0.0012750625610351562,
-0.0151214599609375,
0.03057861328125,
0.00939178466796875,
0.011749267578125,
0.032928466796875,
-0.00460052490234375,
-0.00836181640625,
-0.038604736328125,
0.00452423095703125,
-0.003864288330078125,
0.06378173828125,
0.00672149658203125,
-0.0255584716796875,
0.019195556640625,
-0.01186370849609375,
-0.027984619140625,
-0.031890869140625,
-0.0257720947265625,
0.044158935546875,
-0.03729248046875,
0.031463623046875,
-0.040130615234375,
-0.06793212890625,
0.021392822265625,
-0.01149749755859375,
-0.035491943359375,
0.007259368896484375,
0.025543212890625,
0.02056884765625,
-0.01293182373046875,
-0.0094757080078125,
0.00841522216796875,
-0.007030487060546875,
0.0251007080078125,
0.029388427734375,
-0.037994384765625,
-0.0159149169921875,
0.058258056640625,
-0.0241546630859375,
-0.0005230903625488281,
0.020965576171875,
0.01641845703125,
0.0160369873046875,
0.006832122802734375,
-0.0198211669921875,
0.035125732421875,
-0.0226287841796875,
0.0210723876953125,
0.0299530029296875,
-0.0188446044921875,
0.061248779296875,
0.00616455078125,
-0.04632568359375,
0.0129852294921875,
0.01409912109375,
0.0003948211669921875,
-0.0085906982421875,
0.0156402587890625,
0.022216796875,
0.01248931884765625,
0.0037326812744140625,
-0.0364990234375,
-0.01103973388671875,
0.016204833984375,
-0.0290069580078125,
0.046051025390625,
-0.07379150390625,
0.03961181640625,
-0.040985107421875,
-0.025299072265625,
-0.041839599609375,
-0.01558685302734375,
0.06317138671875,
0.0037384033203125,
-0.0694580078125,
-0.000018417835235595703,
-0.00930023193359375,
0.052520751953125,
0.01227569580078125,
0.00939178466796875,
-0.02789306640625,
0.0018606185913085938,
-0.00289154052734375,
0.01117706298828125,
0.039459228515625,
0.00994110107421875,
0.00469970703125,
0.0196533203125,
-0.004764556884765625,
0.0023365020751953125,
0.02520751953125,
0.031219482421875,
0.01203155517578125,
0.028961181640625,
-0.0220794677734375,
0.01313018798828125,
0.00675201416015625,
0.028289794921875,
0.03363037109375,
-0.02581787109375,
0.0117645263671875,
-0.0111083984375,
0.00009292364120483398,
-0.06524658203125,
-0.0242156982421875,
0.033477783203125,
0.059356689453125,
-0.0170135498046875,
-0.0281829833984375,
0.0101318359375,
-0.00514984130859375,
-0.06695556640625,
0.0283355712890625,
0.019439697265625,
-0.02642822265625,
-0.055755615234375,
-0.033721923828125,
0.003215789794921875,
0.037628173828125,
0.004848480224609375,
-0.01556396484375,
0.01270294189453125,
0.0172271728515625,
-0.049530029296875,
-0.045562744140625,
0.037994384765625,
0.0517578125,
0.01348114013671875,
-0.02825927734375,
-0.0228424072265625,
0.0120697021484375,
0.01233673095703125,
-0.034423828125,
-0.0091094970703125,
0.0228729248046875,
0.009857177734375,
0.0004892349243164062,
-0.043060302734375,
0.005519866943359375,
-0.06280517578125,
-0.0026187896728515625,
0.0487060546875,
0.021942138671875,
-0.0224761962890625,
-0.01422119140625,
-0.05242919921875,
-0.0301361083984375,
-0.0167388916015625,
-0.0290985107421875,
-0.033966064453125,
0.00766754150390625,
0.01374053955078125,
0.0269317626953125,
-0.01531219482421875,
-0.00008624792098999023,
0.002849578857421875,
0.034454345703125,
-0.001789093017578125,
0.06915283203125,
-0.0220794677734375,
0.07159423828125,
0.0013933181762695312,
0.04736328125,
0.01904296875,
0.035675048828125,
-0.00890350341796875,
-0.0190887451171875,
-0.0194854736328125,
-0.04608154296875,
-0.0006518363952636719,
-0.004276275634765625,
0.0008978843688964844,
0.042694091796875,
0.0516357421875,
0.00885009765625,
-0.01125335693359375,
-0.005767822265625,
-0.019256591796875,
-0.0125274658203125,
0.0400390625,
0.02593994140625,
0.023040771484375,
-0.0146331787109375,
0.020233154296875,
-0.009765625,
-0.045196533203125,
-0.0238189697265625,
-0.0027179718017578125,
0.0350341796875,
-0.01061248779296875,
-0.0204010009765625,
-0.05755615234375,
0.061676025390625,
0.09173583984375,
-0.0008134841918945312,
0.0538330078125,
-0.0011892318725585938,
0.0036754608154296875,
0.06134033203125,
0.038116455078125,
0.0031585693359375,
-0.052825927734375,
0.0008654594421386719,
0.0016736984252929688,
0.0201873779296875,
0.0015916824340820312,
-0.01451873779296875,
0.037811279296875,
0.060333251953125,
0.0611572265625,
-0.07867431640625,
0.0018301010131835938,
-0.0011968612670898438,
-0.02886962890625,
0.053436279296875,
-0.05328369140625,
0.0080108642578125,
-0.042022705078125,
0.0654296875,
-0.00923919677734375,
-0.049072265625,
-0.00018835067749023438,
-0.047271728515625,
-0.00754547119140625,
-0.049072265625,
0.011322021484375,
0.028533935546875,
0.0389404296875,
0.0509033203125,
-0.02508544921875,
0.0623779296875,
0.0004398822784423828,
0.043701171875,
-0.0017919540405273438,
-0.0213775634765625,
-0.007427215576171875,
0.0406494140625,
0.011962890625,
-0.040863037109375,
0.0218963623046875,
-0.03271484375,
0.0260009765625,
0.0305633544921875,
-0.027252197265625,
0.0043792724609375,
0.0128936767578125,
-0.030120849609375,
-0.068603515625,
-0.0276947021484375,
0.01168060302734375,
0.034423828125,
0.0024356842041015625,
0.038818359375,
0.0009031295776367188,
-0.052703857421875,
0.0204925537109375,
-0.0262603759765625,
0.0491943359375,
-0.041961669921875,
-0.0099639892578125,
0.0025386810302734375,
-0.042572021484375,
0.02435302734375,
0.0062408447265625,
0.04022216796875,
-0.0078277587890625,
0.0031452178955078125,
0.01093292236328125,
-0.0106964111328125,
-0.0206756591796875,
0.015594482421875,
-0.0001575946807861328,
0.06005859375,
-0.022003173828125,
-0.033111572265625,
-0.01207733154296875,
0.0430908203125,
0.00891876220703125,
0.053314208984375,
-0.044189453125,
0.0259857177734375,
0.03521728515625,
0.0274505615234375,
0.005115509033203125,
0.0189208984375,
0.024627685546875,
-0.0162353515625,
0.032745361328125,
0.00949859619140625,
-0.001529693603515625,
0.012847900390625,
0.021514892578125,
-0.0012102127075195312,
-0.03497314453125,
0.038604736328125,
0.0024204254150390625,
0.01194000244140625,
0.0838623046875,
-0.01849365234375,
0.04296875,
-0.00001627206802368164,
0.0283203125,
0.018035888671875,
-0.004055023193359375,
-0.007568359375,
-0.027801513671875,
0.039093017578125,
-0.03863525390625,
-0.023712158203125,
0.02838134765625,
-0.00614166259765625,
-0.015716552734375,
0.03961181640625,
-0.0142822265625,
-0.017669677734375,
0.025238037109375,
-0.040130615234375,
0.03436279296875,
-0.0250091552734375,
0.00841522216796875,
-0.00737762451171875,
0.014801025390625,
0.0011072158813476562,
-0.01058197021484375,
0.0021076202392578125,
0.043792724609375,
-0.038238525390625,
0.0166015625,
0.03289794921875,
0.0374755859375,
-0.004634857177734375,
-0.037384033203125,
-0.0015687942504882812,
0.043670654296875,
-0.009368896484375,
-0.05377197265625,
-0.004024505615234375,
0.009979248046875,
0.041107177734375,
0.0279998779296875,
0.070556640625,
-0.0229644775390625,
0.01161956787109375,
0.00008165836334228516,
-0.006534576416015625,
0.013458251953125,
0.031951904296875,
0.03076171875,
0.0516357421875,
-0.05908203125,
-0.0377197265625,
-0.025909423828125,
0.0165252685546875,
-0.0074310302734375,
0.05419921875,
-0.0124359130859375,
0.040557861328125,
-0.0140533447265625,
-0.02044677734375,
0.0033855438232421875,
-0.01971435546875,
-0.025787353515625,
0.00432586669921875,
-0.016937255859375,
-0.025726318359375,
0.005130767822265625,
0.02392578125,
0.05218505859375,
0.05364990234375,
0.054718017578125,
0.038970947265625,
0.0011043548583984375,
0.022705078125,
0.06878662109375,
-0.0160675048828125,
-0.01541900634765625,
-0.0243377685546875,
-0.043609619140625,
-0.00983428955078125,
-0.035400390625,
0.00946807861328125,
-0.00144195556640625,
0.00604248046875,
-0.014373779296875,
0.006206512451171875,
0.00957489013671875,
-0.0484619140625,
0.0017175674438476562,
-0.030517578125,
0.064697265625,
-0.0066070556640625,
0.0369873046875,
-0.0026493072509765625,
0.00467681884765625,
0.0361328125,
-0.032318115234375,
-0.00019085407257080078,
0.004238128662109375,
0.048309326171875,
0.04864501953125,
0.02899169921875,
-0.0164337158203125,
-0.03558349609375,
0.01337432861328125,
-0.07965087890625,
0.026123046875,
0.00577545166015625,
-0.038726806640625,
-0.04296875,
-0.0203857421875,
0.05303955078125,
0.001438140869140625,
0.0251312255859375,
-0.003406524658203125,
0.0253753662109375,
-0.004177093505859375,
0.04388427734375,
-0.0287322998046875,
0.003414154052734375,
0.00040912628173828125,
0.01030731201171875,
0.01029205322265625,
-0.01531219482421875,
-0.06256103515625,
-0.0037822723388671875,
0.03857421875,
0.020233154296875,
0.041839599609375,
-0.04217529296875,
0.026580810546875,
-0.01465606689453125,
0.0304107666015625,
-0.032958984375,
-0.032196044921875,
0.023712158203125,
0.0249786376953125,
-0.005828857421875,
0.005218505859375,
0.01258087158203125,
0.02496337890625,
-0.007965087890625,
-0.0270843505859375,
-0.023468017578125,
-0.0132293701171875,
-0.060760498046875,
0.0144500732421875,
0.0167999267578125,
0.01751708984375,
-0.061737060546875,
-0.0259857177734375,
0.02484130859375,
-0.0015363693237304688,
-0.0210723876953125,
-0.0277252197265625,
0.08575439453125,
-0.00537872314453125,
0.0142669677734375,
0.03619384765625,
-0.01531982421875,
-0.0036983489990234375,
0.01476287841796875,
0.004711151123046875,
-0.014434814453125,
-0.023345947265625,
-0.0238037109375,
-0.055145263671875,
-0.0057220458984375,
0.00171661376953125,
-0.0207977294921875,
-0.06280517578125,
-0.01611328125,
-0.005626678466796875,
-0.01233673095703125,
-0.033935546875,
0.013092041015625,
-0.019805908203125,
-0.027008056640625,
0.0157928466796875,
-0.0235748291015625,
0.0010662078857421875,
0.019683837890625,
0.030029296875,
-0.0814208984375,
0.036102294921875,
-0.002101898193359375,
-0.060791015625,
0.0289764404296875,
0.0169219970703125,
0.031219482421875,
-0.0142822265625,
-0.0687255859375,
-0.006320953369140625,
-0.01141357421875,
0.04266357421875,
0.031402587890625,
-0.02392578125,
0.00478363037109375,
-0.0020389556884765625,
-0.01558685302734375,
-0.01514434814453125,
0.0200347900390625,
-0.049835205078125,
-0.0367431640625,
-0.06829833984375,
0.05242919921875,
0.035919189453125,
-0.03973388671875,
-0.11328125,
0.06500244140625,
-0.050079345703125,
-0.02996826171875,
-0.09320068359375,
0.01088714599609375,
0.01258087158203125,
0.0178375244140625,
-0.050506591796875,
0.0031890869140625,
-0.032440185546875,
0.052093505859375,
0.01407623291015625,
0.0258941650390625,
0.0163116455078125,
-0.01617431640625,
-0.03717041015625,
0.01250457763671875,
0.00899505615234375,
0.03704833984375,
0.0036830902099609375,
0.0165557861328125,
0.0218048095703125,
0.0491943359375,
-0.02520751953125,
0.055419921875,
-0.0234527587890625,
-0.0113372802734375,
-0.0003867149353027344,
-0.005359649658203125,
-0.037139892578125,
0.0036449432373046875,
0.07000732421875,
0.07061767578125,
0.0213775634765625,
-0.05340576171875,
-0.0296478271484375,
-0.0310821533203125,
-0.0153045654296875,
-0.036041259765625,
0.0225677490234375,
-0.0738525390625,
-0.0174713134765625,
0.00962066650390625,
0.0081329345703125,
-0.0142669677734375,
-0.024688720703125,
-0.026153564453125,
-0.0233917236328125,
-0.0194091796875,
-0.00926971435546875,
0.0028285980224609375,
-0.03759765625,
0.05340576171875,
-0.029327392578125,
0.005962371826171875,
0.0251312255859375,
0.0214996337890625,
0.01751708984375,
0.071044921875,
0.0110626220703125,
-0.005435943603515625,
-0.0369873046875,
0.00592041015625,
0.00989532470703125,
-0.01416015625,
-0.006099700927734375,
-0.02978515625,
-0.0289154052734375,
0.0196533203125,
0.025115966796875,
0.047088623046875,
-0.0239410400390625,
-0.00687408447265625,
0.0125579833984375,
-0.005420684814453125,
-0.0217132568359375,
0.03802490234375,
0.002376556396484375,
0.00954437255859375,
0.0080413818359375,
0.0015716552734375,
0.03594970703125,
-0.026519775390625,
-0.0016374588012695312,
0.03118896484375,
-0.03680419921875,
-0.06011962890625,
0.042694091796875,
-0.0204620361328125,
-0.006687164306640625,
0.026123046875
]
|
4884908257ee5f327dbb67cbf9b792dde049025c | Wordpress Stackexchange
Q: How to add query vars with paginated URLs? How I can insert some custom url parameters to pagination links? the code below display like
page.php?cpage=2
But I would like to add a parameter category with value fruit. So, the final url will look like below.
page.php?cpage=2&category=fruits
and so on..
page.php?cpage=2&category=fruits&color=red&size=small
Where and how do I insert the code to make the above happen?
echo paginate_links( array(
'base' => add_query_arg( 'cpage', '%#%' ),
'format' => '',
'prev_text' => __('«'),
'next_text' => __('»'),
'total' => ceil($total / $items_per_page),
'current' => $page
));
thanks in advance
A: Use the add_args parameter to add an array of query string arguments to pagination links:
echo paginate_links( array(
'base' => add_query_arg( 'cpage', '%#%' ),
'format' => '',
'prev_text' => __('«'),
'next_text' => __('»'),
'total' => ceil($total / $items_per_page),
'current' => $page,
'add_args' => array(
'category' => 'fruit',
'color' => 'red'
)
));
| Q: How to add query vars with paginated URLs? How I can insert some custom url parameters to pagination links? the code below display like
page.php?cpage=2
But I would like to add a parameter category with value fruit. So, the final url will look like below.
page.php?cpage=2&category=fruits
and so on..
page.php?cpage=2&category=fruits&color=red&size=small
Where and how do I insert the code to make the above happen?
echo paginate_links( array(
'base' => add_query_arg( 'cpage', '%#%' ),
'format' => '',
'prev_text' => __('«'),
'next_text' => __('»'),
'total' => ceil($total / $items_per_page),
'current' => $page
));
thanks in advance
A: Use the add_args parameter to add an array of query string arguments to pagination links:
echo paginate_links( array(
'base' => add_query_arg( 'cpage', '%#%' ),
'format' => '',
'prev_text' => __('«'),
'next_text' => __('»'),
'total' => ceil($total / $items_per_page),
'current' => $page,
'add_args' => array(
'category' => 'fruit',
'color' => 'red'
)
));
| wordpress | {
"language": "en",
"length": 147,
"provenance": "stackexchange_00019.jsonl.gz:464121",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/221341"
} | [
0.09478759765625,
0.001895904541015625,
0.006656646728515625,
-0.12890625,
0.035888671875,
0.0024051666259765625,
-0.0027751922607421875,
0.022369384765625,
-0.03240966796875,
0.0250244140625,
0.0113067626953125,
-0.004032135009765625,
-0.0207672119140625,
-0.036102294921875,
-0.0115509033203125,
-0.04278564453125,
0.01503753662109375,
-0.0284881591796875,
-0.01515960693359375,
-0.00341796875,
0.00429534912109375,
-0.01451873779296875,
0.0135345458984375,
0.049652099609375,
0.022979736328125,
-0.02520751953125,
0.007720947265625,
-0.02276611328125,
0.0093841552734375,
-0.007045745849609375,
0.0035552978515625,
0.0062713623046875,
0.03936767578125,
-0.00959014892578125,
-0.0000029802322387695312,
-0.005451202392578125,
0.046966552734375,
-0.0297698974609375,
-0.0012683868408203125,
0.0247955322265625,
0.031982421875,
-0.00995635986328125,
0.0009431838989257812,
0.01678466796875,
-0.0188140869140625,
-0.033294677734375,
0.035369873046875,
-0.01049041748046875,
-0.01537322998046875,
0.0183563232421875,
0.0011768341064453125,
0.0160675048828125,
0.000029385089874267578,
0.05194091796875,
0.00800323486328125,
0.01229095458984375,
0.007694244384765625,
-0.053314208984375,
0.0259246826171875,
-0.01384735107421875,
-0.0222320556640625,
-0.049163818359375,
0.03826904296875,
-0.0036945343017578125,
-0.011566162109375,
-0.0025386810302734375,
0.01247406005859375,
0.0295562744140625,
-0.0221099853515625,
-0.04034423828125,
0.0007557868957519531,
-0.00511932373046875,
-0.006053924560546875,
-0.0322265625,
0.0219573974609375,
0.003604888916015625,
-0.002994537353515625,
-0.0069580078125,
-0.0009026527404785156,
0.0101318359375,
0.0062103271484375,
0.01047515869140625,
-0.01035308837890625,
-0.004665374755859375,
0.01323699951171875,
0.0114288330078125,
-0.0210113525390625,
-0.0262603759765625,
-0.018646240234375,
-0.0280914306640625,
-0.01137542724609375,
-0.011932373046875,
-0.02435302734375,
-0.02435302734375,
-0.006011962890625,
-0.0494384765625,
0.007904052734375,
0.034423828125,
-0.011749267578125,
0.0258331298828125,
-0.040130615234375,
-0.00858306884765625,
0.0167388916015625,
-0.04644775390625,
0.016204833984375,
0.047607421875,
0.0200347900390625,
0.06854248046875,
0.0635986328125,
0.01369476318359375,
0.0149078369140625,
0.06695556640625,
-0.015777587890625,
-0.006572723388671875,
-0.018157958984375,
0.006427764892578125,
-0.050628662109375,
0.00336456298828125,
-0.0037555694580078125,
0.0164337158203125,
-0.047821044921875,
0.005786895751953125,
-0.00714874267578125,
-0.058135986328125,
0.03662109375,
0.0055694580078125,
0.020416259765625,
-0.0219879150390625,
-0.028106689453125,
0.038665771484375,
-0.039276123046875,
0.014678955078125,
0.047454833984375,
0.0234222412109375,
0.00982666015625,
-0.029052734375,
0.020050048828125,
-0.04473876953125,
-0.02215576171875,
0.02587890625,
-0.00716400146484375,
-0.0262603759765625,
-0.0037097930908203125,
-0.009674072265625,
0.00864410400390625,
-0.0026607513427734375,
0.0034618377685546875,
0.019805908203125,
0.007343292236328125,
-0.024139404296875,
0.007328033447265625,
-0.03564453125,
0.06134033203125,
0.00603485107421875,
-0.12420654296875,
0.0249176025390625,
-0.049072265625,
0.02288818359375,
-0.064208984375,
-0.036651611328125,
-0.01427459716796875,
-0.01160430908203125,
0.00762176513671875,
-0.06719970703125,
-0.065673828125,
-0.01245880126953125,
-0.0237274169921875,
0.0013866424560546875,
0.0167236328125,
0.04327392578125,
-0.01203155517578125,
-0.006046295166015625,
0.044464111328125,
0.0220794677734375,
-0.00467681884765625,
0.01390838623046875,
0.0255279541015625,
0.01306915283203125,
0.036346435546875,
0.0489501953125,
-0.0208892822265625,
-0.047454833984375,
0.08697509765625,
-0.060333251953125,
-0.0657958984375,
0.033447265625,
-0.0007338523864746094,
0.0704345703125,
0.017120361328125,
0.02392578125,
0.020599365234375,
-0.0034465789794921875,
-0.0299530029296875,
-0.010955810546875,
0.011383056640625,
-0.01386260986328125,
0.0010442733764648438,
-0.00949859619140625,
0.0026988983154296875,
-0.0147247314453125,
-0.0254974365234375,
0.0028476715087890625,
-0.00922393798828125,
0.0248870849609375,
-0.0188446044921875,
-0.0004241466522216797,
0.0011053085327148438,
0.034088134765625,
-0.020477294921875,
0.0277252197265625,
0.0225067138671875,
-0.002780914306640625,
-0.01366424560546875,
-0.041168212890625,
-0.00835418701171875,
-0.0016145706176757812,
0.0280914306640625,
0.002155303955078125,
0.002429962158203125,
-0.0226898193359375,
0.0297698974609375,
0.014678955078125,
0.01568603515625,
0.039581298828125,
0.0482177734375,
-0.0100250244140625,
-0.01519775390625,
-0.03302001953125,
0.020965576171875,
-0.01556396484375,
-0.0231781005859375,
0.07037353515625,
0.0276031494140625,
0.03570556640625,
-0.0009775161743164062,
0.024139404296875,
0.046173095703125,
-0.02935791015625,
-0.0016679763793945312,
0.0153961181640625,
0.033294677734375,
0.0241241455078125,
-0.0301361083984375,
-0.03619384765625,
0.05572509765625,
-0.043609619140625,
-0.0009112358093261719,
-0.0273284912109375,
-0.0221099853515625,
0.0104217529296875,
0.06268310546875,
-0.006916046142578125,
0.00444793701171875,
0.00861358642578125,
-0.01319122314453125,
0.0103302001953125,
0.0262298583984375,
0.01776123046875,
-0.0161590576171875,
0.003429412841796875,
0.00434112548828125,
0.030914306640625,
-0.0017728805541992188,
0.0198822021484375,
0.016815185546875,
0.0244903564453125,
0.029815673828125,
0.0290679931640625,
-0.0219879150390625,
0.0161285400390625,
0.01364898681640625,
0.0208587646484375,
-0.0157318115234375,
-0.0150909423828125,
-0.02374267578125,
-0.0299835205078125,
-0.020355224609375,
0.0472412109375,
-0.0300140380859375,
-0.0386962890625,
-0.0031108856201171875,
0.02435302734375,
-0.04510498046875,
-0.0035495758056640625,
-0.020416259765625,
-0.04254150390625,
-0.0126190185546875,
0.03302001953125,
-0.01071929931640625,
0.0034942626953125,
0.0313720703125,
0.004673004150390625,
-0.0228118896484375,
0.01042938232421875,
-0.01324462890625,
-0.00847625732421875,
0.0218353271484375,
-0.0150299072265625,
0.016754150390625,
-0.024200439453125,
0.0050048828125,
0.03167724609375,
0.007472991943359375,
-0.0300445556640625,
-0.0126953125,
-0.01464080810546875,
-0.026092529296875,
0.0302886962890625,
0.0014085769653320312,
-0.06939697265625,
0.0137939453125,
0.0279541015625,
0.01519012451171875,
0.0168914794921875,
0.01397705078125,
-0.0430908203125,
0.012939453125,
0.019073486328125,
-0.08148193359375,
-0.06793212890625,
0.057159423828125,
-0.054534912109375,
-0.005107879638671875,
0.043853759765625,
-0.048248291015625,
-0.0289764404296875,
0.0809326171875,
-0.016693115234375,
-0.0015544891357421875,
-0.08447265625,
-0.056304931640625,
-0.08807373046875,
-0.0615234375,
0.04656982421875,
0.026580810546875,
-0.0001800060272216797,
-0.01517486572265625,
0.074462890625,
0.0087738037109375,
-0.01885986328125,
0.00897979736328125,
-0.055572509765625,
0.00835418701171875,
0.00862884521484375,
0.007801055908203125,
-0.01751708984375,
0.035003662109375,
-0.024017333984375,
0.10797119140625,
0.070068359375,
-0.0494384765625,
0.043609619140625,
0.01715087890625,
0.0034580230712890625,
-0.0006122589111328125,
0.002803802490234375,
0.000507354736328125,
0.0219268798828125,
-0.0010356903076171875,
-0.032440185546875,
-0.02764892578125,
-0.006855010986328125,
-0.05322265625,
0.01219940185546875,
0.041656494140625,
-0.0033016204833984375,
-0.0162811279296875,
-0.01277923583984375,
-0.0127716064453125,
-0.0124053955078125,
0.0175018310546875,
-0.03814697265625,
-0.028106689453125,
0.0005779266357421875,
-0.01181793212890625,
0.0180816650390625,
0.0413818359375,
-0.003902435302734375,
0.041961669921875,
0.028106689453125,
0.004421234130859375,
0.0115966796875,
-0.0106964111328125,
-0.01751708984375,
-0.025177001953125,
0.0278778076171875,
0.007122039794921875,
0.04986572265625,
-0.032958984375,
-0.01641845703125,
-0.021636962890625,
0.0413818359375,
-0.0233001708984375,
-0.04052734375,
-0.0249481201171875,
0.019683837890625,
-0.0176849365234375,
-0.043609619140625,
0.0262298583984375,
0.0041961669921875,
-0.052734375,
-0.0018548965454101562,
-0.0096893310546875,
-0.0145263671875,
-0.013458251953125,
0.041473388671875,
-0.037261962890625,
-0.0198211669921875,
0.035888671875,
0.01459503173828125,
-0.0230865478515625,
0.04339599609375,
-0.0207366943359375,
0.0246734619140625,
-0.052215576171875,
0.0236358642578125,
-0.0303802490234375,
-0.01861572265625,
0.0250396728515625,
0.0272979736328125,
0.00807952880859375,
-0.03131103515625,
-0.02227783203125,
0.035400390625,
0.00856781005859375,
0.0178070068359375,
0.0231781005859375,
0.00621795654296875,
-0.004619598388671875,
-0.02099609375,
0.009490966796875,
-0.035614013671875,
-0.003971099853515625,
-0.01934814453125,
-0.0265655517578125,
-0.0411376953125,
-0.0176849365234375,
-0.022705078125,
0.0279693603515625,
-0.027435302734375,
-0.10809326171875,
-0.025360107421875,
0.0166473388671875,
0.01800537109375,
0.031280517578125,
-0.017822265625,
-0.01490020751953125,
-0.0994873046875,
0.0177001953125,
-0.040985107421875,
-0.031494140625,
0.002056121826171875,
0.049224853515625,
0.0218963623046875,
0.00001055002212524414,
0.03533935546875,
-0.027313232421875,
0.01494598388671875,
-0.0229949951171875,
0.007091522216796875,
-0.004093170166015625,
-0.01641845703125,
0.02740478515625,
-0.029266357421875,
0.0302886962890625,
-0.00982666015625,
0.0228424072265625,
-0.00698089599609375,
-0.01345062255859375,
0.0099639892578125,
-0.012451171875,
0.01021575927734375,
-0.0028667449951171875,
-0.0299835205078125,
0.0037899017333984375,
0.0019855499267578125,
0.0296478271484375,
-0.01611328125,
0.046966552734375,
-0.0249786376953125,
-0.0015306472778320312,
-0.01142120361328125,
0.036865234375,
0.061309814453125,
0.022552490234375,
-0.0039520263671875,
0.01462554931640625,
0.03900146484375,
0.00395965576171875,
0.036590576171875,
0.0151214599609375,
0.0186004638671875,
0.02386474609375,
0.0227508544921875,
-0.0004987716674804688,
0.01641845703125,
0.0176239013671875,
-0.018829345703125,
0.017578125,
0.022796630859375,
-0.054901123046875,
-0.007663726806640625,
-0.0012559890747070312,
-0.035736083984375,
0.0016183853149414062,
0.032989501953125,
0.024383544921875,
0.03851318359375,
0.034332275390625,
-0.01026153564453125,
0.008819580078125,
-0.00403594970703125,
0.0513916015625,
-0.0002149343490600586,
0.00971221923828125,
-0.0226287841796875,
0.07818603515625,
-0.005603790283203125,
0.031768798828125,
-0.00768280029296875,
-0.02691650390625,
0.0181884765625,
0.0223541259765625,
0.023284912109375,
-0.0169219970703125,
0.0019626617431640625,
-0.017181396484375,
0.0665283203125,
-0.0026111602783203125,
0.019134521484375,
0.0137786865234375,
0.0222930908203125,
0.0244140625,
-0.00576019287109375,
-0.016143798828125,
-0.0312042236328125,
-0.015594482421875,
-0.015716552734375,
0.038818359375,
0.0212249755859375,
0.0130462646484375,
-0.0015554428100585938,
-0.0178375244140625,
0.031036376953125,
-0.0240020751953125,
0.00850677490234375,
-0.050567626953125,
0.047882080078125,
0.00824737548828125,
0.033599853515625,
-0.0104217529296875,
-0.038726806640625,
0.0196380615234375,
-0.02838134765625,
-0.0030975341796875,
0.0181732177734375,
0.0204010009765625,
-0.034759521484375,
-0.033782958984375,
0.0108489990234375,
0.007965087890625,
0.07537841796875,
-0.059814453125,
-0.03631591796875,
-0.0086669921875,
-0.0116729736328125,
0.044830322265625,
0.003444671630859375,
-0.0283966064453125,
0.015655517578125,
-0.05950927734375,
-0.0129547119140625,
0.0009322166442871094,
-0.0025310516357421875,
-0.0045166015625,
-0.0202178955078125,
-0.0002694129943847656,
0.044921875,
-0.0113677978515625,
-0.006237030029296875,
-0.0400390625,
-0.004669189453125,
0.0019588470458984375,
0.04156494140625,
0.0169677734375,
0.03778076171875,
-0.041778564453125,
0.067138671875,
0.0098724365234375,
-0.011566162109375,
-0.025604248046875,
-0.0180511474609375,
0.006622314453125,
-0.034576416015625,
-0.01849365234375,
-0.03204345703125,
-0.0038127899169921875,
0.03643798828125,
0.07421875,
0.0086822509765625,
0.032867431640625,
0.001678466796875,
-0.0034809112548828125,
0.0005159378051757812,
0.004810333251953125,
0.00923919677734375,
0.02606201171875,
0.056488037109375,
-0.01531982421875,
-0.037841796875,
-0.005092620849609375,
0.043060302734375,
-0.01666259765625,
-0.00960540771484375,
-0.01366424560546875,
-0.0135498046875,
-0.08453369140625,
0.03997802734375,
0.1011962890625,
0.0224456787109375,
0.05670166015625,
-0.00766754150390625,
0.0250091552734375,
0.0732421875,
0.007274627685546875,
0.029937744140625,
0.0149993896484375,
0.04266357421875,
-0.0211181640625,
0.00212860107421875,
0.0149383544921875,
-0.019989013671875,
0.006687164306640625,
0.014556884765625,
0.029052734375,
-0.03619384765625,
-0.00258636474609375,
-0.01425933837890625,
-0.00934600830078125,
0.045135498046875,
0.0295562744140625,
0.01345062255859375,
-0.00598907470703125,
-0.003314971923828125,
0.0029048919677734375,
0.0161895751953125,
0.0054779052734375,
-0.0215606689453125,
-0.0002853870391845703,
-0.00917816162109375,
-0.036224365234375,
-0.0189208984375,
-0.049652099609375,
-0.01458740234375,
0.042938232421875,
-0.041046142578125,
-0.022735595703125,
-0.039581298828125,
0.054962158203125,
-0.0299072265625,
-0.0772705078125,
0.01006317138671875,
-0.037994384765625,
0.01308441162109375,
0.00383758544921875,
0.02178955078125,
0.0205078125,
0.03607177734375,
0.0008873939514160156,
0.0004825592041015625,
0.030609130859375,
-0.0465087890625,
0.06884765625,
-0.010009765625,
-0.012420654296875,
-0.0104827880859375,
-0.0128173828125,
-0.0198822021484375,
-0.0198516845703125,
0.01055908203125,
-0.0010986328125,
0.03399658203125,
0.06048583984375,
-0.07257080078125,
-0.00812530517578125,
0.037353515625,
0.0126495361328125,
-0.00440216064453125,
-0.0129547119140625,
-0.00736236572265625,
-0.057830810546875,
-0.040374755859375,
0.0005817413330078125,
-0.0537109375,
0.0308380126953125,
-0.022979736328125,
-0.051483154296875,
0.090087890625,
-0.050628662109375,
0.050689697265625,
0.0264739990234375,
0.0435791015625,
-0.0019102096557617188,
0.019561767578125,
-0.0013294219970703125,
0.037506103515625,
-0.0009093284606933594,
0.0291748046875,
-0.029937744140625,
-0.01641845703125,
0.0222015380859375,
0.0643310546875,
0.05572509765625,
0.005283355712890625,
-0.023193359375,
-0.005962371826171875,
0.042388916015625,
0.050811767578125,
-0.0030117034912109375,
0.005504608154296875,
-0.0063018798828125,
0.0243988037109375,
0.05780029296875,
-0.06414794921875,
0.01303863525390625,
0.01044464111328125,
-0.0006656646728515625,
0.01451873779296875,
-0.0091400146484375,
-0.034210205078125,
-0.0031108856201171875,
0.01395416259765625,
-0.053955078125,
0.0032863616943359375,
0.017547607421875,
-0.01096343994140625,
-0.0016660690307617188,
0.107177734375,
0.05511474609375,
-0.057586669921875,
-0.033111572265625,
-0.0511474609375,
0.060577392578125,
-0.0322265625,
0.01629638671875,
0.055389404296875,
0.03460693359375,
0.0499267578125,
0.0010995864868164062,
0.00952911376953125,
-0.0008339881896972656,
0.0095367431640625,
0.0867919921875,
0.02435302734375,
0.018646240234375,
-0.05419921875,
-0.00873565673828125,
0.029998779296875,
0.08642578125,
-0.063232421875,
-0.0223846435546875,
-0.0010404586791992188,
-0.0157623291015625,
0.0228729248046875,
0.008056640625,
0.045928955078125,
0.00157928466796875,
0.0105438232421875,
-0.039642333984375,
-0.0271148681640625,
-0.020233154296875,
0.045745849609375,
-0.01202392578125,
-0.0000845789909362793,
0.003894805908203125,
-0.0408935546875,
-0.03179931640625,
0.0045928955078125,
-0.00734710693359375,
0.03912353515625,
0.0232391357421875,
0.033233642578125,
-0.020111083984375,
-0.0112152099609375,
-0.0217437744140625,
0.046051025390625,
0.01016998291015625,
0.019195556640625,
-0.0165863037109375,
-0.020538330078125,
0.0013017654418945312,
0.02520751953125,
0.0294342041015625,
0.051788330078125,
0.03765869140625,
0.0246734619140625,
0.0267486572265625,
0.00237274169921875,
0.0269622802734375,
-0.018646240234375,
0.01392364501953125,
-0.038665771484375,
0.045562744140625,
0.0027713775634765625,
0.01215362548828125,
-0.02484130859375,
0.024627685546875,
0.0245361328125,
0.00424957275390625,
0.00136566162109375,
0.007251739501953125,
-0.00868988037109375,
0.0269317626953125,
-0.01221466064453125,
0.049163818359375,
0.03289794921875,
-0.08660888671875,
-0.017303466796875,
-0.0460205078125,
-0.04205322265625,
0.04473876953125,
0.0460205078125,
-0.03302001953125,
0.02532958984375,
0.002315521240234375,
-0.0090789794921875,
0.00998687744140625,
0.00565338134765625,
-0.0081939697265625,
-0.004001617431640625,
0.0289306640625,
-0.0020313262939453125,
0.00740814208984375,
-0.0004901885986328125,
0.033447265625,
0.0086669921875,
0.0233612060546875,
0.08099365234375,
-0.01554107666015625,
-0.02105712890625,
0.04193115234375,
0.027618408203125,
-0.003406524658203125,
-0.0018224716186523438,
0.027984619140625,
-0.0152587890625,
0.0247650146484375,
-0.0143280029296875,
0.0091400146484375,
0.0201416015625,
0.02606201171875,
-0.0275421142578125,
-0.009552001953125,
-0.0304107666015625,
0.021392822265625,
0.016815185546875,
0.05633544921875,
-0.0192413330078125,
-0.0186309814453125,
-0.023773193359375,
-0.007480621337890625,
0.0177001953125,
0.005756378173828125,
-0.01210784912109375,
0.0224151611328125,
0.041748046875,
0.029052734375,
0.02490234375,
0.0143585205078125,
0.05377197265625,
0.0294189453125,
-0.0308990478515625,
0.0214385986328125,
0.023529052734375,
-0.01215362548828125,
0.023468017578125,
0.01447296142578125,
-0.0036773681640625,
-0.0065155029296875,
-0.0026302337646484375,
-0.00412750244140625,
0.00555419921875,
0.03717041015625,
-0.01934814453125,
0.02252197265625,
-0.003253936767578125,
0.0048065185546875,
0.032196044921875,
-0.01226806640625,
-0.033905029296875,
-0.04833984375,
-0.0049285888671875,
0.0126953125,
-0.0301666259765625,
-0.03155517578125,
-0.036773681640625,
0.0117950439453125,
0.041473388671875,
0.037811279296875,
-0.075439453125,
0.052001953125,
-0.0164337158203125,
0.01544189453125,
0.00832366943359375,
-0.0318603515625,
-0.006855010986328125,
-0.006931304931640625,
-0.037841796875,
0.01070404052734375,
-0.053985595703125,
-0.017913818359375,
-0.006649017333984375,
0.0262603759765625,
0.03912353515625,
-0.01181793212890625,
-0.0239410400390625,
0.0143280029296875,
0.01125335693359375,
0.05548095703125,
-0.01303863525390625,
-0.004482269287109375,
0.056732177734375,
0.01045989990234375,
-0.0570068359375,
-0.108154296875,
-0.0167388916015625,
-0.046661376953125,
0.054718017578125,
0.037811279296875,
-0.040985107421875,
-0.0116424560546875,
-0.04315185546875,
-0.077880859375,
0.0728759765625,
0.006191253662109375,
-0.038848876953125,
-0.004177093505859375,
0.01007080078125,
-0.024505615234375,
0.0186767578125,
0.006687164306640625,
-0.0177154541015625,
-0.0074005126953125,
0.0083160400390625,
0.014129638671875,
0.032958984375,
0.0180206298828125,
0.0038852691650390625,
-0.0245361328125,
0.013824462890625,
-0.0005288124084472656,
0.00330352783203125,
0.0173797607421875,
-0.0130462646484375,
0.0249481201171875,
0.043701171875,
-0.033843994140625,
-0.0262298583984375,
-0.0172119140625,
0.0005617141723632812,
-0.00591278076171875,
-0.0484619140625,
-0.0286407470703125,
-0.01290130615234375,
0.0994873046875,
-0.0062255859375,
0.0135345458984375,
-0.024078369140625,
-0.0161895751953125,
-0.012542724609375,
-0.018707275390625,
-0.0185546875,
0.0296173095703125,
-0.067138671875,
-0.01134490966796875,
0.0060577392578125,
-0.00222015380859375,
0.00179290771484375,
0.0193328857421875,
-0.0207977294921875,
-0.01456451416015625,
0.0265655517578125,
0.0101776123046875,
-0.0567626953125,
-0.0007991790771484375,
0.04193115234375,
-0.046295166015625,
-0.0265045166015625,
-0.0014142990112304688,
0.01012420654296875,
-0.0090179443359375,
-0.020599365234375,
-0.05364990234375,
0.005828857421875,
0.0064697265625,
0.01800537109375,
-0.0031871795654296875,
0.0244598388671875,
0.013214111328125,
0.0249481201171875,
-0.020294189453125,
0.01531982421875,
0.0113525390625,
0.0043182373046875,
-0.054351806640625,
0.0589599609375,
0.0160675048828125,
0.0914306640625,
-0.0007252693176269531,
-0.0218353271484375,
0.0032634735107421875,
0.00872039794921875,
0.01430511474609375,
-0.0018711090087890625,
0.0174102783203125,
-0.00925445556640625,
-0.002025604248046875,
-0.0037746429443359375,
-0.01268768310546875,
-0.039031982421875,
-0.00665283203125,
0.027252197265625,
0.0021762847900390625,
0.02001953125
]
|
79c03919895a5fe237660443f548ef6ab25b8eac | Wordpress Stackexchange
Q: Set post thumbnail as background I have a single page for my products where all products get listed. This is how i've archieved it:
<ul class="produkte">
<?php $args = array( 'post_type' => 'produkte', 'posts_per_page' => 30 );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
echo '<li class="produkt">';
echo '<a href="' . get_permalink() . '">';
echo '<div class="produkt-info">';
the_title('<h3>', '</h3>');
if (has_post_thumbnail()) {
echo '<figure class="imgBox">';
the_post_thumbnail('full', array('class' => 'img-resp') );
echo "</figure>";
}
echo '</div>';
echo '</a>';
echo '</li>';
endwhile; ?>
</ul>
I decided that i want to set the post thumbnail as the background-image of the li.produkt. When i do something like this:
echo '<li class="produkt" style="background: url('.the_post_thumbnail().')">';
The page generates an image-element above the li-element. What am i doing wrong??
A: There is now the get_the_post_thumbnail_url function provided in WordPress.
Usage example from the codex:
$featured_img_url = get_the_post_thumbnail_url(get_the_ID(),'full');
https://developer.wordpress.org/reference/functions/get_the_post_thumbnail_url/
| Q: Set post thumbnail as background I have a single page for my products where all products get listed. This is how i've archieved it:
<ul class="produkte">
<?php $args = array( 'post_type' => 'produkte', 'posts_per_page' => 30 );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
echo '<li class="produkt">';
echo '<a href="' . get_permalink() . '">';
echo '<div class="produkt-info">';
the_title('<h3>', '</h3>');
if (has_post_thumbnail()) {
echo '<figure class="imgBox">';
the_post_thumbnail('full', array('class' => 'img-resp') );
echo "</figure>";
}
echo '</div>';
echo '</a>';
echo '</li>';
endwhile; ?>
</ul>
I decided that i want to set the post thumbnail as the background-image of the li.produkt. When i do something like this:
echo '<li class="produkt" style="background: url('.the_post_thumbnail().')">';
The page generates an image-element above the li-element. What am i doing wrong??
A: There is now the get_the_post_thumbnail_url function provided in WordPress.
Usage example from the codex:
$featured_img_url = get_the_post_thumbnail_url(get_the_ID(),'full');
https://developer.wordpress.org/reference/functions/get_the_post_thumbnail_url/
A: Per WordPress Codex the the_post_thumbnail() function Display the post thumbnail. https://developer.wordpress.org/reference/functions/the_post_thumbnail/ But this output the whole image tag and not just the src, which in your case is needed.
Instead you should use the wp_get_attachment_image_src() function which Retrieve an image to represent an attachment.. https://developer.wordpress.org/reference/functions/wp_get_attachment_image_src/
So i suggest to try something like this:
//this retrieve the full version of image
$image_data = wp_get_attachment_image_src ( get_the_post_thumbnail( $post->ID), 'full' );
$image_url = $image_data[0];
echo '<li class="produkt" style="background: url('. $image_url .')">';
A: The problem here is the_post_thumbnail() doesn't return image url but the img tag.
You can use this code
$url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
echo '<li class="produkt" style="background: url('. $url.')">';
A: Try using background-size: cover, background-position: center and background-size: 300px 100px;
<?php
echo '<li class="produkt" style="background-image: url('<?php the_post_thumbnail_url(); ?>'); background-size: cover; background-position: center; background-repeat: no-repeat; background-size: 300px 100px;">';
?>
A: simply echo the post thumbnail url :
<li class="produkt" style="background-image: url(<?php echo the_post_thumbnail_url(); ?>);">></li>
| wordpress | {
"language": "en",
"length": 300,
"provenance": "stackexchange_00019.jsonl.gz:464209",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/221704"
} | [
0.0771484375,
0.013763427734375,
0.042327880859375,
-0.037109375,
0.0229949951171875,
-0.0223388671875,
0.050811767578125,
-0.047821044921875,
0.01549530029296875,
-0.007465362548828125,
-0.016510009765625,
0.004055023193359375,
-0.0305023193359375,
-0.043426513671875,
0.00856781005859375,
-0.01238250732421875,
0.0423583984375,
-0.016357421875,
0.054443359375,
0.024749755859375,
0.0010547637939453125,
0.053619384765625,
0.027069091796875,
-0.006618499755859375,
0.032806396484375,
-0.03643798828125,
0.06549072265625,
-0.01078033447265625,
0.0062713623046875,
-0.0216064453125,
0.026519775390625,
-0.01502227783203125,
0.0177001953125,
-0.001621246337890625,
0.0010175704956054688,
0.0073394775390625,
0.033538818359375,
-0.018341064453125,
0.00550079345703125,
0.02276611328125,
0.01202392578125,
0.0035114288330078125,
0.0228729248046875,
0.03265380859375,
-0.023895263671875,
-0.0382080078125,
0.01271820068359375,
-0.0229034423828125,
0.027740478515625,
0.0022563934326171875,
-0.0007920265197753906,
0.04278564453125,
0.0037841796875,
-0.0098724365234375,
-0.01488494873046875,
0.002689361572265625,
-0.0389404296875,
-0.0009741783142089844,
0.03631591796875,
-0.005916595458984375,
-0.023773193359375,
-0.050384521484375,
0.031951904296875,
-0.016815185546875,
0.00769805908203125,
0.01450347900390625,
0.0027408599853515625,
0.008209228515625,
-0.046142578125,
0.0140838623046875,
0.03765869140625,
-0.0599365234375,
0.002658843994140625,
-0.04278564453125,
-0.0116424560546875,
-0.004955291748046875,
0.0025730133056640625,
-0.05694580078125,
0.006694793701171875,
-0.01398468017578125,
-0.0084228515625,
-0.0194854736328125,
-0.03692626953125,
-0.008636474609375,
0.023284912109375,
0.0223388671875,
-0.00649261474609375,
-0.0183868408203125,
0.0131683349609375,
-0.0244598388671875,
-0.0175018310546875,
-0.0018939971923828125,
0.004688262939453125,
-0.00028896331787109375,
-0.0228424072265625,
-0.0262908935546875,
0.046478271484375,
0.03741455078125,
0.0018863677978515625,
0.005859375,
0.009552001953125,
-0.058990478515625,
0.044677734375,
-0.03802490234375,
0.0026340484619140625,
0.057525634765625,
0.0007853507995605469,
0.0186767578125,
0.030670166015625,
0.0172119140625,
0.0171966552734375,
0.0164031982421875,
-0.0249481201171875,
-0.0237884521484375,
-0.020538330078125,
0.0007433891296386719,
-0.0648193359375,
0.02215576171875,
0.0163726806640625,
-0.0196685791015625,
0.00473785400390625,
0.0293121337890625,
0.01151275634765625,
-0.01204681396484375,
0.01010894775390625,
0.0477294921875,
0.0026111602783203125,
-0.08502197265625,
0.0018510818481445312,
0.0223846435546875,
-0.040740966796875,
0.0208740234375,
0.053436279296875,
0.0070037841796875,
0.00542449951171875,
-0.01181793212890625,
0.0251922607421875,
0.019134521484375,
-0.033782958984375,
0.032135009765625,
-0.010406494140625,
-0.0106048583984375,
0.01097869873046875,
-0.0296173095703125,
0.0180206298828125,
0.00970458984375,
-0.0184173583984375,
0.01776123046875,
0.0288848876953125,
-0.0211334228515625,
0.031341552734375,
-0.03753662109375,
0.0024814605712890625,
0.0164642333984375,
0.01953125,
-0.0110626220703125,
0.029510498046875,
-0.00490570068359375,
0.013336181640625,
-0.02691650390625,
0.037445068359375,
0.0081787109375,
0.024566650390625,
-0.00037670135498046875,
-0.01580810546875,
-0.02044677734375,
-0.057525634765625,
-0.005756378173828125,
0.01715087890625,
0.00646209716796875,
-0.032806396484375,
0.0146484375,
0.0070953369140625,
0.027801513671875,
0.00861358642578125,
0.0237274169921875,
0.037384033203125,
-0.030517578125,
0.040679931640625,
0.020751953125,
-0.048370361328125,
-0.016845703125,
0.06390380859375,
-0.053070068359375,
-0.035736083984375,
0.01934814453125,
-0.01067352294921875,
0.0333251953125,
0.02508544921875,
0.0022411346435546875,
0.00926971435546875,
-0.00830078125,
-0.039031982421875,
0.080078125,
-0.003932952880859375,
-0.05230712890625,
-0.07427978515625,
-0.0273284912109375,
-0.033233642578125,
-0.0050811767578125,
0.03045654296875,
-0.0075225830078125,
0.0208587646484375,
0.00577545166015625,
-0.0004298686981201172,
0.0081634521484375,
-0.00975799560546875,
0.03302001953125,
-0.0217132568359375,
0.00962066650390625,
0.017333984375,
0.0171661376953125,
0.00016427040100097656,
-0.0828857421875,
-0.01580810546875,
0.03594970703125,
0.0167388916015625,
-0.00821685791015625,
0.0012989044189453125,
0.00453948974609375,
0.0011529922485351562,
-0.0128173828125,
-0.0257110595703125,
0.0188751220703125,
0.0386962890625,
0.0169677734375,
-0.024505615234375,
-0.025634765625,
0.00872039794921875,
0.01041412353515625,
-0.0509033203125,
0.042510986328125,
-0.0225677490234375,
-0.003963470458984375,
-0.0167083740234375,
0.00986480712890625,
0.036376953125,
-0.03228759765625,
0.01380157470703125,
0.0300140380859375,
0.03875732421875,
0.005588531494140625,
0.0133056640625,
0.03216552734375,
0.1090087890625,
0.03521728515625,
0.01557159423828125,
-0.01335906982421875,
-0.00946044921875,
0.005405426025390625,
0.0055694580078125,
-0.0199432373046875,
0.01476287841796875,
-0.058624267578125,
0.0217132568359375,
0.02117919921875,
-0.003787994384765625,
0.018646240234375,
-0.00563812255859375,
0.009246826171875,
-0.0009765625,
0.022796630859375,
-0.0016889572143554688,
-0.01422882080078125,
0.0288238525390625,
0.006900787353515625,
0.03057861328125,
0.01165771484375,
-0.020843505859375,
-0.01001739501953125,
0.00801849365234375,
0.015777587890625,
-0.01271820068359375,
0.023040771484375,
-0.0166168212890625,
-0.01538848876953125,
-0.03997802734375,
0.0182952880859375,
-0.00957489013671875,
-0.017181396484375,
0.003513336181640625,
0.000698089599609375,
0.031585693359375,
0.006122589111328125,
-0.01806640625,
-0.03619384765625,
0.049713134765625,
0.06439208984375,
-0.03863525390625,
-0.0153961181640625,
0.008636474609375,
0.03765869140625,
-0.024932861328125,
0.032867431640625,
-0.027862548828125,
0.00440216064453125,
0.044647216796875,
-0.03790283203125,
0.05230712890625,
-0.0421142578125,
0.045867919921875,
0.04998779296875,
-0.04644775390625,
0.031707763671875,
-0.0033893585205078125,
0.01554107666015625,
0.02203369140625,
0.007659912109375,
-0.01392364501953125,
-0.0082855224609375,
-0.026153564453125,
-0.01390838623046875,
0.0234832763671875,
0.033416748046875,
-0.0131988525390625,
-0.04345703125,
0.00679779052734375,
0.01326751708984375,
-0.09942626953125,
-0.07928466796875,
-0.0106964111328125,
-0.09136962890625,
0.02203369140625,
-0.047119140625,
-0.043975830078125,
-0.011871337890625,
0.004138946533203125,
0.0105133056640625,
0.004680633544921875,
-0.0090789794921875,
-0.03900146484375,
-0.048187255859375,
-0.0830078125,
-0.01529693603515625,
0.002040863037109375,
0.029815673828125,
0.0012054443359375,
0.036224365234375,
-0.0014209747314453125,
-0.05206298828125,
0.002300262451171875,
0.097900390625,
0.0029296875,
0.0027370452880859375,
-0.043243408203125,
0.003223419189453125,
-0.0234222412109375,
-0.0128326416015625,
-0.027496337890625,
-0.0009484291076660156,
0.0248870849609375,
0.01629638671875,
-0.01509857177734375,
0.016632080078125,
-0.0272064208984375,
0.0601806640625,
0.045166015625,
0.0047760009765625,
-0.00707244873046875,
-0.049102783203125,
-0.0478515625,
-0.0262908935546875,
-0.059295654296875,
0.04595947265625,
0.0394287109375,
0.02008056640625,
-0.0026721954345703125,
0.0178985595703125,
0.0001558065414428711,
0.000024318695068359375,
0.034088134765625,
-0.047088623046875,
0.0237274169921875,
-0.004993438720703125,
0.00296783447265625,
-0.0247955322265625,
-0.0219879150390625,
-0.0168609619140625,
0.0147247314453125,
-0.0118255615234375,
0.0227203369140625,
-0.010101318359375,
0.0272674560546875,
-0.0255126953125,
-0.0189971923828125,
0.01824951171875,
0.0018157958984375,
0.018218994140625,
0.0038013458251953125,
-0.025970458984375,
0.01143646240234375,
0.0672607421875,
-0.041595458984375,
-0.03375244140625,
-0.0079498291015625,
0.0124359130859375,
-0.03302001953125,
-0.0182647705078125,
-0.037353515625,
0.0038318634033203125,
-0.1248779296875,
0.0221099853515625,
0.01320648193359375,
-0.0355224609375,
0.01555633544921875,
0.02032470703125,
-0.07220458984375,
-0.041473388671875,
0.021240234375,
0.0158233642578125,
-0.007476806640625,
0.044525146484375,
-0.023529052734375,
0.050567626953125,
-0.0270843505859375,
0.0033855438232421875,
-0.0697021484375,
-0.0294647216796875,
0.03607177734375,
0.07025146484375,
-0.01715087890625,
-0.0077667236328125,
-0.035552978515625,
0.056488037109375,
-0.00661468505859375,
0.08526611328125,
-0.01425933837890625,
0.006725311279296875,
-0.0250396728515625,
-0.00916290283203125,
0.0210723876953125,
-0.02166748046875,
0.01174163818359375,
-0.0228118896484375,
-0.04327392578125,
-0.02593994140625,
-0.053314208984375,
0.0232696533203125,
-0.0185394287109375,
-0.018096923828125,
-0.060943603515625,
-0.007598876953125,
0.07415771484375,
0.043060302734375,
0.016326904296875,
0.038177490234375,
-0.0231170654296875,
-0.026641845703125,
0.042022705078125,
0.0086517333984375,
-0.0187530517578125,
-0.00151824951171875,
0.0304107666015625,
0.02069091796875,
-0.022247314453125,
-0.0328369140625,
-0.0077667236328125,
0.033599853515625,
0.0014972686767578125,
0.01129913330078125,
-0.007480621337890625,
-0.037994384765625,
0.038238525390625,
0.004535675048828125,
-0.019622802734375,
0.01291656494140625,
0.08978271484375,
-0.0027675628662109375,
-0.01409149169921875,
0.01210784912109375,
-0.020263671875,
-0.0174102783203125,
-0.01444244384765625,
-0.007472991943359375,
-0.00902557373046875,
-0.002468109130859375,
0.0199127197265625,
0.0443115234375,
-0.0269622802734375,
-0.041229248046875,
-0.0189666748046875,
-0.0007548332214355469,
0.00673675537109375,
0.0517578125,
0.054718017578125,
-0.018585205078125,
0.046630859375,
0.03289794921875,
0.0135955810546875,
0.00843048095703125,
0.01340484619140625,
-0.005275726318359375,
0.0175628662109375,
0.0316162109375,
0.0050506591796875,
-0.0232696533203125,
-0.007480621337890625,
0.01250457763671875,
0.060699462890625,
-0.008392333984375,
-0.00435638427734375,
0.02496337890625,
0.02362060546875,
-0.0592041015625,
0.0176239013671875,
0.03533935546875,
0.006427764892578125,
0.013824462890625,
-0.027587890625,
-0.0197906494140625,
0.0034122467041015625,
-0.02740478515625,
0.061279296875,
0.042694091796875,
0.00226593017578125,
0.039794921875,
0.0259246826171875,
0.05078125,
0.01372528076171875,
-0.031402587890625,
0.00254058837890625,
-0.0143280029296875,
0.03424072265625,
0.02801513671875,
0.0056304931640625,
-0.033477783203125,
0.022674560546875,
0.014251708984375,
-0.061614990234375,
0.00141143798828125,
0.045257568359375,
0.094482421875,
-0.0218658447265625,
-0.05450439453125,
-0.0111236572265625,
-0.03900146484375,
-0.020599365234375,
0.032135009765625,
0.03033447265625,
-0.038726806640625,
-0.00583648681640625,
0.01442718505859375,
0.0234375,
-0.00739288330078125,
-0.04412841796875,
0.04888916015625,
-0.01763916015625,
0.038787841796875,
-0.00214385986328125,
-0.0322265625,
0.035125732421875,
0.03387451171875,
0.01517486572265625,
-0.017120361328125,
-0.043426513671875,
0.0300750732421875,
0.03240966796875,
-0.025787353515625,
-0.01099395751953125,
0.045501708984375,
-0.016265869140625,
0.048187255859375,
-0.03717041015625,
-0.0152435302734375,
-0.043975830078125,
-0.0024318695068359375,
0.0516357421875,
0.0264739990234375,
-0.01097869873046875,
-0.005767822265625,
0.0006098747253417969,
-0.02191162109375,
0.0380859375,
-0.0047149658203125,
-0.0257110595703125,
-0.0226287841796875,
0.0077972412109375,
0.033660888671875,
-0.00792694091796875,
-0.00848388671875,
-0.0256500244140625,
0.002712249755859375,
0.00945281982421875,
0.05657958984375,
-0.0237579345703125,
-0.0082244873046875,
0.0153961181640625,
0.027069091796875,
-0.01441192626953125,
-0.021026611328125,
0.01444244384765625,
-0.00982666015625,
-0.02093505859375,
-0.053680419921875,
0.01554107666015625,
0.03533935546875,
-0.037872314453125,
0.032318115234375,
0.07196044921875,
0.02685546875,
0.016815185546875,
-0.0169219970703125,
-0.004238128662109375,
-0.01422882080078125,
0.06549072265625,
-0.0280914306640625,
0.0038127899169921875,
0.04998779296875,
-0.016998291015625,
0.037445068359375,
-0.005176544189453125,
-0.018157958984375,
0.015716552734375,
-0.0283355712890625,
0.0216522216796875,
0.0538330078125,
0.01009368896484375,
0.0006618499755859375,
0.07196044921875,
-0.0005393028259277344,
0.03192138671875,
0.040252685546875,
0.0017862319946289062,
-0.003696441650390625,
0.0202484130859375,
0.0072784423828125,
-0.0232086181640625,
0.050811767578125,
-0.0074462890625,
-0.019012451171875,
0.015472412109375,
-0.028076171875,
0.020721435546875,
0.01343536376953125,
0.0628662109375,
-0.01197052001953125,
0.006961822509765625,
0.0177459716796875,
-0.042205810546875,
0.02801513671875,
0.0218353271484375,
0.010711669921875,
0.037261962890625,
0.038848876953125,
-0.0489501953125,
-0.0013608932495117188,
0.02825927734375,
-0.02008056640625,
0.0287322998046875,
0.0255126953125,
0.0111541748046875,
-0.00567626953125,
-0.11041259765625,
-0.0570068359375,
0.09063720703125,
-0.06597900390625,
-0.030059814453125,
-0.01678466796875,
-0.00907135009765625,
-0.0215301513671875,
-0.031494140625,
0.01727294921875,
-0.022491455078125,
0.028411865234375,
0.0450439453125,
0.0170135498046875,
-0.0238037109375,
0.047119140625,
-0.0161590576171875,
0.034210205078125,
0.0216064453125,
-0.036834716796875,
0.034210205078125,
0.03082275390625,
0.0408935546875,
-0.034820556640625,
-0.0579833984375,
-0.0062103271484375,
-0.07440185546875,
0.024688720703125,
-0.019256591796875,
-0.051055908203125,
0.04486083984375,
-0.07525634765625,
0.0240631103515625,
0.0134735107421875,
0.052001953125,
0.0133056640625,
0.006504058837890625,
0.050506591796875,
-0.04351806640625,
0.01264190673828125,
0.0158233642578125,
0.0265655517578125,
0.005634307861328125,
0.0019330978393554688,
-0.06707763671875,
0.071533203125,
-0.0345458984375,
0.032257080078125,
0.0034580230712890625,
0.030029296875,
0.0203399658203125,
-0.00922393798828125,
0.0012044906616210938,
0.02142333984375,
-0.0572509765625,
0.05548095703125,
-0.050140380859375,
-0.00423431396484375,
0.01499176025390625,
0.037750244140625,
0.0254974365234375,
0.005443572998046875,
-0.047027587890625,
0.0118255615234375,
0.04815673828125,
0.0230560302734375,
0.002460479736328125,
0.0506591796875,
-0.0150909423828125,
0.05548095703125,
0.059844970703125,
-0.045654296875,
0.03594970703125,
-0.0017194747924804688,
-0.039825439453125,
0.006282806396484375,
-0.0057525634765625,
-0.0010194778442382812,
0.023040771484375,
0.03936767578125,
-0.061920166015625,
0.01079559326171875,
0.055206298828125,
-0.06463623046875,
0.0396728515625,
0.038238525390625,
0.039031982421875,
0.0180511474609375,
-0.038726806640625,
0.00726318359375,
0.049163818359375,
-0.006305694580078125,
0.007232666015625,
0.017669677734375,
0.01192474365234375,
0.058135986328125,
0.0283355712890625,
0.0036678314208984375,
0.0253448486328125,
0.02313232421875,
-0.0024394989013671875,
0.03533935546875,
0.0247039794921875,
0.00928497314453125,
0.00841522216796875,
0.0179595947265625,
-0.00620269775390625,
-0.0258636474609375,
-0.02728271484375,
0.0130767822265625,
0.0186004638671875,
0.003940582275390625,
-0.00970458984375,
0.0094757080078125,
-0.0699462890625,
-0.00955963134765625,
-0.0517578125,
-0.00800323486328125,
0.0255126953125,
0.0447998046875,
0.005268096923828125,
-0.0080108642578125,
-0.048065185546875,
-0.03631591796875,
-0.0245819091796875,
0.02362060546875,
0.0068359375,
0.049285888671875,
-0.006549835205078125,
0.03314208984375,
-0.039276123046875,
-0.007633209228515625,
-0.0037689208984375,
0.040985107421875,
0.0157928466796875,
0.0022144317626953125,
-0.0025653839111328125,
-0.004138946533203125,
-0.0216217041015625,
0.01312255859375,
0.036865234375,
-0.0311737060546875,
0.0167236328125,
0.03369140625,
-0.01387786865234375,
-0.0010700225830078125,
0.05084228515625,
-0.00801849365234375,
-0.00800323486328125,
-0.0177459716796875,
0.0567626953125,
0.0269012451171875,
0.02142333984375,
0.0038204193115234375,
0.0386962890625,
0.026947021484375,
-0.0477294921875,
0.0762939453125,
-0.022308349609375,
0.0023975372314453125,
0.0180816650390625,
-0.0207977294921875,
0.08209228515625,
-0.0230255126953125,
-0.05706787109375,
-0.0012359619140625,
-0.016632080078125,
-0.09832763671875,
0.0194854736328125,
0.0276947021484375,
-0.04217529296875,
0.0187835693359375,
0.0216064453125,
0.00823211669921875,
0.016204833984375,
-0.0196685791015625,
0.0067291259765625,
0.016876220703125,
0.028656005859375,
0.018890380859375,
-0.006031036376953125,
-0.00600433349609375,
-0.010711669921875,
0.032440185546875,
0.00492095947265625,
0.0284271240234375,
-0.013458251953125,
0.0309600830078125,
-0.003170013427734375,
-0.004283905029296875,
-0.004886627197265625,
-0.01482391357421875,
0.031585693359375,
-0.0107574462890625,
-0.00397491455078125,
-0.014495849609375,
-0.004604339599609375,
-0.0029048919677734375,
0.04888916015625,
-0.03533935546875,
-0.0311279296875,
-0.005100250244140625,
0.0270538330078125,
0.00836181640625,
0.036529541015625,
-0.0401611328125,
-0.0201873779296875,
-0.045654296875,
-0.017181396484375,
0.006908416748046875,
-0.021728515625,
-0.00907135009765625,
0.03326416015625,
0.054473876953125,
0.024627685546875,
0.055145263671875,
-0.007587432861328125,
0.08935546875,
0.05426025390625,
-0.03399658203125,
-0.04046630859375,
-0.000980377197265625,
-0.00507354736328125,
-0.01195526123046875,
0.0038051605224609375,
0.012939453125,
-0.0064697265625,
-0.00026702880859375,
0.04150390625,
0.01727294921875,
0.0022430419921875,
-0.0268096923828125,
-0.023529052734375,
0.07647705078125,
-0.0243377685546875,
-0.03515625,
0.053619384765625,
-0.0141754150390625,
-0.043487548828125,
0.01849365234375,
-0.0008149147033691406,
0.00804901123046875,
0.003337860107421875,
-0.016876220703125,
0.004993438720703125,
0.035308837890625,
0.02996826171875,
-0.07501220703125,
0.058319091796875,
-0.00896453857421875,
0.010101318359375,
-0.005046844482421875,
-0.02392578125,
0.011627197265625,
0.0116119384765625,
-0.047088623046875,
-0.021942138671875,
-0.0242156982421875,
0.00040531158447265625,
-0.03564453125,
0.0176544189453125,
0.042236328125,
-0.0216064453125,
-0.01561737060546875,
0.0202484130859375,
0.0308380126953125,
0.07366943359375,
-0.045989990234375,
-0.0313720703125,
0.0038356781005859375,
0.00897216796875,
-0.00794219970703125,
-0.056121826171875,
0.007801055908203125,
-0.06451416015625,
-0.00548553466796875,
0.0123138427734375,
-0.00865936279296875,
0.02301025390625,
-0.03863525390625,
-0.050689697265625,
0.048736572265625,
0.01540374755859375,
-0.03289794921875,
0.0224761962890625,
-0.0034503936767578125,
-0.00972747802734375,
0.007534027099609375,
0.01058197021484375,
-0.02801513671875,
-0.004550933837890625,
0.00261688232421875,
-0.0086212158203125,
0.0426025390625,
-0.00485992431640625,
0.00324249267578125,
-0.044036865234375,
-0.006671905517578125,
-0.0290374755859375,
-0.0002143383026123047,
-0.0038318634033203125,
0.0223388671875,
0.00403594970703125,
0.01523590087890625,
-0.0364990234375,
-0.00531005859375,
-0.02191162109375,
0.037933349609375,
-0.008880615234375,
-0.004791259765625,
-0.033416748046875,
-0.027191162109375,
0.060516357421875,
0.0134124755859375,
0.01910400390625,
0.004924774169921875,
-0.033111572265625,
0.00579071044921875,
-0.00774383544921875,
0.00786590576171875,
0.0213775634765625,
-0.07037353515625,
-0.0162811279296875,
-0.00328826904296875,
-0.0144500732421875,
0.002899169921875,
0.004825592041015625,
-0.022247314453125,
-0.016876220703125,
-0.0305023193359375,
-0.0157623291015625,
-0.03411865234375,
-0.0298004150390625,
0.07421875,
-0.035400390625,
0.014892578125,
-0.003215789794921875,
0.01250457763671875,
0.039215087890625,
0.00511932373046875,
-0.006732940673828125,
0.0057373046875,
-0.0222015380859375,
0.0167694091796875,
0.0018100738525390625,
-0.0179290771484375,
-0.01493072509765625,
0.02215576171875,
-0.031951904296875,
0.01190185546875,
0.01012420654296875,
0.009613037109375,
-0.0001246929168701172,
0.00021457672119140625,
0.022674560546875,
0.036407470703125,
-0.00553131103515625,
-0.0210418701171875,
0.0209503173828125,
0.00007557868957519531,
-0.0105438232421875,
0.00826263427734375,
0.031707763671875,
-0.05523681640625,
0.0014219284057617188,
-0.00623321533203125,
-0.045379638671875,
-0.044158935546875,
0.0063018798828125,
-0.026397705078125,
-0.02301025390625,
0.0168914794921875
]
|
436f1a894abb40d641c42b0e447c76ac387fb9a9 | Wordpress Stackexchange
Q: How would I add custom tables/endpoints to the WP REST API? I have created custom tables for performance reasons for products, carts, and notifications. I want to make these tables and their data available for normal CRUD via the WP REST API v2. How would I add custom tables (and their columns) to the API so that I could get/update those records?
A: I eventualy worked out a solution for my restaurants table, which sits alongside the wp_* tables in my WP database. Hope this helps
add_action( 'rest_api_init', function () {
register_rest_route( 'restos/v1', '/all', array(
'methods' => 'GET',
'callback' => 'handle_get_all',
'permission_callback' => function () {
return current_user_can( 'edit_others_posts' );
}
) );
} );
function handle_get_all( $data ) {
global $wpdb;
$query = "SELECT qname, rname, recommendation FROM `restaurants`";
$list = $wpdb->get_results($query);
return $list;
}
I have variations on this theme for all the CRUD actions I need
| Q: How would I add custom tables/endpoints to the WP REST API? I have created custom tables for performance reasons for products, carts, and notifications. I want to make these tables and their data available for normal CRUD via the WP REST API v2. How would I add custom tables (and their columns) to the API so that I could get/update those records?
A: I eventualy worked out a solution for my restaurants table, which sits alongside the wp_* tables in my WP database. Hope this helps
add_action( 'rest_api_init', function () {
register_rest_route( 'restos/v1', '/all', array(
'methods' => 'GET',
'callback' => 'handle_get_all',
'permission_callback' => function () {
return current_user_can( 'edit_others_posts' );
}
) );
} );
function handle_get_all( $data ) {
global $wpdb;
$query = "SELECT qname, rname, recommendation FROM `restaurants`";
$list = $wpdb->get_results($query);
return $list;
}
I have variations on this theme for all the CRUD actions I need
A: Rather than create custom database tables, you would be better off creating your own custom post types (within Wordpress - Since 4.7.+), along with whatever custom fields you need (as well as taxonomies).
All this can be done as a plugin or via functions.php in a theme.
Here's a very simple but thorough example of how to do this.
It shows how to create a custom post type (called 'acme_products') and its custom fields with the ability for custom taxonomies (categories). All with REST API support built in. It will also show you how to customise the input (meta) boxes for the WP-Admin forms and the columns of the list pages.
https://gist.github.com/kosso/47004c9fa71920b441f3cd0c35894409
A: It has just worked with the rest api v1 for me. The v2 declined the callback permission for selecting the table results. Here is an example endpoint for fetching from custom db table: domain.com/wp-json/test/v1/testing
add_action( 'rest_api_init', function () {
$namespace = 'test/v1';
$route = '/testing';
register_rest_route($namespace, $route, array(
'methods' => WP_REST_Server::READABLE,
'callback' => function () {
global $wpdb;
$table = $wpdb->prefix . 'test';
$query = "SELECT name, color, etc.. FROM $table";
$results = $wpdb->get_results($query);
return $results;
},
'permission_callback' => '__return_true',
'args' => array()
));
});
| wordpress | {
"language": "en",
"length": 349,
"provenance": "stackexchange_00019.jsonl.gz:464239",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/221808"
} | [
0.03570556640625,
-0.005039215087890625,
-0.01132965087890625,
-0.0235443115234375,
0.0224609375,
-0.02398681640625,
0.051727294921875,
-0.0013179779052734375,
-0.02734375,
0.033477783203125,
-0.0277099609375,
0.04119873046875,
-0.0252685546875,
0.00423431396484375,
-0.00446319580078125,
-0.034210205078125,
0.04754638671875,
0.002574920654296875,
0.049896240234375,
-0.0001729726791381836,
0.0005211830139160156,
0.02166748046875,
0.0206146240234375,
0.06182861328125,
0.0290374755859375,
-0.002040863037109375,
-0.0113525390625,
0.002155303955078125,
0.0199127197265625,
0.0137786865234375,
0.0125732421875,
-0.043243408203125,
0.002704620361328125,
0.055572509765625,
-0.0285797119140625,
0.0050811767578125,
0.06622314453125,
-0.003948211669921875,
-0.0009012222290039062,
0.048431396484375,
0.035125732421875,
-0.034332275390625,
0.0243682861328125,
-0.025177001953125,
0.00881195068359375,
0.00262451171875,
0.031982421875,
-0.0267486572265625,
-0.0298004150390625,
0.04913330078125,
0.0101165771484375,
0.01256561279296875,
0.0088653564453125,
-0.000873565673828125,
0.0062103271484375,
-0.0229339599609375,
0.03857421875,
-0.0673828125,
0.03240966796875,
-0.02655029296875,
-0.032867431640625,
-0.0322265625,
0.041839599609375,
0.00444793701171875,
0.006999969482421875,
0.0005908012390136719,
0.09033203125,
0.0213165283203125,
0.003963470458984375,
-0.0159454345703125,
-0.0093994140625,
0.027435302734375,
-0.0172271728515625,
-0.0012464523315429688,
-0.0281524658203125,
-0.0221405029296875,
0.0294189453125,
-0.0253753662109375,
0.0010013580322265625,
0.01538848876953125,
0.02239990234375,
0.0005011558532714844,
0.030029296875,
-0.01142120361328125,
0.004428863525390625,
-0.0185699462890625,
-0.00937652587890625,
-0.00798797607421875,
0.01666259765625,
0.0015125274658203125,
0.0033283233642578125,
-0.0765380859375,
-0.019073486328125,
0.08258056640625,
0.035430908203125,
-0.0269927978515625,
-0.0006704330444335938,
-0.018402099609375,
0.0135345458984375,
0.033294677734375,
0.0280609130859375,
-0.056915283203125,
0.0699462890625,
-0.03167724609375,
0.03326416015625,
0.00942230224609375,
-0.0090789794921875,
-0.033905029296875,
0.048797607421875,
0.0098419189453125,
-0.002498626708984375,
0.06964111328125,
0.02105712890625,
-0.0190887451171875,
-0.0202178955078125,
-0.012847900390625,
-0.0030345916748046875,
-0.007266998291015625,
-0.0035800933837890625,
-0.0377197265625,
-0.036407470703125,
-0.00885772705078125,
-0.03961181640625,
0.01000213623046875,
-0.017059326171875,
-0.0411376953125,
0.0080108642578125,
0.04156494140625,
-0.03436279296875,
0.0271453857421875,
-0.01013946533203125,
0.011566162109375,
0.03179931640625,
0.04571533203125,
-0.005382537841796875,
-0.0148468017578125,
0.048614501953125,
0.0119171142578125,
-0.01275634765625,
0.0222015380859375,
0.0177154541015625,
-0.0286102294921875,
-0.03887939453125,
0.0014009475708007812,
-0.0009937286376953125,
-0.0201568603515625,
0.02569580078125,
0.0243682861328125,
-0.030242919921875,
-0.0037689208984375,
-0.006866455078125,
0.033538818359375,
0.00276947021484375,
0.015716552734375,
0.0022735595703125,
0.004840850830078125,
0.0095062255859375,
-0.00616455078125,
0.0036144256591796875,
0.0003528594970703125,
-0.03594970703125,
-0.036224365234375,
0.0194549560546875,
-0.06787109375,
-0.0628662109375,
0.053497314453125,
-0.0433349609375,
-0.007755279541015625,
0.04144287109375,
0.068115234375,
-0.0165557861328125,
-0.0189361572265625,
0.041656494140625,
0.041595458984375,
-0.01323699951171875,
0.0219573974609375,
0.0023956298828125,
0.0279998779296875,
0.0228118896484375,
0.0217742919921875,
0.010772705078125,
-0.0200042724609375,
0.091796875,
-0.0191650390625,
-0.0692138671875,
0.080322265625,
0.0140380859375,
0.1177978515625,
-0.004058837890625,
0.019378662109375,
0.01229095458984375,
0.0090789794921875,
-0.0207672119140625,
0.01226043701171875,
-0.004474639892578125,
-0.035247802734375,
-0.01004791259765625,
-0.03558349609375,
-0.0193634033203125,
0.039947509765625,
-0.05645751953125,
0.00576019287109375,
0.00013697147369384766,
-0.0009741783142089844,
-0.01531982421875,
0.020233154296875,
-0.0220947265625,
0.05108642578125,
-0.01287841796875,
-0.0199737548828125,
0.020843505859375,
-0.00635528564453125,
-0.044219970703125,
0.0298004150390625,
-0.0308685302734375,
-0.00791168212890625,
0.007549285888671875,
0.0384521484375,
-0.0034198760986328125,
0.0126190185546875,
0.01629638671875,
-0.05047607421875,
0.0257568359375,
0.051239013671875,
0.02886962890625,
-0.0300140380859375,
0.0011806488037109375,
-0.0249786376953125,
0.07177734375,
-0.0153350830078125,
0.05517578125,
0.006626129150390625,
0.044769287109375,
0.03326416015625,
-0.005802154541015625,
0.0114288330078125,
0.045135498046875,
-0.026336669921875,
-0.0015773773193359375,
0.0286865234375,
0.0283355712890625,
-0.01201629638671875,
-0.01348876953125,
0.0009708404541015625,
0.016357421875,
-0.0217132568359375,
0.004184722900390625,
-0.0070953369140625,
-0.012054443359375,
0.0335693359375,
-0.017669677734375,
0.0189056396484375,
0.00745391845703125,
-0.04156494140625,
0.0021209716796875,
0.0440673828125,
-0.01702880859375,
-0.00843048095703125,
-0.004985809326171875,
-0.0137481689453125,
0.018341064453125,
-0.037689208984375,
-0.0225677490234375,
-0.011962890625,
-0.0168914794921875,
-0.00333404541015625,
0.023651123046875,
0.0233917236328125,
-0.0085906982421875,
-0.04278564453125,
0.023345947265625,
0.06689453125,
-0.01001739501953125,
0.02008056640625,
-0.0066070556640625,
0.01390838623046875,
-0.0240325927734375,
0.005382537841796875,
0.0189056396484375,
0.0016584396362304688,
-0.00385284423828125,
0.0023403167724609375,
-0.038299560546875,
0.00896453857421875,
0.0141754150390625,
-0.053619384765625,
0.0010700225830078125,
0.0201416015625,
-0.0003292560577392578,
0.01380157470703125,
0.049102783203125,
0.019775390625,
0.021453857421875,
-0.0175018310546875,
-0.0002815723419189453,
-0.006702423095703125,
0.07281494140625,
-0.00787353515625,
0.020294189453125,
-0.014495849609375,
-0.00272369384765625,
0.042755126953125,
0.012054443359375,
-0.034149169921875,
-0.00922393798828125,
-0.01898193359375,
-0.044189453125,
0.04791259765625,
0.020355224609375,
-0.055755615234375,
0.0200653076171875,
0.05938720703125,
0.0357666015625,
0.05279541015625,
0.03424072265625,
-0.034576416015625,
0.0086669921875,
0.0648193359375,
-0.04241943359375,
-0.08575439453125,
0.08599853515625,
0.0024585723876953125,
-0.01220703125,
-0.0310821533203125,
-0.023040771484375,
-0.01959228515625,
-0.03424072265625,
-0.0262451171875,
0.00272369384765625,
-0.0213775634765625,
0.0030956268310546875,
-0.004673004150390625,
-0.04486083984375,
-0.0208587646484375,
0.01425933837890625,
0.0007052421569824219,
-0.003894805908203125,
0.0548095703125,
-0.012115478515625,
-0.032440185546875,
-0.02313232421875,
-0.0308837890625,
0.010833740234375,
-0.0098724365234375,
0.0237884521484375,
-0.025787353515625,
0.029052734375,
-0.0011663436889648438,
0.0303802490234375,
0.05035400390625,
-0.035888671875,
-0.01050567626953125,
0.00353240966796875,
0.0390625,
0.00597381591796875,
0.0238189697265625,
0.00872039794921875,
0.01323699951171875,
0.0007691383361816406,
-0.045135498046875,
-0.01074981689453125,
-0.0014057159423828125,
-0.0208892822265625,
-0.048309326171875,
0.00731658935546875,
-0.012939453125,
-0.038116455078125,
0.042510986328125,
0.030517578125,
0.014129638671875,
0.0269012451171875,
0.0120391845703125,
0.00579071044921875,
-0.00928497314453125,
-0.007625579833984375,
-0.04388427734375,
0.0765380859375,
0.01148223876953125,
-0.0232391357421875,
0.030731201171875,
0.0038509368896484375,
-0.0189208984375,
-0.0171356201171875,
-0.07470703125,
-0.058746337890625,
0.06781005859375,
0.0175628662109375,
0.03936767578125,
-0.0282745361328125,
-0.050506591796875,
0.0179443359375,
0.1209716796875,
0.00299835205078125,
-0.0199127197265625,
-0.006664276123046875,
0.014801025390625,
-0.033294677734375,
-0.0164337158203125,
-0.018707275390625,
-0.00010502338409423828,
0.01861572265625,
-0.007396697998046875,
-0.0291748046875,
0.0107574462890625,
-0.0109710693359375,
-0.0162353515625,
0.033905029296875,
-0.02935791015625,
0.043914794921875,
-0.0650634765625,
-0.0013904571533203125,
0.0246429443359375,
-0.0008883476257324219,
-0.0219268798828125,
-0.0166778564453125,
-0.02166748046875,
-0.09344482421875,
-0.0016241073608398438,
-0.053955078125,
0.052764892578125,
0.03411865234375,
-0.044097900390625,
-0.006256103515625,
0.033782958984375,
0.0266571044921875,
-0.0086822509765625,
0.004878997802734375,
-0.0069122314453125,
-0.02606201171875,
-0.0305328369140625,
-0.0022983551025390625,
-0.04156494140625,
-0.04656982421875,
-0.028472900390625,
0.0083160400390625,
0.03680419921875,
0.00605010986328125,
-0.0178985595703125,
0.016754150390625,
0.002346038818359375,
0.001720428466796875,
-0.04876708984375,
-0.035308837890625,
0.01605224609375,
-0.050445556640625,
0.0214996337890625,
-0.040863037109375,
-0.0179290771484375,
0.00727081298828125,
-0.0014171600341796875,
-0.0159149169921875,
0.0307159423828125,
0.03887939453125,
0.0193634033203125,
-0.016632080078125,
-0.0640869140625,
0.014556884765625,
0.03656005859375,
-0.0200042724609375,
0.0350341796875,
0.01312255859375,
-0.033905029296875,
0.059967041015625,
0.00423431396484375,
0.0077056884765625,
0.01543426513671875,
0.0239715576171875,
0.0238189697265625,
0.0119171142578125,
-0.0102081298828125,
0.019866943359375,
-0.0430908203125,
0.01561737060546875,
-0.013916015625,
-0.00893402099609375,
-0.0257110595703125,
0.0267333984375,
-0.0246734619140625,
0.037445068359375,
-0.0256805419921875,
-0.01441192626953125,
0.001895904541015625,
-0.0218505859375,
0.0301513671875,
0.013275146484375,
-0.00250244140625,
-0.0006542205810546875,
-0.0167388916015625,
0.031585693359375,
-0.033294677734375,
0.00824737548828125,
-0.0308990478515625,
0.0538330078125,
-0.034515380859375,
0.022979736328125,
-0.03326416015625,
-0.0212249755859375,
0.11602783203125,
-0.01067352294921875,
-0.05950927734375,
0.004962921142578125,
-0.0338134765625,
0.01560211181640625,
0.0270538330078125,
0.0217437744140625,
0.04132080078125,
0.012908935546875,
-0.006374359130859375,
-0.0029392242431640625,
-0.044403076171875,
0.022125244140625,
-0.041656494140625,
0.024627685546875,
0.008453369140625,
-0.007190704345703125,
-0.058319091796875,
0.0833740234375,
0.0205535888671875,
0.00937652587890625,
-0.00942230224609375,
0.061798095703125,
0.034271240234375,
0.041015625,
0.00843048095703125,
-0.021575927734375,
0.0211639404296875,
0.003780364990234375,
-0.0269317626953125,
-0.04071044921875,
-0.01995849609375,
0.00827789306640625,
0.04193115234375,
-0.01369476318359375,
-0.023345947265625,
0.018341064453125,
-0.0145416259765625,
-0.0247955322265625,
0.0000393986701965332,
0.002422332763671875,
-0.012481689453125,
-0.029266357421875,
0.017303466796875,
0.0313720703125,
0.0271148681640625,
0.013885498046875,
0.0198974609375,
0.027923583984375,
0.04010009765625,
-0.0137176513671875,
0.0271453857421875,
-0.01324462890625,
-0.0272369384765625,
-0.024169921875,
-0.037811279296875,
-0.0322265625,
-0.0103302001953125,
-0.01380157470703125,
0.00978851318359375,
-0.01123809814453125,
-0.0260772705078125,
-0.0305328369140625,
0.02392578125,
-0.0262603759765625,
0.00513458251953125,
-0.0860595703125,
0.0169219970703125,
0.0224609375,
0.0271148681640625,
-0.00727081298828125,
-0.0217437744140625,
-0.0150299072265625,
-0.007297515869140625,
0.018829345703125,
-0.027069091796875,
0.006687164306640625,
-0.02508544921875,
0.0156707763671875,
0.0247344970703125,
0.007843017578125,
-0.0258636474609375,
-0.007415771484375,
-0.00450897216796875,
0.00994873046875,
-0.01519775390625,
-0.0239715576171875,
0.1058349609375,
-0.04034423828125,
0.08184814453125,
0.01513671875,
0.04278564453125,
-0.0479736328125,
-0.004680633544921875,
0.0106658935546875,
-0.07196044921875,
-0.03936767578125,
-0.00495147705078125,
-0.05328369140625,
0.054290771484375,
0.04205322265625,
-0.005702972412109375,
0.04461669921875,
-0.041534423828125,
-0.00463104248046875,
-0.0168304443359375,
0.0504150390625,
-0.0789794921875,
0.025390625,
0.0100555419921875,
-0.01302337646484375,
0.0220184326171875,
-0.048431396484375,
-0.0127410888671875,
0.0233154296875,
-0.019744873046875,
0.0217437744140625,
0.01398468017578125,
-0.050140380859375,
0.06390380859375,
0.1298828125,
0.0205841064453125,
0.07354736328125,
0.006015777587890625,
0.0010967254638671875,
0.046356201171875,
0.00685882568359375,
-0.004802703857421875,
-0.0037384033203125,
0.0347900390625,
-0.00968170166015625,
-0.0189971923828125,
0.0014057159423828125,
-0.0206298828125,
0.017822265625,
0.0211029052734375,
0.045379638671875,
-0.057586669921875,
0.015594482421875,
0.01149749755859375,
-0.026214599609375,
0.033233642578125,
-0.01409149169921875,
-0.0191650390625,
-0.032257080078125,
0.0089874267578125,
-0.024261474609375,
-0.0479736328125,
-0.03326416015625,
-0.00284576416015625,
0.0034999847412109375,
-0.0279998779296875,
0.01470947265625,
0.003833770751953125,
0.06884765625,
-0.01090240478515625,
-0.060089111328125,
0.039642333984375,
0.0287933349609375,
0.038116455078125,
-0.007572174072265625,
-0.00423431396484375,
-0.0133514404296875,
0.0176849365234375,
-0.03399658203125,
-0.032623291015625,
0.032745361328125,
-0.038848876953125,
0.0256805419921875,
0.02447509765625,
-0.03131103515625,
0.035980224609375,
-0.0030345916748046875,
-0.00804901123046875,
-0.0028285980224609375,
-0.02142333984375,
-0.0256805419921875,
0.0006432533264160156,
-0.0228424072265625,
0.004077911376953125,
-0.038543701171875,
0.0220794677734375,
-0.005718231201171875,
-0.037078857421875,
0.08349609375,
-0.044677734375,
-0.0106048583984375,
-0.0021953582763671875,
-0.005977630615234375,
0.015777587890625,
-0.0102081298828125,
0.04095458984375,
-0.066162109375,
-0.036041259765625,
0.0091094970703125,
-0.02130126953125,
-0.00350189208984375,
0.016143798828125,
-0.017242431640625,
0.0712890625,
-0.0179901123046875,
-0.0313720703125,
0.021820068359375,
0.042572021484375,
-0.03631591796875,
0.0181884765625,
-0.022247314453125,
0.020294189453125,
0.005802154541015625,
0.03448486328125,
-0.0306854248046875,
-0.0067596435546875,
0.007724761962890625,
0.02593994140625,
0.045440673828125,
0.010589599609375,
-0.0167236328125,
-0.03375244140625,
-0.03173828125,
-0.00408935546875,
-0.041229248046875,
0.031463623046875,
-0.00853729248046875,
0.0220489501953125,
0.03363037109375,
-0.01100921630859375,
0.02337646484375,
0.01041412353515625,
-0.0234375,
0.030364990234375,
0.01385498046875,
0.0251922607421875,
-0.0053863525390625,
0.0228729248046875,
0.04803466796875,
-0.0401611328125,
-0.0244293212890625,
-0.037445068359375,
-0.0162506103515625,
0.0347900390625,
-0.0001329183578491211,
-0.011138916015625,
-0.01132965087890625,
-0.023681640625,
0.028839111328125,
0.00041103363037109375,
0.0341796875,
0.0156707763671875,
0.0215301513671875,
-0.0216827392578125,
0.039520263671875,
0.0150146484375,
0.044158935546875,
-0.01068115234375,
0.06951904296875,
0.031768798828125,
0.033477783203125,
-0.03631591796875,
-0.00701141357421875,
0.00400543212890625,
0.0615234375,
-0.045166015625,
0.01360321044921875,
0.0115966796875,
0.0264434814453125,
0.02520751953125,
-0.007965087890625,
0.05731201171875,
0.001689910888671875,
0.00978851318359375,
0.00963592529296875,
0.0193634033203125,
-0.0107574462890625,
-0.0003714561462402344,
0.016876220703125,
0.042999267578125,
-0.040313720703125,
0.01308441162109375,
-0.01346588134765625,
0.0021076202392578125,
0.031524658203125,
0.0102386474609375,
-0.007564544677734375,
0.040283203125,
0.0248870849609375,
0.00691986083984375,
-0.01474761962890625,
-0.00702667236328125,
0.01500701904296875,
0.0033435821533203125,
-0.01418304443359375,
-0.019622802734375,
0.0312347412109375,
0.033599853515625,
0.018585205078125,
0.05084228515625,
0.060760498046875,
0.0003452301025390625,
-0.052093505859375,
-0.002178192138671875,
0.05712890625,
-0.0322265625,
-0.0447998046875,
-0.055267333984375,
-0.023040771484375,
0.0085906982421875,
0.01200103759765625,
0.038177490234375,
-0.00833892822265625,
-0.00019085407257080078,
-0.01171112060546875,
0.042236328125,
-0.0101318359375,
-0.01473236083984375,
0.039093017578125,
-0.022857666015625,
0.0628662109375,
0.006511688232421875,
-0.044830322265625,
0.0025997161865234375,
-0.025482177734375,
-0.0243072509765625,
0.008636474609375,
0.038330078125,
-0.006847381591796875,
0.033355712890625,
-0.0017528533935546875,
0.0007033348083496094,
-0.00627899169921875,
0.0117034912109375,
-0.01053619384765625,
0.010345458984375,
0.040557861328125,
0.00890350341796875,
-0.03350830078125,
-0.05523681640625,
-0.0019474029541015625,
0.047515869140625,
-0.0228118896484375,
0.06231689453125,
-0.026611328125,
0.002498626708984375,
-0.007801055908203125,
0.0238494873046875,
-0.0167388916015625,
-0.019378662109375,
0.033905029296875,
0.023590087890625,
0.0197906494140625,
-0.0138092041015625,
-0.039703369140625,
-0.017425537109375,
0.036590576171875,
-0.04412841796875,
0.0002484321594238281,
-0.0274505615234375,
0.0321044921875,
-0.0323486328125,
-0.01131439208984375,
-0.036407470703125,
-0.01122283935546875,
0.0267333984375,
0.0031299591064453125,
-0.0081329345703125,
-0.007419586181640625,
0.0114898681640625,
0.0153961181640625,
0.03302001953125,
-0.00868988037109375,
0.0190277099609375,
-0.008758544921875,
0.054656982421875,
0.03936767578125,
-0.02484130859375,
0.049713134765625,
-0.0116424560546875,
-0.023468017578125,
0.0236358642578125,
-0.006664276123046875,
-0.02716064453125,
0.0030651092529296875,
0.043365478515625,
0.01995849609375,
0.0311279296875,
0.06634521484375,
0.005779266357421875,
0.0240325927734375,
-0.014373779296875,
0.01271820068359375,
0.00904083251953125,
0.03326416015625,
-0.01355743408203125,
-0.03619384765625,
-0.0018739700317382812,
0.01416778564453125,
-0.017120361328125,
0.011383056640625,
-0.05596923828125,
0.001983642578125,
0.0300445556640625,
0.0068817138671875,
-0.058868408203125,
0.033782958984375,
-0.00722503662109375,
0.046722412109375,
-0.007053375244140625,
-0.021331787109375,
0.02154541015625,
0.05535888671875,
-0.007724761962890625,
-0.006153106689453125,
-0.005496978759765625,
-0.007686614990234375,
-0.0014619827270507812,
0.00008434057235717773,
-0.0001628398895263672,
-0.005615234375,
0.03466796875,
0.00756072998046875,
0.018463134765625,
0.044403076171875,
0.0105133056640625,
-0.00864410400390625,
0.0177459716796875,
-0.00823974609375,
-0.0121917724609375,
-0.07403564453125,
-0.0009455680847167969,
-0.073974609375,
-0.0080108642578125,
-0.048797607421875,
0.03778076171875,
0.041015625,
-0.0257568359375,
-0.08544921875,
0.05499267578125,
-0.03912353515625,
-0.032684326171875,
-0.07891845703125,
-0.04071044921875,
-0.020721435546875,
0.05157470703125,
-0.03582763671875,
-0.00777435302734375,
-0.033172607421875,
0.08087158203125,
-0.00763702392578125,
0.045989990234375,
-0.0032978057861328125,
0.01448822021484375,
-0.06671142578125,
0.005535125732421875,
-0.02178955078125,
0.006771087646484375,
0.0113983154296875,
-0.0272064208984375,
0.0297698974609375,
0.0254669189453125,
-0.040802001953125,
-0.0239410400390625,
-0.009033203125,
-0.00833892822265625,
-0.013702392578125,
-0.049713134765625,
-0.01385498046875,
-0.00746917724609375,
0.05792236328125,
0.057373046875,
0.01690673828125,
-0.051513671875,
-0.0185699462890625,
-0.036163330078125,
0.0248565673828125,
-0.0113983154296875,
-0.031890869140625,
-0.019744873046875,
0.00594329833984375,
-0.00213623046875,
0.005218505859375,
-0.004085540771484375,
0.0063629150390625,
-0.00278472900390625,
0.00463104248046875,
0.0374755859375,
-0.01558685302734375,
-0.012237548828125,
0.00447845458984375,
0.031158447265625,
-0.0275726318359375,
-0.022491455078125,
-0.0271759033203125,
0.032073974609375,
-0.0111541748046875,
-0.058135986328125,
-0.0209808349609375,
-0.057464599609375,
0.010467529296875,
0.05389404296875,
-0.0241546630859375,
-0.0119171142578125,
-0.0274505615234375,
-0.0185089111328125,
-0.0265655517578125,
0.00511932373046875,
0.01336669921875,
0.0093994140625,
-0.0079803466796875,
0.0168914794921875,
0.01654052734375,
0.03363037109375,
-0.001033782958984375,
-0.006992340087890625,
-0.02679443359375,
0.0278167724609375,
0.003177642822265625,
-0.0159149169921875,
0.0194549560546875,
-0.03363037109375,
-0.00495147705078125,
0.0013885498046875,
-0.0214996337890625,
-0.06884765625,
0.0253753662109375,
-0.00296783447265625,
0.00048470497131347656,
0.0282745361328125
]
|
28b6c6f3e976a9ce3a018a1a226a0ff251f22d2a | Wordpress Stackexchange
Q: Wordpress get_posts function, 1300 lines long I'm just getting started learning about the WordPress Core. WordPress's codebase is the first large codebase that I've looked thoroughly into.
The get_posts method in wp-includes/query.php is 1300 lines long. To me that is huge. Can I expect a lot more of these large functions in the codebase?
A: Yes.
To give you some historical perspective WordPress core:
*
*is relatively old code base, code volume tends to grow over time;
*has extreme commitment to backwards compatibility, as result it's extremely rare for code to be removed from core;
*is written in essentially obsolete dialect of PHP version 5.2 (which it remains compatible with), which resulted in monolithic core design and low separation between modules;
*largely ignores code length and complexity metrics for the purposes of development and maintenance.
You don't make it completely clear if you are interested in PHP development in general or WordPress specifically. If you want some experience with modern PHP development style you should probably look at different projects, done in more current styles.
| Q: Wordpress get_posts function, 1300 lines long I'm just getting started learning about the WordPress Core. WordPress's codebase is the first large codebase that I've looked thoroughly into.
The get_posts method in wp-includes/query.php is 1300 lines long. To me that is huge. Can I expect a lot more of these large functions in the codebase?
A: Yes.
To give you some historical perspective WordPress core:
*
*is relatively old code base, code volume tends to grow over time;
*has extreme commitment to backwards compatibility, as result it's extremely rare for code to be removed from core;
*is written in essentially obsolete dialect of PHP version 5.2 (which it remains compatible with), which resulted in monolithic core design and low separation between modules;
*largely ignores code length and complexity metrics for the purposes of development and maintenance.
You don't make it completely clear if you are interested in PHP development in general or WordPress specifically. If you want some experience with modern PHP development style you should probably look at different projects, done in more current styles.
| wordpress | {
"language": "en",
"length": 176,
"provenance": "stackexchange_00019.jsonl.gz:464265",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/221919"
} | [
0.037811279296875,
-0.0050048828125,
-0.017242431640625,
-0.02099609375,
0.01007843017578125,
-0.031524658203125,
0.05242919921875,
0.005489349365234375,
0.0086669921875,
0.010223388671875,
-0.031951904296875,
0.00576019287109375,
-0.04656982421875,
-0.0190887451171875,
-0.0086822509765625,
-0.0323486328125,
0.06927490234375,
-0.0394287109375,
0.03863525390625,
0.006072998046875,
0.0126495361328125,
0.0411376953125,
0.0445556640625,
0.08087158203125,
-0.0089569091796875,
-0.0465087890625,
0.08538818359375,
-0.01544189453125,
-0.0006618499755859375,
-0.0213775634765625,
0.00038433074951171875,
0.0178070068359375,
0.0282135009765625,
0.0294647216796875,
-0.03594970703125,
-0.007236480712890625,
0.01421356201171875,
0.005222320556640625,
0.00009560585021972656,
0.0223846435546875,
-0.0159912109375,
0.018890380859375,
0.04278564453125,
-0.01611328125,
-0.019683837890625,
0.0210113525390625,
-0.0279388427734375,
-0.01345062255859375,
0.03875732421875,
0.016693115234375,
-0.00789642333984375,
-0.00634765625,
-0.0009126663208007812,
-0.03399658203125,
-0.0168304443359375,
0.005893707275390625,
0.04205322265625,
-0.045135498046875,
0.0379638671875,
-0.0540771484375,
-0.046600341796875,
-0.0263824462890625,
0.048248291015625,
0.005229949951171875,
-0.04620361328125,
0.032989501953125,
0.02520751953125,
-0.019134521484375,
-0.046142578125,
-0.058349609375,
0.011474609375,
-0.02685546875,
0.010955810546875,
-0.0279388427734375,
0.011444091796875,
0.0044403076171875,
-0.0175628662109375,
-0.0236358642578125,
0.0244903564453125,
0.008087158203125,
-0.03997802734375,
-0.031494140625,
-0.046783447265625,
-0.0036754608154296875,
-0.02392578125,
-0.013702392578125,
-0.0183868408203125,
0.016448974609375,
-0.042266845703125,
-0.0504150390625,
-0.0239715576171875,
-0.032196044921875,
-0.0654296875,
-0.0084075927734375,
0.0082550048828125,
-0.049163818359375,
-0.0028839111328125,
-0.004119873046875,
-0.002971649169921875,
0.0203094482421875,
0.0187835693359375,
-0.05438232421875,
0.06927490234375,
-0.0122222900390625,
0.006771087646484375,
0.032958984375,
-0.01279449462890625,
0.0263671875,
0.035919189453125,
0.038421630859375,
0.0182647705078125,
-0.01129150390625,
-0.02880859375,
-0.015380859375,
-0.006061553955078125,
0.030364990234375,
-0.03948974609375,
0.01236724853515625,
-0.01265716552734375,
0.0201873779296875,
-0.0066070556640625,
0.00975799560546875,
-0.01517486572265625,
0.0024852752685546875,
0.02734375,
0.006866455078125,
-0.0152587890625,
0.01079559326171875,
0.002040863037109375,
0.0288543701171875,
-0.017364501953125,
0.02447509765625,
-0.018829345703125,
-0.03076171875,
-0.05078125,
-0.0079345703125,
-0.01519775390625,
-0.0174102783203125,
-0.040679931640625,
0.03082275390625,
-0.0084686279296875,
-0.0677490234375,
-0.0071563720703125,
-0.0174102783203125,
0.01861572265625,
0.0005240440368652344,
0.035308837890625,
0.0236358642578125,
0.001708984375,
-0.02532958984375,
0.0182342529296875,
0.041473388671875,
0.0272216796875,
-0.02630615234375,
0.014984130859375,
-0.0255889892578125,
0.00698089599609375,
-0.033782958984375,
0.005100250244140625,
-0.00817108154296875,
0.01654052734375,
-0.0127716064453125,
0.004871368408203125,
-0.043792724609375,
-0.0716552734375,
0.0159454345703125,
-0.035247802734375,
-0.0035610198974609375,
0.020294189453125,
-0.00891876220703125,
0.0217437744140625,
-0.01270294189453125,
0.019744873046875,
0.01103973388671875,
0.005283355712890625,
0.01039886474609375,
-0.00789642333984375,
0.0011348724365234375,
0.035491943359375,
0.0250244140625,
-0.00074005126953125,
-0.017364501953125,
0.04705810546875,
-0.006855010986328125,
-0.06610107421875,
0.034637451171875,
0.01102447509765625,
0.08984375,
0.00940704345703125,
0.0301971435546875,
0.0423583984375,
-0.004375457763671875,
0.01073455810546875,
0.00809478759765625,
-0.027740478515625,
-0.043914794921875,
0.0175323486328125,
0.01385498046875,
-0.0174102783203125,
-0.0117340087890625,
0.01111602783203125,
0.0016222000122070312,
0.00965118408203125,
-0.0118560791015625,
-0.037933349609375,
-0.00405120849609375,
-0.0194549560546875,
0.0255889892578125,
0.03143310546875,
0.040008544921875,
0.01000213623046875,
0.059661865234375,
-0.0618896484375,
0.0269775390625,
-0.027984619140625,
0.0236663818359375,
-0.0181427001953125,
0.017669677734375,
-0.007320404052734375,
-0.01148223876953125,
-0.005687713623046875,
-0.0189361572265625,
-0.0024929046630859375,
0.02410888671875,
0.0469970703125,
0.0014190673828125,
-0.01169586181640625,
-0.006561279296875,
0.020751953125,
0.022979736328125,
-0.019500732421875,
0.0002646446228027344,
0.06494140625,
0.0643310546875,
-0.002239227294921875,
0.0007200241088867188,
-0.006748199462890625,
-0.050384521484375,
-0.00702667236328125,
0.0338134765625,
0.042938232421875,
0.029693603515625,
-0.01364898681640625,
-0.030181884765625,
0.01406097412109375,
-0.08428955078125,
-0.0099029541015625,
-0.0111236572265625,
0.002201080322265625,
0.057342529296875,
0.01209259033203125,
0.00867462158203125,
-0.01128387451171875,
-0.01189422607421875,
-0.00992584228515625,
0.0256195068359375,
-0.00988006591796875,
0.01476287841796875,
-0.0130767822265625,
-0.0014362335205078125,
0.0106048583984375,
-0.06298828125,
-0.0268096923828125,
-0.039215087890625,
-0.0268402099609375,
0.0333251953125,
0.0166778564453125,
0.0312042236328125,
-0.04559326171875,
0.0102081298828125,
0.032196044921875,
0.05419921875,
-0.016510009765625,
0.00836944580078125,
-0.0158843994140625,
-0.046722412109375,
-0.0244598388671875,
0.02667236328125,
-0.045928955078125,
-0.0273590087890625,
-0.00893402099609375,
0.0301055908203125,
-0.01532745361328125,
-0.01180267333984375,
0.0298919677734375,
-0.0197906494140625,
-0.00988006591796875,
-0.0248565673828125,
0.04345703125,
0.0235137939453125,
0.03424072265625,
0.042633056640625,
-0.017730712890625,
0.06890869140625,
-0.0024547576904296875,
-0.01020050048828125,
0.10009765625,
-0.046539306640625,
0.0296783447265625,
-0.007198333740234375,
0.05615234375,
0.038421630859375,
-0.009063720703125,
-0.0092315673828125,
0.01568603515625,
-0.00705718994140625,
0.02862548828125,
0.0211334228515625,
0.01074981689453125,
0.0020465850830078125,
-0.031768798828125,
0.0021533966064453125,
0.0255584716796875,
0.0826416015625,
-0.0149383544921875,
-0.06756591796875,
-0.0064849853515625,
0.044158935546875,
-0.09356689453125,
-0.1212158203125,
-0.003986358642578125,
-0.07861328125,
-0.0120391845703125,
-0.0335693359375,
-0.04022216796875,
0.00189971923828125,
-0.0158843994140625,
0.002696990966796875,
-0.0267791748046875,
-0.039276123046875,
-0.07940673828125,
-0.09735107421875,
-0.0975341796875,
-0.0010509490966796875,
0.0017175674438476562,
0.0276641845703125,
-0.005245208740234375,
0.0810546875,
0.0004429817199707031,
-0.0809326171875,
-0.042083740234375,
0.00405120849609375,
-0.0234832763671875,
0.006114959716796875,
-0.0297393798828125,
0.00601959228515625,
0.02734375,
-0.00421142578125,
-0.03277587890625,
0.00933074951171875,
0.008209228515625,
-0.02044677734375,
0.003131866455078125,
-0.0148773193359375,
0.014434814453125,
0.02740478515625,
-0.01531982421875,
-0.0029277801513671875,
0.0261993408203125,
-0.050689697265625,
-0.0167388916015625,
0.003482818603515625,
-0.0134124755859375,
0.0127410888671875,
-0.0270233154296875,
-0.00506591796875,
0.0010957717895507812,
0.054962158203125,
-0.00817108154296875,
-0.02410888671875,
0.0020961761474609375,
-0.051116943359375,
0.077880859375,
0.011749267578125,
0.032745361328125,
-0.01244354248046875,
0.018341064453125,
-0.0168609619140625,
0.012298583984375,
0.0002295970916748047,
0.0146331787109375,
-0.002841949462890625,
-0.02630615234375,
-0.04345703125,
-0.0288848876953125,
0.062225341796875,
0.057159423828125,
-0.00004029273986816406,
0.0026187896728515625,
-0.04327392578125,
0.0047760009765625,
0.065673828125,
-0.0047607421875,
-0.017181396484375,
-0.01447296142578125,
0.01183319091796875,
-0.06201171875,
-0.0438232421875,
-0.040985107421875,
0.0184326171875,
-0.031646728515625,
-0.0159912109375,
-0.0118865966796875,
-0.0195465087890625,
-0.009307861328125,
0.0207061767578125,
-0.0299072265625,
-0.0236968994140625,
0.03173828125,
-0.02313232421875,
0.0518798828125,
-0.0263519287109375,
0.034515380859375,
-0.037139892578125,
0.004207611083984375,
-0.036102294921875,
-0.08349609375,
-0.017059326171875,
-0.00443267822265625,
0.07012939453125,
0.01177215576171875,
-0.016571044921875,
0.00038433074951171875,
0.0582275390625,
-0.00531005859375,
0.008209228515625,
0.01910400390625,
0.012786865234375,
-0.0088348388671875,
-0.007350921630859375,
0.0162506103515625,
-0.031585693359375,
-0.052398681640625,
-0.020538330078125,
0.03271484375,
0.04034423828125,
-0.007480621337890625,
-0.0256805419921875,
-0.0239105224609375,
0.01456451416015625,
-0.0120086669921875,
-0.02294921875,
-0.025360107421875,
0.0113677978515625,
-0.0275115966796875,
0.0023174285888671875,
-0.01351165771484375,
-0.025115966796875,
0.0802001953125,
0.030303955078125,
0.00506591796875,
-0.01552581787109375,
0.0809326171875,
0.0025920867919921875,
-0.03564453125,
-0.079833984375,
-0.00966644287109375,
0.0274658203125,
-0.00542449951171875,
0.03680419921875,
0.01241302490234375,
-0.031524658203125,
0.06781005859375,
0.0089111328125,
0.016021728515625,
0.03826904296875,
-0.020172119140625,
0.01207733154296875,
-0.01885986328125,
0.001483917236328125,
0.0222015380859375,
-0.028900146484375,
0.03057861328125,
-0.03857421875,
-0.005916595458984375,
-0.00928497314453125,
0.03814697265625,
-0.04376220703125,
0.036285400390625,
-0.046905517578125,
-0.06964111328125,
0.028411865234375,
-0.03704833984375,
-0.0008044242858886719,
-0.02301025390625,
0.01300811767578125,
0.012176513671875,
-0.0092010498046875,
-0.00848388671875,
0.04693603515625,
0.03948974609375,
0.007205963134765625,
0.038299560546875,
0.00514984130859375,
-0.026611328125,
-0.0106048583984375,
-0.00661468505859375,
0.0038814544677734375,
-0.020965576171875,
-0.07415771484375,
-0.0010766983032226562,
-0.0002206563949584961,
0.042999267578125,
0.0273284912109375,
-0.054046630859375,
0.0469970703125,
0.04888916015625,
-0.045623779296875,
-0.004467010498046875,
-0.04449462890625,
-0.009002685546875,
-0.0682373046875,
-0.0318603515625,
-0.01044464111328125,
-0.002918243408203125,
0.03570556640625,
0.012847900390625,
-0.045806884765625,
0.046630859375,
-0.01183319091796875,
0.032806396484375,
0.020477294921875,
0.0394287109375,
0.004573822021484375,
-0.0142364501953125,
0.004489898681640625,
0.029327392578125,
-0.0166168212890625,
-0.01715087890625,
-0.0157012939453125,
-0.0019855499267578125,
0.011138916015625,
0.04608154296875,
0.03521728515625,
-0.007083892822265625,
0.006694793701171875,
-0.009185791015625,
0.032623291015625,
0.034881591796875,
0.005550384521484375,
-0.0300445556640625,
-0.031005859375,
0.022247314453125,
0.0149078369140625,
-0.00617218017578125,
0.045196533203125,
0.004161834716796875,
0.0396728515625,
-0.0216217041015625,
-0.004474639892578125,
-0.007671356201171875,
0.0061492919921875,
-0.039398193359375,
-0.006504058837890625,
0.005687713623046875,
-0.01192474365234375,
-0.02783203125,
-0.00846099853515625,
-0.03814697265625,
0.0386962890625,
0.0214080810546875,
0.02496337890625,
-0.038482666015625,
-0.030120849609375,
-0.01219940185546875,
-0.022674560546875,
0.0999755859375,
0.034332275390625,
-0.0241546630859375,
-0.001277923583984375,
-0.01496124267578125,
-0.0254364013671875,
0.00014209747314453125,
-0.017730712890625,
-0.05364990234375,
-0.0153656005859375,
-0.032470703125,
-0.0186920166015625,
0.0187835693359375,
0.0284881591796875,
0.0016813278198242188,
0.045654296875,
-0.015472412109375,
-0.0093536376953125,
-0.040924072265625,
0.052276611328125,
0.046844482421875,
0.0126190185546875,
0.009002685546875,
0.03143310546875,
0.013214111328125,
-0.00531768798828125,
0.018402099609375,
-0.0399169921875,
-0.016021728515625,
-0.02508544921875,
-0.0019197463989257812,
-0.0134429931640625,
-0.0166015625,
-0.01258087158203125,
-0.00698089599609375,
-0.0126800537109375,
-0.00562286376953125,
-0.0230865478515625,
0.032196044921875,
-0.00215911865234375,
-0.000873565673828125,
-0.004154205322265625,
-0.0012197494506835938,
-0.018157958984375,
-0.00408935546875,
-0.0338134765625,
0.02874755859375,
0.02508544921875,
-0.0018558502197265625,
0.0011949539184570312,
-0.01248931884765625,
0.026824951171875,
0.056976318359375,
-0.0025310516357421875,
0.03741455078125,
0.0206146240234375,
0.00750732421875,
-0.0113525390625,
0.06597900390625,
-0.0033016204833984375,
-0.035491943359375,
0.040374755859375,
0.0124053955078125,
-0.03497314453125,
-0.01312255859375,
-0.039031982421875,
0.03643798828125,
-0.0201568603515625,
0.0780029296875,
-0.0063018798828125,
0.036712646484375,
0.052490234375,
-0.030792236328125,
0.01403045654296875,
0.027923583984375,
-0.016876220703125,
-0.022186279296875,
0.0207672119140625,
-0.0052337646484375,
0.0163421630859375,
0.028411865234375,
0.00992584228515625,
-0.025665283203125,
-0.008209228515625,
0.01654052734375,
0.01047515869140625,
-0.05218505859375,
0.05206298828125,
0.019256591796875,
0.0298309326171875,
-0.0269622802734375,
0.02978515625,
-0.0296478271484375,
-0.002071380615234375,
-0.0360107421875,
0.012908935546875,
0.0035457611083984375,
-0.004970550537109375,
0.0179595947265625,
0.01363372802734375,
-0.0216522216796875,
0.046417236328125,
-0.0307769775390625,
0.033843994140625,
0.0178985595703125,
-0.027099609375,
-0.036041259765625,
-0.0128021240234375,
0.05914306640625,
0.0350341796875,
-0.05389404296875,
0.038909912109375,
-0.0167236328125,
-0.03497314453125,
-0.00860595703125,
-0.01320648193359375,
0.0745849609375,
0.005535125732421875,
-0.028778076171875,
0.031494140625,
-0.0174102783203125,
-0.0328369140625,
-0.003978729248046875,
0.016937255859375,
-0.0239410400390625,
0.0139923095703125,
-0.006267547607421875,
-0.00579833984375,
-0.01256561279296875,
-0.01473236083984375,
-0.006916046142578125,
0.050994873046875,
0.01163482666015625,
-0.01483154296875,
0.0304107666015625,
0.03082275390625,
-0.034881591796875,
0.0307464599609375,
-0.0302734375,
0.06439208984375,
0.0205230712890625,
0.01480865478515625,
-0.053436279296875,
-0.01131439208984375,
0.0000546574592590332,
0.0390625,
0.0582275390625,
0.003795623779296875,
-0.0245819091796875,
-0.03411865234375,
0.03533935546875,
0.060211181640625,
0.01342010498046875,
0.0194244384765625,
-0.004055023193359375,
0.0302276611328125,
0.035430908203125,
-0.05078125,
0.0217742919921875,
-0.004375457763671875,
-0.012542724609375,
0.024444580078125,
0.0013647079467773438,
-0.00437164306640625,
0.0193328857421875,
-0.002109527587890625,
0.00814056396484375,
0.0030975341796875,
-0.00006139278411865234,
0.01053619384765625,
-0.0556640625,
0.04888916015625,
0.0104827880859375,
-0.056640625,
-0.03692626953125,
-0.043548583984375,
0.0264739990234375,
0.010345458984375,
0.059295654296875,
0.033935546875,
0.03424072265625,
0.0909423828125,
-0.0255584716796875,
0.04119873046875,
0.011749267578125,
-0.040863037109375,
0.056671142578125,
0.0232391357421875,
0.0264739990234375,
-0.046783447265625,
-0.0068817138671875,
0.04632568359375,
0.067138671875,
-0.037078857421875,
-0.01145172119140625,
0.006015777587890625,
-0.0019388198852539062,
0.01078033447265625,
-0.01416015625,
0.02520751953125,
0.058380126953125,
0.030914306640625,
-0.01812744140625,
-0.02252197265625,
-0.00405120849609375,
-0.0187835693359375,
-0.00632476806640625,
0.002880096435546875,
0.0504150390625,
0.0032367706298828125,
-0.01605224609375,
-0.004589080810546875,
-0.01273345947265625,
0.011688232421875,
0.01178741455078125,
0.0231475830078125,
-0.00945281982421875,
0.000995635986328125,
0.0205078125,
0.01033782958984375,
0.0116729736328125,
-0.03521728515625,
0.0014190673828125,
-0.054962158203125,
0.034332275390625,
0.0170745849609375,
0.00588226318359375,
0.006542205810546875,
0.018463134765625,
0.0166473388671875,
-0.056182861328125,
0.002056121826171875,
0.076904296875,
-0.017974853515625,
-0.0250091552734375,
-0.0089569091796875,
-0.06365966796875,
-0.0097503662109375,
-0.030609130859375,
-0.000919342041015625,
0.01519012451171875,
0.00742340087890625,
0.0165557861328125,
0.02105712890625,
0.0077667236328125,
0.006435394287109375,
0.044097900390625,
0.0216217041015625,
0.023529052734375,
0.045166015625,
-0.01465606689453125,
-0.00872039794921875,
0.031005859375,
-0.0247650146484375,
-0.00850677490234375,
0.0213165283203125,
-0.0135040283203125,
0.0165863037109375,
-0.0024700164794921875,
-0.0312347412109375,
0.039031982421875,
-0.004241943359375,
-0.00027370452880859375,
0.031494140625,
0.0150146484375,
-0.01068878173828125,
-0.061126708984375,
-0.0271759033203125,
-0.0386962890625,
0.01279449462890625,
0.034942626953125,
0.05584716796875,
0.025543212890625,
0.017822265625,
-0.01739501953125,
-0.0155181884765625,
-0.01268768310546875,
-0.0086669921875,
-0.0255279541015625,
-0.0156402587890625,
-0.0006442070007324219,
0.00510406494140625,
0.00667572021484375,
-0.0302581787109375,
0.056610107421875,
-0.0872802734375,
-0.013763427734375,
-0.0096893310546875,
0.01751708984375,
-0.06756591796875,
-0.00922393798828125,
-0.024261474609375,
0.002285003662109375,
0.025115966796875,
-0.020263671875,
0.008056640625,
-0.01183319091796875,
0.0035762786865234375,
0.0211334228515625,
0.04638671875,
-0.042572021484375,
0.031494140625,
-0.03826904296875,
0.06573486328125,
0.034271240234375,
0.0287017822265625,
0.01136016845703125,
-0.03155517578125,
-0.036163330078125,
-0.0150909423828125,
0.0139617919921875,
-0.0306396484375,
-0.01409912109375,
-0.0042877197265625,
0.00963592529296875,
0.0304718017578125,
0.044097900390625,
-0.0211029052734375,
0.0236358642578125,
0.0352783203125,
-0.00998687744140625,
0.029205322265625,
0.0164947509765625,
-0.01552581787109375,
-0.00417327880859375,
-0.0290985107421875,
-0.03155517578125,
0.001232147216796875,
-0.06585693359375,
0.013092041015625,
-0.029327392578125,
0.023193359375,
-0.00902557373046875,
-0.01145172119140625,
-0.01166534423828125,
-0.01824951171875,
-0.013031005859375,
-0.01519012451171875,
0.0164794921875,
-0.00482940673828125,
0.00934600830078125,
-0.034637451171875,
-0.03009033203125,
-0.0200347900390625,
0.0241851806640625,
-0.0060272216796875,
0.0233917236328125,
0.036224365234375,
-0.02978515625,
0.0004820823669433594,
0.048095703125,
0.0217742919921875,
0.075439453125,
-0.027801513671875,
0.01444244384765625,
0.0269622802734375,
0.005970001220703125,
-0.06317138671875,
-0.07257080078125,
0.030120849609375,
-0.03997802734375,
-0.01313018798828125,
0.006160736083984375,
0.0158233642578125,
0.0230865478515625,
-0.0269927978515625,
-0.058349609375,
0.0200042724609375,
-0.004123687744140625,
-0.0352783203125,
-0.05279541015625,
-0.0284423828125,
-0.0120697021484375,
0.040802001953125,
-0.01476287841796875,
-0.0157012939453125,
-0.040679931640625,
0.043182373046875,
0.016082763671875,
0.0114593505859375,
0.02392578125,
0.0177001953125,
-0.054718017578125,
0.03741455078125,
0.007328033447265625,
0.00788116455078125,
-0.001804351806640625,
0.01708984375,
0.03271484375,
0.06842041015625,
-0.00836944580078125,
0.01197052001953125,
-0.004276275634765625,
-0.041717529296875,
-0.01296234130859375,
-0.042449951171875,
-0.0029087066650390625,
-0.00012135505676269531,
0.0528564453125,
0.0279998779296875,
0.0007600784301757812,
-0.046112060546875,
0.035675048828125,
0.0198974609375,
-0.0574951171875,
-0.031707763671875,
0.0265655517578125,
-0.05328369140625,
-0.03717041015625,
-0.0181427001953125,
-0.0156707763671875,
0.047393798828125,
-0.017486572265625,
-0.01514434814453125,
-0.0112152099609375,
-0.03851318359375,
-0.053131103515625,
-0.01053619384765625,
-0.0618896484375,
0.015106201171875,
-0.003261566162109375,
-0.0203399658203125,
0.0084381103515625,
0.0204925537109375,
-0.02789306640625,
0.07000732421875,
-0.034027099609375,
0.0269927978515625,
-0.0177154541015625,
-0.01380157470703125,
0.016204833984375,
0.00823211669921875,
0.020355224609375,
0.03411865234375,
0.01296234130859375,
0.0157318115234375,
-0.01708984375,
0.006496429443359375,
0.01654052734375,
0.0147552490234375,
-0.029052734375,
0.075439453125,
0.0151824951171875,
0.052978515625,
0.0211181640625,
0.01192474365234375,
-0.007190704345703125,
-0.0144195556640625,
0.0175323486328125,
-0.05450439453125,
-0.002231597900390625,
0.042755126953125,
-0.033294677734375,
-0.02423095703125,
0.004180908203125,
0.036376953125,
0.0083770751953125,
-0.0014295578002929688
]
|
88a90408c74aa30d5b7c59c37d0bea4c0e6d4311 | Wordpress Stackexchange
Q: Prevent Wordpress from adding linebreaks to javascript embedded in a page On a page in Wordpress, If I enter the following code:
var r='<li><a href="#"><img src="' + slide.src + '" width="50" height="50" /></a></li>';
it is rendered in the browser as
var r='
<li><a href="#"><img src="' + slide.src + '" width="50" height="50" /></a></li>
';
and it gives me this error in FF Console SyntaxError: unterminated string literal var r='
This is a single-user blog, so I am "Administrator".
How do I prevent Wordpress from fouling my code?
A: In the new WordPress (WP 5+) Editor - Gutenberg, you can use a "Custom HTML" block to prevent the automatic line breaks and paragraphs:
on Visual Editor click + > Formatting > Custom HTML - and put your JavaScript in there
on Code Editor enclose your JavaScript with <!-- wp:html --> <!-- /wp:html -->
| Q: Prevent Wordpress from adding linebreaks to javascript embedded in a page On a page in Wordpress, If I enter the following code:
var r='<li><a href="#"><img src="' + slide.src + '" width="50" height="50" /></a></li>';
it is rendered in the browser as
var r='
<li><a href="#"><img src="' + slide.src + '" width="50" height="50" /></a></li>
';
and it gives me this error in FF Console SyntaxError: unterminated string literal var r='
This is a single-user blog, so I am "Administrator".
How do I prevent Wordpress from fouling my code?
A: In the new WordPress (WP 5+) Editor - Gutenberg, you can use a "Custom HTML" block to prevent the automatic line breaks and paragraphs:
on Visual Editor click + > Formatting > Custom HTML - and put your JavaScript in there
on Code Editor enclose your JavaScript with <!-- wp:html --> <!-- /wp:html -->
A: The Problem
Really annoying! WordPress wpautop parses the whole page and adds line-breaks in HTML code after certain tags.
Unfortunately WP does not recognize when HTML strings occur inside javascript and this can mess up the JS source code of your page!!
// This breaks your JS code:
<script>
json={"html":"<ul><li>one</li><li>two</li></ul>"};
</script>
// After wpautop is done with your code it becomes invalid JSON/JS:
<script>
json={"html":"<ul>
<li>one</li>
<li>two</li>
</ul>"};
</script>
★★ Easy solution ★★
wpautop has a small exception built in: It will not add line breaks inside <pre></pre> blocks :) We can use this to our advantage, simply by wrapping our <script> tags with <pre>:
// Simple solution!
<pre><script>
json={"html":"<ul><li>one</li><li>two</li></ul>"};
</script></pre>
// Extra: Add |style| to ensure the empty <pre> block is not rendered:
<pre style="display:none"><script>
json={"html":"<ul><li>one</li><li>two</li></ul>"};
</script>
A: You have to bracket the function in <script> tags and then either
1) take all the whitespace out of the script so WordPress does not add <p> tags and then the JS will work, or
2) disable autop in the post editor for all posts/pages
(see http://codex.wordpress.org/Function_Reference/wpautop ) so WP doesn't add paragraph breaks, or
3) do the following, which leaves autop enabled globally, but lets you disable it with and tags in individual posts and pages.
Add the function below to functions.php and use the two tags
<!-- noformat on --> and <!-- noformat off -->
in your page/post editor, i.e.
text will be rendered *with* autop
<!-- noformat on -->
text will be rendered *without* autop
<!-- noformat off -->
text will be rendered *with* autop
Content outside of the two format tags will have autop enabled, as noted.
Add to functions.php of the theme:
// <!-- noformat on --> and <!-- noformat off --> functions
function newautop($text)
{
$newtext = "";
$pos = 0;
$tags = array('<!-- noformat on -->', '<!-- noformat off -->');
$status = 0;
while (!(($newpos = strpos($text, $tags[$status], $pos)) === FALSE))
{
$sub = substr($text, $pos, $newpos-$pos);
if ($status)
$newtext .= $sub;
else
$newtext .= convert_chars(wptexturize(wpautop($sub))); //Apply both functions (faster)
$pos = $newpos+strlen($tags[$status]);
$status = $status?0:1;
}
$sub = substr($text, $pos, strlen($text)-$pos);
if ($status)
$newtext .= $sub;
else
$newtext .= convert_chars(wptexturize(wpautop($sub))); //Apply both functions (faster)
//To remove the tags
$newtext = str_replace($tags[0], "", $newtext);
$newtext = str_replace($tags[1], "", $newtext);
return $newtext;
}
function newtexturize($text)
{
return $text;
}
function new_convert_chars($text)
{
return $text;
}
remove_filter('the_content', 'wpautop');
add_filter('the_content', 'newautop');
remove_filter('the_content', 'wptexturize');
add_filter('the_content', 'newtexturize');
remove_filter('the_content', 'convert_chars');
add_filter('the_content', 'new_convert_chars');
A: This is my version of newautop adapted from above:
function toggleable_autop($text, $filter_state = 'autop_enabled') {
/* Each tag is associated with the key that will toggle the state from current */
$filter_driver = [
'autop_enabled' => [ 'tag' => '<!-- noformat on -->', 'filter' => function($text) { return convert_chars(wptexturize(wpautop($text))); } ],
'autop_disabled' => [ 'tag' => '<!-- noformat off -->', 'filter' => function($text) { return $text; } ],
];
if ( strlen($text) === 0 ) {
return '';
}
$end_state_position = strpos($text, $filter_driver[$filter_state]['tag']);
if ( $end_state_position === false ) {
$end_state_position = strlen($text);
}
return $filter_driver[$filter_state]['filter'](substr($text, 0, $end_state_position))
. toggleable_autop(
substr($text, $end_state_position + strlen($filter_driver[$filter_state]['tag'])),
$filter_state === 'autop_enabled' ? 'autop_disabled' : 'autop_enabled'
);
}
| wordpress | {
"language": "en",
"length": 659,
"provenance": "stackexchange_00019.jsonl.gz:464266",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/221923"
} | [
0.0178985595703125,
-0.0279541015625,
0.003551483154296875,
-0.01232147216796875,
-0.0245208740234375,
-0.01203155517578125,
0.005207061767578125,
-0.01165771484375,
-0.053924560546875,
-0.006603240966796875,
-0.018829345703125,
0.035736083984375,
-0.0626220703125,
-0.03314208984375,
0.0546875,
-0.0487060546875,
0.038421630859375,
0.004566192626953125,
0.032196044921875,
-0.021728515625,
0.01290130615234375,
-0.004550933837890625,
-0.0028514862060546875,
0.06878662109375,
-0.019195556640625,
0.01076507568359375,
0.137451171875,
-0.021575927734375,
0.00836181640625,
-0.01666259765625,
0.0263519287109375,
-0.045928955078125,
0.0268707275390625,
0.0560302734375,
-0.09130859375,
-0.0178680419921875,
-0.03387451171875,
0.0294647216796875,
-0.0118560791015625,
0.00504302978515625,
0.0002715587615966797,
0.02960205078125,
0.053070068359375,
-0.0021533966064453125,
-0.01346588134765625,
-0.0227813720703125,
-0.00201416015625,
-0.034637451171875,
-0.003631591796875,
0.01085662841796875,
-0.018341064453125,
0.027099609375,
-0.0197906494140625,
0.022674560546875,
0.0120391845703125,
0.0204620361328125,
0.006908416748046875,
-0.0599365234375,
0.005489349365234375,
0.04534912109375,
0.0159454345703125,
0.0225677490234375,
0.004955291748046875,
-0.0279541015625,
0.03466796875,
-0.00421142578125,
-0.01441192626953125,
0.0168304443359375,
-0.0259246826171875,
0.0294647216796875,
0.03131103515625,
-0.035552978515625,
0.0162506103515625,
-0.04302978515625,
0.02734375,
0.005992889404296875,
-0.024078369140625,
-0.00444793701171875,
0.024505615234375,
-0.0103912353515625,
0.04888916015625,
-0.004001617431640625,
-0.0088653564453125,
0.0166168212890625,
-0.008453369140625,
0.01265716552734375,
-0.004222869873046875,
-0.008697509765625,
-0.047088623046875,
-0.03668212890625,
-0.0345458984375,
0.0044403076171875,
-0.09039306640625,
-0.032806396484375,
-0.02520751953125,
-0.010040283203125,
-0.03515625,
0.01947021484375,
0.00830841064453125,
0.0496826171875,
0.0249481201171875,
-0.05169677734375,
0.07794189453125,
-0.06597900390625,
-0.0057830810546875,
0.057342529296875,
0.01505279541015625,
0.0080718994140625,
0.02325439453125,
-0.006038665771484375,
0.01525115966796875,
-0.0155181884765625,
0.0037097930908203125,
-0.015899658203125,
0.018280029296875,
0.006481170654296875,
-0.0226898193359375,
0.045745849609375,
-0.0131988525390625,
0.0035457611083984375,
-0.0287017822265625,
-0.00713348388671875,
-0.035003662109375,
0.04437255859375,
0.0192718505859375,
0.01248931884765625,
0.0268096923828125,
-0.00225067138671875,
-0.0298614501953125,
-0.02386474609375,
-0.0345458984375,
0.0249481201171875,
0.0452880859375,
0.0726318359375,
0.0231475830078125,
-0.004608154296875,
0.057891845703125,
-0.01433563232421875,
-0.030853271484375,
0.0335693359375,
-0.047637939453125,
-0.0160369873046875,
-0.00568389892578125,
-0.0794677734375,
-0.0214996337890625,
0.0305938720703125,
-0.00209808349609375,
0.01123046875,
0.01006317138671875,
-0.045684814453125,
0.01105499267578125,
-0.049774169921875,
0.07098388671875,
-0.004398345947265625,
-0.0223236083984375,
-0.07550048828125,
0.0537109375,
-0.06170654296875,
-0.003925323486328125,
-0.08123779296875,
-0.02227783203125,
-0.0020465850830078125,
0.04156494140625,
-0.061309814453125,
-0.05487060546875,
-0.004009246826171875,
-0.0643310546875,
-0.00586700439453125,
0.035675048828125,
0.034637451171875,
-0.016357421875,
-0.043060302734375,
0.01311492919921875,
0.0229034423828125,
-0.0154571533203125,
0.032989501953125,
-0.0307464599609375,
-0.0175018310546875,
0.032623291015625,
0.005298614501953125,
0.00023102760314941406,
-0.02325439453125,
0.0089111328125,
0.0146484375,
-0.038818359375,
0.007114410400390625,
0.0008854866027832031,
0.041656494140625,
0.026885986328125,
0.01326751708984375,
0.041778564453125,
-0.01482391357421875,
-0.006244659423828125,
-0.009765625,
-0.0120391845703125,
-0.057220458984375,
0.01873779296875,
-0.0208892822265625,
-0.01259613037109375,
0.046844482421875,
0.0345458984375,
-0.0032253265380859375,
-0.01062774658203125,
-0.02203369140625,
-0.0438232421875,
-0.0238494873046875,
-0.01107025146484375,
0.027587890625,
-0.01555633544921875,
0.01593017578125,
-0.00045561790466308594,
-0.0164031982421875,
-0.004291534423828125,
-0.005645751953125,
0.0038623809814453125,
0.01146697998046875,
0.01427459716796875,
0.062469482421875,
0.0203094482421875,
-0.00675201416015625,
0.053375244140625,
-0.033905029296875,
0.06427001953125,
0.042999267578125,
-0.0004169940948486328,
-0.0283966064453125,
-0.0204620361328125,
-0.01654052734375,
-0.0282745361328125,
0.00612640380859375,
-0.03515625,
0.0552978515625,
0.034759521484375,
0.03350830078125,
-0.007724761962890625,
0.006580352783203125,
0.0003681182861328125,
-0.051605224609375,
-0.00019443035125732422,
0.0318603515625,
0.06292724609375,
0.05206298828125,
0.011260986328125,
-0.0643310546875,
0.0276336669921875,
-0.06878662109375,
0.02532958984375,
-0.0628662109375,
-0.04119873046875,
0.0092315673828125,
0.01273345947265625,
0.008636474609375,
0.0111846923828125,
-0.0419921875,
-0.0257415771484375,
0.05218505859375,
-0.010955810546875,
-0.0023345947265625,
-0.006198883056640625,
0.0009870529174804688,
-0.00316619873046875,
-0.015655517578125,
-0.003093719482421875,
-0.0210418701171875,
0.04254150390625,
-0.032928466796875,
0.02142333984375,
0.0204315185546875,
-0.0194854736328125,
-0.01560211181640625,
0.0179901123046875,
-0.01084136962890625,
-0.005893707275390625,
0.0178375244140625,
-0.0142364501953125,
0.03466796875,
-0.0210723876953125,
0.0082855224609375,
-0.00897979736328125,
0.004878997802734375,
-0.006420135498046875,
0.004871368408203125,
0.03240966796875,
-0.01105499267578125,
0.009552001953125,
-0.04644775390625,
0.040679931640625,
-0.0217742919921875,
0.0166015625,
0.004146575927734375,
0.033172607421875,
0.018646240234375,
-0.0040130615234375,
0.03326416015625,
-0.0174713134765625,
-0.0261993408203125,
0.05206298828125,
-0.0014209747314453125,
0.0129547119140625,
0.005657196044921875,
0.0906982421875,
0.05877685546875,
-0.029296875,
0.0408935546875,
-0.01277923583984375,
-0.003818511962890625,
-0.01499176025390625,
0.005901336669921875,
-0.0225982666015625,
-0.0283050537109375,
-0.033660888671875,
-0.01447296142578125,
0.0252838134765625,
0.00437164306640625,
0.039581298828125,
-0.0038604736328125,
0.01090240478515625,
0.020782470703125,
-0.05316162109375,
-0.0467529296875,
0.0271453857421875,
-0.09649658203125,
-0.004383087158203125,
0.0450439453125,
-0.0633544921875,
-0.0169677734375,
0.1043701171875,
-0.01251220703125,
-0.0572509765625,
-0.01435089111328125,
-0.05889892578125,
-0.058319091796875,
-0.06195068359375,
0.10137939453125,
-0.006103515625,
0.042724609375,
-0.00859832763671875,
0.0562744140625,
-0.0032939910888671875,
-0.06640625,
-0.00946807861328125,
0.005512237548828125,
-0.0079193115234375,
0.0169525146484375,
-0.00908660888671875,
-0.034820556640625,
0.00841522216796875,
0.0037994384765625,
0.005985260009765625,
-0.006450653076171875,
0.004817962646484375,
-0.01239776611328125,
-0.0147857666015625,
-0.0034542083740234375,
0.023162841796875,
0.039154052734375,
0.016357421875,
0.01013946533203125,
0.04364013671875,
-0.04266357421875,
-0.01461029052734375,
0.00018680095672607422,
-0.022247314453125,
0.039520263671875,
-0.00604248046875,
0.0007109642028808594,
-0.01459503173828125,
0.052581787109375,
0.01995849609375,
-0.0121002197265625,
0.0187530517578125,
-0.0343017578125,
0.040924072265625,
0.0002639293670654297,
0.029144287109375,
-0.045745849609375,
0.041015625,
-0.007717132568359375,
0.0017595291137695312,
0.0113525390625,
-0.0087432861328125,
-0.037811279296875,
-0.018646240234375,
-0.070068359375,
0.040679931640625,
-0.01080322265625,
-0.0158843994140625,
0.02783203125,
0.01496124267578125,
0.01039886474609375,
-0.0038299560546875,
-0.005741119384765625,
0.0005517005920410156,
0.0092926025390625,
-0.00937652587890625,
-0.0032405853271484375,
-0.0178375244140625,
-0.0218505859375,
-0.060943603515625,
-0.007114410400390625,
0.01534271240234375,
-0.009490966796875,
-0.041290283203125,
0.00601959228515625,
-0.032318115234375,
0.05706787109375,
0.0260009765625,
-0.0057220458984375,
0.05206298828125,
-0.07525634765625,
-0.0025539398193359375,
0.0264892578125,
-0.004146575927734375,
-0.032012939453125,
-0.0084686279296875,
-0.0293426513671875,
-0.10394287109375,
-0.0236968994140625,
-0.028778076171875,
0.06658935546875,
0.007114410400390625,
-0.020263671875,
-0.023773193359375,
0.06280517578125,
-0.0086669921875,
-0.007266998291015625,
0.040435791015625,
0.039459228515625,
-0.0018310546875,
-0.0145111083984375,
0.026824951171875,
-0.05950927734375,
-0.0028934478759765625,
0.0231170654296875,
-0.0174407958984375,
0.034423828125,
-0.007045745849609375,
-0.053802490234375,
0.03692626953125,
-0.03265380859375,
-0.05615234375,
-0.032745361328125,
-0.016845703125,
0.023590087890625,
0.01399993896484375,
-0.0113525390625,
-0.05792236328125,
-0.04718017578125,
0.0195465087890625,
-0.019989013671875,
-0.004261016845703125,
0.00907135009765625,
0.05340576171875,
0.01441192626953125,
-0.004756927490234375,
-0.0128326416015625,
0.06829833984375,
0.054534912109375,
-0.01224517822265625,
0.055267333984375,
0.01885986328125,
-0.033782958984375,
0.086669921875,
0.0140228271484375,
0.0186920166015625,
-0.0266571044921875,
0.040191650390625,
0.0115814208984375,
-0.00595855712890625,
0.009063720703125,
0.033477783203125,
-0.00665283203125,
0.001247406005859375,
-0.0029582977294921875,
0.020843505859375,
0.032562255859375,
-0.034515380859375,
-0.0103607177734375,
0.000036776065826416016,
0.036041259765625,
-0.023681640625,
0.0198822021484375,
-0.0043182373046875,
0.04095458984375,
0.016937255859375,
0.0010633468627929688,
0.0157012939453125,
0.0154266357421875,
-0.0169525146484375,
0.020355224609375,
0.0222320556640625,
-0.0159149169921875,
0.0131683349609375,
-0.0023651123046875,
-0.0477294921875,
-0.00975799560546875,
0.00765228271484375,
-0.027191162109375,
-0.023712158203125,
-0.01419830322265625,
-0.060546875,
0.022796630859375,
0.004932403564453125,
0.0203857421875,
0.04193115234375,
0.0158233642578125,
0.0134429931640625,
0.0027751922607421875,
-0.005214691162109375,
0.028350830078125,
0.00025963783264160156,
-0.0223388671875,
0.023773193359375,
0.01010894775390625,
0.002437591552734375,
0.05023193359375,
-0.023468017578125,
0.0272369384765625,
-0.0020351409912109375,
-0.01690673828125,
0.0106658935546875,
0.01251220703125,
0.037750244140625,
0.024627685546875,
-0.01253509521484375,
-0.033172607421875,
0.053131103515625,
-0.01049041748046875,
-0.042083740234375,
0.01227569580078125,
0.0301055908203125,
0.03759765625,
-0.013641357421875,
-0.03607177734375,
0.01175689697265625,
-0.0345458984375,
-0.0018472671508789062,
-0.0258331298828125,
-0.079833984375,
0.01019287109375,
-0.0472412109375,
-0.0443115234375,
0.03497314453125,
0.01541900634765625,
0.0106048583984375,
-0.0162200927734375,
0.0177459716796875,
0.005199432373046875,
0.01294708251953125,
-0.01462554931640625,
-0.0239410400390625,
-0.01186370849609375,
0.0015430450439453125,
-0.01479339599609375,
-0.054107666015625,
-0.007602691650390625,
-0.00528717041015625,
-0.0029697418212890625,
-0.01361846923828125,
0.035919189453125,
-0.0216217041015625,
-0.004673004150390625,
-0.0400390625,
0.035308837890625,
-0.0628662109375,
0.007770538330078125,
0.0648193359375,
0.02734375,
-0.0501708984375,
-0.03411865234375,
-0.049041748046875,
-0.0261688232421875,
-0.0010852813720703125,
-0.0172271728515625,
-0.001399993896484375,
0.0141448974609375,
-0.0096282958984375,
-0.0021190643310546875,
-0.0069580078125,
0.0069732666015625,
-0.0081024169921875,
0.0712890625,
0.0239105224609375,
0.07318115234375,
-0.0325927734375,
0.002777099609375,
0.043914794921875,
0.00970458984375,
-0.02130126953125,
-0.01525115966796875,
0.0278472900390625,
-0.01800537109375,
0.0188140869140625,
0.0049285888671875,
-0.002742767333984375,
-0.005023956298828125,
-0.025238037109375,
-0.03631591796875,
0.027435302734375,
-0.00986480712890625,
0.024444580078125,
0.00897216796875,
0.009979248046875,
-0.01322174072265625,
-0.03240966796875,
0.0025634765625,
0.018035888671875,
0.020172119140625,
0.03717041015625,
0.040435791015625,
-0.01007843017578125,
-0.01145172119140625,
0.002971649169921875,
0.03076171875,
0.0244598388671875,
-0.062042236328125,
0.02484130859375,
-0.035736083984375,
0.00402069091796875,
0.01751708984375,
0.0236663818359375,
0.01480865478515625,
0.041717529296875,
0.0049896240234375,
0.032318115234375,
0.0089874267578125,
-0.02239990234375,
0.01416015625,
-0.006500244140625,
-0.0018281936645507812,
-0.0039215087890625,
-0.0067596435546875,
0.0418701171875,
0.0655517578125,
0.08685302734375,
-0.079833984375,
0.0139923095703125,
-0.00511932373046875,
-0.0401611328125,
0.0323486328125,
-0.019439697265625,
0.0109710693359375,
0.0106658935546875,
0.0019817352294921875,
-0.00786590576171875,
-0.0243682861328125,
0.001132965087890625,
-0.00461578369140625,
-0.0205841064453125,
-0.0208587646484375,
0.0235443115234375,
0.02374267578125,
-0.047119140625,
0.0287322998046875,
0.02691650390625,
0.01678466796875,
0.00656890869140625,
0.0014591217041015625,
0.0296630859375,
-0.021026611328125,
-0.06005859375,
0.01012420654296875,
-0.0085601806640625,
-0.023773193359375,
-0.0289154052734375,
-0.01375579833984375,
0.00580596923828125,
0.05523681640625,
-0.042205810546875,
0.01154327392578125,
0.041778564453125,
-0.0235595703125,
0.05755615234375,
-0.0156402587890625,
-0.0007719993591308594,
0.0255889892578125,
-0.05767822265625,
-0.004924774169921875,
-0.0067291259765625,
0.020751953125,
-0.0074310302734375,
-0.000637054443359375,
0.0458984375,
0.0033016204833984375,
-0.031097412109375,
0.023651123046875,
-0.0005316734313964844,
-0.002483367919921875,
-0.0290374755859375,
0.0244903564453125,
-0.026275634765625,
0.00968170166015625,
-0.02813720703125,
-0.030181884765625,
-0.0184173583984375,
-0.07470703125,
-0.042724609375,
0.043701171875,
0.01160430908203125,
0.0172271728515625,
0.0085601806640625,
0.0110321044921875,
0.0033130645751953125,
0.00991058349609375,
-0.0169525146484375,
0.00521087646484375,
-0.017120361328125,
-0.0014867782592773438,
-0.015960693359375,
0.0096282958984375,
-0.009368896484375,
0.01313018798828125,
0.0263519287109375,
0.0027141571044921875,
-0.0213165283203125,
-0.0088958740234375,
0.0311279296875,
0.06280517578125,
0.024017333984375,
0.00493621826171875,
0.005329132080078125,
0.01438140869140625,
0.001316070556640625,
-0.049713134765625,
0.01038360595703125,
-0.047210693359375,
-0.0190277099609375,
0.0230712890625,
0.01067352294921875,
-0.003536224365234375,
0.01007080078125,
-0.0057373046875,
-0.045166015625,
0.0167236328125,
0.00905609130859375,
0.005474090576171875,
-0.00946807861328125,
0.052978515625,
0.01436614990234375,
-0.0305633544921875,
-0.07354736328125,
-0.01480865478515625,
0.0171661376953125,
-0.01316070556640625,
-0.003360748291015625,
0.0391845703125,
0.0105438232421875,
-0.0276031494140625,
0.02001953125,
-0.0031604766845703125,
0.006702423095703125,
0.00849151611328125,
-0.02435302734375,
-0.023345947265625,
0.00026297569274902344,
-0.07611083984375,
-0.042510986328125,
0.059356689453125,
0.0107421875,
0.007274627685546875,
0.01293182373046875,
0.01331329345703125,
0.0091552734375,
-0.0030345916748046875,
-0.024444580078125,
0.011993408203125,
-0.00762939453125,
-0.014251708984375,
0.007595062255859375,
-0.0014734268188476562,
-0.0020904541015625,
0.0229949951171875,
0.0196533203125,
0.049774169921875,
-0.0426025390625,
-0.02392578125,
-0.07916259765625,
-0.01458740234375,
-0.01094818115234375,
0.08221435546875,
0.0865478515625,
0.0105438232421875,
-0.0023937225341796875,
-0.056884765625,
-0.0289154052734375,
0.00403594970703125,
0.020263671875,
-0.00464630126953125,
-0.004459381103515625,
-0.0147552490234375,
0.04266357421875,
0.02203369140625,
-0.0021991729736328125,
0.0236663818359375,
0.052764892578125,
0.02099609375,
-0.0657958984375,
-0.0045013427734375,
0.0272369384765625,
-0.046173095703125,
-0.03338623046875,
-0.0111846923828125,
0.01342010498046875,
0.03936767578125,
0.0241546630859375,
0.0002512931823730469,
0.053924560546875,
0.02008056640625,
-0.01215362548828125,
0.041259765625,
0.005157470703125,
-0.003520965576171875,
-0.00685882568359375,
0.00881195068359375,
0.00975799560546875,
0.0204315185546875,
-0.056732177734375,
-0.0161285400390625,
-0.0133209228515625,
-0.042205810546875,
0.03411865234375,
0.039093017578125,
-0.0390625,
0.0308685302734375,
0.044586181640625,
-0.016571044921875,
0.029510498046875,
-0.04083251953125,
0.03851318359375,
0.00829315185546875,
0.0094451904296875,
0.022705078125,
-0.0305328369140625,
-0.03131103515625,
0.00778961181640625,
0.0214691162109375,
0.0161590576171875,
0.03863525390625,
0.0125732421875,
0.0247650146484375,
-0.01971435546875,
-0.00862884521484375,
0.008087158203125,
0.0204925537109375,
-0.0501708984375,
0.017303466796875,
0.007434844970703125,
-0.013824462890625,
-0.049713134765625,
0.0239410400390625,
0.01934814453125,
0.0125274658203125,
0.03961181640625,
-0.03131103515625,
0.00820159912109375,
-0.0137176513671875,
0.040252685546875,
-0.01187896728515625,
-0.0307769775390625,
-0.01145172119140625,
-0.01428985595703125,
0.024200439453125,
0.032470703125,
0.036407470703125,
0.03887939453125,
-0.00848388671875,
-0.0273895263671875,
0.033538818359375,
-0.0540771484375,
0.02630615234375,
0.03094482421875,
-0.0087432861328125,
-0.004070281982421875,
-0.0194854736328125,
-0.0159149169921875,
-0.00945281982421875,
0.00777435302734375,
-0.00994873046875,
-0.00968170166015625,
0.01178741455078125,
0.01024627685546875,
0.0382080078125,
0.047943115234375,
0.001041412353515625,
-0.00202178955078125,
0.02691650390625,
-0.019866943359375,
-0.0157318115234375,
0.052642822265625,
-0.028411865234375,
-0.01348114013671875,
0.022796630859375,
0.0152740478515625,
0.01351165771484375,
0.003936767578125,
-0.0809326171875,
-0.029876708984375,
0.019927978515625,
0.01226043701171875,
-0.0760498046875,
0.0203094482421875,
0.018096923828125,
0.035125732421875,
-0.0278472900390625,
0.021453857421875,
-0.0189971923828125,
0.007476806640625,
0.0030364990234375,
-0.0771484375,
-0.04608154296875,
0.09234619140625,
-0.035186767578125,
0.0204010009765625,
0.032989501953125,
-0.01079559326171875,
0.03814697265625,
0.0133209228515625,
0.033660888671875,
0.056182861328125,
-0.01812744140625,
-0.0138397216796875,
0.0095672607421875,
0.0244903564453125,
-0.006282806396484375,
-0.01239013671875,
-0.005718231201171875,
0.0215301513671875,
0.0186309814453125,
-0.0043182373046875,
-0.005916595458984375,
-0.00534820556640625,
-0.06622314453125,
-0.1156005859375,
0.0126495361328125,
-0.01197052001953125,
-0.0377197265625,
0.0259552001953125,
-0.0283203125,
-0.0238189697265625,
0.0180816650390625,
0.004169464111328125,
-0.01543426513671875,
-0.0004703998565673828,
0.02459716796875,
0.01190948486328125,
-0.00505828857421875,
0.05316162109375,
-0.04345703125,
-0.01401519775390625,
0.01494598388671875,
0.03558349609375,
0.005123138427734375,
-0.0440673828125,
0.006072998046875,
0.0191497802734375,
0.02093505859375,
-0.0007762908935546875,
-0.0218353271484375,
0.0296478271484375,
-0.01409149169921875,
-0.007396697998046875,
-0.036376953125,
-0.01311492919921875,
-0.00495147705078125,
0.0237579345703125,
0.05743408203125,
-0.0055389404296875,
-0.04156494140625,
0.0292510986328125,
-0.0207977294921875,
-0.0179290771484375,
0.005207061767578125,
0.0011186599731445312,
-0.035125732421875,
-0.00264739990234375,
0.014373779296875,
-0.003147125244140625,
-0.003353118896484375,
-0.017425537109375,
-0.026336669921875,
-0.01548004150390625,
-0.005046844482421875,
0.0091705322265625,
-0.04534912109375,
-0.02880859375,
0.0736083984375,
-0.046417236328125,
-0.0005426406860351562,
0.0138702392578125,
0.016357421875,
0.050628662109375,
0.0594482421875,
-0.009185791015625,
0.03863525390625,
-0.057342529296875,
-0.00501251220703125,
0.0014371871948242188,
0.043701171875,
-0.0186309814453125,
0.01500701904296875,
0.0021266937255859375,
-0.005771636962890625,
-0.01000213623046875,
-0.00826263427734375,
0.0025119781494140625,
0.0240631103515625,
-0.0024471282958984375,
-0.01181793212890625,
-0.050933837890625,
-0.0195159912109375,
-0.03533935546875,
-0.0021419525146484375,
-0.01458740234375,
0.044158935546875,
0.035980224609375,
-0.0233306884765625,
-0.0076904296875,
0.01059722900390625,
-0.03887939453125,
-0.04669189453125,
-0.01568603515625,
0.008544921875,
0.01103973388671875,
-0.004009246826171875
]
|
59026e6f1a8ff051e66eafa935838974586d6097 | Wordpress Stackexchange
Q: Calling a wp_query $posts causes a 500 error I had a very basic wp_query, below:
// WP_Query arguments
$args = array (
'post_type' => array( 'post' ),
'post_status' => array( 'draft' ),
'posts_per_page' => '15',
);
// The Query
$posts = new WP_Query( $args );
This caused a 500 error. When I changed $posts back to the more traditional $query, everything was fine. Is $posts a reserved variable?
A:
Is $posts a reserved variable
Yes, it is, $posts is the global variable which holds the array of posts from the main query. This is how it is set:
$GLOBALS['posts'] = & $wp_query->posts;
Just remember, $posts === $GLOBALS['posts']
| Q: Calling a wp_query $posts causes a 500 error I had a very basic wp_query, below:
// WP_Query arguments
$args = array (
'post_type' => array( 'post' ),
'post_status' => array( 'draft' ),
'posts_per_page' => '15',
);
// The Query
$posts = new WP_Query( $args );
This caused a 500 error. When I changed $posts back to the more traditional $query, everything was fine. Is $posts a reserved variable?
A:
Is $posts a reserved variable
Yes, it is, $posts is the global variable which holds the array of posts from the main query. This is how it is set:
$GLOBALS['posts'] = & $wp_query->posts;
Just remember, $posts === $GLOBALS['posts']
| wordpress | {
"language": "en",
"length": 108,
"provenance": "stackexchange_00019.jsonl.gz:464303",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/222086"
} | [
0.06280517578125,
-0.004413604736328125,
0.01465606689453125,
-0.0005640983581542969,
0.0031528472900390625,
-0.025482177734375,
0.0546875,
-0.03045654296875,
0.01047515869140625,
0.0225067138671875,
-0.050537109375,
0.007656097412109375,
-0.01021575927734375,
0.0063629150390625,
-0.007354736328125,
-0.0258941650390625,
0.037322998046875,
-0.0065155029296875,
0.0300140380859375,
-0.006702423095703125,
0.0186920166015625,
0.017242431640625,
0.026214599609375,
0.053924560546875,
0.017486572265625,
0.036041259765625,
0.0168914794921875,
-0.027374267578125,
0.01300048828125,
0.0007519721984863281,
0.00839996337890625,
0.002445220947265625,
0.016876220703125,
0.020294189453125,
-0.00405120849609375,
0.0286712646484375,
0.0205230712890625,
0.0024204254150390625,
0.02484130859375,
0.0175628662109375,
-0.0211181640625,
0.012420654296875,
0.015106201171875,
-0.0090484619140625,
-0.0173492431640625,
-0.012847900390625,
-0.0062103271484375,
-0.0167236328125,
-0.00470733642578125,
-0.0379638671875,
0.00992584228515625,
0.00439453125,
0.03460693359375,
-0.055206298828125,
-0.0198974609375,
-0.0119476318359375,
0.068603515625,
-0.03948974609375,
0.031158447265625,
-0.012908935546875,
-0.0595703125,
-0.00015842914581298828,
0.040435791015625,
-0.0357666015625,
0.0081634521484375,
-0.01180267333984375,
0.0572509765625,
0.0230712890625,
-0.02203369140625,
-0.0053253173828125,
0.035064697265625,
0.0162811279296875,
-0.007213592529296875,
-0.0129852294921875,
-0.0047607421875,
-0.044158935546875,
0.0216217041015625,
-0.02734375,
-0.01007843017578125,
0.040130615234375,
-0.01317596435546875,
0.01284027099609375,
-0.0382080078125,
0.0594482421875,
-0.083984375,
-0.0007677078247070312,
-0.027008056640625,
-0.01357269287109375,
-0.0081787109375,
-0.034027099609375,
-0.0175018310546875,
-0.03839111328125,
-0.030426025390625,
0.006420135498046875,
-0.0009021759033203125,
-0.0291900634765625,
-0.007778167724609375,
0.036102294921875,
-0.043121337890625,
0.0062408447265625,
-0.043426513671875,
0.00014019012451171875,
0.00609588623046875,
-0.0157623291015625,
0.0202789306640625,
0.047332763671875,
0.00342559814453125,
0.017913818359375,
0.03009033203125,
0.0221099853515625,
0.02301025390625,
0.0068817138671875,
-0.02691650390625,
0.0178680419921875,
-0.0445556640625,
0.0026950836181640625,
-0.049163818359375,
-0.01413726806640625,
-0.009002685546875,
-0.003780364990234375,
-0.0013704299926757812,
0.01377105712890625,
-0.0026607513427734375,
0.007411956787109375,
-0.01605224609375,
-0.0104217529296875,
-0.0013608932495117188,
-0.016693115234375,
-0.05303955078125,
0.087890625,
-0.029052734375,
0.0020809173583984375,
0.0570068359375,
-0.00809478759765625,
-0.0430908203125,
-0.04364013671875,
0.0273590087890625,
-0.0158233642578125,
0.00518798828125,
0.00841522216796875,
0.022796630859375,
-0.0305023193359375,
-0.006435394287109375,
0.0178680419921875,
0.0269927978515625,
0.0062408447265625,
0.0433349609375,
0.0232086181640625,
-0.01425933837890625,
-0.0423583984375,
0.018402099609375,
0.0157928466796875,
0.0104522705078125,
0.021820068359375,
-0.0087890625,
-0.00799560546875,
0.01535797119140625,
-0.0227508544921875,
-0.0080718994140625,
-0.024078369140625,
0.0182037353515625,
-0.00597381591796875,
0.0244140625,
-0.0151214599609375,
-0.035919189453125,
0.00864410400390625,
-0.05120849609375,
-0.0135650634765625,
0.00567626953125,
0.0242919921875,
-0.007244110107421875,
-0.0208740234375,
0.0203857421875,
-0.0149993896484375,
-0.0192413330078125,
0.01012420654296875,
0.0070953369140625,
-0.02313232421875,
0.017791748046875,
0.0271453857421875,
-0.0288543701171875,
-0.040283203125,
0.006412506103515625,
-0.01038360595703125,
-0.0194854736328125,
0.02099609375,
0.0298309326171875,
0.01537322998046875,
-0.034637451171875,
0.02105712890625,
0.041229248046875,
0.060211181640625,
0.006855010986328125,
0.0216064453125,
0.0121307373046875,
-0.055572509765625,
-0.0230255126953125,
-0.037139892578125,
0.006420135498046875,
0.0017232894897460938,
0.0498046875,
0.0297088623046875,
-0.0269927978515625,
-0.0199737548828125,
-0.08441162109375,
0.007122039794921875,
-0.0007872581481933594,
0.0287017822265625,
-0.01300048828125,
0.03216552734375,
0.0260467529296875,
0.0203094482421875,
-0.041717529296875,
0.00992584228515625,
-0.0162353515625,
0.007320404052734375,
-0.022735595703125,
0.02764892578125,
0.006519317626953125,
0.023712158203125,
-0.01445770263671875,
-0.0234527587890625,
-0.007717132568359375,
0.0186004638671875,
0.055084228515625,
-0.045989990234375,
0.0023288726806640625,
-0.038604736328125,
0.042877197265625,
-0.02142333984375,
-0.0211334228515625,
0.032958984375,
0.0214691162109375,
0.046112060546875,
-0.0020046234130859375,
-0.0002880096435546875,
0.01824951171875,
-0.032440185546875,
0.0101318359375,
0.029632568359375,
0.034210205078125,
0.0115509033203125,
-0.006732940673828125,
-0.0175323486328125,
0.0117034912109375,
-0.0225372314453125,
0.0350341796875,
-0.03302001953125,
0.0357666015625,
0.03839111328125,
0.039794921875,
-0.0316162109375,
0.0179443359375,
0.01140594482421875,
0.0197601318359375,
0.0137481689453125,
-0.0045623779296875,
-0.0037250518798828125,
-0.014068603515625,
0.0098724365234375,
0.0075836181640625,
-0.0394287109375,
-0.0286102294921875,
-0.0070037841796875,
0.0282440185546875,
-0.004299163818359375,
0.00826263427734375,
0.00336456298828125,
-0.015960693359375,
0.0111236572265625,
-0.0011358261108398438,
-0.050811767578125,
0.0019330978393554688,
-0.004276275634765625,
-0.056121826171875,
-0.004032135009765625,
-0.032440185546875,
0.03753662109375,
0.010284423828125,
-0.0262908935546875,
-0.0148773193359375,
0.04681396484375,
-0.01064300537109375,
-0.01184844970703125,
-0.016571044921875,
-0.00716400146484375,
-0.006191253662109375,
-0.020111083984375,
0.0219879150390625,
-0.04412841796875,
0.00547027587890625,
0.0022640228271484375,
-0.0269775390625,
0.042938232421875,
0.01374053955078125,
-0.0465087890625,
0.029693603515625,
-0.058319091796875,
0.0396728515625,
-0.02532958984375,
0.04815673828125,
0.0655517578125,
0.020782470703125,
-0.0243988037109375,
-0.003337860107421875,
-0.00948333740234375,
-0.0146331787109375,
0.00830078125,
-0.0170745849609375,
-0.0299530029296875,
-0.033721923828125,
0.00847625732421875,
0.033538818359375,
0.063720703125,
0.017303466796875,
-0.035614013671875,
0.00017452239990234375,
0.04486083984375,
-0.088134765625,
-0.09326171875,
-0.00919342041015625,
-0.06341552734375,
0.0195770263671875,
-0.0264434814453125,
-0.0194091796875,
-0.00412750244140625,
-0.013092041015625,
0.009307861328125,
-0.0017347335815429688,
-0.0196533203125,
-0.08135986328125,
-0.08380126953125,
-0.09539794921875,
0.0029010772705078125,
0.00168609619140625,
0.0457763671875,
-0.005725860595703125,
0.125,
0.0230560302734375,
-0.0280609130859375,
-0.0025196075439453125,
0.04388427734375,
-0.03173828125,
-0.018280029296875,
0.0059356689453125,
0.016693115234375,
-0.000774383544921875,
-0.00891876220703125,
0.052337646484375,
0.04827880859375,
-0.0518798828125,
-0.0037593841552734375,
0.00907135009765625,
0.03887939453125,
0.03936767578125,
0.01885986328125,
-0.0226287841796875,
0.0021572113037109375,
0.00848388671875,
-0.037750244140625,
-0.0543212890625,
0.007328033447265625,
-0.07635498046875,
0.0125579833984375,
0.0274505615234375,
0.007904052734375,
0.0128936767578125,
0.0074005126953125,
-0.006206512451171875,
0.00946044921875,
0.01201629638671875,
-0.033416748046875,
0.07958984375,
0.0018663406372070312,
0.00732421875,
-0.0191497802734375,
-0.035919189453125,
-0.0311279296875,
0.0151214599609375,
-0.0233917236328125,
0.0208282470703125,
0.0021839141845703125,
-0.01549530029296875,
-0.042022705078125,
-0.044342041015625,
0.025634765625,
-0.033843994140625,
0.0186004638671875,
-0.04266357421875,
-0.00792694091796875,
-0.02484130859375,
0.048004150390625,
-0.022796630859375,
-0.0272674560546875,
-0.01641845703125,
0.015960693359375,
-0.048004150390625,
-0.0670166015625,
0.007289886474609375,
-0.0059051513671875,
0.01568603515625,
-0.0290679931640625,
-0.0159149169921875,
-0.0129547119140625,
-0.037200927734375,
0.00812530517578125,
-0.005229949951171875,
-0.0134429931640625,
0.0243988037109375,
-0.043914794921875,
0.035186767578125,
0.01526641845703125,
0.00516510009765625,
-0.0029964447021484375,
-0.0254058837890625,
-0.03668212890625,
-0.1212158203125,
-0.03253173828125,
0.036651611328125,
0.07659912109375,
-0.022216796875,
-0.0283203125,
-0.054718017578125,
0.033782958984375,
0.00795745849609375,
-0.0023746490478515625,
0.0201416015625,
0.0121917724609375,
0.00112152099609375,
0.01629638671875,
0.01153564453125,
-0.0092010498046875,
0.011199951171875,
0.01091766357421875,
-0.0022182464599609375,
-0.0226898193359375,
-0.059967041015625,
-0.0428466796875,
-0.0268096923828125,
-0.0411376953125,
-0.035797119140625,
-0.0031337738037109375,
0.0194091796875,
0.0241851806640625,
-0.005886077880859375,
0.0086822509765625,
0.007648468017578125,
-0.0240020751953125,
0.050445556640625,
0.042327880859375,
-0.01461029052734375,
-0.01401519775390625,
0.09716796875,
0.023712158203125,
-0.031463623046875,
-0.02691650390625,
-0.02056884765625,
0.0209808349609375,
-0.048431396484375,
0.049102783203125,
0.034637451171875,
-0.01050567626953125,
0.023284912109375,
-0.0158233642578125,
-0.04132080078125,
-0.000461578369140625,
0.01910400390625,
0.01335906982421875,
-0.01519012451171875,
-0.00434112548828125,
-0.011749267578125,
0.0389404296875,
0.009521484375,
-0.007717132568359375,
-0.02886962890625,
-0.0009636878967285156,
0.0538330078125,
-0.0267181396484375,
0.058319091796875,
-0.024993896484375,
-0.049285888671875,
0.009765625,
-0.006717681884765625,
-0.0182037353515625,
0.005458831787109375,
0.00922393798828125,
0.0006151199340820312,
0.01107025146484375,
0.026641845703125,
0.01543426513671875,
0.08026123046875,
-0.0309295654296875,
0.051849365234375,
0.028228759765625,
-0.001270294189453125,
-0.041046142578125,
-0.010040283203125,
0.026397705078125,
0.01055908203125,
-0.05523681640625,
0.0242767333984375,
0.0175323486328125,
0.0219573974609375,
0.01181793212890625,
0.0161285400390625,
0.02618408203125,
0.01334381103515625,
0.0239410400390625,
-0.00011241436004638672,
0.00804901123046875,
-0.022247314453125,
-0.00867462158203125,
0.0268402099609375,
0.0204010009765625,
-0.017364501953125,
-0.01360321044921875,
0.048553466796875,
0.0035724639892578125,
0.0244293212890625,
-0.0032863616943359375,
-0.023895263671875,
-0.0015354156494140625,
0.0428466796875,
0.00006139278411865234,
-0.0026683807373046875,
0.0238037109375,
0.039947509765625,
0.048004150390625,
-0.036285400390625,
0.006649017333984375,
0.0008544921875,
0.01389312744140625,
0.0400390625,
0.0064697265625,
0.0146942138671875,
-0.003597259521484375,
-0.0333251953125,
0.04302978515625,
0.02490234375,
-0.0143585205078125,
-0.048583984375,
-0.024566650390625,
0.03863525390625,
0.02069091796875,
0.011871337890625,
-0.0013151168823242188,
0.016387939453125,
0.054656982421875,
-0.04437255859375,
0.0290985107421875,
-0.00991058349609375,
-0.00426483154296875,
0.0245819091796875,
-0.032684326171875,
-0.0045623779296875,
0.0087127685546875,
0.033294677734375,
-0.040252685546875,
-0.018585205078125,
0.040191650390625,
-0.0035648345947265625,
0.03240966796875,
-0.01629638671875,
-0.0248870849609375,
0.0107421875,
0.01004791259765625,
0.0173492431640625,
0.005096435546875,
-0.0102386474609375,
0.004459381103515625,
-0.037322998046875,
-0.027313232421875,
0.01605224609375,
0.0181121826171875,
-0.04486083984375,
-0.0194854736328125,
-0.0010976791381835938,
0.0001188516616821289,
-0.01128387451171875,
-0.0340576171875,
-0.044281005859375,
0.0146484375,
0.018646240234375,
0.00677490234375,
-0.03662109375,
0.0044403076171875,
0.0289764404296875,
-0.0148162841796875,
-0.0284881591796875,
-0.0169830322265625,
0.02215576171875,
-0.0028476715087890625,
0.0079345703125,
-0.0804443359375,
-0.01520538330078125,
-0.003047943115234375,
-0.03070068359375,
0.00557708740234375,
0.01503753662109375,
0.0025577545166015625,
0.04071044921875,
-0.026580810546875,
-0.0026493072509765625,
0.001949310302734375,
-0.01018524169921875,
-0.0484619140625,
0.007022857666015625,
0.06866455078125,
-0.00830078125,
0.022247314453125,
-0.01486968994140625,
0.036529541015625,
0.004474639892578125,
-0.0316162109375,
0.0172271728515625,
-0.006473541259765625,
-0.004367828369140625,
0.0220947265625,
0.07769775390625,
0.0218963623046875,
0.0577392578125,
0.010528564453125,
0.019012451171875,
0.01479339599609375,
0.04766845703125,
-0.0235137939453125,
-0.0189361572265625,
0.0440673828125,
0.00418853759765625,
-0.0131988525390625,
0.0021800994873046875,
-0.0173797607421875,
-0.0008268356323242188,
0.046875,
0.055084228515625,
-0.07177734375,
0.0027141571044921875,
-0.0018320083618164062,
-0.0232696533203125,
0.01024627685546875,
0.005977630615234375,
0.0185394287109375,
0.0175018310546875,
0.0142669677734375,
-0.0008487701416015625,
-0.00502777099609375,
0.0254974365234375,
0.01513671875,
0.01336669921875,
-0.00730133056640625,
0.0325927734375,
0.002254486083984375,
-0.056060791015625,
0.04644775390625,
0.01541900634765625,
0.040557861328125,
-0.00860595703125,
0.0174407958984375,
-0.02386474609375,
-0.0139617919921875,
-0.07843017578125,
-0.004108428955078125,
-0.014678955078125,
-0.0126953125,
0.01493072509765625,
0.0271148681640625,
0.0113983154296875,
0.06988525390625,
-0.01361846923828125,
0.03863525390625,
0.02508544921875,
0.005474090576171875,
-0.0535888671875,
-0.01270294189453125,
0.01849365234375,
0.061004638671875,
-0.04705810546875,
0.038360595703125,
-0.01904296875,
-0.0029125213623046875,
0.011199951171875,
0.0199432373046875,
0.03875732421875,
-0.033966064453125,
-0.017822265625,
0.030731201171875,
-0.01119232177734375,
-0.01073455810546875,
-0.0141754150390625,
-0.0162353515625,
-0.024505615234375,
-0.0071868896484375,
-0.01552581787109375,
-0.0283203125,
-0.0210113525390625,
-0.048309326171875,
-0.051239013671875,
0.0545654296875,
-0.0031261444091796875,
0.023529052734375,
0.04266357421875,
0.00424957275390625,
-0.0462646484375,
-0.0184326171875,
-0.055084228515625,
0.056884765625,
0.0011959075927734375,
0.0889892578125,
-0.0849609375,
-0.0166473388671875,
0.039398193359375,
0.0310516357421875,
0.066162109375,
0.006954193115234375,
-0.03411865234375,
-0.0269927978515625,
0.05621337890625,
0.07818603515625,
0.02703857421875,
0.004772186279296875,
0.0311431884765625,
0.033966064453125,
0.042724609375,
-0.0281829833984375,
0.045989990234375,
-0.058319091796875,
0.0125579833984375,
0.0202789306640625,
-0.0003604888916015625,
-0.015960693359375,
0.0027618408203125,
-0.040191650390625,
-0.0400390625,
0.01050567626953125,
0.01039886474609375,
0.03326416015625,
0.025787353515625,
0.06005859375,
0.041351318359375,
-0.030853271484375,
-0.041015625,
-0.0229034423828125,
0.046417236328125,
-0.0047607421875,
0.00966644287109375,
0.06085205078125,
0.0302581787109375,
0.07861328125,
-0.0267333984375,
0.006397247314453125,
0.0171966552734375,
-0.0312042236328125,
0.06329345703125,
0.0311431884765625,
0.0228118896484375,
-0.038787841796875,
-0.00675201416015625,
0.03558349609375,
0.0791015625,
-0.046875,
0.0024547576904296875,
0.00151824951171875,
0.02587890625,
0.0132598876953125,
-0.0206298828125,
0.04498291015625,
0.05291748046875,
0.049224853515625,
-0.0240936279296875,
-0.0005035400390625,
0.018524169921875,
0.00421905517578125,
-0.0157928466796875,
-0.04718017578125,
0.00933837890625,
0.01398468017578125,
0.0010013580322265625,
-0.037933349609375,
0.0002872943878173828,
0.03546142578125,
0.0292205810546875,
-0.007274627685546875,
-0.045654296875,
-0.01187896728515625,
-0.007648468017578125,
0.00897979736328125,
-0.013824462890625,
0.005718231201171875,
-0.037567138671875,
-0.051910400390625,
0.0328369140625,
0.034271240234375,
0.006954193115234375,
0.00167083740234375,
0.03631591796875,
0.01971435546875,
-0.04583740234375,
-0.019561767578125,
-0.0301361083984375,
-0.033050537109375,
-0.052276611328125,
0.007366180419921875,
-0.055084228515625,
-0.00823974609375,
-0.01180267333984375,
0.007015228271484375,
0.07208251953125,
-0.05450439453125,
0.0106353759765625,
0.052001953125,
0.002559661865234375,
-0.0020389556884765625,
0.0106353759765625,
0.022369384765625,
0.04278564453125,
0.04925537109375,
-0.044281005859375,
-0.0207672119140625,
0.025634765625,
-0.021026611328125,
-0.0190887451171875,
0.0154571533203125,
-0.00972747802734375,
0.016357421875,
0.0009226799011230469,
-0.02740478515625,
0.0294647216796875,
-0.01340484619140625,
0.00873565673828125,
0.0064697265625,
0.009857177734375,
-0.008758544921875,
-0.05047607421875,
-0.0421142578125,
-0.02294921875,
0.0484619140625,
0.021453857421875,
0.0220489501953125,
0.0036182403564453125,
0.0335693359375,
-0.0014057159423828125,
0.0033702850341796875,
-0.0018472671508789062,
-0.0217437744140625,
0.047882080078125,
-0.024993896484375,
-0.018341064453125,
-0.00531768798828125,
0.0283050537109375,
0.010833740234375,
0.04876708984375,
-0.05792236328125,
0.0107421875,
-0.047454833984375,
0.0131988525390625,
-0.03973388671875,
0.0247650146484375,
-0.016204833984375,
0.0010089874267578125,
-0.00817108154296875,
-0.005725860595703125,
0.03582763671875,
0.01308441162109375,
0.007312774658203125,
0.022064208984375,
-0.02447509765625,
-0.0689697265625,
0.060211181640625,
-0.0970458984375,
0.063720703125,
0.035797119140625,
0.0097503662109375,
0.016326904296875,
-0.026336669921875,
-0.035308837890625,
-0.01690673828125,
0.0256195068359375,
-0.03021240234375,
-0.038848876953125,
0.051849365234375,
-0.055877685546875,
-0.0198516845703125,
0.00089263916015625,
-0.0101165771484375,
-0.0070343017578125,
-0.034637451171875,
-0.0279388427734375,
-0.00244903564453125,
0.017730712890625,
-0.0214996337890625,
-0.0055999755859375,
-0.0220947265625,
-0.00384521484375,
-0.0092926025390625,
-0.06964111328125,
-0.034332275390625,
-0.00891876220703125,
0.01493072509765625,
-0.019287109375,
-0.0185394287109375,
-0.0050048828125,
-0.03204345703125,
0.0005712509155273438,
-0.02490234375,
-0.07415771484375,
0.0302276611328125,
0.0028839111328125,
-0.0323486328125,
0.019378662109375,
-0.047943115234375,
-0.041015625,
-0.0121612548828125,
0.038848876953125,
0.05474853515625,
-0.055419921875,
0.00609588623046875,
0.0390625,
0.0457763671875,
0.06488037109375,
0.00661468505859375,
0.00658416748046875,
0.054840087890625,
0.0163421630859375,
-0.050567626953125,
-0.1043701171875,
0.003292083740234375,
-0.05670166015625,
0.01490020751953125,
-0.00952911376953125,
0.034515380859375,
0.044403076171875,
-0.023101806640625,
-0.068115234375,
0.0308074951171875,
-0.0167694091796875,
-0.03564453125,
-0.046142578125,
-0.004627227783203125,
0.00783538818359375,
0.00455474853515625,
-0.0030651092529296875,
-0.0244293212890625,
-0.045562744140625,
0.002429962158203125,
0.018402099609375,
-0.0139007568359375,
0.049041748046875,
0.003589630126953125,
-0.09619140625,
-0.0289459228515625,
-0.04827880859375,
0.0162353515625,
0.01195526123046875,
0.0004906654357910156,
0.0262603759765625,
0.043060302734375,
-0.0099639892578125,
0.0018968582153320312,
-0.0045318603515625,
-0.040679931640625,
0.00408935546875,
0.0260467529296875,
-0.0316162109375,
-0.0078582763671875,
0.01959228515625,
0.04071044921875,
0.01468658447265625,
-0.025634765625,
-0.0006999969482421875,
-0.0190582275390625,
-0.02093505859375,
-0.021209716796875,
0.0194549560546875,
-0.07421875,
-0.0250244140625,
0.0307159423828125,
-0.017669677734375,
0.01222991943359375,
-0.01236724853515625,
-0.0238189697265625,
-0.0174102783203125,
-0.02838134765625,
-0.025787353515625,
0.0024890899658203125,
-0.050048828125,
0.0135040283203125,
-0.014678955078125,
-0.041259765625,
0.02154541015625,
0.0263214111328125,
-0.035369873046875,
0.040740966796875,
0.0238037109375,
0.005741119384765625,
-0.00940704345703125,
-0.025238037109375,
0.0282135009765625,
-0.002857208251953125,
0.0377197265625,
-0.0269622802734375,
-0.0118255615234375,
0.00811767578125,
0.002559661865234375,
-0.0006756782531738281,
-0.00043392181396484375,
0.03167724609375,
-0.00006139278411865234,
0.0731201171875,
-0.006816864013671875,
0.0253753662109375,
0.03204345703125,
-0.0258331298828125,
0.01070404052734375,
0.00963592529296875,
0.05035400390625,
-0.054107666015625,
0.0037097930908203125,
-0.001613616943359375,
-0.02923583984375,
-0.0166168212890625,
0.0167694091796875,
0.031982421875,
-0.0190277099609375,
0.017608642578125
]
|
0db2015923fc65437f4e179b7538cc4cb1a47c6e | Wordpress Stackexchange
Q: Check if Website is hidden from Search Engines? Any idea how to check if the website is hidden from search engines? The reason is I want to show a big red banner at the top of the homepage when this option is checked because I always forget that this option is checked.
A: The setting is stored in the option blog_public.
if( 0 == get_option( 'blog_public' ) ){
echo 'search engines discouraged';
}
| Q: Check if Website is hidden from Search Engines? Any idea how to check if the website is hidden from search engines? The reason is I want to show a big red banner at the top of the homepage when this option is checked because I always forget that this option is checked.
A: The setting is stored in the option blog_public.
if( 0 == get_option( 'blog_public' ) ){
echo 'search engines discouraged';
}
A: Pretty sure I stole borrowed the following piece of code from the very handy and useful Yoast Plugin:
/**
* Check if Website is visible to Search Engines
*/
function wpse_check_visibility() {
if ( ! class_exists( 'WPSEO_Admin' ) ) {
if ( '0' == get_option( 'blog_public' ) ) {
add_action( 'admin_footer', 'wpse_private_wp_warning' );
}
}
}
add_action( 'admin_init', 'wpse_check_visibility' );
/**
* If website is Private, show alert
*/
function wpse_private_wp_warning() {
if ( ( function_exists( 'is_network_admin' ) && is_network_admin() ) ) {
return;
}
echo '<div id="robotsmessage" class="error">';
echo '<p><strong>' . __( 'Huge SEO Issue: You\'re blocking access to robots.', 'wpse-seo' ) . '</strong> ' . sprintf( __( 'You must %sgo to your Reading Settings%s and uncheck the box for Search Engine Visibility.', 'wordpress-seo' ), '<a href="' . esc_url( admin_url( 'options-reading.php' ) ) . '">', '</a>' ) . '</p></div>';
}
Pretty much on admin_init we check if our site is private. If it is we're going to use the footer and WordPress alert styles to tell us that the site is private. The WPSEO_Admin is Yoast as I believe they will also tell you the site is private if it's installed so we don't want to step on their toes.
A: Another way to see if your Website is hidden from Search Engines is going to Settings » Privacy Settings
The Site Privacy setting controls who can view your site, allowing you to make the site private or public. To access this setting, go to My Site → Settings and look for Privacy.
Privacy Options
*
*Public: This is the setting used by most sites. It allows everyone to read your site and enables your site to be included in search engine results and other content sites.
*Hidden: If you want all human visitors to be able to read your blog, but want to block web crawlers for search engines, this is the setting for you. (Please note, however, that not all search engines respect this setting.)
*Private: Select this option to make your site private. If you want specific people to be able to view it (and add comments, if you’ve enabled them), you’ll need to invite them to be a viewer.
A: Using this since Milos answer on every WordPress project as a handy snippet (put it right after the opening body tag):
<?php if ( is_user_logged_in() ) { ?>
<style>
a.searchengines_blocked {
position: fixed;
bottom: 0;
left: 0;
z-index: 99999;
color: black !important;
background-color: #ffcd1b !important;
font-weight: normal;
font-size: 1.8rem;
padding: 6px 15px;
text-align: center;
vertical-align: middle;
border-top-right-radius: 10px;
}
</style>
<?php
if( 0 == get_option( 'blog_public' ) ){
echo '<a href="./wp-admin/options-reading.php" class="searchengines_blocked">!G</a>';
}
?>
<?php } ?>
| wordpress | {
"language": "en",
"length": 517,
"provenance": "stackexchange_00019.jsonl.gz:464317",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/222136"
} | [
0.024810791015625,
0.017852783203125,
0.045623779296875,
0.0908203125,
-0.00641632080078125,
-0.02471923828125,
0.08636474609375,
-0.10076904296875,
0.02105712890625,
-0.0236358642578125,
-0.054840087890625,
-0.0142364501953125,
-0.04620361328125,
-0.0278778076171875,
0.003993988037109375,
-0.062255859375,
0.0297088623046875,
-0.00598907470703125,
0.033905029296875,
0.00836944580078125,
0.01169586181640625,
0.0266876220703125,
0.0205078125,
0.001445770263671875,
0.048858642578125,
-0.08856201171875,
0.1053466796875,
-0.0236663818359375,
0.057525634765625,
-0.024566650390625,
0.0438232421875,
-0.0287628173828125,
-0.0034427642822265625,
0.0228271484375,
0.01739501953125,
-0.01399993896484375,
0.0175323486328125,
0.01995849609375,
0.024505615234375,
0.01467132568359375,
0.0017375946044921875,
0.00670623779296875,
0.02642822265625,
-0.0283203125,
-0.0045623779296875,
-0.020111083984375,
0.0088653564453125,
-0.035614013671875,
-0.00832366943359375,
-0.005504608154296875,
0.00894927978515625,
0.00616455078125,
0.011932373046875,
-0.0275421142578125,
-0.002353668212890625,
0.0152130126953125,
0.05859375,
0.0290985107421875,
0.0343017578125,
-0.07086181640625,
-0.07098388671875,
0.032318115234375,
0.02972412109375,
-0.01013946533203125,
-0.0178985595703125,
0.005252838134765625,
-0.047882080078125,
0.034942626953125,
-0.051666259765625,
-0.036041259765625,
0.020477294921875,
-0.052459716796875,
0.004039764404296875,
0.01450347900390625,
-0.04632568359375,
-0.045135498046875,
0.0020046234130859375,
-0.05474853515625,
0.03277587890625,
-0.005462646484375,
-0.01197052001953125,
0.039276123046875,
-0.0258026123046875,
-0.03387451171875,
0.02276611328125,
0.002819061279296875,
-0.0210113525390625,
-0.0217742919921875,
-0.01132965087890625,
-0.01236724853515625,
-0.0003681182861328125,
0.0256805419921875,
-0.04010009765625,
0.00235748291015625,
-0.00849151611328125,
-0.037506103515625,
0.05145263671875,
0.08587646484375,
-0.044677734375,
-0.038177490234375,
-0.018707275390625,
-0.0203704833984375,
-0.03424072265625,
-0.0151519775390625,
-0.005657196044921875,
0.037750244140625,
0.0145111083984375,
0.018798828125,
0.0173187255859375,
0.007221221923828125,
-0.00872802734375,
0.022552490234375,
-0.01421356201171875,
0.00006103515625,
-0.020294189453125,
-0.00818634033203125,
-0.053070068359375,
0.013824462890625,
0.00047206878662109375,
0.0222320556640625,
0.041351318359375,
0.06622314453125,
0.021026611328125,
-0.05804443359375,
-0.028778076171875,
-0.01464080810546875,
-0.0298309326171875,
-0.057647705078125,
0.0083160400390625,
0.036163330078125,
-0.036376953125,
0.0156097412109375,
0.01297760009765625,
-0.0281219482421875,
-0.028289794921875,
-0.03314208984375,
-0.02197265625,
0.022186279296875,
-0.03216552734375,
0.0142059326171875,
0.0182952880859375,
-0.047607421875,
-0.00797271728515625,
0.00687408447265625,
-0.00039696693420410156,
0.00826263427734375,
0.0262908935546875,
0.0311279296875,
-0.01384735107421875,
-0.038665771484375,
0.025482177734375,
-0.0152587890625,
0.06689453125,
-0.000457763671875,
-0.055206298828125,
-0.036712646484375,
-0.00799560546875,
-0.0305328369140625,
-0.0156707763671875,
-0.064697265625,
0.0080108642578125,
0.021087646484375,
0.056884765625,
0.01348876953125,
0.00296783447265625,
-0.03985595703125,
-0.02362060546875,
-0.00855255126953125,
0.0175323486328125,
-0.0308837890625,
0.0172119140625,
-0.0212860107421875,
0.046661376953125,
-0.01010894775390625,
-0.007061004638671875,
0.02642822265625,
0.041351318359375,
0.01369476318359375,
0.018310546875,
0.04473876953125,
-0.005626678466796875,
-0.0175933837890625,
0.07525634765625,
-0.037200927734375,
-0.06268310546875,
0.06072998046875,
0.0036487579345703125,
0.045654296875,
-0.0002498626708984375,
-0.013031005859375,
0.046356201171875,
0.0263214111328125,
-0.01477813720703125,
-0.00844573974609375,
0.0101776123046875,
0.0024127960205078125,
-0.01480865478515625,
0.0002340078353881836,
-0.0063323974609375,
-0.037933349609375,
0.00885009765625,
0.01549530029296875,
-0.01201629638671875,
0.01953125,
0.0011510848999023438,
-0.005214691162109375,
-0.001987457275390625,
0.0163421630859375,
0.01181793212890625,
0.0079498291015625,
0.000881195068359375,
-0.037872314453125,
-0.0007791519165039062,
-0.0135955810546875,
-0.017181396484375,
0.01279449462890625,
-0.01334381103515625,
0.029541015625,
-0.0096588134765625,
0.005153656005859375,
-0.01078033447265625,
0.01233673095703125,
-0.0032634735107421875,
0.01322174072265625,
0.04693603515625,
-0.01213836669921875,
-0.00672149658203125,
-0.01378631591796875,
0.0245819091796875,
0.016693115234375,
-0.0478515625,
0.019134521484375,
0.058807373046875,
0.0987548828125,
0.034759521484375,
-0.00635528564453125,
0.033660888671875,
-0.113037109375,
0.019989013671875,
0.0472412109375,
0.038909912109375,
0.00875091552734375,
-0.006427764892578125,
-0.0124969482421875,
0.0260162353515625,
-0.070556640625,
-0.00498199462890625,
-0.0014286041259765625,
0.0180206298828125,
0.02276611328125,
-0.0248260498046875,
-0.0146942138671875,
0.035125732421875,
-0.00824737548828125,
0.002788543701171875,
0.0226898193359375,
-0.0167083740234375,
0.0005278587341308594,
-0.0203094482421875,
-0.004161834716796875,
0.007366180419921875,
-0.01495361328125,
-0.0233306884765625,
-0.00661468505859375,
0.034149169921875,
0.0181427001953125,
0.04425048828125,
0.0400390625,
-0.01020050048828125,
0.01541900634765625,
-0.0044708251953125,
-0.00678253173828125,
0.00513458251953125,
0.037841796875,
0.0460205078125,
0.01776123046875,
-0.01446533203125,
-0.01904296875,
-0.00359344482421875,
0.0292510986328125,
-0.0171356201171875,
0.0081787109375,
-0.0127105712890625,
-0.005527496337890625,
-0.00791168212890625,
0.0019664764404296875,
0.015869140625,
0.0085601806640625,
0.0231475830078125,
0.02471923828125,
0.03533935546875,
0.032501220703125,
0.00015366077423095703,
0.041595458984375,
-0.01456451416015625,
-0.01544952392578125,
-0.07171630859375,
-0.07281494140625,
0.06048583984375,
-0.059356689453125,
0.003101348876953125,
0.083251953125,
0.01503753662109375,
0.01190185546875,
0.004787445068359375,
-0.0003559589385986328,
0.021942138671875,
-0.0230255126953125,
-0.01788330078125,
0.01678466796875,
-0.059112548828125,
0.0214996337890625,
0.0227508544921875,
-0.054534912109375,
0.0361328125,
-0.01328277587890625,
-0.034271240234375,
-0.01033782958984375,
-0.11492919921875,
-0.06341552734375,
-0.01079559326171875,
-0.07000732421875,
-0.0196075439453125,
-0.015411376953125,
-0.03515625,
0.01380157470703125,
-0.0005054473876953125,
-0.002384185791015625,
-0.03155517578125,
-0.06744384765625,
-0.06182861328125,
-0.09503173828125,
-0.0712890625,
0.0287017822265625,
-0.0011234283447265625,
0.008697509765625,
0.00902557373046875,
0.0311279296875,
0.004154205322265625,
-0.0379638671875,
0.0230255126953125,
0.002933502197265625,
-0.006275177001953125,
0.004852294921875,
-0.0163726806640625,
-0.012664794921875,
-0.013031005859375,
0.01092529296875,
0.004596710205078125,
-0.007610321044921875,
0.01617431640625,
-0.003528594970703125,
-0.00481414794921875,
-0.043853759765625,
0.0029048919677734375,
0.0007901191711425781,
-0.007724761962890625,
-0.0694580078125,
-0.0300445556640625,
-0.0810546875,
-0.029876708984375,
0.00832366943359375,
-0.039764404296875,
0.02923583984375,
0.03045654296875,
-0.0307769775390625,
0.0131683349609375,
-0.01032257080078125,
0.037933349609375,
0.019866943359375,
-0.00527191162109375,
-0.01617431640625,
0.00028824806213378906,
0.0175018310546875,
0.043975830078125,
-0.011688232421875,
0.0218505859375,
-0.016571044921875,
0.0024814605712890625,
0.001560211181640625,
0.00016582012176513672,
-0.0030918121337890625,
0.0192108154296875,
-0.01264190673828125,
0.00983428955078125,
0.03240966796875,
-0.0036563873291015625,
0.022216796875,
-0.024627685546875,
-0.028594970703125,
-0.02301025390625,
0.056427001953125,
-0.0335693359375,
0.005840301513671875,
-0.0166168212890625,
-0.0076141357421875,
-0.003665924072265625,
0.01244354248046875,
-0.05364990234375,
0.004581451416015625,
-0.12054443359375,
0.045074462890625,
-0.01873779296875,
-0.0278778076171875,
-0.040863037109375,
-0.04437255859375,
-0.07769775390625,
-0.05419921875,
0.0033092498779296875,
-0.0270233154296875,
0.038299560546875,
-0.00276947021484375,
0.016937255859375,
0.01800537109375,
0.014984130859375,
-0.07135009765625,
-0.0257720947265625,
0.002208709716796875,
0.01088714599609375,
-0.0297698974609375,
-0.01010894775390625,
0.01395416259765625,
0.0008854866027832031,
0.023284912109375,
-0.003849029541015625,
0.03985595703125,
-0.0182952880859375,
-0.0158538818359375,
0.0209503173828125,
0.0176544189453125,
-0.01995849609375,
0.0014886856079101562,
0.0250701904296875,
0.0216522216796875,
-0.0693359375,
0.0011625289916992188,
-0.01983642578125,
-0.0039215087890625,
0.04254150390625,
-0.05865478515625,
-0.0072784423828125,
-0.023529052734375,
0.0184478759765625,
0.022613525390625,
0.0102386474609375,
-0.00409698486328125,
-0.0297393798828125,
-0.0021305084228515625,
0.01277923583984375,
-0.00626373291015625,
-0.0303192138671875,
0.01084136962890625,
0.040924072265625,
0.02294921875,
-0.0055694580078125,
0.0190887451171875,
0.0097503662109375,
0.0209197998046875,
0.0164947509765625,
0.0250396728515625,
-0.0257110595703125,
-0.0250091552734375,
0.040069580078125,
-0.00992584228515625,
-0.0125579833984375,
0.00528717041015625,
0.053375244140625,
-0.015655517578125,
-0.031707763671875,
0.03228759765625,
-0.0268402099609375,
-0.006927490234375,
0.055908203125,
-0.0189361572265625,
-0.005950927734375,
-0.0238800048828125,
0.01302337646484375,
-0.0209197998046875,
0.029022216796875,
-0.0224151611328125,
-0.0142822265625,
-0.0015659332275390625,
0.037841796875,
0.064453125,
0.0418701171875,
-0.0012140274047851562,
0.06036376953125,
0.05084228515625,
0.002948760986328125,
0.020660400390625,
0.0244140625,
-0.044769287109375,
0.048614501953125,
-0.057098388671875,
-0.0396728515625,
0.010955810546875,
-0.019012451171875,
0.047027587890625,
-0.01433563232421875,
-0.051239013671875,
0.0245513916015625,
-0.02850341796875,
-0.021942138671875,
0.04827880859375,
0.01953125,
0.0218505859375,
-0.002964019775390625,
-0.01922607421875,
-0.01105499267578125,
0.01161956787109375,
-0.0128326416015625,
-0.033843994140625,
-0.015625,
-0.00817108154296875,
-0.004314422607421875,
0.04315185546875,
0.037109375,
-0.029937744140625,
0.04296875,
-0.0161590576171875,
-0.0232391357421875,
0.0003674030303955078,
-0.00557708740234375,
-0.00010263919830322266,
0.034759521484375,
0.0186614990234375,
-0.02276611328125,
0.09588623046875,
0.00921630859375,
-0.01898193359375,
0.0235443115234375,
0.0096893310546875,
0.0088348388671875,
0.0338134765625,
-0.01511383056640625,
0.01308441162109375,
-0.0380859375,
0.048736572265625,
0.031402587890625,
-0.0305633544921875,
-0.05841064453125,
-0.03533935546875,
0.03326416015625,
0.0269927978515625,
-0.00873565673828125,
-0.0121002197265625,
-0.0248565673828125,
-0.00019168853759765625,
0.0183868408203125,
-0.05999755859375,
0.021453857421875,
0.038848876953125,
-0.046173095703125,
0.001155853271484375,
0.02484130859375,
-0.02587890625,
-0.0186767578125,
-0.0194549560546875,
-0.0237579345703125,
0.04669189453125,
-0.017608642578125,
0.01824951171875,
-0.0143585205078125,
-0.00513458251953125,
0.0596923828125,
0.015960693359375,
0.025177001953125,
-0.0091400146484375,
-0.027496337890625,
-0.033905029296875,
-0.0259246826171875,
-0.019683837890625,
-0.01702880859375,
-0.0089263916015625,
-0.0200042724609375,
-0.004364013671875,
0.0232391357421875,
0.01331329345703125,
-0.00832366943359375,
-0.0350341796875,
-0.00530242919921875,
0.0239410400390625,
0.029998779296875,
0.01218414306640625,
-0.01099395751953125,
0.021514892578125,
0.005748748779296875,
0.0015993118286132812,
0.0176239013671875,
0.0266265869140625,
0.0079803466796875,
-0.0323486328125,
0.00988006591796875,
-0.0165863037109375,
-0.0210723876953125,
0.00269317626953125,
0.00691986083984375,
-0.01959228515625,
0.0010929107666015625,
-0.0025196075439453125,
-0.0226593017578125,
0.01128387451171875,
0.01251983642578125,
-0.021881103515625,
-0.0014019012451171875,
0.0216064453125,
-0.007663726806640625,
-0.01290130615234375,
-0.0034389495849609375,
0.00980377197265625,
0.00536346435546875,
-0.025909423828125,
0.00856781005859375,
0.01357269287109375,
0.0168609619140625,
-0.01227569580078125,
-0.06781005859375,
0.06488037109375,
0.07183837890625,
0.0212860107421875,
0.07147216796875,
0.0151214599609375,
0.0299835205078125,
0.01544189453125,
0.01206207275390625,
-0.08740234375,
-0.00939178466796875,
0.0224761962890625,
0.0162506103515625,
0.01401519775390625,
0.048553466796875,
0.01123809814453125,
0.0189666748046875,
0.03643798828125,
0.052764892578125,
-0.0728759765625,
0.0139007568359375,
0.02691650390625,
0.006870269775390625,
0.027008056640625,
0.0093231201171875,
-0.01385498046875,
-0.028961181640625,
0.004703521728515625,
-0.006458282470703125,
-0.01453399658203125,
-0.0025787353515625,
0.005458831787109375,
-0.0221405029296875,
-0.02398681640625,
0.042816162109375,
-0.0008745193481445312,
-0.080078125,
0.012969970703125,
0.053253173828125,
-0.0350341796875,
-0.0019702911376953125,
0.0033359527587890625,
0.004665374755859375,
-0.03302001953125,
-0.05389404296875,
0.0017175674438476562,
-0.01145172119140625,
-0.029693603515625,
0.03582763671875,
-0.01189422607421875,
-0.0170440673828125,
0.045379638671875,
-0.0170745849609375,
0.0117645263671875,
0.01189422607421875,
-0.05426025390625,
0.0650634765625,
0.01187896728515625,
0.032867431640625,
-0.0292510986328125,
0.006641387939453125,
-0.022857666015625,
-0.0194854736328125,
-0.0171356201171875,
-0.0264739990234375,
-0.037078857421875,
0.05364990234375,
-0.01277923583984375,
-0.017120361328125,
0.00920867919921875,
0.055450439453125,
-0.00974273681640625,
-0.027740478515625,
0.0269927978515625,
-0.032470703125,
0.02801513671875,
-0.025054931640625,
0.0120849609375,
-0.0206756591796875,
-0.06256103515625,
-0.039093017578125,
0.05670166015625,
-0.039031982421875,
0.028839111328125,
0.0027103424072265625,
0.0151519775390625,
0.0308990478515625,
0.0207977294921875,
-0.0217742919921875,
0.0013256072998046875,
-0.04718017578125,
0.044952392578125,
-0.028167724609375,
0.005489349365234375,
0.00396728515625,
0.02667236328125,
-0.02886962890625,
-0.0004394054412841797,
0.00586700439453125,
0.0015916824340820312,
0.01200103759765625,
-0.00080108642578125,
-0.012115478515625,
0.0288848876953125,
-0.0189208984375,
0.02825927734375,
0.019683837890625,
-0.057861328125,
0.0200653076171875,
-0.034393310546875,
-0.007598876953125,
-0.0013561248779296875,
-0.0115814208984375,
-0.0266265869140625,
-0.005794525146484375,
-0.008880615234375,
-0.031951904296875,
0.0032215118408203125,
0.00434112548828125,
0.0021800994873046875,
-0.026153564453125,
0.026458740234375,
0.018798828125,
-0.063720703125,
-0.0267181396484375,
-0.0269927978515625,
0.02972412109375,
0.0179443359375,
0.00624847412109375,
0.0426025390625,
0.024139404296875,
0.004802703857421875,
-0.00751495361328125,
0.01174163818359375,
0.01045989990234375,
-0.0302276611328125,
0.006580352783203125,
0.0290069580078125,
0.023345947265625,
-0.0236053466796875,
-0.01873779296875,
0.01181793212890625,
0.0352783203125,
-0.015960693359375,
-0.01229095458984375,
-0.0027408599853515625,
-0.01351165771484375,
0.01103973388671875,
-0.038604736328125,
-0.003223419189453125,
0.055023193359375,
0.072509765625,
0.00858306884765625,
-0.0222015380859375,
0.0175018310546875,
0.017242431640625,
0.01451873779296875,
0.025146484375,
-0.01190185546875,
-0.037811279296875,
-0.0205841064453125,
-0.037933349609375,
-0.0038051605224609375,
0.055908203125,
0.05133056640625,
0.0267791748046875,
-0.0089263916015625,
-0.02606201171875,
-0.05181884765625,
0.0212554931640625,
0.007171630859375,
0.06719970703125,
-0.093017578125,
-0.01126861572265625,
0.047576904296875,
0.05914306640625,
-0.022003173828125,
0.014373779296875,
0.01528167724609375,
0.033599853515625,
-0.0049896240234375,
-0.01302337646484375,
0.0631103515625,
-0.01222991943359375,
0.01303863525390625,
-0.0211181640625,
0.043731689453125,
0.05267333984375,
0.01494598388671875,
0.00029921531677246094,
0.00794219970703125,
0.07757568359375,
-0.0032901763916015625,
0.04217529296875,
-0.000255584716796875,
-0.011932373046875,
0.0474853515625,
-0.01027679443359375,
0.08331298828125,
0.02398681640625,
-0.032684326171875,
-0.0174713134765625,
0.0034694671630859375,
-0.007503509521484375,
0.00714111328125,
0.0242462158203125,
-0.0211334228515625,
0.03533935546875,
-0.001979827880859375,
0.006771087646484375,
-0.00562286376953125,
-0.01849365234375,
0.0257568359375,
0.056488037109375,
0.005126953125,
0.037445068359375,
-0.0458984375,
-0.0166015625,
0.026336669921875,
0.009918212890625,
-0.00927734375,
0.033843994140625,
0.0162200927734375,
-0.0129547119140625,
-0.020355224609375,
-0.01076507568359375,
0.006175994873046875,
-0.01371002197265625,
0.0113372802734375,
0.03338623046875,
-0.002513885498046875,
-0.025238037109375,
-0.0780029296875,
0.02117919921875,
0.01226806640625,
-0.0212249755859375,
0.05126953125,
-0.0308990478515625,
0.0005908012390136719,
-0.0276336669921875,
0.012664794921875,
-0.04638671875,
-0.040771484375,
-0.0211944580078125,
0.0021381378173828125,
-0.004352569580078125,
-0.040252685546875,
-0.0196685791015625,
0.042022705078125,
-0.03997802734375,
-0.034912109375,
0.013275146484375,
-0.06561279296875,
-0.007564544677734375,
0.0260467529296875,
0.003963470458984375,
0.0416259765625,
0.00147247314453125,
-0.01183319091796875,
0.0227508544921875,
0.024658203125,
-0.06866455078125,
0.0146026611328125,
0.01181793212890625,
-0.04156494140625,
-0.046966552734375,
-0.0333251953125,
-0.055023193359375,
-0.0175018310546875,
-0.005107879638671875,
-0.006893157958984375,
-0.005886077880859375,
0.0611572265625,
-0.007045745849609375,
0.0259552001953125,
-0.02935791015625,
-0.0063323974609375,
0.01239776611328125,
-0.044158935546875,
-0.035247802734375,
-0.022857666015625,
0.0169830322265625,
-0.0054168701171875,
-0.0231781005859375,
-0.031829833984375,
-0.01438140869140625,
0.0465087890625,
-0.0258636474609375,
0.05322265625,
-0.005794525146484375,
0.006435394287109375,
-0.055511474609375,
0.0369873046875,
-0.00936126708984375,
-0.017791748046875,
0.039947509765625,
0.0208587646484375,
0.031829833984375,
-0.0172882080078125,
0.005939483642578125,
-0.0010471343994140625,
-0.0001957416534423828,
0.04473876953125,
-0.0263519287109375,
-0.0214385986328125,
-0.0026798248291015625,
-0.0020351409912109375,
-0.0033016204833984375,
-0.0269927978515625,
0.00408935546875,
-0.0245361328125,
-0.050323486328125,
-0.0296783447265625,
-0.0068817138671875,
0.01806640625,
-0.052734375,
-0.1151123046875,
0.087890625,
-0.03509521484375,
-0.036834716796875,
0.00029921531677246094,
0.0024700164794921875,
-0.029083251953125,
0.01088714599609375,
0.019195556640625,
-0.0187225341796875,
0.006183624267578125,
0.007965087890625,
0.0130157470703125,
0.045928955078125,
0.0028228759765625,
-0.011016845703125,
-0.0176849365234375,
0.00684356689453125,
-0.0035305023193359375,
0.012908935546875,
0.00276947021484375,
-0.0236663818359375,
0.0159149169921875,
0.028656005859375,
-0.0447998046875,
-0.03741455078125,
0.00875091552734375,
0.0193023681640625,
0.010345458984375,
-0.0174713134765625,
-0.017333984375,
-0.0135040283203125,
0.040252685546875,
0.011932373046875,
0.0159912109375,
-0.00807952880859375,
-0.041259765625,
-0.0018138885498046875,
-0.0002732276916503906,
-0.0189971923828125,
0.0305938720703125,
-0.0765380859375,
-0.00231170654296875,
-0.008026123046875,
0.0216064453125,
0.003971099853515625,
-0.005584716796875,
0.0005054473876953125,
-0.0168914794921875,
0.018646240234375,
0.00408935546875,
-0.0137939453125,
0.03790283203125,
0.0096435546875,
-0.0258026123046875,
0.0014677047729492188,
-0.0091705322265625,
0.0032558441162109375,
-0.002040863037109375,
-0.0204925537109375,
0.03192138671875,
0.044891357421875,
-0.032257080078125,
-0.01202392578125,
0.048492431640625,
-0.01264190673828125,
0.00901031494140625,
-0.01560211181640625,
-0.005298614501953125,
0.0223541259765625,
0.025787353515625,
0.02581787109375,
-0.06109619140625,
0.050140380859375,
0.0131988525390625,
0.03143310546875,
-0.01508331298828125,
0.04547119140625,
-0.02459716796875,
0.044677734375,
-0.023101806640625,
0.0062713623046875,
0.01226043701171875,
-0.003620147705078125,
-0.0031585693359375,
-0.0002989768981933594,
-0.0021800994873046875,
-0.04608154296875,
0.034881591796875,
-0.04541015625,
0.008148193359375,
0.0270538330078125
]
|
2a12a6209688cb617237901abae75fd9f60bac16 | Wordpress Stackexchange
Q: Make a custom theme translate-ready I created a my own theme, now I wish to make it translatable.
I made two files:
theme.pot
msgid "know_more"
msgstr "Vuoi saperne di più?"
it_IT.po
msgid "know_more"
msgstr "Vuoi saperne di più?"
Then in the index theme file i wrote:
<h2><?php _e('know_more',''); ?></h2>
But when I run the site appears just: know_more
A: To do it properly, you need to generate a valid .mo file and load the text domain in your theme functions.php:
function wpse222346_localize_theme() {
load_theme_textdomain( 'your_theme_domain', get_template_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'wpse222346_localize_theme' );
You can check the WordPress Codex for more info on the load_theme_textdomain function: https://codex.wordpress.org/Function_Reference/load_theme_textdomain
Then you would call the translatable strings using your theme's text domain:
<h2><?php _e( 'know_more', 'your_theme_domain' ); ?></h2>
Also, it's strongly advised to use a tool for automating the creation of the POT files. It makes maintainability much easier. There are many options, such as Poedit, several online generators, makepot.php and even a very nice plugin to do it from the WordPress Dashboard called LocoTranslate. Most of them will also help you creating the .PO and .MO files.
| Q: Make a custom theme translate-ready I created a my own theme, now I wish to make it translatable.
I made two files:
theme.pot
msgid "know_more"
msgstr "Vuoi saperne di più?"
it_IT.po
msgid "know_more"
msgstr "Vuoi saperne di più?"
Then in the index theme file i wrote:
<h2><?php _e('know_more',''); ?></h2>
But when I run the site appears just: know_more
A: To do it properly, you need to generate a valid .mo file and load the text domain in your theme functions.php:
function wpse222346_localize_theme() {
load_theme_textdomain( 'your_theme_domain', get_template_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'wpse222346_localize_theme' );
You can check the WordPress Codex for more info on the load_theme_textdomain function: https://codex.wordpress.org/Function_Reference/load_theme_textdomain
Then you would call the translatable strings using your theme's text domain:
<h2><?php _e( 'know_more', 'your_theme_domain' ); ?></h2>
Also, it's strongly advised to use a tool for automating the creation of the POT files. It makes maintainability much easier. There are many options, such as Poedit, several online generators, makepot.php and even a very nice plugin to do it from the WordPress Dashboard called LocoTranslate. Most of them will also help you creating the .PO and .MO files.
| wordpress | {
"language": "en",
"length": 187,
"provenance": "stackexchange_00019.jsonl.gz:464376",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/222346"
} | [
0.0033130645751953125,
-0.03277587890625,
0.0259552001953125,
-0.021484375,
-0.02490234375,
-0.0021190643310546875,
0.0013980865478515625,
-0.0028057098388671875,
-0.028594970703125,
0.052490234375,
0.01483154296875,
-0.007205963134765625,
0.0300445556640625,
-0.0287322998046875,
-0.016754150390625,
-0.0197906494140625,
0.034881591796875,
-0.0384521484375,
0.0234832763671875,
-0.010772705078125,
0.0182952880859375,
0.00846099853515625,
0.0498046875,
-0.049163818359375,
0.04052734375,
-0.09063720703125,
0.07135009765625,
-0.0195770263671875,
0.0058746337890625,
-0.0313720703125,
0.037139892578125,
0.030914306640625,
0.03985595703125,
0.0099029541015625,
-0.026763916015625,
-0.015106201171875,
0.058990478515625,
-0.042449951171875,
-0.04498291015625,
0.061676025390625,
0.006069183349609375,
-0.005680084228515625,
0.00650787353515625,
0.0102996826171875,
0.007137298583984375,
-0.067626953125,
0.029632568359375,
-0.064453125,
-0.00868988037109375,
0.02398681640625,
0.0219879150390625,
-0.01666259765625,
0.028350830078125,
0.01544952392578125,
-0.01235198974609375,
-0.0263519287109375,
-0.05072021484375,
0.019439697265625,
0.021881103515625,
-0.0101318359375,
-0.00391387939453125,
0.005153656005859375,
0.0250244140625,
0.0224609375,
-0.0235137939453125,
0.0211181640625,
-0.006832122802734375,
-0.0038700103759765625,
-0.0005249977111816406,
-0.037017822265625,
-0.016754150390625,
-0.006793975830078125,
0.04754638671875,
-0.018096923828125,
-0.0209808349609375,
-0.0069732666015625,
-0.031219482421875,
-0.0291900634765625,
0.058685302734375,
-0.043853759765625,
-0.01126861572265625,
-0.033050537109375,
-0.0007424354553222656,
-0.00965118408203125,
-0.01490020751953125,
-0.0009937286376953125,
-0.0191497802734375,
0.004329681396484375,
-0.064697265625,
-0.0184478759765625,
-0.035858154296875,
-0.0205841064453125,
-0.07977294921875,
0.01293182373046875,
0.0253448486328125,
-0.015289306640625,
-0.010833740234375,
0.01641845703125,
-0.0023097991943359375,
0.0379638671875,
-0.0224609375,
-0.0239105224609375,
0.049713134765625,
-0.03021240234375,
0.0063323974609375,
0.02777099609375,
-0.0147247314453125,
0.0283203125,
0.055816650390625,
0.0308074951171875,
0.0209503173828125,
0.027252197265625,
-0.026031494140625,
-0.033355712890625,
-0.00806427001953125,
0.06317138671875,
-0.003971099853515625,
-0.0016698837280273438,
-0.006866455078125,
0.0009112358093261719,
0.00984954833984375,
-0.001880645751953125,
0.022705078125,
-0.00032448768615722656,
-0.007236480712890625,
-0.020477294921875,
-0.033233642578125,
-0.00469207763671875,
0.0274505615234375,
0.020477294921875,
-0.034332275390625,
-0.0062255859375,
-0.0007648468017578125,
0.022613525390625,
0.005939483642578125,
-0.02252197265625,
0.013153076171875,
0.0089569091796875,
0.0037288665771484375,
-0.00218963623046875,
0.03179931640625,
-0.040679931640625,
-0.00872039794921875,
0.0264739990234375,
-0.05328369140625,
0.004535675048828125,
0.0094146728515625,
0.0275726318359375,
0.001689910888671875,
-0.051910400390625,
0.016021728515625,
-0.0264739990234375,
0.04522705078125,
-0.0167083740234375,
-0.021484375,
-0.031402587890625,
-0.0087432861328125,
-0.0181121826171875,
-0.0230255126953125,
-0.0231475830078125,
0.0111541748046875,
-0.03204345703125,
-0.0673828125,
-0.01309967041015625,
-0.038421630859375,
0.02435302734375,
0.045318603515625,
0.01052093505859375,
0.022674560546875,
0.004268646240234375,
0.0149078369140625,
0.0013570785522460938,
0.028411865234375,
0.02178955078125,
-0.0014982223510742188,
0.02337646484375,
-0.025421142578125,
0.048187255859375,
0.011444091796875,
0.01010894775390625,
0.0303497314453125,
-0.027252197265625,
0.06170654296875,
0.0163116455078125,
-0.0509033203125,
0.00408172607421875,
0.01154327392578125,
0.056854248046875,
0.048126220703125,
0.0160980224609375,
0.0038890838623046875,
-0.03143310546875,
-0.053985595703125,
0.004032135009765625,
-0.0184326171875,
0.00769805908203125,
-0.00815582275390625,
0.0216217041015625,
-0.0045318603515625,
0.01751708984375,
-0.032989501953125,
-0.048736572265625,
0.016265869140625,
0.017852783203125,
-0.04107666015625,
-0.019195556640625,
-0.032318115234375,
0.0322265625,
0.042938232421875,
0.014923095703125,
0.0032672882080078125,
0.006591796875,
0.007709503173828125,
-0.0721435546875,
-0.07489013671875,
-0.0238800048828125,
0.01605224609375,
0.035736083984375,
0.0211181640625,
-0.0096282958984375,
0.062042236328125,
-0.030792236328125,
0.05029296875,
0.0236968994140625,
-0.0069732666015625,
0.0295257568359375,
-0.0306243896484375,
0.02117919921875,
-0.005035400390625,
0.0230560302734375,
0.03582763671875,
0.01151275634765625,
0.010467529296875,
-0.01496124267578125,
-0.04345703125,
-0.005313873291015625,
0.008514404296875,
-0.04559326171875,
0.01372528076171875,
0.04949951171875,
0.0256805419921875,
0.029144287109375,
-0.0135040283203125,
0.006305694580078125,
0.032379150390625,
-0.042694091796875,
-0.0025463104248046875,
0.006816864013671875,
0.005153656005859375,
0.036956787109375,
0.006519317626953125,
-0.0004901885986328125,
-0.01230621337890625,
-0.062469482421875,
0.0033111572265625,
0.0228729248046875,
-0.026275634765625,
-0.0165252685546875,
0.0238037109375,
-0.01207733154296875,
0.0043792724609375,
-0.01117706298828125,
-0.022125244140625,
-0.007587432861328125,
0.0289459228515625,
0.0293121337890625,
0.016143798828125,
-0.0016241073608398438,
-0.0712890625,
0.054931640625,
0.0272979736328125,
0.006381988525390625,
-0.0198516845703125,
0.00109100341796875,
-0.031890869140625,
-0.0193939208984375,
-0.0135650634765625,
0.0419921875,
-0.042724609375,
-0.0430908203125,
-0.011322021484375,
0.0241851806640625,
-0.0491943359375,
-0.0100250244140625,
0.0284881591796875,
-0.046661376953125,
-0.0218505859375,
0.009979248046875,
-0.0162506103515625,
-0.009368896484375,
-0.0136871337890625,
0.044708251953125,
-0.0501708984375,
0.07110595703125,
-0.01678466796875,
-0.007808685302734375,
0.061920166015625,
-0.0694580078125,
0.0312042236328125,
-0.01290130615234375,
0.06414794921875,
0.07904052734375,
0.016357421875,
-0.001331329345703125,
0.0089111328125,
-0.0400390625,
0.02044677734375,
0.00905609130859375,
0.00971221923828125,
-0.037750244140625,
-0.0458984375,
-0.04730224609375,
-0.0060577392578125,
-0.0207672119140625,
-0.01308441162109375,
-0.030853271484375,
-0.02239990234375,
-0.0208892822265625,
-0.052703857421875,
-0.0038585662841796875,
0.07330322265625,
-0.004566192626953125,
-0.028839111328125,
-0.00220489501953125,
-0.01953125,
-0.022003173828125,
-0.004100799560546875,
-0.0190887451171875,
-0.0102996826171875,
-0.0250396728515625,
-0.0156402587890625,
-0.0435791015625,
-0.05133056640625,
-0.041748046875,
0.02362060546875,
0.01029205322265625,
0.0015697479248046875,
-0.035491943359375,
-0.01558685302734375,
0.034332275390625,
0.0237274169921875,
0.050018310546875,
0.01358795166015625,
-0.05889892578125,
-0.02276611328125,
-0.015716552734375,
0.022064208984375,
-0.0019130706787109375,
-0.0147552490234375,
0.00860595703125,
0.0011653900146484375,
0.00022614002227783203,
-0.00571441650390625,
0.00499725341796875,
-0.0018758773803710938,
-0.050201416015625,
-0.0006303787231445312,
-0.0030040740966796875,
-0.044830322265625,
-0.055206298828125,
-0.038421630859375,
0.0278167724609375,
-0.0171966552734375,
0.0306549072265625,
0.0008678436279296875,
-0.043365478515625,
0.01325225830078125,
0.04534912109375,
0.007709503173828125,
0.001163482666015625,
0.01093292236328125,
0.006710052490234375,
-0.022064208984375,
-0.0161895751953125,
-0.00765228271484375,
-0.00490570068359375,
0.037078857421875,
-0.016326904296875,
-0.01024627685546875,
-0.0094146728515625,
0.007354736328125,
-0.005275726318359375,
-0.0224761962890625,
-0.04022216796875,
-0.02264404296875,
0.055389404296875,
-0.01129150390625,
-0.01268768310546875,
-0.005168914794921875,
-0.0316162109375,
-0.00445556640625,
0.055023193359375,
-0.012542724609375,
0.0011425018310546875,
0.005886077880859375,
0.0019321441650390625,
-0.0224609375,
-0.0011548995971679688,
-0.05908203125,
-0.0004191398620605469,
-0.045379638671875,
0.00469207763671875,
-0.0018825531005859375,
-0.012542724609375,
-0.0311431884765625,
0.0311431884765625,
-0.0206756591796875,
-0.0258331298828125,
0.020599365234375,
0.01824951171875,
0.0019216537475585938,
0.0047454833984375,
-0.0029048919677734375,
-0.016357421875,
0.00150299072265625,
-0.0164947509765625,
-0.08551025390625,
-0.021575927734375,
-0.0154876708984375,
0.06951904296875,
0.0213775634765625,
-0.040313720703125,
-0.0016641616821289062,
0.0594482421875,
0.0247344970703125,
0.08563232421875,
-0.0059814453125,
-0.00537109375,
0.0241851806640625,
-0.0154571533203125,
0.038543701171875,
-0.0188140869140625,
-0.01287078857421875,
-0.00434112548828125,
-0.0189056396484375,
0.053863525390625,
-0.000514984130859375,
0.0139312744140625,
0.01369476318359375,
-0.03216552734375,
-0.037628173828125,
-0.034454345703125,
-0.0235748291015625,
0.013702392578125,
-0.0004291534423828125,
-0.00798797607421875,
-0.027587890625,
-0.049163818359375,
0.05419921875,
0.006725311279296875,
0.00543212890625,
0.00791168212890625,
0.0428466796875,
-0.0061798095703125,
-0.046295166015625,
-0.08270263671875,
0.019683837890625,
0.035614013671875,
0.032928466796875,
0.02593994140625,
0.01241302490234375,
-0.044952392578125,
0.053497314453125,
0.027374267578125,
-0.050628662109375,
0.0703125,
-0.01110076904296875,
0.0045318603515625,
-0.051116943359375,
-0.0036773681640625,
-0.0215911865234375,
0.0005526542663574219,
0.013946533203125,
-0.01314544677734375,
0.024993896484375,
0.0268096923828125,
-0.015960693359375,
-0.039581298828125,
0.0195465087890625,
0.0183868408203125,
-0.056121826171875,
0.0193939208984375,
0.004970550537109375,
-0.03375244140625,
-0.047943115234375,
0.03265380859375,
-0.017974853515625,
-0.01099395751953125,
0.01641845703125,
0.016357421875,
0.00412750244140625,
-0.019256591796875,
0.0103607177734375,
0.049835205078125,
-0.0015048980712890625,
0.006244659423828125,
-0.00222015380859375,
0.039398193359375,
-0.01389312744140625,
-0.0243377685546875,
-0.0307159423828125,
0.0094757080078125,
0.053466796875,
0.04095458984375,
0.026153564453125,
0.028167724609375,
0.03594970703125,
-0.0009965896606445312,
0.0059967041015625,
0.036834716796875,
0.0031528472900390625,
-0.0295257568359375,
-0.038604736328125,
-0.008392333984375,
-0.017822265625,
-0.0145416259765625,
0.043548583984375,
-0.05322265625,
0.0275115966796875,
0.00542449951171875,
-0.0248870849609375,
0.0157928466796875,
0.0277862548828125,
0.01132965087890625,
-0.01494598388671875,
0.0001671314239501953,
0.0195159912109375,
0.039886474609375,
-0.040283203125,
0.0273284912109375,
0.03759765625,
0.04876708984375,
-0.02630615234375,
-0.055694580078125,
0.0133209228515625,
-0.034271240234375,
-0.007568359375,
-0.009613037109375,
0.003223419189453125,
-0.0194244384765625,
-0.005634307861328125,
0.0222320556640625,
0.001148223876953125,
0.018157958984375,
0.0198516845703125,
0.005947113037109375,
-0.006008148193359375,
-0.030487060546875,
0.034942626953125,
-0.020660400390625,
-0.052276611328125,
-0.0460205078125,
-0.059661865234375,
-0.0098114013671875,
0.0345458984375,
-0.0290679931640625,
-0.04888916015625,
0.0135498046875,
-0.0106201171875,
0.0011138916015625,
0.0014476776123046875,
-0.058013916015625,
0.0018634796142578125,
0.031951904296875,
-0.044403076171875,
0.009124755859375,
0.0015211105346679688,
-0.055328369140625,
-0.0188751220703125,
-0.032379150390625,
-0.043243408203125,
-0.0261993408203125,
-0.062347412109375,
-0.03759765625,
-0.0318603515625,
0.030670166015625,
0.0197906494140625,
0.031982421875,
-0.0164947509765625,
-0.034942626953125,
0.0219268798828125,
0.026214599609375,
-0.0023517608642578125,
0.04644775390625,
-0.00493621826171875,
0.0308074951171875,
0.01800537109375,
-0.0204315185546875,
0.01971435546875,
0.040496826171875,
0.0181427001953125,
-0.0105743408203125,
-0.0035915374755859375,
-0.040252685546875,
-0.01386260986328125,
-0.002254486083984375,
0.031341552734375,
0.0189361572265625,
0.006168365478515625,
0.00989532470703125,
0.005641937255859375,
-0.007022857666015625,
0.006988525390625,
-0.0209197998046875,
0.02752685546875,
-0.0219879150390625,
0.0308380126953125,
-0.0271453857421875,
-0.06817626953125,
0.013458251953125,
0.0019855499267578125,
0.01525115966796875,
0.0275421142578125,
-0.05731201171875,
0.0253143310546875,
0.06719970703125,
-0.06671142578125,
0.046234130859375,
0.00952911376953125,
0.0263824462890625,
0.0296783447265625,
-0.0262908935546875,
0.0283203125,
-0.012115478515625,
-0.00754547119140625,
-0.0318603515625,
0.0250091552734375,
-0.0030956268310546875,
-0.02716064453125,
-0.016632080078125,
-0.0535888671875,
-0.007396697998046875,
-0.0038166046142578125,
0.08172607421875,
0.064208984375,
-0.0736083984375,
-0.0281524658203125,
-0.0025119781494140625,
-0.037628173828125,
-0.011383056640625,
0.006618499755859375,
0.01387786865234375,
0.02081298828125,
0.0257568359375,
-0.036468505859375,
-0.0218505859375,
0.0056915283203125,
-0.007152557373046875,
-0.0124969482421875,
-0.02923583984375,
0.046417236328125,
0.0250701904296875,
0.0244903564453125,
-0.0014047622680664062,
-0.0209197998046875,
0.0217742919921875,
-0.0245208740234375,
0.01458740234375,
-0.01219940185546875,
-0.0011444091796875,
-0.044708251953125,
0.00009715557098388672,
-0.0264129638671875,
0.0186767578125,
0.01058197021484375,
0.054443359375,
0.0204010009765625,
0.058929443359375,
-0.0240936279296875,
0.04290771484375,
0.033905029296875,
0.0256805419921875,
0.015899658203125,
-0.002544403076171875,
0.0015668869018554688,
0.037689208984375,
-0.01226043701171875,
0.0011196136474609375,
-0.026123046875,
0.00559234619140625,
-0.01641845703125,
-0.020782470703125,
0.0743408203125,
-0.02154541015625,
-0.01493072509765625,
0.057159423828125,
0.036529541015625,
-0.03118896484375,
-0.0165557861328125,
0.01323699951171875,
-0.0528564453125,
-0.021331787109375,
0.004001617431640625,
-0.039398193359375,
-0.025634765625,
-0.008880615234375,
-0.087890625,
0.129638671875,
0.01209259033203125,
0.05194091796875,
-0.019195556640625,
0.06622314453125,
-0.03216552734375,
0.0248260498046875,
-0.02398681640625,
0.0201263427734375,
0.007083892822265625,
0.0021839141845703125,
-0.02508544921875,
-0.01082611083984375,
0.0020885467529296875,
0.043975830078125,
0.0421142578125,
0.007904052734375,
-0.01351165771484375,
-0.0027923583984375,
0.04022216796875,
0.01250457763671875,
-0.028594970703125,
0.030914306640625,
0.005603790283203125,
0.027191162109375,
-0.034210205078125,
-0.044647216796875,
0.0169219970703125,
-0.0860595703125,
-0.0283355712890625,
0.015533447265625,
-0.0174407958984375,
-0.048126220703125,
0.039581298828125,
-0.0215606689453125,
-0.06951904296875,
0.022003173828125,
0.014007568359375,
-0.0030307769775390625,
0.006946563720703125,
0.01096343994140625,
0.045623779296875,
-0.037567138671875,
0.0288848876953125,
-0.039337158203125,
0.054107666015625,
0.01483154296875,
0.0333251953125,
0.0116729736328125,
0.01033782958984375,
0.05072021484375,
-0.033782958984375,
0.0103912353515625,
0.002979278564453125,
-0.013275146484375,
0.006282806396484375,
0.0445556640625,
0.03216552734375,
0.028045654296875,
0.01067352294921875,
0.0130615234375,
0.0186004638671875,
-0.0139617919921875,
0.006961822509765625,
-0.0006723403930664062,
-0.01568603515625,
0.0027923583984375,
-0.0194549560546875,
0.0255279541015625,
0.01409912109375,
-0.02008056640625,
0.0160369873046875,
-0.0151824951171875,
0.0034198760986328125,
-0.023590087890625,
0.01435089111328125,
0.0230560302734375,
0.03167724609375,
0.041717529296875,
-0.04266357421875,
0.0180511474609375,
0.024322509765625,
0.0369873046875,
-0.0203399658203125,
0.0751953125,
0.007091522216796875,
-0.0017290115356445312,
0.01099395751953125,
-0.00461578369140625,
0.0204925537109375,
-0.0222320556640625,
-0.0071563720703125,
-0.00392913818359375,
0.02117919921875,
0.0239105224609375,
0.0103607177734375,
-0.0173797607421875,
0.0250701904296875,
0.071533203125,
-0.003711700439453125,
-0.01763916015625,
0.056549072265625,
0.01074981689453125,
0.0166168212890625,
-0.01617431640625,
-0.01467132568359375,
-0.013427734375,
-0.02392578125,
-0.0207672119140625,
0.0256195068359375,
0.002330780029296875,
-0.0091705322265625,
0.057281494140625,
-0.00688934326171875,
-0.0194244384765625,
0.01142120361328125,
-0.049224853515625,
0.1097412109375,
0.005924224853515625,
-0.039276123046875,
0.0109405517578125,
-0.03814697265625,
-0.05670166015625,
0.025848388671875,
0.042144775390625,
-0.0303192138671875,
0.022491455078125,
0.0054473876953125,
0.0035381317138671875,
0.003360748291015625,
-0.00992584228515625,
0.0040130615234375,
0.032257080078125,
0.041656494140625,
0.01983642578125,
-0.0216217041015625,
-0.0301361083984375,
0.0006170272827148438,
0.046600341796875,
0.0203399658203125,
0.015899658203125,
-0.00875091552734375,
0.035491943359375,
-0.0021820068359375,
0.017303466796875,
-0.014129638671875,
-0.0217132568359375,
0.00032138824462890625,
0.040557861328125,
0.04132080078125,
-0.01373291015625,
-0.0272369384765625,
-0.0016088485717773438,
0.036102294921875,
-0.0289459228515625,
0.016754150390625,
-0.03033447265625,
0.02069091796875,
-0.035980224609375,
0.01287078857421875,
-0.037811279296875,
-0.07135009765625,
-0.06024169921875,
0.0213165283203125,
0.004650115966796875,
0.004695892333984375,
-0.05718994140625,
0.058135986328125,
-0.0264892578125,
0.0243682861328125,
0.0169219970703125,
-0.0236663818359375,
-0.011688232421875,
0.01331329345703125,
-0.0298004150390625,
-0.01345062255859375,
0.0120391845703125,
-0.0199127197265625,
0.0298919677734375,
-0.0111541748046875,
0.06524658203125,
-0.005878448486328125,
0.012054443359375,
-0.0006895065307617188,
-0.045654296875,
0.0193328857421875,
-0.025848388671875,
0.0088653564453125,
-0.054290771484375,
0.029083251953125,
0.060394287109375,
0.01381683349609375,
-0.0113677978515625,
0.0024318695068359375,
-0.0269927978515625,
-0.005733489990234375,
-0.01065826416015625,
-0.026763916015625,
-0.01421356201171875,
0.00650787353515625,
0.0171356201171875,
-0.00698089599609375,
-0.023345947265625,
-0.0106201171875,
0.007129669189453125,
0.0379638671875,
-0.0191497802734375,
-0.05615234375,
0.0296783447265625,
0.04443359375,
-0.004055023193359375,
-0.01352691650390625,
-0.0290679931640625,
-0.0259246826171875,
-0.00632476806640625,
-0.004489898681640625,
0.028106689453125,
0.01611328125,
-0.033233642578125,
0.0150146484375,
-0.018951416015625,
0.059967041015625,
-0.022735595703125,
-0.005603790283203125,
0.036895751953125,
-0.01210784912109375,
-0.0758056640625,
-0.1085205078125,
0.0189666748046875,
-0.1285400390625,
0.017669677734375,
-0.021392822265625,
-0.0142822265625,
-0.0187530517578125,
-0.0577392578125,
-0.10211181640625,
0.0596923828125,
-0.022979736328125,
-0.03778076171875,
-0.0372314453125,
-0.019378662109375,
-0.01049041748046875,
0.045318603515625,
-0.0035419464111328125,
-0.0259857177734375,
-0.032012939453125,
0.035888671875,
0.01148223876953125,
0.06549072265625,
-0.004688262939453125,
0.018646240234375,
0.00555419921875,
0.022064208984375,
0.01165771484375,
-0.002655029296875,
0.00405120849609375,
-0.0084075927734375,
-0.0028324127197265625,
0.0290374755859375,
-0.04052734375,
-0.0611572265625,
-0.0293731689453125,
0.01244354248046875,
-0.017578125,
-0.044525146484375,
0.0059356689453125,
-0.0120391845703125,
0.039886474609375,
0.00347137451171875,
-0.001251220703125,
-0.0191497802734375,
0.06378173828125,
0.01373291015625,
-0.0287628173828125,
0.006977081298828125,
0.0057373046875,
-0.017120361328125,
-0.0235595703125,
0.02606201171875,
-0.0084686279296875,
-0.020751953125,
0.006900787353515625,
-0.0259857177734375,
-0.0111846923828125,
-0.01015472412109375,
-0.0191497802734375,
-0.0181427001953125,
-0.059326171875,
0.10943603515625,
-0.035552978515625,
0.0047760009765625,
-0.01751708984375,
0.061126708984375,
0.045684814453125,
-0.040740966796875,
-0.0034618377685546875,
0.0007839202880859375,
-0.005970001220703125,
0.01165008544921875,
0.01444244384765625,
0.027374267578125,
0.02947998046875,
-0.0246429443359375,
-0.007671356201171875,
0.01355743408203125,
0.0234375,
0.0265350341796875,
-0.0589599609375,
0.037567138671875,
0.01317596435546875,
-0.0121002197265625,
0.005641937255859375,
-0.00733184814453125,
-0.01953125,
0.032196044921875,
-0.0299072265625,
-0.0218353271484375,
-0.01409149169921875,
-0.046234130859375,
0.034271240234375,
-0.043426513671875,
0.0157928466796875,
0.0286102294921875,
-0.023345947265625,
-0.056243896484375,
-0.049957275390625,
-0.000980377197265625
]
|
5bccdc4252a3db5136242f1c63c514b64da362e0 | Wordpress Stackexchange
Q: Blank/White Screen on Frontend but Accessible backend? I have this issue, where I can't access the frontend without a blank page anymore. It drives me crazy.
The backend seems to be up just fine, but the frontend is white. When trying to chose another theme (twentyten) this one also returns white, already in the preview.
I've turned on debug in wp-config after following another thread and it has come up with the following errors:
Warning:
include_once(/home/dali/public_html/wilds/wp-content/plugins/wp-super-cache/wp-cache-phase1.php):
failed to open stream: Permission denied in
/home/wildsofo/public_html/wp-content/advanced-cache.php on line 14
Warning: include_once(): Failed opening
'/home/dali/public_html/wilds/wp-content/plugins/wp-super-cache/wp-cache-phase1.php'
for inclusion (include_path='.:/opt/php54/lib/php') in
/home/wildsofo/public_html/wp-content/advanced-cache.php on line 14
What can I possibly do?
Website: wildsofoldham.co.uk
A: In my case, nothing about debugging and disabling themes/plugins was useful... After some research, I've realized that my index.php was empty!
The only content was a message saying Silence is golden.
Using a backup I had, I could get back my original index.php and get the site working again.
| Q: Blank/White Screen on Frontend but Accessible backend? I have this issue, where I can't access the frontend without a blank page anymore. It drives me crazy.
The backend seems to be up just fine, but the frontend is white. When trying to chose another theme (twentyten) this one also returns white, already in the preview.
I've turned on debug in wp-config after following another thread and it has come up with the following errors:
Warning:
include_once(/home/dali/public_html/wilds/wp-content/plugins/wp-super-cache/wp-cache-phase1.php):
failed to open stream: Permission denied in
/home/wildsofo/public_html/wp-content/advanced-cache.php on line 14
Warning: include_once(): Failed opening
'/home/dali/public_html/wilds/wp-content/plugins/wp-super-cache/wp-cache-phase1.php'
for inclusion (include_path='.:/opt/php54/lib/php') in
/home/wildsofo/public_html/wp-content/advanced-cache.php on line 14
What can I possibly do?
Website: wildsofoldham.co.uk
A: In my case, nothing about debugging and disabling themes/plugins was useful... After some research, I've realized that my index.php was empty!
The only content was a message saying Silence is golden.
Using a backup I had, I could get back my original index.php and get the site working again.
A: I wouldn't delete the htaccess. Just rename it for testing. (don't do this first though)
To find out what your error is though do this:
Turn on debugging in your wp-config.php file. Do this by changing this line:
define('WP_DEBUG', false);
to this:
define('WP_DEBUG', true);
Hit save.
Load the front page and you should now see the actual error. Use this to fix the problem.
If you can't resolve it this way, disable plugins by renaming the plugins folder to something else. Does your site load now? If it does, change the plugins back to "plugins" and deactivate all your plugins in the dashboard. Re-enable them 1 by 1 until you find the trouble-causing one.
Feel free to change the wp-config back once you're done testing.
A: I would try the following:
*
*Try to disable the wp-super-cache plugin or delete it completely
through ftp.
*Delete the .htaccess located within root
*Check the wp-config.php for any line which is not a WordPress default and comment out.
*Go to admin > Settings > Permalinks > save once**
At this moment the front end should be visible.
If still not working, check with the server errors log which should reveal the exact problem.
A: If all else fails, check that your server is actually loading index.php as the priority.In my case, I was moving a WordPress site to a new server, I hadn't noticed that there was a default.html file in the root directory that, under the new server, prioritized loading default.html over index.php. There were no error logs, even loading index.php didn't work since WordPress automatically redirects index.php to mysite.com/, which would load the empty default.html file.
To ensure index.php is loading before others, add this line to your .htaccess file in the same directory as your Wordpress installation's index.php.
DirectoryIndex index.php index.html
| wordpress | {
"language": "en",
"length": 460,
"provenance": "stackexchange_00019.jsonl.gz:464399",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/222433"
} | [
0.030120849609375,
0.0217132568359375,
-0.0146484375,
-0.046173095703125,
0.01007843017578125,
-0.015167236328125,
-0.00937652587890625,
-0.0156097412109375,
0.055084228515625,
-0.0299530029296875,
-0.051544189453125,
-0.044464111328125,
-0.0166473388671875,
-0.039306640625,
-0.007450103759765625,
-0.0479736328125,
0.047210693359375,
-0.0163421630859375,
0.044281005859375,
0.01200103759765625,
-0.0032711029052734375,
0.041961669921875,
0.01800537109375,
-0.004299163818359375,
0.0048675537109375,
-0.0372314453125,
0.017822265625,
-0.0239715576171875,
-0.0033321380615234375,
-0.02154541015625,
0.01435089111328125,
0.0205535888671875,
0.02239990234375,
0.044677734375,
-0.06524658203125,
-0.007617950439453125,
-0.0236663818359375,
0.01922607421875,
-0.02569580078125,
0.023223876953125,
0.046295166015625,
-0.0130462646484375,
0.022674560546875,
0.026336669921875,
0.01007080078125,
-0.0804443359375,
0.07403564453125,
-0.045196533203125,
0.0281524658203125,
-0.008453369140625,
-0.004039764404296875,
-0.01354217529296875,
-0.0117034912109375,
-0.02935791015625,
-0.00197601318359375,
0.00640106201171875,
-0.0008697509765625,
-0.01352691650390625,
0.038970947265625,
-0.0016698837280273438,
-0.0221710205078125,
-0.040435791015625,
0.0246429443359375,
-0.0162811279296875,
0.007007598876953125,
-0.0164947509765625,
0.005462646484375,
0.0275726318359375,
-0.030364990234375,
0.00804901123046875,
0.0225830078125,
-0.0186767578125,
0.00467681884765625,
-0.039215087890625,
0.0299224853515625,
0.015228271484375,
-0.0100860595703125,
0.0182647705078125,
0.003551483154296875,
0.0159454345703125,
-0.01776123046875,
-0.058563232421875,
-0.044647216796875,
-0.02960205078125,
-0.004230499267578125,
-0.01134490966796875,
-0.00501251220703125,
0.0189666748046875,
-0.024932861328125,
0.00899505615234375,
-0.0238494873046875,
-0.021514892578125,
-0.0007047653198242188,
-0.004100799560546875,
0.00295257568359375,
-0.0283203125,
0.045745849609375,
0.0413818359375,
0.00296783447265625,
-0.00792694091796875,
0.019744873046875,
-0.06005859375,
0.0294036865234375,
-0.0273590087890625,
-0.0230712890625,
0.01434326171875,
0.0196380615234375,
0.050262451171875,
0.02099609375,
0.0278778076171875,
-0.0012369155883789062,
0.01526641845703125,
-0.044647216796875,
-0.043182373046875,
-0.005413055419921875,
0.04541015625,
-0.02349853515625,
-0.019927978515625,
0.00662994384765625,
-0.0266876220703125,
-0.00598907470703125,
0.034942626953125,
-0.00853729248046875,
-0.0309600830078125,
-0.0008478164672851562,
-0.0229034423828125,
-0.01000213623046875,
-0.0005936622619628906,
0.07525634765625,
0.02142333984375,
-0.04583740234375,
0.019317626953125,
0.0511474609375,
-0.036895751953125,
-0.0312042236328125,
-0.0209197998046875,
0.002994537353515625,
0.0258636474609375,
-0.0014810562133789062,
0.007965087890625,
0.0006718635559082031,
-0.0628662109375,
-0.0037708282470703125,
-0.0027027130126953125,
-0.00695037841796875,
-0.01241302490234375,
0.0146942138671875,
0.033233642578125,
0.004161834716796875,
-0.042022705078125,
0.0389404296875,
-0.011383056640625,
0.01172637939453125,
0.022796630859375,
0.010162353515625,
-0.00007683038711547852,
0.0256500244140625,
-0.0242462158203125,
-0.0175018310546875,
-0.022674560546875,
0.03155517578125,
0.0089111328125,
0.0081024169921875,
-0.0447998046875,
-0.0166473388671875,
-0.04949951171875,
-0.0231475830078125,
0.00930023193359375,
0.0169525146484375,
0.00870513916015625,
0.006591796875,
0.0219879150390625,
0.0087127685546875,
0.0306396484375,
0.022491455078125,
0.0179595947265625,
-0.00382232666015625,
-0.01172637939453125,
0.027618408203125,
0.03363037109375,
0.00846099853515625,
-0.00879669189453125,
0.051239013671875,
-0.0003769397735595703,
-0.050079345703125,
0.0279541015625,
0.0205535888671875,
0.074951171875,
0.0133209228515625,
0.0276947021484375,
-0.014251708984375,
-0.0038909912109375,
0.0075225830078125,
0.04571533203125,
0.0038299560546875,
-0.058258056640625,
-0.049713134765625,
-0.017852783203125,
-0.032257080078125,
-0.0014009475708007812,
0.017181396484375,
0.033233642578125,
0.007236480712890625,
-0.00608062744140625,
-0.0684814453125,
0.01371002197265625,
-0.0203704833984375,
0.044281005859375,
-0.00650787353515625,
0.0164794921875,
0.00926971435546875,
-0.0177459716796875,
-0.00815582275390625,
-0.027435302734375,
-0.01403045654296875,
-0.004547119140625,
-0.0206146240234375,
0.050506591796875,
0.00980377197265625,
0.01788330078125,
0.0338134765625,
-0.040679931640625,
0.046173095703125,
0.0005459785461425781,
0.037200927734375,
-0.0100860595703125,
-0.0108489990234375,
-0.01311492919921875,
0.06890869140625,
-0.00908660888671875,
0.045501708984375,
0.0266571044921875,
0.0212860107421875,
-0.01142120361328125,
-0.0222320556640625,
0.0210113525390625,
0.0286102294921875,
-0.057525634765625,
-0.019073486328125,
0.040252685546875,
0.054473876953125,
-0.006011962890625,
-0.0177001953125,
-0.0078887939453125,
0.0789794921875,
-0.056427001953125,
-0.017913818359375,
0.0018815994262695312,
0.01102447509765625,
0.004886627197265625,
-0.0222930908203125,
-0.02130126953125,
0.0472412109375,
-0.03985595703125,
-0.0021991729736328125,
0.03363037109375,
-0.005023956298828125,
0.00691986083984375,
-0.041900634765625,
0.00022804737091064453,
0.019439697265625,
0.011383056640625,
-0.036224365234375,
0.00806427001953125,
-0.030975341796875,
0.020782470703125,
-0.02105712890625,
-0.00396728515625,
-0.036407470703125,
0.0277099609375,
0.051788330078125,
-0.0010271072387695312,
-0.0010051727294921875,
0.044158935546875,
0.05242919921875,
0.00534820556640625,
-0.037811279296875,
-0.0208740234375,
0.035736083984375,
0.0247802734375,
-0.03033447265625,
-0.0033016204833984375,
-0.079345703125,
-0.00833892822265625,
-0.01055145263671875,
-0.07891845703125,
-0.0140380859375,
0.029083251953125,
0.005222320556640625,
0.002567291259765625,
0.0021820068359375,
0.0438232421875,
-0.0361328125,
0.045501708984375,
-0.002838134765625,
-0.002658843994140625,
0.017822265625,
-0.01788330078125,
0.027618408203125,
-0.0130767822265625,
0.0169677734375,
0.062255859375,
0.0157012939453125,
-0.03485107421875,
0.003604888916015625,
0.001068115234375,
-0.00954437255859375,
0.0098724365234375,
-0.0125732421875,
0.00969696044921875,
-0.07965087890625,
-0.018035888671875,
0.029327392578125,
0.037628173828125,
-0.019378662109375,
-0.0229644775390625,
-0.03118896484375,
0.034637451171875,
-0.05126953125,
-0.05877685546875,
-0.040802001953125,
-0.01230621337890625,
-0.0268096923828125,
-0.0306243896484375,
-0.010650634765625,
0.01800537109375,
-0.05084228515625,
0.00982666015625,
0.0027027130126953125,
-0.050262451171875,
-0.0438232421875,
-0.0736083984375,
-0.06158447265625,
-0.03955078125,
0.005733489990234375,
-0.01319122314453125,
0.0018310546875,
0.0171966552734375,
-0.006778717041015625,
-0.0362548828125,
-0.0215301513671875,
0.021575927734375,
-0.00859832763671875,
-0.060272216796875,
0.01158905029296875,
-0.0290679931640625,
-0.0109405517578125,
0.005157470703125,
-0.02508544921875,
-0.012969970703125,
0.022247314453125,
-0.029022216796875,
-0.007965087890625,
-0.06390380859375,
-0.05413818359375,
0.03985595703125,
0.048583984375,
-0.0501708984375,
-0.006420135498046875,
-0.05279541015625,
-0.03680419921875,
-0.016937255859375,
-0.063720703125,
-0.02996826171875,
0.0310211181640625,
-0.004730224609375,
0.0012578964233398438,
-0.04327392578125,
0.004150390625,
0.0018453598022460938,
-0.01203155517578125,
-0.01442718505859375,
-0.0027179718017578125,
-0.01206207275390625,
0.012115478515625,
0.006229400634765625,
0.0300140380859375,
-0.01474761962890625,
-0.00222015380859375,
0.0172576904296875,
0.016510009765625,
0.024627685546875,
-0.0171356201171875,
0.00797271728515625,
-0.0014028549194335938,
0.0028553009033203125,
-0.06317138671875,
0.03228759765625,
-0.04248046875,
0.00949859619140625,
-0.033050537109375,
0.0291900634765625,
-0.07867431640625,
0.0025634765625,
0.0028438568115234375,
0.025146484375,
-0.031585693359375,
-0.04534912109375,
-0.041107177734375,
-0.00998687744140625,
-0.0584716796875,
0.005069732666015625,
-0.0101470947265625,
-0.0267333984375,
0.020843505859375,
-0.056671142578125,
-0.01500701904296875,
-0.04058837890625,
0.04541015625,
-0.0265655517578125,
-0.023284912109375,
0.0029163360595703125,
-0.01035308837890625,
-0.055084228515625,
-0.0283203125,
0.0119781494140625,
-0.07293701171875,
-0.0275421142578125,
0.035797119140625,
0.042449951171875,
-0.01629638671875,
-0.010101318359375,
0.0014858245849609375,
0.047119140625,
0.007297515869140625,
0.02496337890625,
0.007129669189453125,
0.005275726318359375,
-0.00829315185546875,
-0.0288543701171875,
0.02325439453125,
-0.031707763671875,
-0.03802490234375,
-0.0240478515625,
-0.007564544677734375,
0.0121307373046875,
-0.0132598876953125,
-0.0264129638671875,
0.02117919921875,
-0.00865936279296875,
-0.0007157325744628906,
-0.006500244140625,
-0.0238189697265625,
-0.0289459228515625,
0.01094818115234375,
-0.036773681640625,
0.00885772705078125,
0.0230560302734375,
0.0279083251953125,
-0.040374755859375,
-0.054931640625,
0.015899658203125,
0.03631591796875,
0.0266265869140625,
-0.00974273681640625,
0.00301361083984375,
-0.019805908203125,
0.04266357421875,
0.040863037109375,
-0.0037841796875,
-0.004047393798828125,
-0.03515625,
0.03912353515625,
0.0198822021484375,
0.00408172607421875,
-0.0190582275390625,
0.0374755859375,
-0.018646240234375,
-0.045013427734375,
0.033599853515625,
-0.01332855224609375,
0.0048370361328125,
0.0306549072265625,
0.0088653564453125,
0.0245819091796875,
0.01666259765625,
-0.0238037109375,
0.007137298583984375,
-0.0391845703125,
0.00943756103515625,
-0.056121826171875,
0.00690460205078125,
-0.03302001953125,
0.0567626953125,
0.03033447265625,
-0.00876617431640625,
0.036224365234375,
0.033905029296875,
-0.016815185546875,
0.01212310791015625,
0.03857421875,
0.004764556884765625,
0.044189453125,
-0.0206451416015625,
-0.0173492431640625,
-0.040557861328125,
-0.0095672607421875,
0.0672607421875,
0.00665283203125,
-0.06390380859375,
-0.00925445556640625,
0.00920867919921875,
0.01206207275390625,
0.007617950439453125,
0.056884765625,
0.03369140625,
-0.026031494140625,
0.005001068115234375,
0.00897979736328125,
0.041015625,
-0.0204010009765625,
-0.02197265625,
0.0265655517578125,
-0.0009016990661621094,
-0.02325439453125,
-0.011688232421875,
0.04608154296875,
-0.03265380859375,
0.01224517822265625,
0.007213592529296875,
-0.0533447265625,
-0.0458984375,
0.0421142578125,
0.01519012451171875,
-0.04071044921875,
0.032379150390625,
0.003387451171875,
0.08380126953125,
-0.020965576171875,
-0.035308837890625,
0.0018014907836914062,
0.030487060546875,
-0.0246429443359375,
-0.005039215087890625,
0.0230560302734375,
-0.0055999755859375,
-0.004650115966796875,
0.054290771484375,
-0.01207733154296875,
-0.053741455078125,
-0.0205535888671875,
-0.0070953369140625,
0.03271484375,
-0.034088134765625,
-0.00737762451171875,
0.03729248046875,
-0.01200103759765625,
-0.001438140869140625,
0.047027587890625,
-0.07708740234375,
0.00006461143493652344,
0.0277557373046875,
-0.00469970703125,
-0.0177459716796875,
0.00695037841796875,
-0.06915283203125,
0.0036144256591796875,
-0.033843994140625,
-0.019378662109375,
0.035675048828125,
-0.024444580078125,
0.0034046173095703125,
-0.0006079673767089844,
-0.01715087890625,
0.032928466796875,
0.0053558349609375,
0.0504150390625,
0.0092926025390625,
-0.03570556640625,
-0.01239013671875,
-0.024566650390625,
-0.032867431640625,
0.0157470703125,
-0.001125335693359375,
-0.05450439453125,
-0.00656890869140625,
0.0018100738525390625,
0.015960693359375,
-0.0296478271484375,
-0.0362548828125,
-0.06866455078125,
0.048828125,
0.05706787109375,
0.08831787109375,
-0.039215087890625,
0.03509521484375,
-0.006038665771484375,
0.029205322265625,
-0.01641845703125,
0.002899169921875,
0.0145111083984375,
-0.0116424560546875,
-0.01366424560546875,
-0.0038299560546875,
-0.004505157470703125,
-0.005401611328125,
0.0166778564453125,
0.045257568359375,
0.06268310546875,
0.00789642333984375,
-0.01180267333984375,
0.00629425048828125,
-0.002109527587890625,
-0.026123046875,
0.0767822265625,
0.0188140869140625,
0.0350341796875,
0.00769805908203125,
-0.0236053466796875,
-0.00299072265625,
-0.00455474853515625,
-0.047210693359375,
0.018951416015625,
0.00875091552734375,
0.006122589111328125,
0.02838134765625,
-0.01398468017578125,
0.0178985595703125,
0.1217041015625,
-0.0014896392822265625,
0.0655517578125,
0.04791259765625,
0.01093292236328125,
0.0888671875,
0.056976318359375,
-0.0266571044921875,
0.0032939910888671875,
0.06939697265625,
0.01824951171875,
-0.04547119140625,
0.025238037109375,
-0.04278564453125,
0.0087738037109375,
0.04974365234375,
0.0477294921875,
-0.0291900634765625,
-0.01446533203125,
0.0238800048828125,
-0.0419921875,
-0.01328277587890625,
-0.0517578125,
0.0302886962890625,
-0.035247802734375,
0.043426513671875,
0.036285400390625,
-0.0270843505859375,
-0.0252685546875,
-0.037750244140625,
0.007259368896484375,
-0.002880096435546875,
0.0253448486328125,
0.0024471282958984375,
-0.051971435546875,
-0.01064300537109375,
0.03765869140625,
-0.01149749755859375,
0.0111541748046875,
0.0212249755859375,
-0.059814453125,
-0.0467529296875,
-0.04840087890625,
-0.061309814453125,
0.0186614990234375,
-0.03643798828125,
0.01446533203125,
0.04168701171875,
-0.0284423828125,
0.0389404296875,
-0.028045654296875,
0.025146484375,
0.0017080307006835938,
0.013671875,
0.0570068359375,
-0.00893402099609375,
0.043212890625,
-0.007335662841796875,
-0.0467529296875,
0.00836181640625,
-0.0166473388671875,
-0.0282745361328125,
-0.02777099609375,
-0.03021240234375,
0.07745361328125,
-0.00301361083984375,
-0.01263427734375,
0.034423828125,
0.0210723876953125,
-0.0233306884765625,
0.019073486328125,
0.040283203125,
-0.006893157958984375,
0.025543212890625,
0.041900634765625,
0.0335693359375,
-0.0206756591796875,
0.05889892578125,
-0.043243408203125,
0.080810546875,
-0.06695556640625,
0.02392578125,
0.0654296875,
0.015411376953125,
-0.044189453125,
-0.0164794921875,
-0.0163116455078125,
0.07598876953125,
-0.003238677978515625,
0.03363037109375,
-0.063232421875,
-0.0140533447265625,
0.0262298583984375,
0.044403076171875,
-0.01271820068359375,
0.0003933906555175781,
0.048309326171875,
0.0027370452880859375,
0.00164031982421875,
-0.034210205078125,
-0.0504150390625,
0.013885498046875,
-0.043670654296875,
0.0125579833984375,
-0.036376953125,
-0.0745849609375,
0.01468658447265625,
-0.06707763671875,
-0.0479736328125,
-0.01244354248046875,
-0.0033721923828125,
-0.052581787109375,
0.05694580078125,
0.044403076171875,
-0.046966552734375,
0.034912109375,
0.0212249755859375,
-0.00469970703125,
-0.0159149169921875,
0.00012981891632080078,
0.026031494140625,
-0.0643310546875,
-0.001842498779296875,
-0.0316162109375,
0.033843994140625,
0.0318603515625,
-0.01519012451171875,
-0.00994110107421875,
0.0156097412109375,
-0.0233612060546875,
-0.068115234375,
-0.0218048095703125,
0.007015228271484375,
-0.03363037109375,
0.0014057159423828125,
0.039093017578125,
0.041351318359375,
0.004871368408203125,
-0.005916595458984375,
0.021270751953125,
0.0119171142578125,
-0.00580596923828125,
-0.0877685546875,
0.0023040771484375,
-0.01329803466796875,
0.01132965087890625,
0.057098388671875,
0.0160369873046875,
0.018218994140625,
0.058258056640625,
-0.042205810546875,
0.0181427001953125,
0.01515960693359375,
0.0103607177734375,
-0.0182342529296875,
0.01454925537109375,
-0.0145263671875,
0.0238037109375,
-0.032745361328125,
0.005786895751953125,
0.0205078125,
0.01485443115234375,
-0.007068634033203125,
0.027587890625,
0.02923583984375,
0.0035152435302734375,
-0.033721923828125,
0.056427001953125,
-0.00145721435546875,
0.04339599609375,
-0.0882568359375,
-0.067626953125,
-0.001743316650390625,
0.053680419921875,
-0.051177978515625,
0.042144775390625,
0.02471923828125,
0.0178985595703125,
-0.04583740234375,
-0.029083251953125,
0.003917694091796875,
-0.04620361328125,
-0.01432037353515625,
-0.0168914794921875,
-0.01136016845703125,
0.005573272705078125,
-0.0033969879150390625,
-0.0070037841796875,
0.025665283203125,
0.0084686279296875,
-0.0063629150390625,
0.0015716552734375,
0.003993988037109375,
-0.034515380859375,
0.035675048828125,
-0.011383056640625,
0.03350830078125,
0.007198333740234375,
-0.0302276611328125,
-0.00519561767578125,
-0.0301971435546875,
0.0276031494140625,
-0.019134521484375,
0.006633758544921875,
-0.0035552978515625,
0.050048828125,
-0.003116607666015625,
-0.006023406982421875,
0.00489044189453125,
-0.007022857666015625,
0.0181884765625,
0.057891845703125,
0.0262603759765625,
0.02557373046875,
-0.059051513671875,
-0.0484619140625,
-0.02374267578125,
0.0543212890625,
-0.0017261505126953125,
0.09124755859375,
-0.0296478271484375,
0.0271453857421875,
0.023681640625,
-0.0038280487060546875,
-0.0014524459838867188,
-0.0099639892578125,
0.00262451171875,
-0.0335693359375,
0.011810302734375,
0.0056610107421875,
-0.07977294921875,
0.01428985595703125,
0.0181884765625,
-0.0085601806640625,
0.028717041015625,
-0.0255126953125,
0.00801849365234375,
-0.0183258056640625,
-0.01568603515625,
-0.047760009765625,
-0.0213165283203125,
-0.022369384765625,
0.023956298828125,
-0.01788330078125,
-0.057037353515625,
-0.05902099609375,
0.01158905029296875,
0.00501251220703125,
-0.0310821533203125,
0.01396942138671875,
-0.035430908203125,
0.0233154296875,
0.0311431884765625,
-0.0017480850219726562,
0.0078887939453125,
-0.041717529296875,
-0.021636962890625,
0.00757598876953125,
0.0020046234130859375,
-0.007022857666015625,
-0.010955810546875,
0.032562255859375,
0.0408935546875,
-0.00494384765625,
0.0088043212890625,
-0.039581298828125,
-0.0119476318359375,
0.068359375,
0.01202392578125,
-0.0133514404296875,
0.00809478759765625,
0.0016546249389648438,
-0.0149688720703125,
-0.0207061767578125,
0.0171661376953125,
0.0010547637939453125,
-0.000013768672943115234,
-0.014251708984375,
-0.0083770751953125,
0.048065185546875,
0.01503753662109375,
-0.054962158203125,
0.036956787109375,
-0.035064697265625,
0.00882720947265625,
0.0195770263671875,
0.0287017822265625,
-0.00695037841796875,
0.00464630126953125,
-0.03485107421875,
-0.025482177734375,
-0.0017032623291015625,
0.03533935546875,
0.01186370849609375,
0.00576019287109375,
0.0404052734375,
0.0017976760864257812,
0.01168060302734375,
-0.0193939208984375,
-0.0211639404296875,
0.0235137939453125,
-0.036102294921875,
-0.00823974609375,
-0.0011224746704101562,
0.00791168212890625,
0.002574920654296875,
-0.0204620361328125,
-0.005550384521484375,
-0.0148162841796875,
0.0038738250732421875,
-0.0224456787109375,
-0.021514892578125,
-0.01299285888671875,
-0.053955078125,
-0.06378173828125,
-0.02020263671875,
0.0208282470703125,
-0.041534423828125,
-0.0474853515625,
-0.0247039794921875,
-0.0074615478515625,
0.0161285400390625,
-0.010498046875,
-0.05352783203125,
-0.05120849609375,
0.042327880859375,
0.0118255615234375,
0.0191650390625,
0.004909515380859375,
0.029449462890625,
-0.0233612060546875,
0.0266571044921875,
0.008941650390625,
-0.023681640625,
-0.0102996826171875,
0.004058837890625,
0.010986328125,
0.0357666015625,
-0.020904541015625,
-0.0305328369140625,
0.01617431640625,
-0.0292205810546875,
0.01395416259765625,
-0.00777435302734375,
-0.0159912109375,
-0.0099639892578125,
0.040771484375,
0.0203399658203125,
0.01122283935546875,
-0.01544952392578125,
-0.05712890625,
-0.07440185546875,
-0.0243377685546875,
-0.0241851806640625,
0.015777587890625,
-0.0946044921875,
0.00919342041015625,
0.01751708984375,
-0.01300048828125,
0.025604248046875,
0.0271148681640625,
-0.0144805908203125,
-0.0117645263671875,
0.00032210350036621094,
-0.031280517578125,
0.0016355514526367188,
-0.0273590087890625,
0.05059814453125,
-0.039154052734375,
-0.006183624267578125,
0.0004551410675048828,
0.0217132568359375,
0.0214080810546875,
0.0006604194641113281,
0.002048492431640625,
-0.0197906494140625,
-0.037109375,
0.01151275634765625,
0.00170135498046875,
0.038116455078125,
-0.028289794921875,
-0.0313720703125,
0.01165771484375,
-0.00930023193359375,
-0.001682281494140625,
0.0113983154296875,
-0.005031585693359375,
-0.040435791015625,
-0.04656982421875,
0.046722412109375,
-0.029327392578125,
0.0031719207763671875,
-0.0206756591796875,
0.01451873779296875,
-0.0290985107421875,
0.005237579345703125,
0.030487060546875,
-0.03326416015625,
0.01210784912109375,
0.036163330078125,
0.0037841796875,
-0.0301971435546875,
0.0241546630859375,
-0.033355712890625,
0.0116729736328125,
0.0135955810546875
]
|
9e9ccd7eb76aa4a0586474a1f0986220c5e38840 | Wordpress Stackexchange
Q: contactform7 remove tags with "wpcf7_autop false" from functions.php i want to remove those <p> and <br/> tags from my contactform7 forms. now they have this wpcf7_autop which can be set to false when inserting:
define('WPCF7_AUTOP', false);
to wp-config.php
The problem is:
I need this setting to be attached with my theme, so is it possible to some how do it through the functions.php file?
A: If you have already upgraded CF7 to version 5.0 or higher, then you can use the new hook:
add_filter( 'wpcf7_autop_or_not', '__return_false' );
| Q: contactform7 remove tags with "wpcf7_autop false" from functions.php i want to remove those <p> and <br/> tags from my contactform7 forms. now they have this wpcf7_autop which can be set to false when inserting:
define('WPCF7_AUTOP', false);
to wp-config.php
The problem is:
I need this setting to be attached with my theme, so is it possible to some how do it through the functions.php file?
A: If you have already upgraded CF7 to version 5.0 or higher, then you can use the new hook:
add_filter( 'wpcf7_autop_or_not', '__return_false' );
A: Use the following code to get ride of autop (automatic <p> tag) and line breaking tag (<br> tag).
<?php
// Remove auto p from Contact Form 7 shortcode output
add_filter('wpcf7_autop_or_not', 'wpcf7_autop_return_false');
function wpcf7_autop_return_false() {
return false;
}
Add this code to your theme's function.php file.
A: *
*You can try minify html from the contact form 7
*To completely disable the wpautop filter, you can use:
remove_filter('the_content', 'wpautop');
| wordpress | {
"language": "en",
"length": 157,
"provenance": "stackexchange_00019.jsonl.gz:464437",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/222580"
} | [
0.0136871337890625,
0.0217437744140625,
-0.06573486328125,
-0.0182952880859375,
0.019134521484375,
-0.040679931640625,
0.0170745849609375,
0.0035572052001953125,
0.029327392578125,
-0.00925445556640625,
-0.0178070068359375,
-0.0240325927734375,
0.00323486328125,
-0.0322265625,
0.011749267578125,
-0.01433563232421875,
-0.0252838134765625,
-0.005039215087890625,
-0.0364990234375,
-0.0270233154296875,
0.0194854736328125,
-0.034454345703125,
-0.032196044921875,
-0.0171051025390625,
-0.015869140625,
0.0110931396484375,
0.04669189453125,
-0.011444091796875,
-0.016021728515625,
-0.0286712646484375,
-0.0083160400390625,
0.040863037109375,
0.041717529296875,
0.062347412109375,
-0.14306640625,
-0.062255859375,
-0.053070068359375,
0.0211639404296875,
-0.0635986328125,
0.04669189453125,
0.0158233642578125,
-0.0110015869140625,
-0.04302978515625,
0.01348876953125,
-0.058563232421875,
-0.01081085205078125,
-0.017364501953125,
-0.0219573974609375,
0.00443267822265625,
0.00864410400390625,
0.0147705078125,
0.044677734375,
0.031707763671875,
-0.009002685546875,
-0.0015773773193359375,
-0.0032501220703125,
-0.045989990234375,
0.0081787109375,
0.0234222412109375,
0.09423828125,
0.030670166015625,
0.017120361328125,
-0.0386962890625,
-0.0672607421875,
-0.016632080078125,
0.0001266002655029297,
0.005645751953125,
0.01324462890625,
-0.047943115234375,
-0.033935546875,
0.030670166015625,
-0.03155517578125,
0.0247344970703125,
0.0227203369140625,
0.0032196044921875,
-0.0237579345703125,
-0.00010955333709716797,
0.0206298828125,
0.0269775390625,
0.0038661956787109375,
-0.00933074951171875,
-0.05047607421875,
-0.0245361328125,
0.019805908203125,
0.0015058517456054688,
0.06365966796875,
-0.003673553466796875,
-0.0123443603515625,
-0.037689208984375,
-0.031524658203125,
-0.034149169921875,
-0.03033447265625,
-0.03363037109375,
-0.01031494140625,
-0.0160675048828125,
-0.0309295654296875,
-0.0021038055419921875,
-0.0125274658203125,
-0.00939178466796875,
0.0026073455810546875,
0.0101318359375,
-0.04132080078125,
0.0176239013671875,
-0.0254058837890625,
0.0214080810546875,
0.06878662109375,
-0.057373046875,
0.013214111328125,
0.060272216796875,
0.033111572265625,
0.04046630859375,
-0.0592041015625,
-0.004302978515625,
0.03070068359375,
-0.033843994140625,
-0.00968170166015625,
-0.029541015625,
0.0059051513671875,
-0.03021240234375,
0.038299560546875,
-0.01611328125,
0.024383544921875,
-0.03778076171875,
-0.0197296142578125,
0.01194000244140625,
0.003421783447265625,
0.0194549560546875,
-0.0152740478515625,
-0.0352783203125,
-0.0021953582763671875,
-0.0150299072265625,
-0.001377105712890625,
0.05078125,
0.08294677734375,
0.037384033203125,
-0.0224456787109375,
0.00919342041015625,
0.00878143310546875,
-0.005828857421875,
0.021148681640625,
0.0208892822265625,
-0.06414794921875,
-0.04052734375,
0.0278472900390625,
-0.055999755859375,
0.0012502670288085938,
0.010406494140625,
0.03192138671875,
-0.005016326904296875,
-0.035980224609375,
-0.0181121826171875,
-0.01334381103515625,
0.060089111328125,
0.018951416015625,
-0.060302734375,
0.0018301010131835938,
0.05670166015625,
-0.0323486328125,
-0.0699462890625,
-0.069580078125,
0.0294036865234375,
-0.033538818359375,
-0.02178955078125,
-0.0062713623046875,
-0.039794921875,
0.0216827392578125,
-0.041748046875,
0.00562286376953125,
0.011688232421875,
-0.0238037109375,
-0.011932373046875,
-0.006656646728515625,
-0.01288604736328125,
-0.01318359375,
0.004669189453125,
0.025909423828125,
0.030609130859375,
0.0305633544921875,
0.033782958984375,
0.039398193359375,
-0.026947021484375,
-0.03424072265625,
0.11126708984375,
-0.06597900390625,
-0.0872802734375,
0.0404052734375,
0.016998291015625,
0.062286376953125,
0.01294708251953125,
0.01386260986328125,
0.08660888671875,
0.00019299983978271484,
-0.0192718505859375,
0.03289794921875,
0.0214691162109375,
-0.0732421875,
-0.0078582763671875,
-0.01708984375,
-0.00662994384765625,
-0.01123046875,
-0.0269927978515625,
-0.007427215576171875,
-0.003711700439453125,
-0.01751708984375,
-0.046356201171875,
-0.0236663818359375,
-0.0269927978515625,
0.050750732421875,
-0.0269927978515625,
0.0284881591796875,
0.01270294189453125,
-0.0098724365234375,
-0.048004150390625,
0.0828857421875,
0.0266265869140625,
-0.01551055908203125,
-0.01496124267578125,
0.03399658203125,
-0.0210418701171875,
0.034088134765625,
-0.0194244384765625,
-0.0088348388671875,
-0.0010662078857421875,
0.01513671875,
0.0068206787109375,
-0.005756378173828125,
-0.03607177734375,
-0.0186309814453125,
-0.021331787109375,
-0.0162353515625,
-0.01169586181640625,
0.06439208984375,
-0.006900787353515625,
0.0119781494140625,
-0.04632568359375,
-0.01251983642578125,
-0.0014944076538085938,
-0.0248870849609375,
0.00922393798828125,
0.04022216796875,
0.0380859375,
0.052734375,
-0.017791748046875,
-0.0202789306640625,
0.06219482421875,
-0.0185546875,
0.0095977783203125,
-0.013519287109375,
0.0171661376953125,
-0.0057525634765625,
-0.0189208984375,
-0.029144287109375,
0.04248046875,
-0.052886962890625,
0.03619384765625,
0.03411865234375,
-0.06390380859375,
-0.058624267578125,
0.035369873046875,
-0.036834716796875,
0.033203125,
-0.04266357421875,
-0.0270538330078125,
-0.014251708984375,
0.05517578125,
-0.0012235641479492188,
0.064697265625,
0.0523681640625,
-0.0172576904296875,
-0.0021495819091796875,
0.00714874267578125,
0.026702880859375,
-0.01544189453125,
0.028228759765625,
0.051483154296875,
0.00257110595703125,
-0.044189453125,
-0.00214385986328125,
-0.0187530517578125,
0.01800537109375,
-0.0012121200561523438,
0.061004638671875,
0.0238494873046875,
-0.0034542083740234375,
-0.03704833984375,
-0.053955078125,
0.00832366943359375,
0.0142822265625,
-0.00014340877532958984,
-0.030792236328125,
-0.00897979736328125,
0.01079559326171875,
-0.02764892578125,
0.0416259765625,
0.020721435546875,
-0.0279388427734375,
0.0013456344604492188,
-0.03961181640625,
0.05914306640625,
-0.05157470703125,
0.019775390625,
0.065185546875,
-0.0341796875,
0.04302978515625,
0.0030994415283203125,
-0.0198211669921875,
0.01250457763671875,
0.024444580078125,
0.01436614990234375,
-0.00559234619140625,
-0.0255126953125,
0.017608642578125,
0.003292083740234375,
-0.004428863525390625,
-0.0254669189453125,
-0.035919189453125,
-0.00630950927734375,
-0.0108642578125,
-0.06597900390625,
-0.041168212890625,
-0.00905609130859375,
-0.0216217041015625,
-0.03607177734375,
0.03350830078125,
-0.0232086181640625,
0.01471710205078125,
0.054931640625,
-0.00782012939453125,
-0.0011167526245117188,
-0.0241546630859375,
-0.047515869140625,
-0.0027942657470703125,
-0.04608154296875,
0.07073974609375,
-0.00266265869140625,
0.01496124267578125,
-0.00328826904296875,
0.07550048828125,
0.005725860595703125,
-0.048004150390625,
-0.00014674663543701172,
-0.0221710205078125,
-0.00821685791015625,
0.0258331298828125,
-0.0094757080078125,
-0.0033473968505859375,
0.01082611083984375,
0.0149993896484375,
-0.0758056640625,
-0.0031719207763671875,
0.0172882080078125,
-0.0439453125,
-0.02886962890625,
-0.043792724609375,
0.00791168212890625,
0.007068634033203125,
0.0053253173828125,
-0.052490234375,
0.01055908203125,
-0.07122802734375,
-0.0035533905029296875,
0.0231475830078125,
0.007213592529296875,
0.0127410888671875,
-0.055755615234375,
-0.035858154296875,
0.004421234130859375,
0.05584716796875,
0.027587890625,
0.008819580078125,
0.0130157470703125,
0.00800323486328125,
0.073486328125,
-0.01399993896484375,
0.0014295578002929688,
-0.056793212890625,
0.053253173828125,
-0.030029296875,
0.022796630859375,
0.011627197265625,
-0.035858154296875,
-0.00843048095703125,
-0.03594970703125,
-0.0159912109375,
-0.0256195068359375,
0.0205535888671875,
-0.058013916015625,
-0.00785064697265625,
-0.01078033447265625,
0.0275421142578125,
-0.01812744140625,
0.04241943359375,
-0.043701171875,
-0.027191162109375,
0.02337646484375,
0.04150390625,
-0.045135498046875,
-0.0435791015625,
-0.0208587646484375,
-0.01458740234375,
-0.058746337890625,
0.0017566680908203125,
-0.0147705078125,
-0.0018329620361328125,
-0.01160430908203125,
0.01332855224609375,
-0.029388427734375,
-0.049285888671875,
0.0270843505859375,
-0.0084686279296875,
-0.03192138671875,
0.0311737060546875,
-0.031890869140625,
-0.018157958984375,
-0.02008056640625,
0.002643585205078125,
-0.09271240234375,
0.01090240478515625,
-0.053375244140625,
0.044647216796875,
-0.0038776397705078125,
0.013641357421875,
-0.03179931640625,
0.03741455078125,
0.0167388916015625,
-0.045562744140625,
0.0125274658203125,
0.0072021484375,
-0.0728759765625,
0.0175018310546875,
0.029693603515625,
-0.03778076171875,
-0.00431060791015625,
-0.01397705078125,
-0.037750244140625,
-0.0170440673828125,
-0.0251922607421875,
0.01305389404296875,
0.015167236328125,
-0.02655029296875,
-0.034759521484375,
-0.0250244140625,
-0.032562255859375,
-0.0167694091796875,
-0.0244140625,
-0.01441192626953125,
-0.0036563873291015625,
-0.0119476318359375,
-0.01538848876953125,
0.006595611572265625,
-0.00939178466796875,
0.0244140625,
0.02996826171875,
0.0214691162109375,
0.0027751922607421875,
-0.0254364013671875,
0.007526397705078125,
0.0606689453125,
0.009307861328125,
0.01207733154296875,
0.00765228271484375,
-0.054901123046875,
0.061920166015625,
0.033355712890625,
0.0310821533203125,
-0.0560302734375,
0.09765625,
-0.01216888427734375,
-0.0116729736328125,
0.03546142578125,
-0.0119171142578125,
-0.010101318359375,
-0.0126190185546875,
0.02874755859375,
-0.03375244140625,
0.03997802734375,
0.0310821533203125,
0.013824462890625,
0.00965118408203125,
-0.01158905029296875,
-0.039581298828125,
0.028961181640625,
0.06378173828125,
-0.0192718505859375,
-0.0030384063720703125,
0.0117950439453125,
-0.0096282958984375,
-0.0251617431640625,
-0.000507354736328125,
-0.035430908203125,
-0.0188140869140625,
-0.040618896484375,
0.0205535888671875,
0.00616455078125,
-0.01198577880859375,
-0.0190582275390625,
-0.0005502700805664062,
-0.00412750244140625,
0.00543975830078125,
-0.0285797119140625,
-0.020965576171875,
-0.0017366409301757812,
0.0198516845703125,
0.00020444393157958984,
0.0147857666015625,
0.01506805419921875,
0.003627777099609375,
0.0286712646484375,
0.029510498046875,
0.016815185546875,
0.0184783935546875,
-0.00897216796875,
-0.02569580078125,
0.013275146484375,
-0.025543212890625,
0.050872802734375,
0.006328582763671875,
0.0201873779296875,
0.019256591796875,
-0.029937744140625,
0.0042724609375,
-0.001766204833984375,
0.0108795166015625,
0.01708984375,
0.0150146484375,
0.0007104873657226562,
-0.02490234375,
0.026214599609375,
-0.055572509765625,
-0.062164306640625,
0.032257080078125,
0.0218048095703125,
0.00010645389556884766,
0.01526641845703125,
-0.0027675628662109375,
0.06353759765625,
0.01157379150390625,
0.0145416259765625,
0.043914794921875,
0.0020599365234375,
0.0010223388671875,
0.0283355712890625,
0.00647735595703125,
0.0013990402221679688,
0.0138092041015625,
0.0246429443359375,
0.0005202293395996094,
-0.001964569091796875,
0.06756591796875,
-0.03631591796875,
-0.03985595703125,
-0.02764892578125,
0.0238494873046875,
-0.01491546630859375,
-0.0260772705078125,
-0.04473876953125,
-0.01071929931640625,
-0.0165557861328125,
0.007350921630859375,
0.0513916015625,
-0.050445556640625,
0.02386474609375,
-0.01531982421875,
0.01519775390625,
0.0187225341796875,
0.01548004150390625,
0.056640625,
0.04315185546875,
-0.0297088623046875,
-0.006710052490234375,
-0.048065185546875,
-0.015228271484375,
-0.040252685546875,
-0.045166015625,
-0.0223541259765625,
-0.005001068115234375,
-0.007293701171875,
0.01299285888671875,
-0.04449462890625,
-0.030975341796875,
0.00368499755859375,
0.01715087890625,
0.0225067138671875,
0.042724609375,
-0.027618408203125,
0.0019464492797851562,
0.0154876708984375,
0.003124237060546875,
-0.0005502700805664062,
0.00047397613525390625,
0.00812530517578125,
-0.024627685546875,
0.0094757080078125,
-0.058837890625,
-0.028656005859375,
0.0087127685546875,
-0.042999267578125,
0.0254669189453125,
0.01238250732421875,
-0.0073394775390625,
0.037811279296875,
-0.026885986328125,
-0.00371551513671875,
-0.01464080810546875,
0.0172882080078125,
-0.058502197265625,
0.0022220611572265625,
0.01023101806640625,
0.0028324127197265625,
0.032470703125,
-0.0209503173828125,
-0.0308990478515625,
0.035400390625,
-0.0166015625,
0.03192138671875,
0.0044708251953125,
-0.00536346435546875,
0.01300811767578125,
0.0012035369873046875,
-0.0101470947265625,
0.032073974609375,
0.01715087890625,
0.02764892578125,
0.0139007568359375,
0.04351806640625,
-0.036407470703125,
-0.030914306640625,
0.01470947265625,
0.01910400390625,
0.0151214599609375,
0.020538330078125,
0.005825042724609375,
0.006900787353515625,
0.026947021484375,
0.050872802734375,
-0.062042236328125,
0.03204345703125,
0.02740478515625,
0.00972747802734375,
0.02716064453125,
-0.03900146484375,
-0.03863525390625,
-0.0428466796875,
0.07012939453125,
-0.0255584716796875,
-0.03131103515625,
0.0023632049560546875,
0.01018524169921875,
-0.00806427001953125,
-0.007274627685546875,
0.04815673828125,
0.011993408203125,
0.00464630126953125,
-0.0308074951171875,
-0.02886962890625,
0.0028076171875,
-0.00005131959915161133,
0.0025997161865234375,
0.0221099853515625,
-0.07220458984375,
-0.10919189453125,
-0.045562744140625,
0.030181884765625,
-0.07086181640625,
-0.0174102783203125,
-0.002399444580078125,
0.03399658203125,
0.0284271240234375,
-0.01381683349609375,
-0.0233917236328125,
-0.0035915374755859375,
0.007091522216796875,
-0.0653076171875,
-0.058349609375,
0.01371002197265625,
0.034515380859375,
-0.0305938720703125,
0.0474853515625,
0.0027103424072265625,
-0.059661865234375,
-0.0183868408203125,
0.01180267333984375,
0.0616455078125,
0.016937255859375,
-0.05389404296875,
0.029205322265625,
0.0159912109375,
-0.02655029296875,
-0.021484375,
-0.0019626617431640625,
-0.060333251953125,
-0.050872802734375,
-0.023712158203125,
-0.07763671875,
0.002593994140625,
-0.059234619140625,
-0.0557861328125,
0.0726318359375,
-0.017425537109375,
0.030609130859375,
0.004253387451171875,
0.0290374755859375,
-0.0126190185546875,
0.019378662109375,
-0.0074920654296875,
0.02423095703125,
0.059234619140625,
-0.033172607421875,
0.01003265380859375,
-0.0004012584686279297,
-0.0180816650390625,
0.01448822021484375,
-0.004543304443359375,
-0.0148773193359375,
0.0313720703125,
0.010833740234375,
0.07452392578125,
0.053436279296875,
0.02252197265625,
-0.0253448486328125,
-0.0021266937255859375,
-0.0050201416015625,
0.010223388671875,
-0.041107177734375,
0.052642822265625,
-0.0821533203125,
0.0150604248046875,
-0.00003451108932495117,
0.0205078125,
0.035308837890625,
-0.0380859375,
0.047698974609375,
0.04180908203125,
-0.03851318359375,
-0.0142822265625,
-0.0219879150390625,
-0.0229339599609375,
-0.0018854141235351562,
0.0047607421875,
-0.07476806640625,
-0.0364990234375,
-0.024169921875,
0.035430908203125,
0.017425537109375,
0.01108551025390625,
0.0513916015625,
0.0136566162109375,
0.067138671875,
-0.005008697509765625,
0.022064208984375,
0.011688232421875,
0.00574493408203125,
-0.0177154541015625,
0.0018310546875,
0.00298309326171875,
-0.012359619140625,
0.0257720947265625,
0.06402587890625,
-0.0157623291015625,
-0.0103607177734375,
-0.046417236328125,
0.0154571533203125,
-0.00463104248046875,
0.0012311935424804688,
0.01294708251953125,
0.0079345703125,
-0.056976318359375,
-0.0099639892578125,
0.004459381103515625,
-0.0176849365234375,
0.007373809814453125,
0.005710601806640625,
0.0136871337890625,
0.0364990234375,
-0.02020263671875,
-0.0218963623046875,
-0.039276123046875,
-0.0145263671875,
0.01251983642578125,
0.03802490234375,
0.033935546875,
0.0121917724609375,
0.0124664306640625,
-0.01355743408203125,
-0.0060882568359375,
-0.0033702850341796875,
-0.0080108642578125,
-0.00533294677734375,
-0.02069091796875,
0.00637054443359375,
-0.01430511474609375,
0.0265960693359375,
-0.005565643310546875,
-0.005313873291015625,
0.047698974609375,
0.043304443359375,
-0.034637451171875,
-0.0092620849609375,
0.047515869140625,
-0.01556396484375,
0.01255035400390625,
-0.037811279296875,
0.007778167724609375,
0.0253143310546875,
0.0252532958984375,
0.0143890380859375,
-0.0130767822265625,
0.040771484375,
0.00006783008575439453,
-0.03509521484375,
0.0124969482421875,
-0.043304443359375,
-0.005901336669921875,
-0.0269012451171875,
-0.0175323486328125,
0.0165557861328125,
-0.035400390625,
-0.01202392578125,
-0.033782958984375,
-0.0126495361328125,
0.0230712890625,
0.0227813720703125,
-0.0186920166015625,
0.03851318359375,
-0.0099945068359375,
-0.01275634765625,
0.02447509765625,
-0.0224761962890625,
-0.03009033203125,
0.021453857421875,
0.037841796875,
-0.0102996826171875,
-0.012237548828125,
-0.015838623046875,
0.0272979736328125,
0.0185546875,
-0.027496337890625,
0.06195068359375,
-0.01275634765625,
-0.00628662109375,
-0.040313720703125,
0.035675048828125,
-0.055755615234375,
-0.04888916015625,
0.04638671875,
0.00896453857421875,
-0.003055572509765625,
-0.0018825531005859375,
0.0130157470703125,
-0.0005345344543457031,
0.0239715576171875,
-0.037384033203125,
0.042266845703125,
-0.049774169921875,
0.0170745849609375,
-0.02301025390625,
0.023681640625,
0.0007615089416503906,
-0.0235443115234375,
-0.03399658203125,
-0.00945281982421875,
0.0367431640625,
0.0555419921875,
-0.0013685226440429688,
0.045379638671875,
-0.0009708404541015625,
0.003589630126953125,
0.039947509765625,
-0.038299560546875,
0.035736083984375,
0.0199432373046875,
-0.03717041015625,
0.0129547119140625,
-0.032806396484375,
-0.033966064453125,
0.0238494873046875,
-0.01251983642578125,
-0.00756072998046875,
-0.01177978515625,
-0.0323486328125,
-0.02008056640625,
0.01352691650390625,
0.029876708984375,
-0.00019216537475585938,
0.0244598388671875,
-0.030364990234375,
0.002307891845703125,
-0.00263214111328125,
0.0157012939453125,
-0.0172882080078125,
0.004993438720703125,
0.0008153915405273438,
0.01532745361328125,
0.0225067138671875,
-0.024444580078125,
-0.0501708984375,
0.0006246566772460938,
0.0240478515625,
-0.01165771484375,
-0.011260986328125,
0.0083770751953125,
-0.0191650390625,
0.026458740234375,
0.006336212158203125,
0.006732940673828125,
-0.02197265625,
-0.0217132568359375,
-0.0264739990234375,
-0.04132080078125,
-0.048187255859375,
0.061798095703125,
-0.006870269775390625,
-0.0165252685546875,
0.01556396484375,
0.0037441253662109375,
-0.048583984375,
-0.03228759765625,
-0.021514892578125,
0.0207672119140625,
-0.018798828125,
-0.0203857421875,
-0.004642486572265625,
0.00047016143798828125,
0.0026607513427734375,
-0.019622802734375,
0.0037384033203125,
-0.031585693359375,
-0.01555633544921875,
-0.01171112060546875,
-0.027740478515625,
-0.0208892822265625,
-0.052825927734375,
-0.072998046875,
0.038818359375,
-0.017669677734375,
-0.02252197265625,
-0.0017499923706054688,
0.00582122802734375,
0.023406982421875,
-0.01430511474609375,
-0.01180267333984375,
0.01245880126953125,
-0.04364013671875,
-0.0176544189453125,
0.018463134765625,
0.0733642578125,
-0.00020205974578857422,
-0.0104827880859375,
-0.0097198486328125,
0.0007476806640625,
-0.004573822021484375,
0.030120849609375,
0.007965087890625,
0.0260162353515625,
0.0087432861328125,
0.04644775390625,
-0.033203125,
-0.01558685302734375,
-0.02264404296875,
-0.04632568359375,
-0.005329132080078125,
-0.056304931640625,
0.0042266845703125,
-0.0216217041015625,
0.0016717910766601562,
-0.01251983642578125,
-0.005023956298828125,
-0.007480621337890625,
0.03326416015625,
0.03302001953125,
0.0297088623046875,
0.026702880859375,
-0.0220184326171875,
0.0243377685546875,
0.00690460205078125,
-0.016387939453125,
-0.00937652587890625,
0.0148773193359375,
-0.023223876953125,
-0.036102294921875,
-0.0032672882080078125,
-0.031158447265625,
-0.0088348388671875,
-0.005077362060546875,
-0.0219573974609375,
0.0170745849609375,
-0.0263824462890625,
-0.042938232421875,
0.0207061767578125,
0.01226806640625,
-0.0266571044921875,
0.0153961181640625,
-0.004802703857421875,
0.0148773193359375,
-0.0170135498046875,
0.0194244384765625,
0.025054931640625,
-0.019744873046875,
-0.01238250732421875,
0.006855010986328125,
-0.0009851455688476562,
0.018951416015625,
0.004566192626953125,
0.01503753662109375,
-0.04132080078125,
0.03399658203125,
-0.0006489753723144531,
0.034088134765625,
-0.0158538818359375,
-0.045684814453125,
-0.03253173828125,
0.01580810546875,
-0.01459503173828125,
0.00330352783203125,
0.036590576171875,
-0.02630615234375,
-0.00720977783203125,
0.011444091796875,
-0.017059326171875,
-0.05828857421875,
0.038116455078125,
0.028533935546875,
0.028472900390625,
0.0218353271484375
]
|
94dd35b9b8e5a280d57d3b3a2459e21cd9da7dd6 | Wordpress Stackexchange
Q: Shortcode attribute escaping I'm trying to set shortcode attribute value to ' " (single and double quote) by using escaped values ' ".
Example:
[shortcode attr="' ""]test[/shortcode]
As soon as I switch to visual editor, they get converted back to ' " and shortcode is now broken.
How does one properly escape shortcode attributes so that they can work even after switching between visual and text editor?
A: I suggest using keywords for them. so you would do something like [shortcode attr="single_quote double_quote"]test[/shortcode]. Then, while parsing the shortcode you can change them back.
| Q: Shortcode attribute escaping I'm trying to set shortcode attribute value to ' " (single and double quote) by using escaped values ' ".
Example:
[shortcode attr="' ""]test[/shortcode]
As soon as I switch to visual editor, they get converted back to ' " and shortcode is now broken.
How does one properly escape shortcode attributes so that they can work even after switching between visual and text editor?
A: I suggest using keywords for them. so you would do something like [shortcode attr="single_quote double_quote"]test[/shortcode]. Then, while parsing the shortcode you can change them back.
| wordpress | {
"language": "en",
"length": 94,
"provenance": "stackexchange_00019.jsonl.gz:464475",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/222751"
} | [
0.0094757080078125,
-0.0450439453125,
0.0269622802734375,
0.025054931640625,
-0.041839599609375,
0.000850677490234375,
0.056976318359375,
-0.014190673828125,
-0.0093994140625,
0.05224609375,
0.030303955078125,
-0.0014743804931640625,
0.0225677490234375,
-0.0341796875,
-0.030426025390625,
0.0002701282501220703,
-0.0062713623046875,
0.0150604248046875,
-0.033966064453125,
-0.0416259765625,
0.00604248046875,
-0.039031982421875,
-0.0540771484375,
0.0235137939453125,
0.01071929931640625,
-0.03656005859375,
0.07122802734375,
-0.00794219970703125,
0.0146484375,
-0.01468658447265625,
0.008056640625,
-0.0100250244140625,
0.0728759765625,
-0.002590179443359375,
-0.0606689453125,
0.10980224609375,
-0.028472900390625,
0.01198577880859375,
-0.0172271728515625,
0.037139892578125,
0.0266265869140625,
-0.028472900390625,
0.039154052734375,
0.0276336669921875,
0.005035400390625,
-0.0216064453125,
0.0400390625,
-0.0357666015625,
0.027008056640625,
-0.01505279541015625,
0.02508544921875,
0.022918701171875,
0.034027099609375,
-0.039459228515625,
-0.0136260986328125,
0.007171630859375,
-0.027801513671875,
-0.04107666015625,
0.02960205078125,
0.045379638671875,
0.01690673828125,
-0.032440185546875,
0.0091094970703125,
-0.0440673828125,
0.041412353515625,
0.00623321533203125,
-0.0106964111328125,
0.0309600830078125,
-0.00864410400390625,
0.062744140625,
0.01377105712890625,
-0.048583984375,
0.0198974609375,
-0.06732177734375,
0.00026869773864746094,
0.050323486328125,
-0.0006847381591796875,
0.0236968994140625,
-0.0026397705078125,
-0.032501220703125,
0.07611083984375,
-0.03106689453125,
-0.05096435546875,
0.01311492919921875,
0.0251007080078125,
0.03375244140625,
0.01049041748046875,
-0.0257415771484375,
0.005954742431640625,
0.00434112548828125,
-0.0082550048828125,
0.041473388671875,
-0.0169219970703125,
0.0177459716796875,
-0.0044708251953125,
0.00362396240234375,
-0.044891357421875,
0.0242767333984375,
0.004039764404296875,
0.048736572265625,
-0.04132080078125,
-0.01319122314453125,
0.02239990234375,
-0.04962158203125,
0.0095977783203125,
0.004528045654296875,
0.004627227783203125,
0.024322509765625,
0.0291595458984375,
0.020843505859375,
-0.027099609375,
0.01023101806640625,
-0.045074462890625,
0.01297760009765625,
-0.043182373046875,
0.020233154296875,
-0.061187744140625,
-0.01213836669921875,
-0.0374755859375,
0.007175445556640625,
0.0200042724609375,
0.038482666015625,
0.005229949951171875,
0.00969696044921875,
-0.0347900390625,
0.0031585693359375,
0.0004973411560058594,
-0.0738525390625,
0.03472900390625,
-0.00007021427154541016,
-0.01474761962890625,
-0.02703857421875,
0.0062255859375,
0.059112548828125,
0.0284271240234375,
-0.00815582275390625,
0.0101165771484375,
-0.01136016845703125,
-0.0200958251953125,
-0.00992584228515625,
0.003910064697265625,
0.018096923828125,
0.020843505859375,
-0.039581298828125,
-0.0212249755859375,
0.02813720703125,
0.0137786865234375,
0.006633758544921875,
-0.022003173828125,
-0.080810546875,
0.045013427734375,
-0.0560302734375,
0.0244140625,
0.01071929931640625,
-0.020965576171875,
-0.05145263671875,
0.0165863037109375,
-0.0521240234375,
0.04010009765625,
-0.054534912109375,
-0.0009431838989257812,
-0.015045166015625,
0.0211334228515625,
-0.03759765625,
-0.0292205810546875,
-0.00685882568359375,
-0.032928466796875,
0.0035762786865234375,
0.01323699951171875,
0.07940673828125,
-0.044952392578125,
0.0184478759765625,
-0.0279541015625,
-0.00433349609375,
-0.0196990966796875,
-0.0189361572265625,
-0.044830322265625,
0.026641845703125,
0.043426513671875,
-0.0287628173828125,
-0.01280975341796875,
-0.0377197265625,
0.0308380126953125,
0.021026611328125,
-0.041839599609375,
0.0186614990234375,
0.00004875659942626953,
0.058837890625,
0.032318115234375,
0.0106201171875,
-0.0235137939453125,
0.01190948486328125,
-0.03631591796875,
0.035491943359375,
0.041900634765625,
-0.038909912109375,
-0.034759521484375,
-0.045745849609375,
0.0152130126953125,
-0.0212249755859375,
0.054962158203125,
-0.00006127357482910156,
0.0252227783203125,
-0.0027790069580078125,
-0.016021728515625,
-0.0093841552734375,
-0.006603240966796875,
0.00861358642578125,
-0.047760009765625,
0.003139495849609375,
0.03564453125,
-0.041717529296875,
-0.0205535888671875,
0.03240966796875,
0.022125244140625,
0.00977325439453125,
-0.006847381591796875,
0.043304443359375,
-0.0059051513671875,
0.0343017578125,
0.034027099609375,
-0.0352783203125,
0.03759765625,
0.04595947265625,
-0.007572174072265625,
0.025299072265625,
-0.0330810546875,
-0.0023593902587890625,
-0.027008056640625,
0.018890380859375,
-0.0023136138916015625,
0.0247039794921875,
0.0205230712890625,
0.0272674560546875,
-0.038330078125,
-0.0033397674560546875,
-0.023468017578125,
-0.01352691650390625,
0.008453369140625,
0.0479736328125,
0.03289794921875,
0.028289794921875,
-0.0220184326171875,
-0.04278564453125,
0.03338623046875,
0.0240325927734375,
0.047271728515625,
-0.05718994140625,
-0.00846099853515625,
0.00904083251953125,
0.0145416259765625,
-0.0207977294921875,
0.0194854736328125,
-0.0767822265625,
-0.01031494140625,
0.0443115234375,
-0.048248291015625,
-0.0114593505859375,
-0.00762939453125,
-0.0013027191162109375,
-0.0024967193603515625,
-0.0230865478515625,
0.01849365234375,
-0.0270843505859375,
0.06744384765625,
0.0305023193359375,
0.0482177734375,
0.0270843505859375,
-0.033905029296875,
0.0491943359375,
0.004398345947265625,
-0.0235748291015625,
-0.0186920166015625,
0.043060302734375,
0.06610107421875,
0.036834716796875,
-0.036346435546875,
-0.0229034423828125,
0.00408172607421875,
0.03765869140625,
-0.00640869140625,
0.0085906982421875,
0.0018758773803710938,
-0.0232391357421875,
0.04052734375,
0.0224151611328125,
-0.001720428466796875,
-0.043548583984375,
0.00970458984375,
-0.023345947265625,
-0.003879547119140625,
0.04736328125,
-0.0257110595703125,
0.07342529296875,
-0.010833740234375,
-0.01467132568359375,
0.07244873046875,
-0.03607177734375,
0.0401611328125,
0.0022220611572265625,
0.040618896484375,
0.04510498046875,
-0.0026607513427734375,
0.0180511474609375,
0.002079010009765625,
0.0300140380859375,
-0.006561279296875,
0.0012798309326171875,
-0.0007228851318359375,
-0.0158233642578125,
-0.0191192626953125,
0.0180511474609375,
0.0061492919921875,
0.044189453125,
-0.0396728515625,
-0.048370361328125,
-0.035369873046875,
0.0043182373046875,
-0.06378173828125,
-0.053680419921875,
0.05828857421875,
-0.01128387451171875,
0.007171630859375,
0.0007562637329101562,
0.0015773773193359375,
-0.0367431640625,
0.023834228515625,
-0.00891876220703125,
0.0225982666015625,
0.0211334228515625,
0.0169525146484375,
0.01042938232421875,
-0.040985107421875,
-0.0338134765625,
0.01244354248046875,
0.01450347900390625,
-0.00002294778823852539,
0.01442718505859375,
-0.002063751220703125,
-0.0130767822265625,
0.02154541015625,
0.005138397216796875,
0.003627777099609375,
0.01320648193359375,
-0.004779815673828125,
-0.001743316650390625,
-0.00986480712890625,
0.0009164810180664062,
0.005321502685546875,
0.0271148681640625,
-0.0184478759765625,
-0.00887298583984375,
-0.00926971435546875,
0.032012939453125,
0.05438232421875,
-0.0538330078125,
-0.0160675048828125,
0.07672119140625,
0.04449462890625,
-0.0005331039428710938,
-0.005077362060546875,
-0.028717041015625,
-0.034881591796875,
0.0038585662841796875,
0.025604248046875,
0.0016269683837890625,
-0.031280517578125,
0.0248260498046875,
0.0080108642578125,
0.00958251953125,
0.0706787109375,
-0.0279998779296875,
-0.003093719482421875,
-0.0199737548828125,
-0.0178680419921875,
-0.050750732421875,
-0.016632080078125,
-0.04736328125,
0.047271728515625,
-0.002716064453125,
0.00003927946090698242,
0.01174163818359375,
-0.00811767578125,
0.03369140625,
-0.0220794677734375,
0.056640625,
0.01513671875,
0.053131103515625,
-0.07000732421875,
-0.04595947265625,
-0.0677490234375,
0.07232666015625,
-0.045684814453125,
-0.005344390869140625,
0.01495361328125,
-0.0020885467529296875,
-0.01103973388671875,
0.004718780517578125,
-0.07928466796875,
-0.00594329833984375,
-0.034698486328125,
0.03204345703125,
-0.00482940673828125,
-0.006866455078125,
-0.0028171539306640625,
-0.05267333984375,
0.0115203857421875,
-0.03253173828125,
0.023590087890625,
-0.0291290283203125,
0.002735137939453125,
-0.018890380859375,
0.0193939208984375,
-0.057861328125,
0.0135345458984375,
-0.0274658203125,
-0.052581787109375,
-0.0203399658203125,
0.01898193359375,
0.046966552734375,
0.0068511962890625,
-0.03631591796875,
-0.0298919677734375,
0.0286712646484375,
-0.054107666015625,
-0.0191497802734375,
-0.003261566162109375,
0.049957275390625,
-0.0172271728515625,
0.03436279296875,
-0.02288818359375,
-0.0016021728515625,
-0.01056671142578125,
0.0171966552734375,
0.005207061767578125,
0.0247344970703125,
-0.01309967041015625,
-0.040374755859375,
0.022491455078125,
-0.0298919677734375,
-0.070556640625,
-0.016815185546875,
0.01352691650390625,
0.023406982421875,
0.004947662353515625,
0.0082855224609375,
-0.00189208984375,
-0.05950927734375,
0.07342529296875,
0.018798828125,
0.018402099609375,
-0.0259552001953125,
0.0528564453125,
0.0015697479248046875,
-0.05474853515625,
0.01071929931640625,
-0.005054473876953125,
0.0472412109375,
-0.0113067626953125,
0.00997161865234375,
-0.00786590576171875,
-0.04888916015625,
0.062225341796875,
-0.0052490234375,
0.047821044921875,
-0.0987548828125,
0.0758056640625,
-0.0106201171875,
0.0325927734375,
0.015716552734375,
0.01568603515625,
0.0216522216796875,
0.016021728515625,
0.01296234130859375,
-0.004238128662109375,
0.0214080810546875,
0.01325225830078125,
0.002643585205078125,
-0.0423583984375,
-0.0187225341796875,
-0.025177001953125,
0.004360198974609375,
0.04241943359375,
-0.0098876953125,
0.041473388671875,
-0.0085296630859375,
0.004974365234375,
0.01413726806640625,
-0.022216796875,
-0.028289794921875,
-0.007232666015625,
-0.0157623291015625,
0.03662109375,
-0.0865478515625,
-0.037841796875,
-0.0113983154296875,
-0.008880615234375,
0.0259552001953125,
0.005645751953125,
-0.0360107421875,
0.003894805908203125,
-0.0132293701171875,
-0.0129241943359375,
0.006977081298828125,
0.04443359375,
-0.01102447509765625,
0.007232666015625,
0.027252197265625,
0.0254058837890625,
0.013458251953125,
0.035552978515625,
-0.00038623809814453125,
0.00923919677734375,
-0.0025882720947265625,
0.002597808837890625,
0.0272979736328125,
0.01303863525390625,
-0.0022068023681640625,
0.011383056640625,
-0.0028972625732421875,
0.02996826171875,
0.0576171875,
0.0235748291015625,
0.046875,
-0.05157470703125,
-0.015380859375,
0.0102996826171875,
-0.033721923828125,
-0.0173797607421875,
-0.0192718505859375,
0.037994384765625,
0.0426025390625,
-0.02410888671875,
-0.01409912109375,
0.01432037353515625,
-0.0192108154296875,
-0.00788116455078125,
-0.0037689208984375,
-0.0215606689453125,
-0.00701141357421875,
-0.0154571533203125,
0.00609588623046875,
0.0263671875,
0.01065826416015625,
0.0268402099609375,
-0.0394287109375,
-0.0192718505859375,
-0.0204315185546875,
-0.0197601318359375,
-0.0013322830200195312,
-0.03179931640625,
-0.0301361083984375,
0.039337158203125,
-0.020172119140625,
-0.013153076171875,
-0.02081298828125,
0.006778717041015625,
-0.028961181640625,
-0.00788116455078125,
0.042999267578125,
-0.017608642578125,
0.04132080078125,
-0.030426025390625,
0.0005474090576171875,
-0.007228851318359375,
-0.0121307373046875,
0.07232666015625,
0.03338623046875,
-0.061126708984375,
0.0007405281066894531,
-0.0271453857421875,
0.004383087158203125,
0.031494140625,
0.00971221923828125,
-0.02691650390625,
-0.00492095947265625,
0.01309967041015625,
0.056121826171875,
0.006839752197265625,
-0.01947021484375,
0.0110626220703125,
-0.01490020751953125,
-0.0218505859375,
0.093994140625,
-0.0080108642578125,
-0.016510009765625,
0.043304443359375,
0.022064208984375,
0.007709503173828125,
0.0067138671875,
0.046966552734375,
-0.05084228515625,
0.033538818359375,
0.036285400390625,
-0.023529052734375,
-0.03375244140625,
0.02972412109375,
-0.0439453125,
0.05987548828125,
-0.01092529296875,
0.0220184326171875,
-0.03460693359375,
-0.01371002197265625,
-0.02496337890625,
0.039947509765625,
-0.05615234375,
0.0221710205078125,
-0.01453399658203125,
-0.0250091552734375,
-0.005741119384765625,
-0.00554656982421875,
-0.0173492431640625,
0.020782470703125,
-0.0022945404052734375,
0.00872039794921875,
0.035247802734375,
0.0171966552734375,
-0.0010614395141601562,
0.050567626953125,
-0.0110015869140625,
0.034332275390625,
0.031341552734375,
0.00911712646484375,
0.035430908203125,
-0.0158843994140625,
0.0260162353515625,
0.033843994140625,
0.013031005859375,
-0.032928466796875,
-0.020782470703125,
-0.0173797607421875,
-0.017425537109375,
0.053619384765625,
0.054443359375,
0.10247802734375,
-0.0830078125,
0.0135498046875,
0.033050537109375,
-0.057220458984375,
0.026611328125,
0.0180511474609375,
0.0004734992980957031,
-0.01509857177734375,
-0.020599365234375,
0.0139007568359375,
-0.0164947509765625,
-0.0018033981323242188,
0.02703857421875,
-0.00669097900390625,
-0.029144287109375,
0.0323486328125,
0.01105499267578125,
-0.0249176025390625,
-0.0043792724609375,
0.021697998046875,
0.0046539306640625,
-0.016815185546875,
0.00176239013671875,
0.00624847412109375,
-0.040863037109375,
-0.06060791015625,
-0.01201629638671875,
-0.0024318695068359375,
-0.01280975341796875,
0.0261077880859375,
0.049560546875,
0.046295166015625,
0.025665283203125,
0.0364990234375,
-0.05224609375,
-0.017547607421875,
0.052978515625,
0.064697265625,
-0.0034332275390625,
0.006877899169921875,
0.0230712890625,
-0.01377105712890625,
-0.008697509765625,
0.007602691650390625,
0.007598876953125,
-0.0222625732421875,
-0.0141143798828125,
0.02215576171875,
-0.004741668701171875,
-0.0103302001953125,
0.02703857421875,
0.047637939453125,
-0.0258331298828125,
-0.0179290771484375,
-0.058837890625,
-0.03759765625,
-0.007732391357421875,
-0.06597900390625,
-0.06805419921875,
0.0283203125,
-0.061981201171875,
-0.08636474609375,
0.060546875,
0.00982666015625,
0.052001953125,
-0.0035381317138671875,
0.01271820068359375,
-0.0218353271484375,
-0.0208587646484375,
-0.02142333984375,
0.00927734375,
-0.0007877349853515625,
0.019500732421875,
-0.0352783203125,
-0.0160369873046875,
0.0093231201171875,
0.0491943359375,
0.0206756591796875,
-0.00774383544921875,
0.005870819091796875,
0.043701171875,
0.08355712890625,
0.01256561279296875,
-0.0189361572265625,
0.0275421142578125,
0.002376556396484375,
0.01090240478515625,
0.0240325927734375,
-0.0423583984375,
0.03131103515625,
-0.041748046875,
0.00426483154296875,
0.0215301513671875,
-0.01035308837890625,
-0.02398681640625,
0.009124755859375,
-0.0360107421875,
-0.03863525390625,
0.01551055908203125,
-0.0045318603515625,
-0.01325225830078125,
-0.0323486328125,
0.031280517578125,
0.00969696044921875,
-0.05157470703125,
-0.07122802734375,
-0.00992584228515625,
0.0244903564453125,
0.0130157470703125,
0.00395965576171875,
0.026092529296875,
-0.0117645263671875,
0.058013916015625,
0.05914306640625,
0.00815582275390625,
0.045806884765625,
0.035064697265625,
0.01030731201171875,
-0.022979736328125,
0.00597381591796875,
-0.0450439453125,
0.044403076171875,
0.00968170166015625,
0.01016998291015625,
-0.027587890625,
0.0157012939453125,
0.016998291015625,
0.0017604827880859375,
-0.025482177734375,
-0.0252685546875,
-0.01837158203125,
-0.001834869384765625,
-0.00229644775390625,
-0.0195770263671875,
0.006847381591796875,
0.04376220703125,
0.04608154296875,
0.0260772705078125,
0.055511474609375,
-0.10919189453125,
-0.031402587890625,
-0.041900634765625,
-0.0013208389282226562,
0.03570556640625,
0.0860595703125,
0.027984619140625,
0.033294677734375,
-0.05938720703125,
-0.0498046875,
-0.005977630615234375,
0.0043792724609375,
-0.004787445068359375,
0.0091705322265625,
-0.00811767578125,
0.0031642913818359375,
0.0090789794921875,
0.017242431640625,
-0.00794219970703125,
-0.003841400146484375,
0.0018329620361328125,
0.017852783203125,
-0.0159454345703125,
-0.00966644287109375,
0.01015472412109375,
-0.01483917236328125,
0.030181884765625,
0.0130767822265625,
-0.0043487548828125,
-0.01104736328125,
-0.016204833984375,
-0.06048583984375,
0.032867431640625,
0.0180816650390625,
-0.03704833984375,
0.08026123046875,
-0.01068115234375,
0.02679443359375,
0.003215789794921875,
0.0022602081298828125,
-0.004154205322265625,
-0.005558013916015625,
0.0030117034912109375,
0.01499176025390625,
0.0129852294921875,
-0.0699462890625,
0.0006766319274902344,
0.0272979736328125,
-0.031341552734375,
0.035858154296875,
-0.037261962890625,
-0.038604736328125,
-0.00632476806640625,
0.029937744140625,
0.0221405029296875,
0.01336669921875,
-0.0243682861328125,
-0.0118255615234375,
-0.0350341796875,
-0.0285186767578125,
0.026092529296875,
0.018829345703125,
0.00799560546875,
0.0241546630859375,
-0.0015077590942382812,
0.006114959716796875,
0.0185699462890625,
0.0189208984375,
-0.0293426513671875,
0.0037994384765625,
-0.004138946533203125,
-0.03375244140625,
0.006885528564453125,
-0.0022449493408203125,
-0.01091766357421875,
0.052978515625,
0.00304412841796875,
0.0014085769653320312,
0.033721923828125,
-0.03118896484375,
0.00252532958984375,
0.020111083984375,
0.06146240234375,
-0.0208587646484375,
-0.0634765625,
-0.06536865234375,
0.00499725341796875,
0.01219940185546875,
0.003177642822265625,
-0.0278778076171875,
0.021514892578125,
0.07440185546875,
0.0187225341796875,
0.017120361328125,
0.0017328262329101562,
0.048736572265625,
0.022552490234375,
0.002490997314453125,
0.009124755859375,
0.01389312744140625,
-0.030975341796875,
0.033111572265625,
0.00344085693359375,
0.01038360595703125,
0.0085601806640625,
-0.0015459060668945312,
0.0179901123046875,
0.023895263671875,
0.04754638671875,
0.00736236572265625,
0.025787353515625,
-0.003459930419921875,
0.0061798095703125,
0.01256561279296875,
0.013214111328125,
-0.008636474609375,
-0.032623291015625,
0.01629638671875,
0.01409912109375,
-0.0126495361328125,
0.0117034912109375,
-0.047760009765625,
-0.05731201171875,
0.05560302734375,
0.0105438232421875,
-0.00817108154296875,
-0.058837890625,
0.01139068603515625,
0.020172119140625,
0.03521728515625,
0.01538848876953125,
-0.00441741943359375,
0.0186004638671875,
-0.039215087890625,
-0.0250091552734375,
-0.032684326171875,
0.029541015625,
-0.038177490234375,
0.0289459228515625,
0.032867431640625,
-0.00722503662109375,
-0.0064697265625,
0.02923583984375,
0.002391815185546875,
0.07861328125,
-0.003692626953125,
-0.0276031494140625,
0.0158843994140625,
0.029815673828125,
-0.031463623046875,
-0.060394287109375,
0.00435638427734375,
-0.02337646484375,
0.0357666015625,
0.0012102127075195312,
0.000031948089599609375,
0.00836944580078125,
-0.048553466796875,
-0.0738525390625,
0.049835205078125,
-0.00037026405334472656,
-0.026275634765625,
0.01177978515625,
-0.02044677734375,
-0.00925445556640625,
0.008697509765625,
0.005706787109375,
-0.0294189453125,
-0.0306396484375,
0.0157623291015625,
0.018035888671875,
0.053802490234375,
0.0152587890625,
0.0159912109375,
0.00910186767578125,
-0.005126953125,
-0.033233642578125,
-0.00777435302734375,
0.007213592529296875,
-0.0022144317626953125,
0.020294189453125,
0.0509033203125,
-0.01812744140625,
-0.036376953125,
-0.007965087890625,
-0.060394287109375,
0.0155181884765625,
-0.023681640625,
-0.018524169921875,
0.010009765625,
0.05816650390625,
-0.0007143020629882812,
0.00197601318359375,
-0.0430908203125,
-0.0157012939453125,
0.0145416259765625,
0.047393798828125,
-0.0090789794921875,
-0.01306915283203125,
-0.05181884765625,
-0.049560546875,
-0.0230560302734375,
-0.007427215576171875,
-0.006076812744140625,
-0.0184326171875,
-0.0164337158203125,
-0.005191802978515625,
-0.01079559326171875,
-0.016571044921875,
-0.009429931640625,
-0.0155792236328125,
0.05413818359375,
-0.0203094482421875,
0.00975799560546875,
-0.00901031494140625,
0.02227783203125,
0.0273895263671875,
0.0032711029052734375,
0.017791748046875,
-0.006336212158203125,
-0.016998291015625,
0.0015077590942382812,
0.02349853515625,
0.0196075439453125,
0.00685882568359375,
-0.0281524658203125,
0.00513458251953125,
0.02294921875,
-0.020416259765625,
0.0267181396484375,
-0.01287078857421875,
0.04266357421875,
-0.001132965087890625,
0.04754638671875,
-0.0516357421875,
0.05474853515625,
-0.017974853515625,
0.021575927734375,
-0.02685546875,
0.031463623046875,
0.007038116455078125,
0.00849151611328125,
0.0269012451171875,
0.0323486328125,
0.050048828125,
-0.004863739013671875,
0.008331298828125,
0.0105743408203125,
0.043121337890625,
0.0010271072387695312
]
|
5881e005b76bc82b80da8d6af821a522249d80d3 | Wordpress Stackexchange
Q: How can I modify the content of default columns? I have a code to add content to my custom columns, that looks like this
add_action( 'manage_posts_custom_column', 'my_custom_columns', 10, 2 );
function my_custom_columns( $column, $post_id ) {
switch ( $column ) {
case 'column1':
echo 'output1';
break;
case 'column2':
echo 'output2';
break;
case 'column3':
echo 'output3';
break;
}
}
There is a way to do the same thing with default columns like the Title one?
| Q: How can I modify the content of default columns? I have a code to add content to my custom columns, that looks like this
add_action( 'manage_posts_custom_column', 'my_custom_columns', 10, 2 );
function my_custom_columns( $column, $post_id ) {
switch ( $column ) {
case 'column1':
echo 'output1';
break;
case 'column2':
echo 'output2';
break;
case 'column3':
echo 'output3';
break;
}
}
There is a way to do the same thing with default columns like the Title one?
| wordpress | {
"language": "en",
"length": 75,
"provenance": "stackexchange_00019.jsonl.gz:464508",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/222882"
} | [
0.0081939697265625,
-0.0294036865234375,
0.0211639404296875,
-0.01343536376953125,
-0.019866943359375,
0.004184722900390625,
0.00911712646484375,
-0.0203704833984375,
-0.019989013671875,
-0.016937255859375,
-0.0148468017578125,
-0.017059326171875,
-0.06640625,
-0.0310821533203125,
-0.0112152099609375,
-0.06658935546875,
0.047607421875,
-0.0165863037109375,
0.03302001953125,
-0.0103759765625,
0.01690673828125,
0.0190582275390625,
0.04278564453125,
0.10369873046875,
0.0185699462890625,
-0.0038051605224609375,
0.021575927734375,
0.0046539306640625,
0.019500732421875,
0.0125274658203125,
0.0364990234375,
-0.0212249755859375,
0.00862884521484375,
0.001453399658203125,
0.0019025802612304688,
0.006107330322265625,
0.025360107421875,
-0.007701873779296875,
-0.0007052421569824219,
0.037109375,
0.0296783447265625,
-0.0172119140625,
0.034271240234375,
-0.01544189453125,
0.0128173828125,
-0.0188140869140625,
0.04632568359375,
-0.03326416015625,
0.024322509765625,
-0.01528167724609375,
0.00307464599609375,
0.047088623046875,
0.003570556640625,
-0.053253173828125,
-0.0005583763122558594,
-0.0119171142578125,
-0.0077972412109375,
-0.00620269775390625,
0.06011962890625,
-0.030792236328125,
-0.0379638671875,
-0.04827880859375,
0.0232086181640625,
-0.016815185546875,
0.00992584228515625,
-0.00920867919921875,
0.01474761962890625,
0.03704833984375,
-0.038482666015625,
0.007648468017578125,
0.03448486328125,
-0.018218994140625,
0.01479339599609375,
-0.0419921875,
-0.0090179443359375,
0.025054931640625,
0.01277923583984375,
-0.0051116943359375,
0.00946807861328125,
-0.01294708251953125,
0.01239013671875,
0.0091705322265625,
0.040679931640625,
-0.067626953125,
0.039398193359375,
-0.030029296875,
-0.00954437255859375,
-0.00634765625,
-0.00878143310546875,
0.005252838134765625,
0.005519866943359375,
-0.03076171875,
-0.040771484375,
0.024322509765625,
0.02789306640625,
-0.032470703125,
-0.00824737548828125,
0.0212860107421875,
-0.0005421638488769531,
0.01763916015625,
0.00917816162109375,
-0.03155517578125,
0.0302581787109375,
-0.0286102294921875,
-0.007778167724609375,
0.0035152435302734375,
-0.004741668701171875,
-0.0308074951171875,
0.00007933378219604492,
0.03802490234375,
-0.0293121337890625,
0.00872039794921875,
0.0014657974243164062,
0.0284881591796875,
-0.047271728515625,
-0.00957489013671875,
-0.0261383056640625,
-0.0037250518798828125,
-0.031646728515625,
0.0262451171875,
-0.0203704833984375,
-0.0111083984375,
-0.0011816024780273438,
-0.05059814453125,
0.00836181640625,
-0.03265380859375,
-0.043670654296875,
0.034820556640625,
0.0006551742553710938,
-0.01058197021484375,
-0.052581787109375,
-0.00018322467803955078,
0.1285400390625,
0.0924072265625,
0.05670166015625,
-0.00928497314453125,
0.02337646484375,
-0.006839752197265625,
-0.005748748779296875,
0.01245880126953125,
-0.0073394775390625,
-0.035614013671875,
-0.0025196075439453125,
-0.0004220008850097656,
0.03125,
0.0166473388671875,
0.041015625,
0.021270751953125,
-0.029144287109375,
-0.038726806640625,
0.025726318359375,
0.0211639404296875,
0.0207061767578125,
0.0137481689453125,
-0.011627197265625,
0.0166168212890625,
0.00997161865234375,
0.0020008087158203125,
-0.028106689453125,
-0.006015777587890625,
-0.0164947509765625,
-0.0228118896484375,
-0.0025501251220703125,
-0.029144287109375,
-0.07415771484375,
0.057830810546875,
0.001552581787109375,
-0.00732421875,
0.01611328125,
-0.0333251953125,
0.002986907958984375,
0.011077880859375,
-0.0033855438232421875,
0.0044708251953125,
0.0212554931640625,
0.01276397705078125,
-0.053802490234375,
-0.0099639892578125,
0.030914306640625,
0.055389404296875,
0.0117950439453125,
-0.031982421875,
-0.01258087158203125,
0.03326416015625,
-0.049835205078125,
0.045379638671875,
-0.00001519918441772461,
0.06573486328125,
0.0322265625,
0.005794525146484375,
0.00969696044921875,
-0.0225830078125,
-0.06903076171875,
-0.023529052734375,
0.0017995834350585938,
0.00009065866470336914,
0.0006642341613769531,
-0.0249481201171875,
0.007106781005859375,
0.03350830078125,
0.0247039794921875,
0.0177459716796875,
0.0062255859375,
0.019317626953125,
-0.0167083740234375,
0.0025501251220703125,
-0.014556884765625,
0.0279541015625,
0.006893157958984375,
-0.0117645263671875,
0.0050506591796875,
-0.00926971435546875,
0.0265350341796875,
-0.065185546875,
-0.053466796875,
0.006374359130859375,
0.0028896331787109375,
-0.0058746337890625,
-0.0008611679077148438,
0.0019216537475585938,
0.00768280029296875,
-0.00872039794921875,
-0.0199737548828125,
0.03033447265625,
0.038299560546875,
-0.031097412109375,
-0.01416778564453125,
-0.03350830078125,
0.03173828125,
-0.00466156005859375,
-0.0147247314453125,
0.0279541015625,
0.0008893013000488281,
-0.0134735107421875,
-0.0283050537109375,
-0.01006317138671875,
-0.0285491943359375,
-0.07318115234375,
0.003765106201171875,
0.06512451171875,
0.0167083740234375,
0.00823211669921875,
-0.031951904296875,
-0.00027441978454589844,
0.05792236328125,
0.043701171875,
0.025848388671875,
-0.0028362274169921875,
0.033111572265625,
0.03594970703125,
-0.03448486328125,
-0.0298004150390625,
0.038970947265625,
-0.049957275390625,
0.0338134765625,
0.0233306884765625,
-0.0322265625,
-0.01812744140625,
0.016998291015625,
-0.0073394775390625,
-0.000629425048828125,
-0.025543212890625,
-0.00518035888671875,
-0.012664794921875,
0.054168701171875,
0.0199127197265625,
0.048797607421875,
0.028839111328125,
-0.03314208984375,
0.0299224853515625,
0.005283355712890625,
-0.0209808349609375,
-0.0011148452758789062,
0.01088714599609375,
-0.0333251953125,
0.0004379749298095703,
-0.0211639404296875,
0.001979827880859375,
-0.01256561279296875,
-0.00974273681640625,
0.00380706787109375,
0.05523681640625,
-0.0467529296875,
-0.0243377685546875,
0.0165863037109375,
-0.037078857421875,
-0.04351806640625,
-0.0002663135528564453,
-0.0171661376953125,
-0.0301055908203125,
-0.004543304443359375,
0.0286712646484375,
-0.02459716796875,
0.02587890625,
0.00008690357208251953,
-0.02178955078125,
0.017669677734375,
-0.0469970703125,
0.036224365234375,
-0.05810546875,
0.01474761962890625,
0.0523681640625,
-0.03704833984375,
0.028839111328125,
0.005496978759765625,
0.0221099853515625,
0.00608062744140625,
0.0240631103515625,
-0.0003418922424316406,
-0.0013360977172851562,
-0.03515625,
-0.00731658935546875,
0.03070068359375,
0.08349609375,
-0.0071868896484375,
-0.03338623046875,
-0.005706787109375,
0.03656005859375,
-0.017425537109375,
-0.027618408203125,
0.0548095703125,
-0.0269775390625,
-0.00946807861328125,
-0.045166015625,
-0.007175445556640625,
-0.01508331298828125,
-0.040435791015625,
-0.0162811279296875,
0.008636474609375,
-0.041961669921875,
-0.0239715576171875,
-0.03289794921875,
-0.05487060546875,
-0.00920867919921875,
0.010955810546875,
0.0245819091796875,
-0.0047760009765625,
0.07318115234375,
-0.01279449462890625,
-0.0684814453125,
-0.01441192626953125,
-0.05059814453125,
-0.00901031494140625,
0.038116455078125,
0.0511474609375,
-0.0255889892578125,
0.031707763671875,
0.0189056396484375,
0.03936767578125,
0.056793212890625,
-0.06195068359375,
-0.044677734375,
-0.040374755859375,
0.0038814544677734375,
0.0001590251922607422,
0.0143585205078125,
0.031524658203125,
0.021759033203125,
0.018096923828125,
-0.0203399658203125,
-0.0433349609375,
0.006618499755859375,
-0.04656982421875,
0.01154327392578125,
0.028839111328125,
-0.010833740234375,
-0.044525146484375,
0.038787841796875,
0.0105438232421875,
0.0030345916748046875,
0.04559326171875,
-0.0178375244140625,
-0.0006561279296875,
-0.00522613525390625,
-0.004161834716796875,
-0.0287933349609375,
0.0134124755859375,
-0.00940704345703125,
0.0183258056640625,
0.01300048828125,
0.055694580078125,
0.0033721923828125,
0.037750244140625,
-0.04638671875,
-0.068115234375,
0.028228759765625,
-0.0599365234375,
0.0036773681640625,
-0.029296875,
0.006866455078125,
0.00070953369140625,
0.072509765625,
-0.057830810546875,
-0.0217742919921875,
0.0246124267578125,
0.0185394287109375,
-0.01190185546875,
-0.029052734375,
-0.0462646484375,
-0.03363037109375,
-0.043212890625,
0.0187530517578125,
-0.009246826171875,
-0.02203369140625,
-0.037384033203125,
0.0169525146484375,
-0.039794921875,
-0.023345947265625,
0.032806396484375,
0.02764892578125,
-0.002048492431640625,
0.0186004638671875,
-0.016143798828125,
0.0187225341796875,
-0.01117706298828125,
0.01021575927734375,
-0.133056640625,
-0.037445068359375,
-0.007678985595703125,
0.08673095703125,
0.00988006591796875,
0.0012454986572265625,
-0.0401611328125,
0.05682373046875,
0.01285552978515625,
0.0180511474609375,
0.0037364959716796875,
0.007110595703125,
0.01180267333984375,
-0.047698974609375,
0.0022678375244140625,
-0.0457763671875,
-0.03125,
-0.0576171875,
0.0131072998046875,
0.035888671875,
-0.01433563232421875,
0.049224853515625,
-0.0264892578125,
0.01131439208984375,
-0.01409912109375,
-0.025390625,
-0.0273590087890625,
0.033721923828125,
-0.04974365234375,
0.036773681640625,
-0.0253753662109375,
-0.02191162109375,
0.050079345703125,
-0.0064544677734375,
-0.00914764404296875,
0.0001512765884399414,
0.062744140625,
0.015899658203125,
-0.024322509765625,
-0.00569915771484375,
-0.0182952880859375,
0.01326751708984375,
-0.0121612548828125,
0.0341796875,
0.002044677734375,
-0.0036983489990234375,
0.072509765625,
-0.032501220703125,
-0.0094146728515625,
-0.02813720703125,
0.056304931640625,
-0.00865936279296875,
-0.00949859619140625,
0.0020599365234375,
-0.036956787109375,
0.033721923828125,
0.0063629150390625,
-0.0129852294921875,
-0.0198822021484375,
-0.0311737060546875,
0.049163818359375,
-0.006679534912109375,
0.03692626953125,
-0.038360595703125,
0.004558563232421875,
-0.00010722875595092773,
-0.014312744140625,
0.0270233154296875,
0.0263671875,
0.003955841064453125,
-0.003696441650390625,
-0.0170440673828125,
0.0232391357421875,
0.0021114349365234375,
-0.026580810546875,
-0.0093994140625,
0.031494140625,
0.0018978118896484375,
0.0174102783203125,
0.0237884521484375,
-0.007678985595703125,
0.08013916015625,
-0.002567291259765625,
-0.048309326171875,
-0.0283355712890625,
0.002288818359375,
0.049102783203125,
0.00411224365234375,
-0.0011529922485351562,
0.03363037109375,
0.06268310546875,
-0.01523590087890625,
-0.0019006729125976562,
-0.019683837890625,
0.057708740234375,
-0.042449951171875,
-0.0174102783203125,
0.01306915283203125,
-0.0328369140625,
0.00664520263671875,
0.01284027099609375,
0.0257110595703125,
-0.00696563720703125,
-0.0213775634765625,
0.040069580078125,
0.037445068359375,
0.02093505859375,
-0.0061492919921875,
0.021636962890625,
-0.033111572265625,
0.0307464599609375,
-0.004047393798828125,
-0.018157958984375,
0.00934600830078125,
-0.0030384063720703125,
0.02978515625,
-0.0007042884826660156,
-0.019134521484375,
0.020416259765625,
-0.052581787109375,
0.0021800994873046875,
-0.019805908203125,
-0.0269317626953125,
-0.049774169921875,
0.017333984375,
0.0155181884765625,
-0.0213775634765625,
-0.0278472900390625,
-0.0081939697265625,
0.0250396728515625,
-0.049560546875,
0.049560546875,
-0.04534912109375,
0.042877197265625,
-0.037322998046875,
-0.04669189453125,
-0.004360198974609375,
-0.0037899017333984375,
-0.011566162109375,
-0.0440673828125,
-0.046234130859375,
0.0027446746826171875,
0.00629425048828125,
0.033355712890625,
-0.016937255859375,
0.032257080078125,
-0.01044464111328125,
-0.01515960693359375,
-0.0020389556884765625,
0.006572723388671875,
0.043060302734375,
0.01395416259765625,
-0.035003662109375,
-0.007205963134765625,
-0.046142578125,
-0.00559234619140625,
-0.0188140869140625,
-0.049713134765625,
-0.01593017578125,
-0.0193634033203125,
0.033935546875,
-0.0037517547607421875,
0.00782012939453125,
-0.0704345703125,
-0.059356689453125,
0.0179595947265625,
0.08782958984375,
0.01012420654296875,
0.0094757080078125,
0.04888916015625,
0.0030670166015625,
0.0526123046875,
0.037109375,
0.046112060546875,
-0.01201629638671875,
-0.0616455078125,
0.0186614990234375,
-0.01558685302734375,
-0.005321502685546875,
0.0012760162353515625,
-0.03131103515625,
-0.028594970703125,
0.0121612548828125,
-0.01177215576171875,
0.01025390625,
-0.0205841064453125,
0.00019931793212890625,
-0.015838623046875,
0.0246124267578125,
-0.042388916015625,
-0.003387451171875,
0.01088714599609375,
0.0184326171875,
0.0745849609375,
-0.05126953125,
-0.043182373046875,
0.05426025390625,
-0.020599365234375,
0.0635986328125,
0.02056884765625,
-0.0712890625,
0.07672119140625,
0.04052734375,
-0.0037841796875,
0.0175628662109375,
0.002788543701171875,
-0.01012420654296875,
-0.01141357421875,
-0.03778076171875,
0.0209197998046875,
0.064208984375,
0.07568359375,
-0.01389312744140625,
-0.0188751220703125,
0.03582763671875,
-0.036102294921875,
0.04095458984375,
0.076904296875,
0.0948486328125,
-0.1192626953125,
0.035552978515625,
0.01042938232421875,
-0.003337860107421875,
0.08038330078125,
0.004913330078125,
0.00024890899658203125,
-0.0224761962890625,
-0.017303466796875,
0.003986358642578125,
-0.0335693359375,
-0.031341552734375,
0.0101165771484375,
-0.024444580078125,
0.0112457275390625,
-0.011505126953125,
0.0157012939453125,
0.0153961181640625,
-0.004779815673828125,
-0.007732391357421875,
0.013214111328125,
0.00040411949157714844,
0.0206146240234375,
-0.0113067626953125,
-0.00890350341796875,
-0.04583740234375,
0.0135650634765625,
-0.031219482421875,
-0.0135650634765625,
0.000415802001953125,
0.00015020370483398438,
0.00016260147094726562,
0.04852294921875,
-0.0217742919921875,
0.0198822021484375,
0.020172119140625,
-0.0419921875,
-0.0059814453125,
-0.0264739990234375,
0.00865936279296875,
0.053375244140625,
-0.024688720703125,
0.029815673828125,
0.01548004150390625,
-0.03985595703125,
0.0007658004760742188,
0.00403594970703125,
0.06561279296875,
-0.046356201171875,
-0.0106658935546875,
0.0290679931640625,
-0.00977325439453125,
-0.00815582275390625,
-0.01277923583984375,
0.0110931396484375,
-0.0280914306640625,
0.004489898681640625,
-0.0303192138671875,
-0.02862548828125,
0.005466461181640625,
-0.0399169921875,
-0.05963134765625,
0.07647705078125,
0.00028777122497558594,
-0.0025959014892578125,
-0.01016998291015625,
0.03399658203125,
-0.0301666259765625,
0.01122283935546875,
-0.0487060546875,
0.04931640625,
-0.00685882568359375,
0.0576171875,
-0.0638427734375,
-0.0203399658203125,
0.00847625732421875,
0.038177490234375,
0.025177001953125,
-0.0036792755126953125,
0.01123809814453125,
-0.0173797607421875,
0.027740478515625,
0.032073974609375,
-0.01168060302734375,
-0.0016355514526367188,
-0.0268402099609375,
0.032989501953125,
0.0203857421875,
-0.024078369140625,
0.01849365234375,
0.01206207275390625,
-0.045379638671875,
0.0097198486328125,
0.0377197265625,
0.0447998046875,
0.0191650390625,
0.01959228515625,
-0.0181427001953125,
0.00601959228515625,
0.0235595703125,
-0.016693115234375,
-0.0306549072265625,
0.07550048828125,
0.042755126953125,
-0.00716400146484375,
-0.0140380859375,
-0.039703369140625,
0.045806884765625,
0.026947021484375,
0.03900146484375,
0.053680419921875,
0.018096923828125,
0.017547607421875,
0.011962890625,
0.0255584716796875,
-0.0028667449951171875,
-0.0008196830749511719,
0.045684814453125,
0.044036865234375,
0.0158843994140625,
-0.0019063949584960938,
0.051239013671875,
0.0174713134765625,
0.045379638671875,
-0.047119140625,
0.0202178955078125,
0.023345947265625,
0.0259552001953125,
-0.00994873046875,
-0.055877685546875,
-0.00618743896484375,
-0.0231475830078125,
0.00118255615234375,
-0.053436279296875,
-0.001708984375,
0.039276123046875,
-0.0017995834350585938,
-0.01146697998046875,
-0.01141357421875,
-0.00679779052734375,
-0.0035114288330078125,
-0.01123809814453125,
0.005268096923828125,
0.005954742431640625,
0.0206298828125,
-0.010223388671875,
0.05706787109375,
-0.01273345947265625,
0.00516510009765625,
-0.010528564453125,
0.037506103515625,
-0.0122833251953125,
0.024139404296875,
-0.03692626953125,
-0.043121337890625,
-0.01216888427734375,
0.0350341796875,
0.00395965576171875,
0.0396728515625,
0.0491943359375,
0.022186279296875,
-0.0245361328125,
0.0015573501586914062,
0.0016460418701171875,
-0.03277587890625,
-0.01241302490234375,
-0.043426513671875,
0.02178955078125,
0.0294189453125,
0.004016876220703125,
0.0115203857421875,
-0.005641937255859375,
0.041778564453125,
-0.00555419921875,
0.007717132568359375,
0.002140045166015625,
-0.02490234375,
0.04046630859375,
-0.00325775146484375,
0.0498046875,
0.01184844970703125,
-0.08746337890625,
-0.0170745849609375,
-0.04351806640625,
-0.09722900390625,
0.06085205078125,
0.068603515625,
-0.0076446533203125,
-0.03228759765625,
-0.01849365234375,
0.018280029296875,
0.0107574462890625,
-0.0099639892578125,
-0.0060882568359375,
0.01454925537109375,
0.0440673828125,
0.004863739013671875,
-0.051025390625,
-0.038116455078125,
-0.0244598388671875,
0.0560302734375,
0.0252838134765625,
0.004177093505859375,
-0.0034160614013671875,
0.05487060546875,
-0.0004019737243652344,
0.004791259765625,
-0.01056671142578125,
-0.0010271072387695312,
0.01204681396484375,
0.005832672119140625,
0.021575927734375,
-0.0187530517578125,
-0.00031375885009765625,
0.024261474609375,
0.01497650146484375,
-0.037994384765625,
0.0303192138671875,
-0.052703857421875,
0.00939178466796875,
-0.0390625,
-0.0005702972412109375,
-0.0185546875,
-0.008575439453125,
-0.0177001953125,
-0.00875091552734375,
0.0219879150390625,
-0.008148193359375,
-0.01415252685546875,
0.0225830078125,
0.009185791015625,
-0.006168365478515625,
0.0057220458984375,
-0.006805419921875,
0.008087158203125,
0.03826904296875,
-0.0157623291015625,
-0.038330078125,
0.04302978515625,
-0.0034961700439453125,
0.0093994140625,
0.033294677734375,
0.0271453857421875,
0.034820556640625,
-0.06805419921875,
0.0025634765625,
0.018524169921875,
0.046966552734375,
-0.02801513671875,
0.021484375,
-0.012115478515625,
0.004680633544921875,
0.048797607421875,
0.01233673095703125,
-0.0176849365234375,
-0.01284027099609375,
-0.0106658935546875,
0.01432037353515625,
-0.0163421630859375,
-0.029937744140625,
-0.0565185546875,
0.00396728515625,
-0.0017757415771484375,
-0.00972747802734375,
-0.024139404296875,
0.0156097412109375,
0.00450897216796875,
0.0169830322265625,
-0.0305633544921875,
-0.033477783203125,
0.02996826171875,
0.040771484375,
-0.04425048828125,
-0.0111236572265625,
-0.03619384765625,
-0.034332275390625,
-0.027557373046875,
0.041595458984375,
0.058380126953125,
-0.03472900390625,
0.00492095947265625,
0.027191162109375,
0.022003173828125,
0.08514404296875,
-0.01004791259765625,
-0.0226287841796875,
0.0172119140625,
-0.013153076171875,
-0.02783203125,
-0.04766845703125,
0.01934814453125,
-0.098876953125,
-0.03216552734375,
0.02001953125,
-0.0000017285346984863281,
0.0379638671875,
-0.0313720703125,
-0.06292724609375,
0.0248870849609375,
-0.00970458984375,
-0.03424072265625,
-0.0300140380859375,
0.0226593017578125,
-0.01053619384765625,
-0.0153961181640625,
-0.0025730133056640625,
-0.0125579833984375,
-0.01107025146484375,
0.0037384033203125,
-0.0087127685546875,
0.022918701171875,
0.0160369873046875,
-0.00850677490234375,
-0.043487548828125,
-0.00131988525390625,
-0.0184326171875,
-0.010986328125,
0.0364990234375,
-0.0550537109375,
0.041595458984375,
0.019927978515625,
-0.051116943359375,
-0.07275390625,
-0.0111846923828125,
-0.0071258544921875,
-0.01229095458984375,
-0.033905029296875,
-0.01995849609375,
-0.035980224609375,
0.043853759765625,
0.03375244140625,
0.0009002685546875,
-0.00017201900482177734,
0.00797271728515625,
-0.0168609619140625,
-0.033294677734375,
-0.0144500732421875,
0.012359619140625,
-0.06842041015625,
-0.031036376953125,
0.01395416259765625,
-0.0216522216796875,
-0.0162811279296875,
0.01806640625,
-0.024658203125,
0.020172119140625,
0.046661376953125,
-0.004787445068359375,
-0.02154541015625,
0.02557373046875,
0.0361328125,
-0.0240631103515625,
0.0293121337890625,
-0.0166015625,
0.005168914794921875,
0.0264739990234375,
-0.00021457672119140625,
-0.03106689453125,
-0.05322265625,
0.00701904296875,
0.01415252685546875,
-0.01263427734375,
0.051544189453125,
0.00537109375,
-0.0275726318359375,
-0.01393890380859375,
0.0389404296875,
-0.00707244873046875,
0.0556640625,
0.011383056640625,
0.0214385986328125,
0.004741668701171875,
0.04034423828125,
-0.0257110595703125,
-0.01232147216796875,
-0.02117919921875,
0.01255035400390625,
-0.043914794921875,
0.0237884521484375,
-0.0163421630859375,
-0.0185699462890625,
0.0211639404296875,
-0.0200042724609375,
-0.0038890838623046875,
-0.013885498046875,
0.0058135986328125,
-0.025543212890625,
-0.033935546875,
0.01380157470703125
]
|
8de5cd16ebea62cd995870a758e9cd24b3d3138b | Wordpress Stackexchange
Q: Multiple endpoints in one URL I am trying to add multiple endpoints in one url like:
http://localhost:1000/manage-lead/lead_id/1000/product_id/123455
But this way the query var lead_id is equal to 1000/product/123455 and not 1000.
When I do it the following way everything goes right:
http://localhost:1000/manage-lead/lead_id/1000/?product_id=123455
So I think that I need to add some rewrite rules, so Wordpress understands that lead_id and product_id are 2 query vars.
How I add my endpoints:
function add_lead_management_endpoints() {
add_rewrite_endpoint( 'lead_id', EP_PAGES );
add_rewrite_endpoint( 'product_id', EP_PAGES );
}
add_action( 'init', 'add_lead_management_endpoints' );
A: Not sure of the context for this, is it a custom post type or just a page?
This might be something which you're looking for -
function add_lead_management_endpoints() {
add_rewrite_rule(
'manage-lead/lead_id/([0-9]{1,})/product_id/([0-9]{1,})',
'index.php?pagename=manage-lead&lead_id=$matches[1]&product_id=$matches[2]',
'top'
);
add_rewrite_tag( '%lead_id%', '([^&]+)' );
add_rewrite_tag( '%product_id%', '([^&]+)' );
}
add_action( 'init', 'add_lead_management_endpoints' );
You'll need to flush permalinks for this to take affect (visit settings->permalinks).
| Q: Multiple endpoints in one URL I am trying to add multiple endpoints in one url like:
http://localhost:1000/manage-lead/lead_id/1000/product_id/123455
But this way the query var lead_id is equal to 1000/product/123455 and not 1000.
When I do it the following way everything goes right:
http://localhost:1000/manage-lead/lead_id/1000/?product_id=123455
So I think that I need to add some rewrite rules, so Wordpress understands that lead_id and product_id are 2 query vars.
How I add my endpoints:
function add_lead_management_endpoints() {
add_rewrite_endpoint( 'lead_id', EP_PAGES );
add_rewrite_endpoint( 'product_id', EP_PAGES );
}
add_action( 'init', 'add_lead_management_endpoints' );
A: Not sure of the context for this, is it a custom post type or just a page?
This might be something which you're looking for -
function add_lead_management_endpoints() {
add_rewrite_rule(
'manage-lead/lead_id/([0-9]{1,})/product_id/([0-9]{1,})',
'index.php?pagename=manage-lead&lead_id=$matches[1]&product_id=$matches[2]',
'top'
);
add_rewrite_tag( '%lead_id%', '([^&]+)' );
add_rewrite_tag( '%product_id%', '([^&]+)' );
}
add_action( 'init', 'add_lead_management_endpoints' );
You'll need to flush permalinks for this to take affect (visit settings->permalinks).
| wordpress | {
"language": "en",
"length": 146,
"provenance": "stackexchange_00019.jsonl.gz:464550",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/223098"
} | [
0.0482177734375,
-0.03009033203125,
0.016876220703125,
-0.0721435546875,
-0.0240936279296875,
-0.0141754150390625,
0.033355712890625,
0.018951416015625,
-0.0428466796875,
0.003910064697265625,
0.01560211181640625,
0.0184783935546875,
-0.042510986328125,
-0.051177978515625,
0.054931640625,
-0.0240020751953125,
0.00931549072265625,
0.019683837890625,
0.0234222412109375,
-0.029998779296875,
0.02679443359375,
-0.0283966064453125,
-0.01035308837890625,
0.058349609375,
0.0272369384765625,
-0.0157318115234375,
-0.0323486328125,
-0.0217437744140625,
-0.029327392578125,
-0.04302978515625,
-0.0018091201782226562,
0.06829833984375,
0.03668212890625,
-0.027313232421875,
0.0259246826171875,
-0.004390716552734375,
0.055450439453125,
-0.03936767578125,
-0.006130218505859375,
0.042633056640625,
0.049957275390625,
-0.03460693359375,
0.0294647216796875,
0.00066375732421875,
0.031097412109375,
-0.0257110595703125,
0.06842041015625,
-0.07501220703125,
0.0266571044921875,
0.01214599609375,
-0.01275634765625,
-0.005352020263671875,
-0.022216796875,
0.033172607421875,
-0.036224365234375,
-0.015716552734375,
0.055145263671875,
-0.0789794921875,
0.024322509765625,
0.01433563232421875,
-0.019622802734375,
-0.00524139404296875,
0.007366180419921875,
-0.04510498046875,
-0.023040771484375,
0.0155181884765625,
-0.008758544921875,
0.0170745849609375,
0.0268707275390625,
-0.020965576171875,
-0.00860595703125,
-0.0022678375244140625,
0.007114410400390625,
0.0176239013671875,
-0.02130126953125,
-0.05499267578125,
0.004573822021484375,
-0.0106658935546875,
0.0096893310546875,
0.03533935546875,
-0.0139007568359375,
-0.05096435546875,
-0.0125732421875,
-0.0251312255859375,
0.021209716796875,
0.0113983154296875,
-0.003387451171875,
0.0090484619140625,
-0.015899658203125,
0.0022335052490234375,
-0.0128936767578125,
0.004779815673828125,
0.0096893310546875,
0.007129669189453125,
-0.0274658203125,
0.001438140869140625,
0.014862060546875,
-0.00962066650390625,
0.004497528076171875,
0.004451751708984375,
0.04376220703125,
-0.061859130859375,
0.0672607421875,
-0.0275421142578125,
0.0014657974243164062,
0.0352783203125,
0.006191253662109375,
0.034576416015625,
0.0628662109375,
0.016082763671875,
0.00620269775390625,
0.056488037109375,
-0.012908935546875,
0.046142578125,
-0.0302276611328125,
-0.01523590087890625,
-0.0797119140625,
0.0260162353515625,
-0.034088134765625,
0.0299530029296875,
-0.01084136962890625,
0.0076141357421875,
0.006549835205078125,
0.0179595947265625,
0.0271148681640625,
0.022796630859375,
0.0032672882080078125,
-0.0155487060546875,
0.032989501953125,
-0.00936126708984375,
-0.03662109375,
0.0183868408203125,
0.03302001953125,
0.0316162109375,
0.0244903564453125,
0.002399444580078125,
0.0222015380859375,
-0.0052490234375,
-0.002071380615234375,
0.0311279296875,
0.0135345458984375,
-0.04876708984375,
-0.01314544677734375,
0.02215576171875,
-0.01056671142578125,
-0.0107421875,
0.0189056396484375,
0.0297698974609375,
0.00415802001953125,
-0.0056610107421875,
-0.010009765625,
-0.0015287399291992188,
0.0221099853515625,
-0.007205963134765625,
-0.00782012939453125,
-0.03753662109375,
-0.0116119384765625,
-0.0165863037109375,
0.0185089111328125,
-0.0173492431640625,
0.00788116455078125,
-0.0037555694580078125,
0.0256500244140625,
-0.07061767578125,
-0.05670166015625,
-0.0259857177734375,
-0.075439453125,
-0.0205841064453125,
0.0143585205078125,
0.057525634765625,
-0.012054443359375,
-0.01052093505859375,
0.001983642578125,
-0.00152587890625,
-0.01169586181640625,
0.0005469322204589844,
0.01031494140625,
0.00933074951171875,
0.016021728515625,
0.0033397674560546875,
-0.021881103515625,
-0.05218505859375,
0.052032470703125,
-0.023468017578125,
-0.08343505859375,
0.0999755859375,
-0.01219940185546875,
0.08892822265625,
-0.004390716552734375,
-0.01430511474609375,
0.049407958984375,
0.0289306640625,
0.007045745849609375,
-0.0232696533203125,
0.0024700164794921875,
-0.033233642578125,
0.0235595703125,
-0.0083770751953125,
-0.006336212158203125,
-0.0008072853088378906,
-0.04718017578125,
0.0196380615234375,
-0.01262664794921875,
0.054168701171875,
-0.04425048828125,
0.034576416015625,
-0.027984619140625,
0.03460693359375,
-0.0124359130859375,
-0.02374267578125,
0.02508544921875,
0.0084228515625,
-0.0138092041015625,
-0.0546875,
-0.02325439453125,
0.050689697265625,
0.0161285400390625,
-0.0022296905517578125,
-0.018768310546875,
-0.0275726318359375,
-0.00891876220703125,
0.00989532470703125,
-0.0097198486328125,
0.076904296875,
0.030120849609375,
0.01445770263671875,
-0.0071563720703125,
0.01043701171875,
0.02423095703125,
0.018157958984375,
-0.029571533203125,
0.015838623046875,
0.05938720703125,
0.00786590576171875,
-0.03594970703125,
0.03375244140625,
0.0242767333984375,
-0.00441741943359375,
-0.038116455078125,
0.0305328369140625,
0.02899169921875,
-0.0027141571044921875,
-0.01885986328125,
-0.00963592529296875,
0.00373077392578125,
-0.043304443359375,
0.0062713623046875,
-0.0011835098266601562,
-0.01078033447265625,
0.036834716796875,
-0.04095458984375,
0.010223388671875,
0.014892578125,
-0.08624267578125,
-0.0142059326171875,
0.04583740234375,
-0.03131103515625,
-0.03106689453125,
-0.0345458984375,
0.01093292236328125,
0.00372314453125,
-0.075927734375,
-0.02813720703125,
-0.0266265869140625,
-0.0011310577392578125,
-0.00998687744140625,
0.031768798828125,
0.029205322265625,
0.0033359527587890625,
-0.044158935546875,
-0.00018203258514404297,
0.0292510986328125,
-0.00945281982421875,
-0.006778717041015625,
0.00726318359375,
-0.052642822265625,
-0.0279388427734375,
0.02618408203125,
-0.0031452178955078125,
-0.0262908935546875,
-0.0202789306640625,
0.008148193359375,
-0.01137542724609375,
-0.00884246826171875,
-0.00815582275390625,
-0.006946563720703125,
0.004619598388671875,
-0.004245758056640625,
0.0498046875,
0.01131439208984375,
0.0355224609375,
-0.01273345947265625,
-0.0084075927734375,
0.0288848876953125,
0.0200653076171875,
-0.053619384765625,
0.00891876220703125,
-0.04022216796875,
0.03778076171875,
-0.04669189453125,
0.016815185546875,
0.055511474609375,
0.00821685791015625,
-0.03375244140625,
-0.00710296630859375,
0.0007448196411132812,
-0.0232696533203125,
0.0298309326171875,
0.00762939453125,
-0.0290679931640625,
-0.054168701171875,
0.005146026611328125,
0.0390625,
0.035247802734375,
0.040069580078125,
-0.01351165771484375,
0.0182952880859375,
0.03717041015625,
-0.034637451171875,
-0.08050537109375,
0.022430419921875,
-0.03155517578125,
0.00852203369140625,
0.01387786865234375,
-0.01354217529296875,
-0.0237274169921875,
0.03094482421875,
0.01059722900390625,
-0.01322174072265625,
-0.046417236328125,
-0.057342529296875,
-0.07373046875,
-0.07000732421875,
0.00595855712890625,
0.0003552436828613281,
0.00630950927734375,
0.01097869873046875,
0.02001953125,
0.008636474609375,
-0.033203125,
0.0272674560546875,
-0.04388427734375,
-0.02020263671875,
0.0024051666259765625,
-0.033599853515625,
-0.021820068359375,
-0.00452423095703125,
-0.01335906982421875,
0.0238037109375,
-0.0056610107421875,
0.026885986328125,
0.005649566650390625,
-0.00537109375,
0.01451873779296875,
0.006748199462890625,
-0.017364501953125,
0.0235137939453125,
0.0283203125,
0.0012216567993164062,
-0.02740478515625,
-0.0595703125,
-0.0286712646484375,
-0.055694580078125,
-0.006580352783203125,
0.07073974609375,
-0.01190948486328125,
-0.00545501708984375,
-0.01340484619140625,
0.0537109375,
0.0078887939453125,
0.0019054412841796875,
-0.005329132080078125,
0.03851318359375,
-0.0021209716796875,
0.0384521484375,
-0.04376220703125,
0.0274200439453125,
-0.0251312255859375,
0.005496978759765625,
-0.00667572021484375,
-0.021484375,
-0.03118896484375,
0.0179443359375,
-0.06817626953125,
-0.0309295654296875,
0.0438232421875,
-0.014923095703125,
-0.006252288818359375,
-0.0260467529296875,
-0.0121307373046875,
-0.0249176025390625,
0.056732177734375,
-0.04119873046875,
-0.01551055908203125,
-0.0205078125,
0.0221710205078125,
-0.00920867919921875,
-0.057403564453125,
0.00324249267578125,
-0.01097869873046875,
0.0218658447265625,
-0.016754150390625,
-0.02716064453125,
-0.01126861572265625,
-0.00978851318359375,
-0.01812744140625,
0.0179290771484375,
-0.021484375,
0.051116943359375,
0.01309967041015625,
0.01094818115234375,
0.03131103515625,
-0.009490966796875,
0.0198516845703125,
-0.06903076171875,
0.0244140625,
-0.05230712890625,
-0.028045654296875,
0.033111572265625,
0.057464599609375,
0.009063720703125,
-0.0777587890625,
0.0038928985595703125,
0.05914306640625,
-0.01776123046875,
-0.042755126953125,
0.03497314453125,
0.024993896484375,
-0.041717529296875,
0.01549530029296875,
-0.002655029296875,
-0.0308074951171875,
-0.0167999267578125,
-0.0291748046875,
-0.036773681640625,
0.029571533203125,
0.0004124641418457031,
0.0297393798828125,
0.013916015625,
-0.0125885009765625,
-0.0909423828125,
-0.0200653076171875,
0.0015354156494140625,
0.039337158203125,
0.00974273681640625,
-0.0198822021484375,
-0.0283966064453125,
-0.0972900390625,
0.0200042724609375,
-0.0198974609375,
0.037139892578125,
0.0020618438720703125,
0.03717041015625,
-0.00507354736328125,
-0.0265960693359375,
0.04791259765625,
0.0273284912109375,
0.033660888671875,
-0.0027866363525390625,
0.0199127197265625,
0.01690673828125,
-0.0057373046875,
-0.0178985595703125,
-0.005809783935546875,
0.01494598388671875,
0.04071044921875,
-0.006927490234375,
0.0117950439453125,
-0.00988006591796875,
0.007762908935546875,
0.032806396484375,
-0.031707763671875,
0.049957275390625,
-0.008819580078125,
-0.035186767578125,
-0.0178070068359375,
0.032257080078125,
-0.01178741455078125,
0.00963592529296875,
-0.03271484375,
-0.05157470703125,
0.0163116455078125,
0.003833770751953125,
0.02947998046875,
0.0276641845703125,
0.0008258819580078125,
0.039337158203125,
-0.00612640380859375,
-0.0010204315185546875,
0.02764892578125,
0.01157379150390625,
0.0007648468017578125,
0.014495849609375,
0.0294189453125,
-0.0093841552734375,
-0.004650115966796875,
-0.01020050048828125,
0.08843994140625,
0.0229339599609375,
-0.0200958251953125,
0.0098876953125,
-0.037841796875,
-0.040802001953125,
0.01136016845703125,
0.01280975341796875,
0.0236053466796875,
0.00107574462890625,
0.00464630126953125,
-0.0019817352294921875,
-0.02001953125,
0.002960205078125,
-0.03546142578125,
0.012298583984375,
-0.00458526611328125,
-0.0005292892456054688,
-0.0262298583984375,
0.06982421875,
-0.0261077880859375,
0.0205841064453125,
0.0172882080078125,
0.028045654296875,
0.039886474609375,
0.034332275390625,
0.007793426513671875,
0.01495361328125,
-0.0145416259765625,
0.023193359375,
0.0082550048828125,
-0.027130126953125,
0.0009946823120117188,
0.06939697265625,
0.0450439453125,
0.0029888153076171875,
-0.021820068359375,
-0.031036376953125,
-0.035186767578125,
-0.01549530029296875,
0.0034580230712890625,
-0.025421142578125,
-0.039154052734375,
-0.025604248046875,
0.03436279296875,
0.0266876220703125,
-0.01349639892578125,
0.0194549560546875,
-0.0214996337890625,
-0.0252532958984375,
-0.00986480712890625,
-0.00437164306640625,
0.00556182861328125,
-0.03955078125,
-0.0435791015625,
0.06683349609375,
-0.0220947265625,
-0.0258026123046875,
-0.032745361328125,
0.025054931640625,
-0.038970947265625,
0.018096923828125,
0.048248291015625,
-0.01041412353515625,
0.04449462890625,
0.01026153564453125,
-0.05267333984375,
0.021942138671875,
0.00376129150390625,
0.03240966796875,
0.0247955322265625,
-0.0262603759765625,
-0.007335662841796875,
-0.02325439453125,
-0.007022857666015625,
0.057220458984375,
-0.003749847412109375,
0.01407623291015625,
-0.03155517578125,
0.0128631591796875,
0.047698974609375,
-0.0200958251953125,
-0.006847381591796875,
0.020782470703125,
0.005950927734375,
-0.021240234375,
0.06927490234375,
-0.023468017578125,
0.04901123046875,
0.012359619140625,
0.038238525390625,
0.00891876220703125,
-0.00951385498046875,
-0.030120849609375,
-0.0006299018859863281,
-0.00820159912109375,
-0.0106964111328125,
-0.004451751708984375,
0.006748199462890625,
-0.004367828369140625,
0.002227783203125,
0.037109375,
-0.0011539459228515625,
0.0526123046875,
-0.006832122802734375,
0.0086212158203125,
-0.027069091796875,
-0.0198822021484375,
-0.03912353515625,
0.027069091796875,
0.033111572265625,
0.0082244873046875,
0.09039306640625,
0.0022106170654296875,
0.0137786865234375,
-0.01300048828125,
-0.0228424072265625,
0.0310211181640625,
0.01346588134765625,
-0.0335693359375,
0.03192138671875,
0.08148193359375,
-0.0014810562133789062,
0.053619384765625,
0.0230865478515625,
0.027862548828125,
0.09503173828125,
-0.0149383544921875,
0.03558349609375,
0.03936767578125,
0.0264434814453125,
-0.0179595947265625,
0.0261688232421875,
0.0201416015625,
-0.004886627197265625,
-0.0299224853515625,
-0.0087127685546875,
-0.0081787109375,
-0.0296783447265625,
-0.006229400634765625,
-0.046478271484375,
0.0128936767578125,
0.0494384765625,
0.0120086669921875,
0.03936767578125,
0.05206298828125,
-0.029754638671875,
0.017364501953125,
-0.0184173583984375,
-0.004901885986328125,
0.0015249252319335938,
0.0056915283203125,
-0.0174560546875,
0.0139312744140625,
-0.0242919921875,
0.0113372802734375,
-0.04180908203125,
-0.005069732666015625,
-0.0198516845703125,
0.00727081298828125,
-0.02142333984375,
0.012725830078125,
-0.034210205078125,
-0.013519287109375,
0.02874755859375,
-0.0465087890625,
0.01279449462890625,
0.029388427734375,
-0.01149749755859375,
0.0245208740234375,
-0.01061248779296875,
-0.0010280609130859375,
0.00795745849609375,
-0.055084228515625,
0.034423828125,
0.024139404296875,
0.005218505859375,
-0.007602691650390625,
-0.02447509765625,
0.006923675537109375,
-0.0215606689453125,
-0.033782958984375,
0.01302337646484375,
0.004306793212890625,
0.0273590087890625,
0.0225677490234375,
0.00652313232421875,
-0.033599853515625,
0.0309600830078125,
0.0225982666015625,
-0.0009465217590332031,
0.0032634735107421875,
-0.0042266845703125,
-0.023040771484375,
-0.0196533203125,
-0.005168914794921875,
-0.04608154296875,
0.01904296875,
-0.01462554931640625,
-0.08026123046875,
0.12103271484375,
0.00366973876953125,
0.048095703125,
0.01457977294921875,
0.057586669921875,
-0.0232086181640625,
0.0289306640625,
-0.0146942138671875,
0.044464111328125,
-0.035614013671875,
0.0123291015625,
-0.035125732421875,
-0.007419586181640625,
0.0096282958984375,
0.032379150390625,
0.0594482421875,
0.0261688232421875,
-0.05816650390625,
-0.01319122314453125,
-0.0012111663818359375,
-0.032012939453125,
-0.041961669921875,
0.06390380859375,
-0.016357421875,
0.0283203125,
0.0252685546875,
-0.0362548828125,
0.0214691162109375,
-0.024078369140625,
-0.040618896484375,
0.006946563720703125,
0.007511138916015625,
0.029144287109375,
-0.01267242431640625,
0.0231170654296875,
0.0195770263671875,
-0.0193939208984375,
-0.0077667236328125,
-0.037353515625,
0.022308349609375,
-0.014190673828125,
0.0009870529174804688,
-0.060699462890625,
0.01287841796875,
-0.040008544921875,
0.033203125,
-0.01076507568359375,
0.00200653076171875,
0.00994110107421875,
0.015960693359375,
0.05902099609375,
0.0015697479248046875,
-0.002857208251953125,
0.0206298828125,
-0.0007052421569824219,
0.026214599609375,
0.04559326171875,
0.042877197265625,
0.016632080078125,
0.047149658203125,
0.015533447265625,
0.0272369384765625,
-0.0382080078125,
-0.0283203125,
0.006618499755859375,
0.01116943359375,
-0.0026950836181640625,
-0.0091552734375,
0.025238037109375,
-0.03350830078125,
0.009368896484375,
-0.0291748046875,
0.0170135498046875,
0.0122222900390625,
-0.002933502197265625,
-0.00936126708984375,
0.0096588134765625,
-0.041778564453125,
0.054412841796875,
-0.045867919921875,
0.0212554931640625,
0.006710052490234375,
0.0711669921875,
0.03594970703125,
0.046112060546875,
-0.0496826171875,
-0.048736572265625,
-0.029876708984375,
-0.004425048828125,
0.0066070556640625,
0.0198822021484375,
-0.040863037109375,
-0.016876220703125,
0.034515380859375,
0.046966552734375,
0.05438232421875,
0.08709716796875,
0.06854248046875,
0.022796630859375,
0.0157012939453125,
0.0270233154296875,
0.030853271484375,
-0.035400390625,
0.025543212890625,
-0.051483154296875,
0.0082855224609375,
-0.028472900390625,
-0.0011587142944335938,
-0.013641357421875,
0.0129547119140625,
-0.0298309326171875,
0.006927490234375,
0.00983428955078125,
0.00799560546875,
-0.01251983642578125,
-0.00531005859375,
-0.0230865478515625,
0.004772186279296875,
0.01922607421875,
-0.02191162109375,
-0.007152557373046875,
0.0287322998046875,
-0.0308685302734375,
0.003589630126953125,
0.046112060546875,
-0.00931549072265625,
0.01971435546875,
0.01509857177734375,
0.0321044921875,
0.02008056640625,
-0.0262908935546875,
-0.0285491943359375,
-0.0146026611328125,
0.047393798828125,
-0.0012006759643554688,
-0.055023193359375,
-0.0212249755859375,
0.0094757080078125,
0.0096893310546875,
0.00951385498046875,
0.0809326171875,
-0.021759033203125,
0.0006518363952636719,
0.023651123046875,
0.03509521484375,
-0.006439208984375,
0.01357269287109375,
0.0283355712890625,
-0.0253753662109375,
-0.00849151611328125,
-0.00279998779296875,
0.03900146484375,
0.0211944580078125,
0.03179931640625,
-0.023468017578125,
0.021240234375,
-0.04559326171875,
0.01212310791015625,
-0.0060577392578125,
0.069580078125,
-0.01088714599609375,
-0.0513916015625,
-0.040771484375,
0.024169921875,
-0.0004470348358154297,
0.0307159423828125,
-0.03155517578125,
0.03948974609375,
0.0302581787109375,
0.005954742431640625,
0.0229339599609375,
-0.024444580078125,
0.0423583984375,
0.045379638671875,
-0.00608062744140625,
0.0053863525390625,
0.025634765625,
-0.025115966796875,
0.020233154296875,
0.003631591796875,
0.027923583984375,
0.0125274658203125,
-0.0171356201171875,
0.0222930908203125,
0.00021004676818847656,
0.0026035308837890625,
0.0031604766845703125,
-0.0172576904296875,
0.0018568038940429688,
-0.009979248046875,
-0.0178070068359375,
0.005550384521484375,
-0.0136871337890625,
-0.0270233154296875,
0.00030493736267089844,
0.016082763671875,
-0.0136871337890625,
0.003055572509765625,
-0.023468017578125,
0.03253173828125,
0.01409149169921875,
0.00984954833984375,
-0.07781982421875,
0.065673828125,
-0.0188140869140625,
0.05072021484375,
-0.0269927978515625,
-0.0265655517578125,
-0.01190185546875,
0.0120086669921875,
-0.01617431640625,
-0.0176544189453125,
-0.051422119140625,
0.00745391845703125,
-0.0496826171875,
-0.0283203125,
0.01232147216796875,
0.0114288330078125,
0.00937652587890625,
-0.06072998046875,
-0.0211944580078125,
0.0009126663208007812,
-0.0687255859375,
-0.0220794677734375,
0.01369476318359375,
-0.01214599609375,
-0.007175445556640625,
-0.05242919921875,
-0.0177764892578125,
-0.0562744140625,
0.00875091552734375,
-0.03289794921875,
0.0266571044921875,
0.03814697265625,
-0.0252838134765625,
-0.0477294921875,
0.0330810546875,
-0.00806427001953125,
-0.0203704833984375,
-0.07745361328125,
-0.02325439453125,
-0.0174407958984375,
0.05780029296875,
-0.0266876220703125,
-0.02783203125,
-0.0521240234375,
0.0625,
-0.005893707275390625,
0.03411865234375,
0.01548004150390625,
-0.01436614990234375,
0.01593017578125,
0.0176849365234375,
0.0230560302734375,
-0.01043701171875,
0.0755615234375,
-0.03704833984375,
0.088623046875,
0.059173583984375,
-0.032867431640625,
0.0306854248046875,
-0.0166168212890625,
-0.054046630859375,
0.0038166046142578125,
-0.045135498046875,
-0.03253173828125,
-0.015167236328125,
0.0712890625,
0.0277099609375,
0.01277923583984375,
-0.0268707275390625,
0.008453369140625,
-0.022552490234375,
-0.0189056396484375,
0.0007710456848144531,
0.0141143798828125,
-0.0276031494140625,
0.01486968994140625,
0.003078460693359375,
0.0203704833984375,
0.006092071533203125,
-0.01324462890625,
0.004924774169921875,
-0.0101470947265625,
0.0318603515625,
-0.0017004013061523438,
-0.0170135498046875,
0.048065185546875,
0.04071044921875,
-0.03924560546875,
-0.058624267578125,
-0.00521087646484375,
-0.0059967041015625,
-0.0158233642578125,
-0.08282470703125,
-0.007678985595703125,
0.0239105224609375,
0.00811004638671875,
0.00933074951171875,
0.0240020751953125,
0.002368927001953125,
-0.0221710205078125,
0.0096893310546875,
-0.0173797607421875,
0.02325439453125,
-0.00440216064453125,
-0.006900787353515625,
-0.0234222412109375,
0.046356201171875,
0.004215240478515625,
0.10528564453125,
-0.026580810546875,
0.023681640625,
0.0018444061279296875,
0.013031005859375,
-0.04248046875,
0.032196044921875,
-0.0066986083984375,
-0.03460693359375,
-0.0064239501953125,
0.015777587890625,
-0.04864501953125,
-0.0750732421875,
0.029571533203125,
0.0406494140625,
0.01509857177734375,
0.0239410400390625
]
|
ca5ff27f1ebb2e83b878998708c8f85d7600157b | Wordpress Stackexchange
Q: PHP code on Visual Composer Plugin I want to add some php and html code in my page but i can't do it using Visual Composer, i can choose the "Raw Html" Box but that doesn't render PHP at all, only HTML.
Do you guys have any idea how can i do it?? Or is there a workaround solution?
A: So i found the answer with the help of Pieter Goosen and i would like to share it with you:
A good method will be to create a Shortcode.
To do it, just go to your template Functions.php file and create your function like this example:
function shortcode_hello( $atts ){
$time = ( date('G') < 9 ) ? "good morning" : "good day";
return "Hello, and " . $time . ', my name is Linda';
}
add_shortcode( 'hello', 'shortcode_hello' );
Now all you have to do is to place the [hello] shortcode on your page builder (Visual composer here).
| Q: PHP code on Visual Composer Plugin I want to add some php and html code in my page but i can't do it using Visual Composer, i can choose the "Raw Html" Box but that doesn't render PHP at all, only HTML.
Do you guys have any idea how can i do it?? Or is there a workaround solution?
A: So i found the answer with the help of Pieter Goosen and i would like to share it with you:
A good method will be to create a Shortcode.
To do it, just go to your template Functions.php file and create your function like this example:
function shortcode_hello( $atts ){
$time = ( date('G') < 9 ) ? "good morning" : "good day";
return "Hello, and " . $time . ', my name is Linda';
}
add_shortcode( 'hello', 'shortcode_hello' );
Now all you have to do is to place the [hello] shortcode on your page builder (Visual composer here).
| wordpress | {
"language": "en",
"length": 160,
"provenance": "stackexchange_00019.jsonl.gz:464661",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/223571"
} | [
0.05291748046875,
0.01190185546875,
-0.050537109375,
-0.08544921875,
0.039215087890625,
-0.0207672119140625,
0.0049285888671875,
0.0215606689453125,
0.006481170654296875,
0.040283203125,
-0.034637451171875,
0.0032863616943359375,
-0.020355224609375,
-0.0033092498779296875,
-0.037078857421875,
-0.02752685546875,
0.0146942138671875,
0.0226898193359375,
0.0390625,
-0.002079010009765625,
-0.01419830322265625,
0.019195556640625,
0.0035400390625,
0.010833740234375,
-0.005695343017578125,
0.025482177734375,
0.03857421875,
-0.0251007080078125,
-0.016387939453125,
-0.0119171142578125,
0.00348663330078125,
0.0103759765625,
0.044464111328125,
0.029144287109375,
-0.0726318359375,
0.035797119140625,
0.0015850067138671875,
0.0019350051879882812,
-0.0230865478515625,
0.029510498046875,
0.034454345703125,
-0.0229339599609375,
0.05023193359375,
-0.00531768798828125,
0.00289154052734375,
-0.0188751220703125,
0.046722412109375,
-0.03350830078125,
0.0067291259765625,
-0.05084228515625,
0.010040283203125,
-0.004093170166015625,
0.029571533203125,
-0.010223388671875,
-0.01446533203125,
-0.004856109619140625,
-0.06414794921875,
0.01593017578125,
0.022247314453125,
0.04290771484375,
0.006649017333984375,
-0.035491943359375,
0.003772735595703125,
-0.030059814453125,
-0.01009368896484375,
0.007656097412109375,
-0.0034580230712890625,
-0.001068115234375,
0.0013561248779296875,
-0.012542724609375,
0.0199127197265625,
-0.01383209228515625,
0.00406646728515625,
-0.049652099609375,
-0.0224151611328125,
0.04339599609375,
0.00400543212890625,
0.0253753662109375,
0.00400543212890625,
-0.0231781005859375,
0.0175628662109375,
0.0023860931396484375,
0.01629638671875,
-0.045745849609375,
0.00013577938079833984,
-0.0411376953125,
-0.003978729248046875,
0.002254486083984375,
-0.0269775390625,
0.0191192626953125,
-0.02545166015625,
0.01372528076171875,
0.01459503173828125,
-0.0223846435546875,
-0.020782470703125,
0.00681304931640625,
-0.0204620361328125,
-0.0187835693359375,
0.030181884765625,
0.0924072265625,
0.01441192626953125,
-0.05926513671875,
0.12396240234375,
-0.049591064453125,
0.006137847900390625,
0.034088134765625,
-0.0191497802734375,
0.0244293212890625,
0.0433349609375,
0.0185394287109375,
0.0231475830078125,
0.004543304443359375,
-0.0186004638671875,
-0.0252532958984375,
-0.0168304443359375,
0.025299072265625,
-0.035614013671875,
-0.01006317138671875,
-0.002025604248046875,
-0.00965118408203125,
-0.01324462890625,
0.035980224609375,
-0.00004100799560546875,
-0.02642822265625,
-0.026031494140625,
-0.025146484375,
0.006488800048828125,
-0.03778076171875,
0.05340576171875,
0.0027618408203125,
-0.03363037109375,
0.021514892578125,
0.03289794921875,
0.0220794677734375,
0.01215362548828125,
-0.003170013427734375,
0.04742431640625,
-0.013641357421875,
0.019073486328125,
-0.0205230712890625,
0.0001036524772644043,
-0.0062103271484375,
0.00010925531387329102,
0.0010004043579101562,
-0.012451171875,
0.01910400390625,
0.01378631591796875,
0.0136871337890625,
0.007801055908203125,
-0.04132080078125,
0.01178741455078125,
-0.033721923828125,
-0.004695892333984375,
0.01557159423828125,
0.02618408203125,
0.05242919921875,
-0.0016336441040039062,
0.0240478515625,
-0.014190673828125,
0.049346923828125,
-0.005619049072265625,
-0.0391845703125,
-0.01593017578125,
-0.07403564453125,
-0.07537841796875,
0.0268402099609375,
-0.038665771484375,
0.00571441650390625,
0.017913818359375,
0.02838134765625,
-0.001338958740234375,
0.006687164306640625,
-0.00411224365234375,
0.01323699951171875,
-0.0036296844482421875,
0.011016845703125,
-0.028564453125,
0.039398193359375,
0.0276336669921875,
0.0023441314697265625,
0.0177764892578125,
-0.01904296875,
0.060333251953125,
0.0230865478515625,
-0.08843994140625,
0.046661376953125,
-0.0007734298706054688,
0.07061767578125,
0.04083251953125,
0.00359344482421875,
0.0401611328125,
0.005641937255859375,
0.0169525146484375,
-0.0158233642578125,
-0.0249481201171875,
-0.0242462158203125,
-0.031341552734375,
-0.00560760498046875,
-0.02825927734375,
0.03558349609375,
-0.004669189453125,
-0.058380126953125,
0.0589599609375,
-0.0064239501953125,
-0.0016117095947265625,
-0.0001989603042602539,
-0.0158233642578125,
-0.00037932395935058594,
0.011688232421875,
0.00959014892578125,
-0.005207061767578125,
-0.035675048828125,
-0.0009713172912597656,
-0.005718231201171875,
-0.01480865478515625,
0.021942138671875,
-0.03765869140625,
0.048248291015625,
0.01148223876953125,
0.0506591796875,
0.045867919921875,
-0.019073486328125,
0.047149658203125,
-0.01031494140625,
-0.0048980712890625,
0.019012451171875,
-0.034210205078125,
0.0028972625732421875,
-0.01488494873046875,
0.0260772705078125,
-0.00141143798828125,
0.01340484619140625,
-0.0009179115295410156,
-0.004638671875,
-0.06536865234375,
-0.007717132568359375,
-0.038360595703125,
-0.0012311935424804688,
-0.010284423828125,
0.041656494140625,
0.054901123046875,
0.0159912109375,
0.01447296142578125,
-0.0276336669921875,
0.08209228515625,
0.020172119140625,
0.038055419921875,
-0.05877685546875,
-0.01029205322265625,
0.008209228515625,
0.0057830810546875,
0.012786865234375,
0.01280975341796875,
-0.045562744140625,
0.00933837890625,
0.03863525390625,
0.00255584716796875,
-0.01332855224609375,
-0.01557159423828125,
0.0147552490234375,
0.0247344970703125,
-0.00749969482421875,
-0.03533935546875,
-0.01099395751953125,
0.00814056396484375,
-0.01369476318359375,
0.032379150390625,
0.0248870849609375,
-0.010345458984375,
-0.0164794921875,
-0.003322601318359375,
0.0243682861328125,
-0.00547027587890625,
0.0262298583984375,
0.0254974365234375,
0.034332275390625,
-0.0196685791015625,
-0.01641845703125,
0.01020050048828125,
0.018341064453125,
-0.0162506103515625,
0.0023097991943359375,
0.01165771484375,
-0.01194000244140625,
0.0116729736328125,
-0.0220489501953125,
0.0060882568359375,
-0.0173187255859375,
0.00191497802734375,
-0.00815582275390625,
-0.007843017578125,
0.0743408203125,
-0.0313720703125,
0.07379150390625,
0.01114654541015625,
0.006893157958984375,
0.055419921875,
-0.01177215576171875,
0.0204315185546875,
-0.0118865966796875,
0.0372314453125,
0.0310821533203125,
0.0035381317138671875,
-0.029205322265625,
-0.011199951171875,
-0.0008106231689453125,
-0.031585693359375,
0.004764556884765625,
-0.0123748779296875,
-0.060638427734375,
0.0196075439453125,
0.01406097412109375,
0.0128936767578125,
0.033111572265625,
-0.0305633544921875,
-0.040802001953125,
-0.041473388671875,
0.0202789306640625,
-0.054962158203125,
-0.058837890625,
0.041015625,
-0.004638671875,
-0.016876220703125,
0.0102996826171875,
-0.0111083984375,
-0.00848388671875,
0.01397705078125,
-0.01849365234375,
-0.018402099609375,
-0.026092529296875,
-0.017303466796875,
-0.0535888671875,
-0.08502197265625,
-0.01039886474609375,
0.01280975341796875,
0.0303802490234375,
0.008056640625,
0.011016845703125,
-0.00894927978515625,
-0.0209503173828125,
-0.014251708984375,
0.00342559814453125,
-0.0097503662109375,
-0.0181121826171875,
0.0200653076171875,
-0.07830810546875,
-0.0007281303405761719,
-0.0101165771484375,
-0.035797119140625,
-0.016693115234375,
0.04302978515625,
-0.0143890380859375,
0.005153656005859375,
0.00122833251953125,
0.0010499954223632812,
0.023895263671875,
-0.0010223388671875,
-0.0321044921875,
-0.0084991455078125,
-0.05731201171875,
-0.02093505859375,
0.024749755859375,
-0.0202484130859375,
-0.005504608154296875,
-0.0031299591064453125,
-0.0210113525390625,
-0.003261566162109375,
0.0095672607421875,
-0.020782470703125,
0.0076904296875,
0.02496337890625,
-0.0135650634765625,
0.0258331298828125,
-0.039703369140625,
-0.046875,
-0.02276611328125,
0.04180908203125,
-0.012786865234375,
0.034698486328125,
0.0204010009765625,
0.021026611328125,
0.01192474365234375,
-0.003940582275390625,
-0.0191497802734375,
0.004070281982421875,
0.0516357421875,
0.00677490234375,
0.038787841796875,
-0.0341796875,
-0.025054931640625,
-0.02874755859375,
0.050079345703125,
-0.037261962890625,
-0.0138702392578125,
0.007663726806640625,
0.00974273681640625,
-0.02496337890625,
-0.0113525390625,
-0.0548095703125,
-0.0202178955078125,
-0.07403564453125,
0.037811279296875,
0.01416778564453125,
0.001575469970703125,
-0.0283355712890625,
0.037811279296875,
-0.04290771484375,
-0.0335693359375,
0.045379638671875,
-0.028350830078125,
0.0316162109375,
0.0301513671875,
-0.010986328125,
0.015777587890625,
-0.037628173828125,
-0.031494140625,
-0.08392333984375,
-0.0184783935546875,
-0.008819580078125,
0.063232421875,
0.0072784423828125,
-0.0222320556640625,
-0.0548095703125,
0.016082763671875,
-0.00856781005859375,
0.00577545166015625,
0.0222320556640625,
0.02215576171875,
0.0217437744140625,
0.0004088878631591797,
-0.005191802978515625,
-0.01413726806640625,
-0.0224456787109375,
0.0166168212890625,
0.055572509765625,
0.0631103515625,
-0.029571533203125,
-0.03594970703125,
-0.00643157958984375,
-0.0037403106689453125,
-0.0101776123046875,
-0.02227783203125,
-0.043426513671875,
0.0149078369140625,
-0.0208740234375,
0.0009565353393554688,
-0.0288543701171875,
-0.035552978515625,
0.06658935546875,
-0.0084075927734375,
0.00627899169921875,
-0.003932952880859375,
0.09661865234375,
0.00897979736328125,
-0.030609130859375,
-0.062164306640625,
0.044708251953125,
0.05572509765625,
-0.0141448974609375,
0.007358551025390625,
-0.00812530517578125,
-0.061126708984375,
0.09112548828125,
0.0004982948303222656,
0.0277557373046875,
-0.023681640625,
0.04425048828125,
-0.0181884765625,
-0.0208587646484375,
0.0276031494140625,
0.007183074951171875,
-0.0266876220703125,
0.0052032470703125,
0.00756072998046875,
-0.001972198486328125,
0.04095458984375,
-0.00969696044921875,
-0.019683837890625,
0.020050048828125,
0.03436279296875,
-0.06439208984375,
0.0009741783142089844,
0.0089111328125,
0.032684326171875,
0.03558349609375,
-0.0029010772705078125,
0.04290771484375,
0.038238525390625,
0.0028285980224609375,
0.006336212158203125,
-0.017181396484375,
-0.0157318115234375,
0.0246734619140625,
-0.0289154052734375,
-0.0273284912109375,
0.0367431640625,
-0.005718231201171875,
0.0347900390625,
0.0292816162109375,
-0.0240936279296875,
-0.028656005859375,
-0.002124786376953125,
0.007282257080078125,
-0.0194549560546875,
0.0299530029296875,
0.0209197998046875,
0.03857421875,
-0.01079559326171875,
0.01227569580078125,
0.048431396484375,
0.026153564453125,
-0.0296783447265625,
-0.014190673828125,
-0.001739501953125,
-0.0257110595703125,
-0.0008368492126464844,
0.0269317626953125,
-0.0159759521484375,
0.015472412109375,
0.0018329620361328125,
0.0213165283203125,
0.00034737586975097656,
0.01517486572265625,
0.032684326171875,
-0.0020236968994140625,
0.0313720703125,
-0.047882080078125,
-0.002735137939453125,
-0.0130615234375,
-0.02386474609375,
0.0044708251953125,
0.026031494140625,
-0.02337646484375,
-0.0118408203125,
0.0126190185546875,
-0.012664794921875,
-0.0285186767578125,
-0.0242919921875,
0.0266265869140625,
0.055633544921875,
-0.0243988037109375,
-0.03936767578125,
0.00420379638671875,
0.0675048828125,
-0.0010442733764648438,
0.012237548828125,
-0.01337432861328125,
0.028472900390625,
0.0161285400390625,
-0.004436492919921875,
-0.0217437744140625,
-0.037811279296875,
-0.0220947265625,
-0.0009284019470214844,
0.01454925537109375,
-0.07977294921875,
-0.024383544921875,
-0.0224151611328125,
-0.01105499267578125,
0.040313720703125,
-0.04827880859375,
0.024505615234375,
-0.0271453857421875,
0.007595062255859375,
0.0014972686767578125,
0.01113128662109375,
0.048492431640625,
0.039154052734375,
-0.0235137939453125,
-0.0275115966796875,
-0.02227783203125,
-0.01052093505859375,
0.02203369140625,
-0.01074981689453125,
-0.01849365234375,
-0.0091400146484375,
-0.01105499267578125,
0.0143890380859375,
-0.008209228515625,
-0.004241943359375,
-0.0225067138671875,
0.02471923828125,
0.0062408447265625,
0.054473876953125,
-0.0051422119140625,
0.0784912109375,
-0.0266876220703125,
0.0714111328125,
0.006267547607421875,
0.0252685546875,
-0.01435089111328125,
-0.0251922607421875,
0.05126953125,
-0.0029296875,
-0.05181884765625,
-0.04522705078125,
-0.0100860595703125,
-0.023284912109375,
0.0294647216796875,
-0.0294189453125,
-0.0002982616424560547,
-0.01486968994140625,
-0.005367279052734375,
-0.01383209228515625,
0.04742431640625,
-0.0149078369140625,
-0.0023136138916015625,
0.01366424560546875,
-0.0253143310546875,
0.00910186767578125,
-0.004314422607421875,
-0.00855255126953125,
0.025634765625,
-0.020965576171875,
0.0179595947265625,
0.0163421630859375,
-0.0128326416015625,
0.04132080078125,
0.07965087890625,
0.00934600830078125,
0.05609130859375,
0.0194091796875,
0.0153045654296875,
0.03851318359375,
0.0246429443359375,
-0.0181884765625,
-0.02593994140625,
0.0653076171875,
0.0218963623046875,
-0.0611572265625,
0.040008544921875,
-0.039886474609375,
0.0134429931640625,
0.050628662109375,
0.0582275390625,
-0.08465576171875,
0.00007426738739013672,
0.031585693359375,
-0.017791748046875,
-0.035186767578125,
-0.03131103515625,
-0.01306915283203125,
-0.055877685546875,
0.10211181640625,
0.03228759765625,
-0.0007581710815429688,
0.04571533203125,
0.00555419921875,
-0.002166748046875,
-0.0121002197265625,
0.024383544921875,
0.0067138671875,
-0.051055908203125,
0.03106689453125,
0.01568603515625,
0.020233154296875,
-0.024749755859375,
0.01052093505859375,
0.0097198486328125,
-0.03289794921875,
-0.0692138671875,
0.0103912353515625,
0.0102996826171875,
-0.01338958740234375,
0.0016269683837890625,
0.02789306640625,
0.004749298095703125,
0.052581787109375,
-0.035247802734375,
0.042572021484375,
0.033355712890625,
-0.003948211669921875,
0.04852294921875,
0.00930023193359375,
0.0133056640625,
0.0390625,
-0.052764892578125,
-0.0023517608642578125,
-0.01041412353515625,
0.035491943359375,
-0.0020294189453125,
0.025970458984375,
0.05987548828125,
-0.00478363037109375,
-0.04486083984375,
0.018585205078125,
-0.01100921630859375,
-0.0077362060546875,
0.008056640625,
0.0022563934326171875,
-0.045684814453125,
-0.022705078125,
0.0222930908203125,
-0.041168212890625,
-0.0159149169921875,
0.013031005859375,
-0.07513427734375,
0.0816650390625,
0.043609619140625,
0.006847381591796875,
-0.00469970703125,
0.03936767578125,
-0.0609130859375,
-0.0005359649658203125,
-0.0035305023193359375,
0.022430419921875,
0.006439208984375,
-0.01299285888671875,
0.007160186767578125,
-0.0022182464599609375,
0.0094146728515625,
0.035125732421875,
0.042572021484375,
0.007488250732421875,
-0.0064849853515625,
0.024383544921875,
0.07470703125,
0.0032215118408203125,
-0.028289794921875,
0.031005859375,
-0.002651214599609375,
-0.036102294921875,
0.00641632080078125,
-0.00531005859375,
0.020660400390625,
-0.0252685546875,
0.00305938720703125,
0.010955810546875,
-0.021484375,
-0.05206298828125,
0.009307861328125,
0.02374267578125,
-0.0027790069580078125,
0.0038471221923828125,
-0.03515625,
0.060546875,
-0.0111083984375,
0.0452880859375,
-0.002826690673828125,
0.0170745849609375,
-0.06463623046875,
-0.0041656494140625,
0.018218994140625,
0.01482391357421875,
0.0191497802734375,
0.0208740234375,
0.005329132080078125,
-0.01096343994140625,
0.0188446044921875,
0.02410888671875,
0.037689208984375,
-0.03363037109375,
0.0196685791015625,
-0.003662109375,
0.018890380859375,
-0.03948974609375,
-0.012298583984375,
0.0230560302734375,
0.0254974365234375,
-0.019317626953125,
-0.017578125,
0.004756927490234375,
0.01666259765625,
-0.0019216537475585938,
-0.00342559814453125,
0.02044677734375,
0.0184783935546875,
0.0445556640625,
-0.0304718017578125,
-0.0211334228515625,
0.007144927978515625,
0.0299224853515625,
-0.006114959716796875,
-0.01123046875,
-0.00629425048828125,
-0.041015625,
-0.061737060546875,
0.05029296875,
0.0159454345703125,
0.0499267578125,
-0.015625,
0.08599853515625,
-0.035736083984375,
-0.0146636962890625,
0.0004353523254394531,
0.0294189453125,
-0.0089263916015625,
-0.021087646484375,
-0.006069183349609375,
-0.032440185546875,
0.006114959716796875,
0.01560211181640625,
0.0045623779296875,
-0.004512786865234375,
0.00656890869140625,
0.000004231929779052734,
-0.017730712890625,
-0.0207977294921875,
-0.002323150634765625,
-0.01204681396484375,
-0.02398681640625,
-0.01174163818359375,
-0.0599365234375,
-0.0007128715515136719,
-0.0281829833984375,
-0.005901336669921875,
-0.006320953369140625,
0.0197296142578125,
-0.060760498046875,
0.050689697265625,
-0.012664794921875,
-0.032928466796875,
0.04931640625,
-0.0102386474609375,
0.059814453125,
-0.0222625732421875,
0.0445556640625,
0.04229736328125,
-0.04730224609375,
-0.0714111328125,
-0.000904083251953125,
0.03033447265625,
0.001705169677734375,
0.027618408203125,
0.0131378173828125,
-0.023193359375,
-0.0085296630859375,
0.0246734619140625,
0.01190185546875,
0.00626373291015625,
0.029632568359375,
0.00045013427734375,
-0.07647705078125,
-0.0614013671875,
-0.0760498046875,
0.08746337890625,
0.01125335693359375,
0.140869140625,
-0.06591796875,
0.0341796875,
-0.030487060546875,
-0.0028591156005859375,
-0.0168304443359375,
-0.01885986328125,
0.041717529296875,
0.01007843017578125,
-0.0259857177734375,
-0.0208587646484375,
-0.01416015625,
0.0211944580078125,
0.03643798828125,
0.0124969482421875,
0.0069732666015625,
-0.0083465576171875,
0.01531982421875,
-0.01531982421875,
0.04095458984375,
-0.00420379638671875,
-0.007572174072265625,
-0.0243377685546875,
-0.00896453857421875,
0.0271759033203125,
0.0257110595703125,
-0.004913330078125,
0.0121002197265625,
-0.0004489421844482422,
-0.05267333984375,
0.031402587890625,
-0.06353759765625,
0.06671142578125,
0.04083251953125,
-0.0015363693237304688,
-0.08392333984375,
-0.00678253173828125,
-0.01224517822265625,
-0.036376953125,
0.021270751953125,
0.034454345703125,
0.004718780517578125,
-0.07470703125,
0.037628173828125,
0.044769287109375,
0.032073974609375,
-0.03485107421875,
0.01413726806640625,
0.04815673828125,
-0.011627197265625,
0.02734375,
0.017822265625,
-0.0291290283203125,
-0.0245513916015625,
0.007312774658203125,
0.018341064453125,
-0.00524139404296875,
-0.0311737060546875,
-0.072998046875,
-0.005710601806640625,
0.0233154296875,
-0.00482940673828125,
-0.016326904296875,
-0.036773681640625,
0.0149688720703125,
0.051788330078125,
0.00897979736328125,
0.029144287109375,
-0.01424407958984375,
-0.0123291015625,
-0.0506591796875,
-0.03533935546875,
-0.032958984375,
0.05657958984375,
-0.0229644775390625,
0.019287109375,
0.0423583984375,
-0.01027679443359375,
-0.0306549072265625,
0.020477294921875,
-0.004390716552734375,
0.07708740234375,
-0.020782470703125,
-0.03515625,
0.0340576171875,
-0.031707763671875,
-0.00658416748046875,
-0.046142578125,
0.002765655517578125,
-0.06536865234375,
-0.00171661376953125,
0.01102447509765625,
-0.0267181396484375,
-0.00730133056640625,
-0.064208984375,
-0.126953125,
-0.006244659423828125,
-0.00012290477752685547,
-0.05950927734375,
-0.043304443359375,
0.0107269287109375,
-0.00514984130859375,
0.017608642578125,
-0.010406494140625,
-0.0192718505859375,
-0.0124969482421875,
0.0305633544921875,
-0.0124969482421875,
0.03814697265625,
0.0146636962890625,
-0.00605010986328125,
-0.0158843994140625,
-0.0094146728515625,
-0.0160369873046875,
-0.0131988525390625,
0.01522064208984375,
-0.0098114013671875,
0.0201416015625,
0.039703369140625,
-0.02435302734375,
-0.045806884765625,
-0.01021575927734375,
-0.022247314453125,
0.0303497314453125,
-0.08636474609375,
-0.046417236328125,
-0.04486083984375,
0.0400390625,
0.01027679443359375,
0.017333984375,
-0.00806427001953125,
0.0010595321655273438,
-0.0189361572265625,
0.0286407470703125,
-0.00934600830078125,
-0.01959228515625,
-0.016387939453125,
-0.01288604736328125,
-0.04095458984375,
-0.00200653076171875,
0.019500732421875,
-0.0284576416015625,
-0.0133056640625,
-0.00833892822265625,
0.0013074874877929688,
0.004161834716796875,
-0.023223876953125,
-0.0469970703125,
0.068115234375,
-0.0290374755859375,
0.01303863525390625,
0.0013227462768554688,
0.033203125,
0.0350341796875,
0.0250244140625,
0.014373779296875,
-0.0290985107421875,
0.01371002197265625,
0.01325225830078125,
0.022613525390625,
0.0172271728515625,
0.0130615234375,
-0.0301055908203125,
0.005290985107421875,
0.01129913330078125,
-0.0082855224609375,
0.0037174224853515625,
-0.03076171875,
0.06341552734375,
0.009857177734375,
0.0272674560546875,
-0.0248260498046875,
-0.01282501220703125,
-0.0224761962890625,
0.003559112548828125,
-0.0250091552734375,
0.01776123046875,
0.01328277587890625,
-0.0271759033203125,
0.024017333984375,
0.029022216796875,
0.0594482421875,
0.012481689453125,
-0.0036678314208984375,
-0.027984619140625,
0.01349639892578125,
-0.00251007080078125
]
|
ab93c68e02770713b1d7ee6354e8d7f719e58d66 | Wordpress Stackexchange
Q: How to support multiple search terms query within one process? For multiple search terms; ?s=hello+world
Wordpress work find "hello world" like the_title , the_content posts!
*
*And, if our post title Hello Anna wordpress does not get one results!
I want to use all keys:
"hello world" , "hello" , "world"
Maybe
array('hello world','hello','world'); but it exceeds my exp.!
Is it in a single loop may be able to divide the query and send multiple queries? Is there someone who can help on the subject? e.g. ?s=, $_GET
Wanted something must have been like to call more results for multiple queries!
A: Fixed:
Search and result the all keys;
<?php
$the_keys = preg_split('/\s+/', str_replace('-',' ',get_query_var('s')),-1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
$total_keys = count($the_keys);
$the_query = new WP_Query(array('post_type'=>'nothing'));
if($total_keys>1){
for($i = 0; $i<=$total_keys; $i++) {
$the_query_mask = new WP_Query(array('s' => $the_keys[$i]));
$the_query->post_count = count( $the_query->posts );
$the_query->posts = array_merge( $the_query->posts, $the_query_mask->posts );
}
} else {
$the_query= new WP_Query(array('s' => get_query_var('s')));
}
if ($the_query->have_posts()) : ?>
Note: 'post_type'=>'nothing' just need array merge!
| Q: How to support multiple search terms query within one process? For multiple search terms; ?s=hello+world
Wordpress work find "hello world" like the_title , the_content posts!
*
*And, if our post title Hello Anna wordpress does not get one results!
I want to use all keys:
"hello world" , "hello" , "world"
Maybe
array('hello world','hello','world'); but it exceeds my exp.!
Is it in a single loop may be able to divide the query and send multiple queries? Is there someone who can help on the subject? e.g. ?s=, $_GET
Wanted something must have been like to call more results for multiple queries!
A: Fixed:
Search and result the all keys;
<?php
$the_keys = preg_split('/\s+/', str_replace('-',' ',get_query_var('s')),-1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
$total_keys = count($the_keys);
$the_query = new WP_Query(array('post_type'=>'nothing'));
if($total_keys>1){
for($i = 0; $i<=$total_keys; $i++) {
$the_query_mask = new WP_Query(array('s' => $the_keys[$i]));
$the_query->post_count = count( $the_query->posts );
$the_query->posts = array_merge( $the_query->posts, $the_query_mask->posts );
}
} else {
$the_query= new WP_Query(array('s' => get_query_var('s')));
}
if ($the_query->have_posts()) : ?>
Note: 'post_type'=>'nothing' just need array merge!
A:
Maybe somebody like me want fuzzy logic results
I solved this way: "search.php"
<?php
$the_keys = preg_split('/\s+/', get_query_var('s'),-1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
$total_keys = count($the_keys); // Count the search term
$the_query = new WP_Query(array('s' => get_query_var('s')));
// IF have multiple term and havent a result
if($total_keys > 1 && $the_query->post_count < 1){
// Loop for total term count, if found post break it! <3
for($i = 0; $i < $total_keys; $i++) {
//Set the new array term value
$the_query = new WP_Query(array('s' => $the_keys[$i]));
//if found post break it! <3
if($the_query->post_count>0) break;
}
}
// List of my Level 2 filter posts :)
if ($the_query->have_posts()) : ?>
......
<?php
endwhile;
endif;
?>
e.g. post title: ( Hello baby )
Normaly:
*
*?s=hello+baby => find true
*?s=hello => find true
*?s=baby => find true
*?s=hello+whats+up => find false
*?s=hey+baby => find false
search, Work now and find e.g. ?s=hello+whats+up => find true
A: You are getting into deep water quickly. I would look into SearchWP plugin as they provide LIKE searching and Fuzzy matching. SearchWP
| wordpress | {
"language": "en",
"length": 344,
"provenance": "stackexchange_00019.jsonl.gz:464697",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/223707"
} | [
0.026763916015625,
-0.022705078125,
0.00783538818359375,
-0.03302001953125,
-0.0111083984375,
-0.02410888671875,
0.0350341796875,
0.00905609130859375,
0.02301025390625,
0.024444580078125,
-0.06500244140625,
-0.0191497802734375,
-0.0017108917236328125,
-0.014495849609375,
-0.007556915283203125,
-0.0634765625,
0.03741455078125,
-0.06524658203125,
-0.01207733154296875,
-0.008758544921875,
0.01041412353515625,
0.0181121826171875,
0.0032501220703125,
0.054931640625,
0.0254669189453125,
-0.037628173828125,
0.037261962890625,
-0.010498046875,
0.007801055908203125,
-0.0155487060546875,
0.014190673828125,
0.019256591796875,
0.032562255859375,
-0.001987457275390625,
-0.020263671875,
0.0296783447265625,
0.0262298583984375,
-0.01177978515625,
0.004154205322265625,
0.017303466796875,
0.0189361572265625,
-0.0057830810546875,
0.037139892578125,
0.01433563232421875,
0.0169830322265625,
-0.056732177734375,
0.06719970703125,
-0.05511474609375,
0.004238128662109375,
-0.0207672119140625,
0.004451751708984375,
0.023956298828125,
-0.0025501251220703125,
-0.0167236328125,
0.004917144775390625,
0.0273590087890625,
0.0223541259765625,
-0.051513671875,
0.047332763671875,
-0.03564453125,
-0.04449462890625,
-0.039764404296875,
0.04693603515625,
-0.0001633167266845703,
-0.0433349609375,
0.01012420654296875,
0.0330810546875,
-0.00469970703125,
-0.0174407958984375,
-0.052947998046875,
0.0248870849609375,
0.0117950439453125,
0.0153350830078125,
-0.0018873214721679688,
-0.00450897216796875,
-0.02850341796875,
0.0023860931396484375,
-0.00380706787109375,
0.0128326416015625,
0.0153350830078125,
0.003063201904296875,
0.003368377685546875,
-0.05987548828125,
0.00022172927856445312,
-0.0027141571044921875,
0.0146942138671875,
-0.00518035888671875,
-0.0036029815673828125,
-0.032135009765625,
-0.043121337890625,
-0.014312744140625,
-0.054168701171875,
-0.053985595703125,
0.00732421875,
0.0083465576171875,
-0.039825439453125,
-0.00909423828125,
0.0214996337890625,
0.0182647705078125,
0.0278472900390625,
-0.025787353515625,
-0.02838134765625,
0.003795623779296875,
-0.0226287841796875,
0.0243682861328125,
0.00047326087951660156,
-0.0291290283203125,
0.043304443359375,
0.0787353515625,
0.05926513671875,
0.00803375244140625,
0.047454833984375,
-0.0016012191772460938,
-0.004329681396484375,
-0.0243988037109375,
0.0241851806640625,
-0.01629638671875,
-0.00707244873046875,
-0.010894775390625,
0.011077880859375,
0.006580352783203125,
0.005519866943359375,
-0.0207672119140625,
-0.0012664794921875,
0.0012178421020507812,
-0.023040771484375,
-0.00415802001953125,
0.005916595458984375,
0.005748748779296875,
0.0182647705078125,
-0.007144927978515625,
0.00870513916015625,
0.0091705322265625,
0.01059722900390625,
-0.030242919921875,
-0.01142120361328125,
0.035614013671875,
-0.0214996337890625,
-0.01326751708984375,
-0.01108551025390625,
0.042877197265625,
-0.00888824462890625,
-0.020843505859375,
0.01605224609375,
0.0305023193359375,
-0.033447265625,
0.03472900390625,
0.051422119140625,
-0.00316619873046875,
-0.0015497207641601562,
0.040740966796875,
0.0269317626953125,
0.056304931640625,
-0.022247314453125,
-0.08404541015625,
-0.01393890380859375,
-0.03460693359375,
-0.01531219482421875,
-0.031707763671875,
-0.042266845703125,
0.003932952880859375,
0.0060577392578125,
0.044158935546875,
-0.021514892578125,
-0.019744873046875,
-0.0269012451171875,
-0.051177978515625,
-0.004901885986328125,
0.019439697265625,
-0.042633056640625,
0.025848388671875,
-0.0162200927734375,
0.0709228515625,
-0.03387451171875,
-0.0298309326171875,
-0.006786346435546875,
-0.00037980079650878906,
0.002986907958984375,
0.0098419189453125,
0.03448486328125,
-0.00789642333984375,
-0.035919189453125,
0.0301666259765625,
-0.0123138427734375,
-0.0638427734375,
0.071044921875,
-0.006206512451171875,
0.045196533203125,
-0.002262115478515625,
0.0036029815673828125,
0.037567138671875,
0.0194244384765625,
-0.01224517822265625,
0.041778564453125,
-0.021087646484375,
-0.035675048828125,
-0.031341552734375,
0.002651214599609375,
-0.0235443115234375,
-0.03057861328125,
0.034881591796875,
-0.03009033203125,
0.00823211669921875,
0.017669677734375,
-0.07318115234375,
0.0172271728515625,
-0.031463623046875,
0.0091400146484375,
-0.041107177734375,
0.007678985595703125,
0.0264892578125,
0.0016345977783203125,
-0.01629638671875,
-0.035308837890625,
-0.01496124267578125,
-0.004119873046875,
-0.039306640625,
0.00443267822265625,
0.00539398193359375,
-0.0028781890869140625,
0.0154876708984375,
-0.019561767578125,
0.0006084442138671875,
0.0115203857421875,
0.09130859375,
-0.00617218017578125,
-0.02069091796875,
-0.0239105224609375,
0.04833984375,
0.006885528564453125,
-0.057952880859375,
0.047332763671875,
0.050994873046875,
0.06988525390625,
-0.0184478759765625,
-0.007427215576171875,
0.03863525390625,
-0.0161590576171875,
0.01340484619140625,
0.03009033203125,
0.041961669921875,
0.0267791748046875,
-0.0306396484375,
-0.045623779296875,
0.048736572265625,
-0.0477294921875,
0.004184722900390625,
-0.025634765625,
0.00786590576171875,
0.052032470703125,
-0.014801025390625,
0.007251739501953125,
0.0214996337890625,
-0.045166015625,
0.0026416778564453125,
0.0328369140625,
-0.00705718994140625,
-0.01116943359375,
-0.017822265625,
0.0060882568359375,
-0.00510406494140625,
-0.0765380859375,
-0.01149749755859375,
-0.02655029296875,
-0.018310546875,
0.0106964111328125,
0.0048828125,
-0.0016117095947265625,
0.00530242919921875,
0.0006313323974609375,
0.001689910888671875,
-0.05816650390625,
-0.005645751953125,
0.0052947998046875,
-0.0263824462890625,
-0.01201629638671875,
-0.029693603515625,
0.027374267578125,
0.0016908645629882812,
-0.02783203125,
0.0019483566284179688,
0.040130615234375,
-0.060028076171875,
-0.00872039794921875,
-0.041351318359375,
-0.054534912109375,
-0.00308990478515625,
0.0484619140625,
-0.0029315948486328125,
0.0139312744140625,
0.01641845703125,
0.04803466796875,
0.0000998377799987793,
0.01499176025390625,
-0.028350830078125,
0.01462554931640625,
0.058349609375,
-0.06097412109375,
0.039337158203125,
-0.024810791015625,
0.0509033203125,
0.0628662109375,
-0.007221221923828125,
0.002643585205078125,
-0.0096282958984375,
0.006488800048828125,
0.01116943359375,
-0.004856109619140625,
-0.01291656494140625,
-0.01464080810546875,
-0.0631103515625,
-0.0092315673828125,
0.02850341796875,
0.061553955078125,
0.0007300376892089844,
-0.037200927734375,
-0.0014829635620117188,
0.045562744140625,
-0.074951171875,
-0.07489013671875,
0.05731201171875,
-0.04522705078125,
-0.03302001953125,
-0.002544403076171875,
-0.03955078125,
0.01078033447265625,
0.01251983642578125,
-0.01861572265625,
-0.03924560546875,
-0.0219879150390625,
-0.0672607421875,
-0.040863037109375,
-0.038909912109375,
0.0682373046875,
-0.0136260986328125,
0.0078582763671875,
0.00963592529296875,
0.036224365234375,
0.01800537109375,
-0.0244598388671875,
0.0290374755859375,
0.06805419921875,
-0.018707275390625,
-0.019317626953125,
-0.01100921630859375,
-0.0172119140625,
0.0134429931640625,
-0.0085906982421875,
0.0124359130859375,
0.0114898681640625,
0.0006875991821289062,
-0.004840850830078125,
0.0200347900390625,
0.034515380859375,
0.05657958984375,
-0.0231475830078125,
-0.053436279296875,
0.058074951171875,
0.047515869140625,
-0.0025196075439453125,
0.0140228271484375,
-0.0133056640625,
-0.03045654296875,
-0.063232421875,
0.0198974609375,
-0.0089111328125,
-0.0212860107421875,
-0.0199127197265625,
0.0030345916748046875,
0.0303955078125,
-0.0560302734375,
-0.01064300537109375,
0.05255126953125,
0.01055145263671875,
0.01123809814453125,
0.0293121337890625,
-0.007709503173828125,
-0.028076171875,
0.027587890625,
-0.00186920166015625,
0.01364898681640625,
0.04058837890625,
-0.0390625,
0.026123046875,
0.016815185546875,
0.033294677734375,
0.045440673828125,
0.04010009765625,
-0.0225830078125,
-0.038177490234375,
-0.041229248046875,
0.037200927734375,
-0.048004150390625,
-0.01245880126953125,
0.01275634765625,
0.0411376953125,
-0.0305633544921875,
-0.06512451171875,
-0.001293182373046875,
-0.0234222412109375,
-0.02410888671875,
0.0001976490020751953,
-0.0294952392578125,
-0.01422882080078125,
-0.024627685546875,
-0.03582763671875,
-0.01221466064453125,
-0.022918701171875,
0.041107177734375,
-0.04486083984375,
0.0208892822265625,
0.003627777099609375,
-0.005107879638671875,
-0.0112152099609375,
-0.0265350341796875,
-0.025115966796875,
-0.06689453125,
-0.01029205322265625,
0.0279693603515625,
0.038970947265625,
-0.01151275634765625,
-0.02349853515625,
-0.024139404296875,
0.035003662109375,
0.004039764404296875,
0.019805908203125,
0.0182647705078125,
-0.0004527568817138672,
0.031646728515625,
0.012725830078125,
0.0213470458984375,
-0.02734375,
0.00702667236328125,
0.003875732421875,
-0.0166473388671875,
-0.00917816162109375,
-0.059051513671875,
-0.040924072265625,
-0.0416259765625,
-0.033416748046875,
-0.007274627685546875,
0.00820159912109375,
0.007091522216796875,
0.015899658203125,
-0.040008544921875,
0.028778076171875,
0.01534271240234375,
-0.01910400390625,
0.03924560546875,
0.03912353515625,
-0.03106689453125,
-0.0066680908203125,
0.049591064453125,
0.0250701904296875,
-0.037872314453125,
-0.06622314453125,
-0.033050537109375,
0.005992889404296875,
0.01462554931640625,
-0.002346038818359375,
-0.0110931396484375,
0.002513885498046875,
-0.0267486572265625,
-0.0144805908203125,
-0.033294677734375,
0.0178375244140625,
0.027313232421875,
0.00286102294921875,
-0.01047515869140625,
-0.006999969482421875,
-0.027191162109375,
0.01427459716796875,
0.055755615234375,
0.01006317138671875,
-0.05517578125,
-0.0009088516235351562,
0.032867431640625,
-0.0218048095703125,
0.0380859375,
-0.003429412841796875,
-0.053009033203125,
0.03143310546875,
-0.0003325939178466797,
0.003482818603515625,
-0.0018310546875,
0.006439208984375,
0.025909423828125,
-0.002574920654296875,
-0.00884246826171875,
0.0237274169921875,
0.070556640625,
-0.00502777099609375,
0.047088623046875,
-0.006832122802734375,
-0.01470184326171875,
-0.032989501953125,
0.006710052490234375,
0.050323486328125,
-0.03619384765625,
-0.036895751953125,
-0.005950927734375,
-0.0220184326171875,
-0.035552978515625,
0.046112060546875,
-0.0003886222839355469,
0.021270751953125,
0.036773681640625,
-0.0174407958984375,
-0.0080718994140625,
0.037445068359375,
-0.029296875,
-0.0287322998046875,
0.0245513916015625,
-0.0206756591796875,
0.0265655517578125,
0.0015897750854492188,
0.08013916015625,
-0.06170654296875,
0.07135009765625,
-0.01529693603515625,
-0.004306793212890625,
0.025390625,
0.006328582763671875,
0.01309967041015625,
-0.005523681640625,
0.0011129379272460938,
0.00852203369140625,
0.0193634033203125,
-0.004055023193359375,
-0.01375579833984375,
0.049163818359375,
-0.0032482147216796875,
0.01580810546875,
0.0232391357421875,
-0.00787353515625,
0.0280609130859375,
-0.0113067626953125,
-0.01517486572265625,
-0.005138397216796875,
0.0159912109375,
-0.00994110107421875,
-0.015869140625,
0.005123138427734375,
0.0081634521484375,
-0.0005216598510742188,
0.000012278556823730469,
-0.0053253173828125,
0.05072021484375,
-0.048858642578125,
0.01555633544921875,
0.0019626617431640625,
-0.00923919677734375,
0.0126495361328125,
-0.003185272216796875,
0.005260467529296875,
-0.06903076171875,
-0.0266265869140625,
-0.00797271728515625,
-0.0161895751953125,
0.045989990234375,
-0.01715087890625,
0.0294189453125,
-0.030059814453125,
-0.0007777214050292969,
0.033966064453125,
0.01322174072265625,
0.041290283203125,
0.00533294677734375,
-0.01953125,
-0.01953125,
-0.0301971435546875,
-0.0200653076171875,
0.042266845703125,
0.00921630859375,
-0.02032470703125,
-0.019073486328125,
0.0113677978515625,
0.027435302734375,
0.02301025390625,
0.0133819580078125,
-0.032745361328125,
-0.0173187255859375,
-0.01015472412109375,
0.0240631103515625,
-0.0272979736328125,
0.0380859375,
0.0190582275390625,
0.0255889892578125,
-0.0005812644958496094,
0.00543212890625,
-0.0025501251220703125,
-0.0137939453125,
-0.01473236083984375,
-0.0733642578125,
-0.007221221923828125,
0.031585693359375,
-0.03985595703125,
0.03155517578125,
0.01081085205078125,
0.004852294921875,
0.0205841064453125,
-0.0076904296875,
0.00030231475830078125,
-0.0081329345703125,
0.00919342041015625,
-0.004497528076171875,
-0.0129241943359375,
0.050537109375,
-0.0229949951171875,
0.0166015625,
0.0185546875,
-0.007602691650390625,
0.03045654296875,
-0.01444244384765625,
0.00019562244415283203,
0.0162506103515625,
-0.007648468017578125,
0.00418853759765625,
0.0325927734375,
-0.0144500732421875,
0.0013303756713867188,
-0.00952911376953125,
-0.0271148681640625,
0.0255126953125,
-0.02923583984375,
0.0269012451171875,
0.045654296875,
0.05413818359375,
-0.0265350341796875,
-0.0023937225341796875,
0.026031494140625,
-0.0235595703125,
-0.015411376953125,
-0.005504608154296875,
0.0120849609375,
-0.0343017578125,
-0.0020961761474609375,
0.0218048095703125,
-0.0016069412231445312,
-0.037872314453125,
0.04901123046875,
0.00466156005859375,
0.0018281936645507812,
-0.048004150390625,
0.0229949951171875,
-0.00547027587890625,
-0.005283355712890625,
0.0172576904296875,
0.00864410400390625,
-0.00865936279296875,
0.00350189208984375,
-0.0019502639770507812,
-0.045501708984375,
0.004642486572265625,
0.04290771484375,
0.00952911376953125,
-0.013336181640625,
0.010986328125,
0.021087646484375,
-0.01465606689453125,
-0.06304931640625,
0.031524658203125,
-0.00959014892578125,
-0.0082550048828125,
-0.031890869140625,
0.04266357421875,
0.0243682861328125,
0.056610107421875,
0.003345489501953125,
0.00797271728515625,
0.04296875,
-0.027801513671875,
-0.0194091796875,
-0.0078125,
-0.00733184814453125,
0.0170135498046875,
0.00011909008026123047,
0.012664794921875,
-0.0167083740234375,
0.000675201416015625,
-0.007221221923828125,
-0.01061248779296875,
0.03607177734375,
-0.03387451171875,
0.0008645057678222656,
0.037841796875,
0.020965576171875,
-0.0029926300048828125,
0.0257110595703125,
0.017608642578125,
-0.07513427734375,
-0.063720703125,
0.02252197265625,
-0.06658935546875,
-0.0114288330078125,
0.025177001953125,
-0.05804443359375,
0.1107177734375,
-0.059417724609375,
0.035858154296875,
0.036956787109375,
0.0207977294921875,
-0.022857666015625,
0.0129852294921875,
-0.0274810791015625,
0.05609130859375,
-0.0177459716796875,
0.024139404296875,
-0.050079345703125,
-0.01425933837890625,
0.00022268295288085938,
0.0287322998046875,
0.0379638671875,
0.004852294921875,
-0.037628173828125,
-0.018798828125,
0.038299560546875,
0.040252685546875,
0.006259918212890625,
0.036346435546875,
0.0196380615234375,
0.01183319091796875,
0.06488037109375,
0.0039825439453125,
0.03485107421875,
-0.004718780517578125,
0.005878448486328125,
0.051055908203125,
0.01032257080078125,
0.019195556640625,
-0.02203369140625,
0.007366180419921875,
-0.006988525390625,
-0.027069091796875,
0.0029087066650390625,
0.038177490234375,
0.0362548828125,
0.02276611328125,
0.006916046142578125,
-0.038299560546875,
0.00010001659393310547,
-0.0311279296875,
0.0285186767578125,
-0.03582763671875,
0.04638671875,
0.04376220703125,
0.0216522216796875,
0.10107421875,
-0.0248565673828125,
0.023101806640625,
0.00547027587890625,
-0.01224517822265625,
0.048370361328125,
0.00820159912109375,
0.0238037109375,
-0.0693359375,
-0.0129852294921875,
0.0203094482421875,
0.06646728515625,
-0.038330078125,
-0.0743408203125,
-0.006771087646484375,
-0.0025882720947265625,
0.02630615234375,
-0.00539398193359375,
0.004108428955078125,
0.08056640625,
0.12042236328125,
-0.035308837890625,
-0.0001227855682373047,
0.0474853515625,
-0.041900634765625,
0.00008296966552734375,
0.0273590087890625,
0.019805908203125,
0.01421356201171875,
-0.04522705078125,
0.004611968994140625,
0.01477813720703125,
0.052581787109375,
-0.004314422607421875,
0.06475830078125,
-0.02728271484375,
-0.0200347900390625,
-0.01506805419921875,
0.013824462890625,
-0.01053619384765625,
0.0230712890625,
-0.036376953125,
-0.0239105224609375,
-0.00647735595703125,
0.0355224609375,
0.0307159423828125,
0.025848388671875,
0.050048828125,
0.054718017578125,
-0.00844573974609375,
0.006500244140625,
0.035308837890625,
-0.00943756103515625,
-0.0214080810546875,
-0.00962066650390625,
-0.034454345703125,
0.0194854736328125,
-0.0185546875,
0.01922607421875,
0.012664794921875,
0.01091766357421875,
0.0275726318359375,
0.0134124755859375,
0.01056671142578125,
-0.0257568359375,
0.01751708984375,
0.02099609375,
0.04351806640625,
0.04119873046875,
-0.09173583984375,
-0.0267333984375,
-0.0031147003173828125,
-0.03216552734375,
0.02374267578125,
0.0309295654296875,
-0.029449462890625,
0.0209808349609375,
0.005550384521484375,
-0.00545501708984375,
0.00446319580078125,
0.0205078125,
0.00555419921875,
0.0008344650268554688,
0.0218658447265625,
-0.004638671875,
-0.0545654296875,
-0.0015172958374023438,
0.029876708984375,
-0.0240478515625,
-0.0229339599609375,
-0.01448822021484375,
0.050933837890625,
-0.0157012939453125,
0.031494140625,
-0.0007371902465820312,
0.01552581787109375,
0.04486083984375,
-0.006786346435546875,
-0.0225982666015625,
0.0166015625,
-0.0118560791015625,
0.0257720947265625,
0.017242431640625,
0.051513671875,
-0.024322509765625,
0.0035190582275390625,
-0.0142974853515625,
0.018646240234375,
-0.038482666015625,
0.03204345703125,
-0.019378662109375,
0.047607421875,
-0.0278167724609375,
-0.0655517578125,
0.08465576171875,
-0.01531982421875,
-0.0225067138671875,
0.0223541259765625,
0.03302001953125,
-0.025726318359375,
0.047271728515625,
-0.037811279296875,
0.08251953125,
0.04156494140625,
0.018157958984375,
0.008453369140625,
-0.03692626953125,
-0.0196075439453125,
-0.0257415771484375,
0.038604736328125,
-0.07147216796875,
-0.00177764892578125,
0.0027942657470703125,
0.033599853515625,
0.0164642333984375,
0.041717529296875,
-0.004398345947265625,
0.004791259765625,
0.032012939453125,
-0.0187530517578125,
0.00980377197265625,
0.0034084320068359375,
-0.039031982421875,
-0.0299530029296875,
-0.0129241943359375,
-0.0127410888671875,
-0.005573272705078125,
-0.06878662109375,
-0.0214691162109375,
-0.0224151611328125,
0.01390838623046875,
-0.00909423828125,
0.00003522634506225586,
0.0124664306640625,
-0.0222930908203125,
-0.0357666015625,
-0.014007568359375,
-0.05828857421875,
0.007232666015625,
0.0176239013671875,
0.00162506103515625,
-0.00771331787109375,
-0.05908203125,
-0.00958251953125,
-0.024810791015625,
0.00104522705078125,
0.0261688232421875,
0.000560760498046875,
-0.03973388671875,
0.012847900390625,
-0.006168365478515625,
0.03948974609375,
-0.00469207763671875,
-0.0062408447265625,
0.034271240234375,
-0.0010480880737304688,
-0.044708251953125,
-0.07421875,
0.0258941650390625,
-0.0714111328125,
-0.014495849609375,
0.0430908203125,
0.0096588134765625,
0.0357666015625,
-0.04510498046875,
-0.138916015625,
0.010528564453125,
-0.0213623046875,
-0.06268310546875,
-0.06103515625,
-0.042205810546875,
0.002964019775390625,
0.0019235610961914062,
-0.022186279296875,
0.00678253173828125,
-0.0767822265625,
0.038818359375,
0.00240325927734375,
0.022247314453125,
0.00478363037109375,
0.04034423828125,
-0.060028076171875,
0.0170745849609375,
-0.03375244140625,
-0.0188446044921875,
0.01617431640625,
-0.01293182373046875,
0.0210113525390625,
0.02581787109375,
-0.0261383056640625,
-0.003314971923828125,
0.00038051605224609375,
-0.037200927734375,
-0.00812530517578125,
0.01012420654296875,
-0.01953125,
0.0170745849609375,
0.04718017578125,
0.062225341796875,
0.0194091796875,
-0.053009033203125,
0.023040771484375,
-0.0194854736328125,
-0.01349639892578125,
-0.0171966552734375,
0.00902557373046875,
-0.042724609375,
-0.02008056640625,
-0.0106353759765625,
0.00598907470703125,
-0.019500732421875,
-0.028656005859375,
-0.00391387939453125,
-0.032989501953125,
0.0026836395263671875,
0.0234375,
0.00916290283203125,
0.0088348388671875,
0.061126708984375,
-0.04736328125,
-0.038360595703125,
-0.02020263671875,
0.01788330078125,
-0.011962890625,
-0.0670166015625,
-0.0017328262329101562,
0.011749267578125,
0.033203125,
0.001934051513671875,
0.035919189453125,
-0.06268310546875,
0.03216552734375,
0.0259857177734375,
-0.0307464599609375,
0.0225982666015625,
0.0173797607421875,
0.025146484375,
-0.05938720703125,
0.057647705078125,
0.0263824462890625,
0.05828857421875,
0.0222015380859375,
0.0445556640625,
0.005237579345703125,
0.022857666015625,
0.028533935546875,
-0.037078857421875,
0.030364990234375,
-0.0269012451171875,
0.005222320556640625,
-0.0002014636993408203,
-0.004886627197265625,
-0.038665771484375,
0.008514404296875,
0.04937744140625,
-0.002956390380859375,
0.016510009765625
]
|
822ebbca2e51860b1ea5f8ff263533e9ccfe1b88 | Wordpress Stackexchange
Q: How to edit codes of an individual page/post? I want to run a JavaScript and I want to paste in inside the <head></head> tag
I do not want to add it to the text-view area.
How can I add this code snippet to an individual post (I mean not editing the headers.php)?
A: You want to hook into the Header code using something like this:
add_action('wp_head','hook_javascript');
function hook_javascript() {
if (is_single('123')) {
$output="<script> enter your script here </script>";
echo $output;
}
}
More information available here: https://codex.wordpress.org/Plugin_API/Action_Reference/wp_head
| Q: How to edit codes of an individual page/post? I want to run a JavaScript and I want to paste in inside the <head></head> tag
I do not want to add it to the text-view area.
How can I add this code snippet to an individual post (I mean not editing the headers.php)?
A: You want to hook into the Header code using something like this:
add_action('wp_head','hook_javascript');
function hook_javascript() {
if (is_single('123')) {
$output="<script> enter your script here </script>";
echo $output;
}
}
More information available here: https://codex.wordpress.org/Plugin_API/Action_Reference/wp_head
| wordpress | {
"language": "en",
"length": 88,
"provenance": "stackexchange_00019.jsonl.gz:464711",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/223751"
} | [
0.053985595703125,
-0.037933349609375,
-0.00269317626953125,
-0.01522064208984375,
-0.0171661376953125,
-0.027130126953125,
0.03887939453125,
-0.0032100677490234375,
-0.058319091796875,
-0.00920867919921875,
-0.031768798828125,
0.0270233154296875,
-0.055877685546875,
-0.0283660888671875,
0.034271240234375,
-0.050445556640625,
0.049957275390625,
-0.0411376953125,
0.004215240478515625,
-0.0091552734375,
0.00864410400390625,
0.0255126953125,
0.00577545166015625,
0.1025390625,
0.00910186767578125,
-0.01120758056640625,
0.0694580078125,
-0.033905029296875,
0.02801513671875,
-0.016571044921875,
0.0172271728515625,
-0.0019426345825195312,
0.03546142578125,
0.029052734375,
-0.04534912109375,
0.0672607421875,
-0.0033779144287109375,
0.0216522216796875,
0.01507568359375,
0.0233001708984375,
0.036956787109375,
-0.016815185546875,
0.006298065185546875,
0.042327880859375,
-0.00548553466796875,
-0.040924072265625,
0.048980712890625,
-0.0305938720703125,
0.0006442070007324219,
-0.04437255859375,
-0.000553131103515625,
0.01690673828125,
0.01297760009765625,
-0.010498046875,
-0.0204620361328125,
0.00760650634765625,
-0.02557373046875,
-0.04095458984375,
0.0170135498046875,
0.046478271484375,
0.01210784912109375,
-0.0234832763671875,
0.00850677490234375,
-0.025115966796875,
0.00579833984375,
-0.0041656494140625,
-0.04425048828125,
0.00013136863708496094,
-0.0103302001953125,
0.01094818115234375,
0.034088134765625,
-0.04522705078125,
-0.00472259521484375,
-0.01153564453125,
0.005367279052734375,
-0.0206298828125,
-0.0110626220703125,
-0.02227783203125,
0.00650787353515625,
0.036224365234375,
0.04888916015625,
0.0017576217651367188,
0.01324462890625,
-0.0285491943359375,
0.02813720703125,
-0.00998687744140625,
0.004642486572265625,
-0.0260772705078125,
-0.044921875,
-0.0013341903686523438,
-0.04791259765625,
-0.0182647705078125,
-0.00846099853515625,
-0.0106048583984375,
-0.0311126708984375,
0.0238494873046875,
-0.0103759765625,
0.00792694091796875,
0.00170135498046875,
0.0350341796875,
0.0178680419921875,
-0.047637939453125,
0.06890869140625,
-0.054046630859375,
0.00669097900390625,
0.05120849609375,
0.00397491455078125,
-0.044189453125,
0.0023784637451171875,
-0.0075531005859375,
-0.01047515869140625,
-0.017364501953125,
0.01220703125,
0.03973388671875,
-0.047088623046875,
-0.00827789306640625,
-0.0266265869140625,
-0.01081085205078125,
-0.0298309326171875,
0.01922607421875,
-0.0041351318359375,
0.002162933349609375,
0.0104522705078125,
0.00345611572265625,
-0.01490020751953125,
-0.006103515625,
-0.01568603515625,
-0.02923583984375,
0.02752685546875,
-0.076416015625,
-0.041595458984375,
0.055755615234375,
0.08795166015625,
0.05120849609375,
0.0323486328125,
0.0135498046875,
-0.01259613037109375,
-0.004360198974609375,
-0.0235443115234375,
0.00605010986328125,
-0.015960693359375,
-0.01324462890625,
0.016021728515625,
-0.03643798828125,
0.021697998046875,
-0.0188140869140625,
-0.01490020751953125,
0.0310821533203125,
0.051239013671875,
0.0269927978515625,
-0.0023174285888671875,
-0.0093231201171875,
0.0273895263671875,
-0.01399993896484375,
0.005435943603515625,
-0.0679931640625,
0.01395416259765625,
-0.056884765625,
0.048065185546875,
-0.0390625,
0.00637054443359375,
-0.006072998046875,
0.04083251953125,
0.009368896484375,
-0.0278472900390625,
0.004726409912109375,
-0.05712890625,
-0.00679779052734375,
0.01031494140625,
-0.017608642578125,
-0.0172119140625,
-0.01177978515625,
0.004215240478515625,
-0.0118408203125,
-0.007114410400390625,
0.0135955810546875,
-0.0330810546875,
0.0104827880859375,
0.049468994140625,
0.00592803955078125,
0.0255279541015625,
-0.0061492919921875,
0.0504150390625,
0.0162353515625,
-0.061767578125,
0.061737060546875,
0.0255279541015625,
0.075927734375,
-0.004947662353515625,
0.0177459716796875,
0.044525146484375,
0.02716064453125,
-0.023406982421875,
-0.004863739013671875,
-0.017852783203125,
-0.037109375,
0.006198883056640625,
-0.016510009765625,
-0.026519775390625,
0.044708251953125,
-0.02081298828125,
-0.000057578086853027344,
0.0035572052001953125,
0.01500701904296875,
-0.0255584716796875,
-0.01495361328125,
-0.0138702392578125,
0.0281982421875,
0.00920867919921875,
-0.0034847259521484375,
0.006458282470703125,
-0.00638580322265625,
0.025970458984375,
-0.08685302734375,
-0.056671142578125,
0.0157928466796875,
-0.0311126708984375,
0.06988525390625,
0.016815185546875,
0.04638671875,
0.023193359375,
-0.038360595703125,
0.029022216796875,
-0.03350830078125,
0.0367431640625,
-0.0254669189453125,
-0.0195770263671875,
-0.04931640625,
-0.0168304443359375,
-0.01019287109375,
-0.0672607421875,
0.056549072265625,
-0.0022430419921875,
0.03607177734375,
-0.039215087890625,
-0.0242767333984375,
-0.03668212890625,
0.019866943359375,
0.006622314453125,
0.0294952392578125,
0.040618896484375,
0.038848876953125,
0.026763916015625,
0.00811767578125,
0.0706787109375,
-0.036865234375,
0.0161285400390625,
-0.0294342041015625,
0.024444580078125,
0.0219573974609375,
-0.010223388671875,
-0.0107879638671875,
0.042755126953125,
-0.0821533203125,
0.03399658203125,
0.046722412109375,
-0.010009765625,
0.006195068359375,
0.004871368408203125,
-0.02508544921875,
0.01294708251953125,
-0.0308380126953125,
-0.0273590087890625,
-0.0229034423828125,
0.08660888671875,
-0.007183074951171875,
0.057464599609375,
0.03192138671875,
-0.042205810546875,
0.01047515869140625,
0.01141357421875,
0.0238037109375,
0.001811981201171875,
0.0360107421875,
-0.0009355545043945312,
0.0074462890625,
-0.01273345947265625,
-0.01503753662109375,
0.0017566680908203125,
0.016326904296875,
0.00530242919921875,
0.01065826416015625,
-0.029022216796875,
-0.00537872314453125,
0.0190277099609375,
-0.0235748291015625,
-0.00119781494140625,
0.00421142578125,
0.0036106109619140625,
0.0183868408203125,
0.05426025390625,
0.01181793212890625,
-0.022308349609375,
0.01438140869140625,
-0.0248870849609375,
-0.00826263427734375,
0.0745849609375,
-0.041168212890625,
0.03533935546875,
-0.029937744140625,
0.0921630859375,
0.05487060546875,
-0.0423583984375,
0.03314208984375,
0.0011472702026367188,
-0.05010986328125,
-0.002899169921875,
0.0224456787109375,
-0.0015745162963867188,
-0.031097412109375,
-0.0091552734375,
0.041748046875,
0.01336669921875,
0.0426025390625,
-0.0243377685546875,
-0.061309814453125,
-0.016143798828125,
0.0006127357482910156,
-0.11212158203125,
-0.09613037109375,
0.0187835693359375,
-0.059295654296875,
0.035003662109375,
-0.0182342529296875,
-0.015838623046875,
-0.032012939453125,
0.0262451171875,
0.01451873779296875,
0.0031604766845703125,
-0.01055908203125,
-0.0119781494140625,
-0.0290679931640625,
-0.045074462890625,
-0.00453948974609375,
0.00524139404296875,
-0.0035495758056640625,
-0.00028014183044433594,
0.004238128662109375,
0.00269317626953125,
-0.0384521484375,
-0.0086822509765625,
0.0096435546875,
-0.0248870849609375,
-0.023193359375,
0.0027332305908203125,
-0.040130615234375,
0.00029468536376953125,
-0.005157470703125,
-0.0450439453125,
0.01336669921875,
0.010833740234375,
-0.0069427490234375,
-0.0390625,
-0.030059814453125,
-0.0247955322265625,
0.06573486328125,
0.05535888671875,
0.0166473388671875,
0.052276611328125,
-0.0133209228515625,
0.0025482177734375,
-0.0119476318359375,
-0.023162841796875,
-0.0161285400390625,
0.0079345703125,
-0.006862640380859375,
-0.01861572265625,
0.0170745849609375,
0.047698974609375,
0.036529541015625,
0.00969696044921875,
0.0259857177734375,
-0.006744384765625,
-0.004932403564453125,
0.022796630859375,
-0.036773681640625,
0.00945281982421875,
-0.0030689239501953125,
0.01299285888671875,
-0.0009217262268066406,
0.014862060546875,
-0.03521728515625,
0.045684814453125,
-0.06866455078125,
-0.0288543701171875,
0.0222320556640625,
-0.016265869140625,
0.01513671875,
-0.01338958740234375,
-0.0110321044921875,
-0.001216888427734375,
0.060699462890625,
-0.04296875,
-0.010711669921875,
0.002307891845703125,
-0.004058837890625,
-0.0297088623046875,
-0.02581787109375,
-0.06549072265625,
-0.0063323974609375,
-0.03936767578125,
0.0265960693359375,
-0.002445220947265625,
-0.0105743408203125,
-0.036285400390625,
0.046051025390625,
-0.03680419921875,
-0.01251983642578125,
0.0151824951171875,
-0.034942626953125,
-0.0286865234375,
0.020416259765625,
-0.057464599609375,
0.008392333984375,
-0.0302581787109375,
-0.025970458984375,
-0.0897216796875,
-0.0034465789794921875,
-0.051666259765625,
0.07177734375,
0.03802490234375,
-0.055816650390625,
-0.037506103515625,
0.0226287841796875,
-0.0153656005859375,
0.0248565673828125,
-0.01497650146484375,
0.0224761962890625,
-0.02398681640625,
-0.023468017578125,
-0.01346588134765625,
-0.03424072265625,
-0.002918243408203125,
0.005474090576171875,
-0.00777435302734375,
0.0391845703125,
-0.0080718994140625,
-0.0002446174621582031,
0.001964569091796875,
-0.0175018310546875,
-0.05926513671875,
-0.049468994140625,
-0.01580810546875,
0.00740814208984375,
-0.00531768798828125,
-0.005352020263671875,
-0.041290283203125,
-0.059234619140625,
0.0275726318359375,
0.003665924072265625,
-0.0051422119140625,
-0.00981903076171875,
0.0426025390625,
0.0163421630859375,
-0.0109100341796875,
-0.0006804466247558594,
0.05206298828125,
0.041717529296875,
-0.0230255126953125,
0.059906005859375,
0.0131988525390625,
-0.0178375244140625,
0.09259033203125,
-0.00835418701171875,
0.0241851806640625,
-0.05584716796875,
0.04248046875,
0.0372314453125,
0.0160980224609375,
0.004962921142578125,
0.050567626953125,
0.01290130615234375,
-0.0028324127197265625,
-0.0323486328125,
0.004047393798828125,
0.0218048095703125,
0.00734710693359375,
-0.05133056640625,
0.068359375,
0.01776123046875,
-0.01531982421875,
-0.00507354736328125,
0.051666259765625,
0.023101806640625,
0.0457763671875,
0.00197601318359375,
-0.0006394386291503906,
0.007381439208984375,
0.034332275390625,
-0.00273895263671875,
0.01507568359375,
-0.03680419921875,
0.039520263671875,
0.006061553955078125,
-0.00714111328125,
-0.003864288330078125,
-0.01898193359375,
0.0243682861328125,
0.0180511474609375,
-0.0301666259765625,
0.002346038818359375,
0.0025310516357421875,
0.02191162109375,
-0.0138702392578125,
0.039093017578125,
0.0029201507568359375,
-0.002178192138671875,
0.005878448486328125,
-0.00982666015625,
0.0269927978515625,
-0.00983428955078125,
-0.01153564453125,
-0.01094818115234375,
0.00870513916015625,
-0.0168914794921875,
0.03802490234375,
-0.02264404296875,
-0.0004563331604003906,
-0.01087188720703125,
-0.00868988037109375,
0.050079345703125,
0.03118896484375,
0.011627197265625,
0.0105438232421875,
0.0160980224609375,
-0.00849151611328125,
0.0039520263671875,
-0.01473236083984375,
-0.022308349609375,
-0.00896453857421875,
0.003925323486328125,
0.02276611328125,
0.010528564453125,
0.0163726806640625,
0.0008759498596191406,
0.001354217529296875,
-0.0179290771484375,
0.007049560546875,
-0.00931549072265625,
-0.0240936279296875,
-0.0108489990234375,
0.029571533203125,
0.0224456787109375,
0.0169525146484375,
0.02166748046875,
0.0283050537109375,
0.002452850341796875,
0.01739501953125,
0.0165252685546875,
-0.00308990478515625,
-0.034515380859375,
-0.0267791748046875,
0.0158233642578125,
0.01532745361328125,
0.001865386962890625,
-0.0455322265625,
-0.033416748046875,
-0.0096282958984375,
-0.0046234130859375,
0.04864501953125,
-0.0004734992980957031,
0.00812530517578125,
-0.026123046875,
-0.01345062255859375,
-0.0079803466796875,
-0.0281524658203125,
0.0863037109375,
0.038665771484375,
-0.066162109375,
0.026580810546875,
-0.04998779296875,
-0.007442474365234375,
-0.01226043701171875,
-0.03436279296875,
-0.04443359375,
-0.024871826171875,
-0.01210784912109375,
0.024566650390625,
-0.0161285400390625,
0.015045166015625,
-0.0083770751953125,
0.0276641845703125,
-0.0027484893798828125,
0.08697509765625,
-0.0208587646484375,
0.07183837890625,
-0.0252685546875,
0.0205841064453125,
-0.005558013916015625,
0.05279541015625,
0.01145172119140625,
-0.01500701904296875,
0.01410675048828125,
-0.0292816162109375,
-0.0228424072265625,
-0.021484375,
0.0269927978515625,
0.0297088623046875,
0.021209716796875,
-0.00777435302734375,
-0.002155303955078125,
0.009033203125,
0.0145111083984375,
-0.016204833984375,
-0.026519775390625,
0.0218963623046875,
-0.031585693359375,
0.037200927734375,
0.007537841796875,
-0.01491546630859375,
-0.00417327880859375,
-0.0231475830078125,
0.035888671875,
0.0183563232421875,
0.0165252685546875,
-0.04144287109375,
-0.0253448486328125,
0.01006317138671875,
0.04058837890625,
0.0188140869140625,
0.04583740234375,
0.01129913330078125,
0.027862548828125,
0.0310211181640625,
-0.0008897781372070312,
-0.0192413330078125,
-0.006717681884765625,
0.006038665771484375,
-0.0252532958984375,
-0.003345489501953125,
-0.01316070556640625,
-0.00916290283203125,
0.00006467103958129883,
0.05059814453125,
0.042388916015625,
-0.0867919921875,
0.02154541015625,
-0.0020198822021484375,
-0.007671356201171875,
0.0251617431640625,
0.016754150390625,
-0.0125732421875,
-0.0051116943359375,
0.0035266876220703125,
0.026153564453125,
-0.003894805908203125,
0.034637451171875,
0.040924072265625,
-0.01544189453125,
-0.04052734375,
0.00634002685546875,
-0.0007748603820800781,
-0.06060791015625,
0.032806396484375,
0.04010009765625,
-0.00039458274841308594,
-0.0222930908203125,
-0.01387786865234375,
0.044830322265625,
-0.042877197265625,
-0.0548095703125,
0.03759765625,
-0.017913818359375,
-0.00908660888671875,
0.005157470703125,
-0.0222015380859375,
0.0189971923828125,
0.035491943359375,
-0.01507568359375,
0.0088653564453125,
0.01580810546875,
-0.00431060791015625,
-0.004390716552734375,
-0.00246429443359375,
-0.0019550323486328125,
0.053253173828125,
-0.02984619140625,
0.01215362548828125,
-0.006439208984375,
0.01361846923828125,
-0.00792694091796875,
-0.0193634033203125,
0.046234130859375,
0.0156707763671875,
-0.05145263671875,
0.018646240234375,
-0.0242919921875,
-0.0125732421875,
0.0005307197570800781,
0.0211181640625,
-0.04034423828125,
-0.004619598388671875,
0.006641387939453125,
-0.02587890625,
-0.0400390625,
-0.0220489501953125,
-0.05474853515625,
0.11865234375,
-0.010711669921875,
0.004459381103515625,
0.0040435791015625,
0.0506591796875,
-0.0338134765625,
0.0176544189453125,
-0.03131103515625,
0.06878662109375,
-0.00653076171875,
0.0270233154296875,
-0.037933349609375,
-0.0012969970703125,
0.006500244140625,
0.0108184814453125,
0.0174560546875,
0.0005803108215332031,
0.0103759765625,
-0.0026149749755859375,
0.020172119140625,
0.03021240234375,
-0.0144195556640625,
0.0012369155883789062,
-0.005847930908203125,
0.0009908676147460938,
0.0128173828125,
-0.0009183883666992188,
0.035003662109375,
-0.01482391357421875,
-0.03857421875,
0.03826904296875,
0.00006186962127685547,
-0.013214111328125,
0.00650787353515625,
-0.0084381103515625,
-0.055816650390625,
0.0193023681640625,
0.020477294921875,
0.02801513671875,
-0.03466796875,
0.05194091796875,
0.00543975830078125,
0.0010995864868164062,
-0.01947021484375,
-0.027679443359375,
0.0215911865234375,
0.00437164306640625,
0.039886474609375,
-0.005596160888671875,
0.021728515625,
-0.0010843276977539062,
0.0035419464111328125,
0.004405975341796875,
0.043548583984375,
-0.029876708984375,
0.04608154296875,
0.042022705078125,
0.02178955078125,
0.004261016845703125,
0.06719970703125,
0.044647216796875,
0.0435791015625,
-0.062255859375,
0.006908416748046875,
0.00777435302734375,
0.011932373046875,
0.00972747802734375,
-0.0176544189453125,
0.031982421875,
0.01145172119140625,
0.01163482666015625,
0.0016965866088867188,
-0.0166778564453125,
0.0289154052734375,
0.0289154052734375,
0.020660400390625,
0.0513916015625,
-0.041107177734375,
-0.02093505859375,
-0.05450439453125,
0.0261077880859375,
0.00812530517578125,
0.0499267578125,
0.01212310791015625,
0.063232421875,
-0.015838623046875,
-0.0133514404296875,
-0.0159912109375,
0.0183258056640625,
0.01145172119140625,
0.015411376953125,
-0.034759521484375,
-0.0185699462890625,
0.0130615234375,
0.031494140625,
0.0293121337890625,
0.044921875,
0.03076171875,
-0.01898193359375,
-0.04278564453125,
0.013519287109375,
0.0251007080078125,
-0.032501220703125,
0.0280914306640625,
-0.0009403228759765625,
0.042327880859375,
0.00826263427734375,
-0.0068206787109375,
-0.0159912109375,
0.08843994140625,
-0.00493621826171875,
-0.040863037109375,
0.02386474609375,
-0.0128326416015625,
-0.01959228515625,
0.04443359375,
-0.00423431396484375,
0.061767578125,
-0.01898193359375,
-0.03509521484375,
0.01116943359375,
-0.025634765625,
-0.1104736328125,
0.0477294921875,
0.05279541015625,
-0.037811279296875,
0.01032257080078125,
0.007415771484375,
0.00904083251953125,
0.0262298583984375,
-0.0287017822265625,
0.01044464111328125,
0.0006380081176757812,
0.0164794921875,
0.01102447509765625,
-0.032318115234375,
-0.002651214599609375,
-0.037567138671875,
0.038543701171875,
0.02691650390625,
0.038116455078125,
-0.01001739501953125,
0.03985595703125,
0.00775909423828125,
0.0223388671875,
-0.010406494140625,
0.021453857421875,
-0.025146484375,
-0.0135955810546875,
0.022216796875,
-0.01003265380859375,
-0.038330078125,
0.0310516357421875,
0.0006308555603027344,
0.007965087890625,
0.035400390625,
-0.034393310546875,
0.00785064697265625,
0.01065826416015625,
0.03936767578125,
0.006420135498046875,
-0.01373291015625,
-0.003940582275390625,
-0.0009617805480957031,
0.040008544921875,
0.066162109375,
0.03302001953125,
0.0248260498046875,
-0.01580810546875,
-0.0092315673828125,
0.004024505615234375,
-0.01397705078125,
-0.0235137939453125,
0.0241241455078125,
-0.011505126953125,
0.018890380859375,
0.0265655517578125,
-0.0211181640625,
0.035369873046875,
0.0033664703369140625,
-0.0011739730834960938,
0.024444580078125,
-0.07049560546875,
-0.0093994140625,
0.0250701904296875,
0.041107177734375,
-0.01288604736328125,
0.024688720703125,
-0.0003826618194580078,
-0.0152740478515625,
0.0134735107421875,
0.05615234375,
-0.03643798828125,
-0.01113128662109375,
0.0279998779296875,
0.0230255126953125,
0.007106781005859375,
0.001293182373046875,
-0.080810546875,
-0.02545166015625,
0.03668212890625,
-0.0362548828125,
0.001972198486328125,
-0.046722412109375,
-0.0255584716796875,
0.059539794921875,
-0.03472900390625,
0.005657196044921875,
-0.026702880859375,
0.002994537353515625,
-0.019256591796875,
-0.055877685546875,
-0.03314208984375,
0.0745849609375,
-0.021209716796875,
0.029205322265625,
0.080322265625,
-0.01399993896484375,
-0.01392364501953125,
0.03668212890625,
0.015838623046875,
0.0875244140625,
-0.043426513671875,
-0.0153656005859375,
0.0123443603515625,
0.0168304443359375,
-0.01194000244140625,
-0.0240020751953125,
-0.01229095458984375,
0.01200103759765625,
0.01477813720703125,
-0.01434326171875,
0.0199432373046875,
0.0211181640625,
-0.0311279296875,
-0.0828857421875,
-0.00200653076171875,
-0.0037631988525390625,
-0.035369873046875,
-0.0251312255859375,
-0.005672454833984375,
-0.0024204254150390625,
-0.017242431640625,
-0.03277587890625,
0.005451202392578125,
-0.032318115234375,
0.0177001953125,
0.0241851806640625,
0.0288543701171875,
0.010986328125,
0.00841522216796875,
-0.0297088623046875,
0.03240966796875,
0.01678466796875,
0.0151519775390625,
0.003627777099609375,
0.0010786056518554688,
0.03326416015625,
0.0204010009765625,
-0.032806396484375,
0.03521728515625,
0.0012331008911132812,
-0.0233154296875,
-0.005908966064453125,
-0.044708251953125,
-0.05377197265625,
0.00504302978515625,
0.1068115234375,
0.038116455078125,
0.0277557373046875,
-0.05218505859375,
0.0079193115234375,
-0.027435302734375,
-0.038726806640625,
0.0087890625,
0.009857177734375,
-0.0021419525146484375,
0.0419921875,
-0.0127410888671875,
-0.005664825439453125,
-0.0189971923828125,
0.033966064453125,
-0.01337432861328125,
-0.01690673828125,
0.0196533203125,
-0.0160369873046875,
-0.046417236328125,
-0.034088134765625,
0.06549072265625,
-0.0250244140625,
0.0201873779296875,
0.0200958251953125,
0.005107879638671875,
0.045562744140625,
0.04925537109375,
0.028350830078125,
-0.0038585662841796875,
-0.054351806640625,
0.0235748291015625,
-0.01027679443359375,
0.07666015625,
-0.06341552734375,
-0.049285888671875,
-0.0174102783203125,
0.03704833984375,
0.0165863037109375,
0.03656005859375,
-0.0280303955078125,
0.00971221923828125,
-0.00033354759216308594,
0.018890380859375,
-0.05303955078125,
0.01543426513671875,
-0.0355224609375,
0.0011463165283203125,
0.0289764404296875,
0.02972412109375,
0.078369140625,
0.0224151611328125,
-0.00783538818359375,
0.0196990966796875,
0.01216888427734375,
-0.046356201171875,
0.044525146484375,
0.0204315185546875,
0.027801513671875,
0.0298309326171875
]
|
14bb9573e1116568ff3af6aca5470ae7f05b6337 | Wordpress Stackexchange
Q: Custom route for WP-API gives "rest_no_route" value I am following this tutorial to create custom end points to WP-API .
I am always getting this error on hitting /wp-json/custom-plugin/v2/get-all-post-ids/ on postman to test :
{
"code": "rest_no_route",
"message": "No route was found matching
the URL and request method",
"data":
{
"status": 404
}
}
I have created a custom-plugin.php file in /plugins/custom-plugin/ directory .
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
add_action( 'rest_api_init', 'dt_register_api_hooks' );
function dt_register_api_hooks() {
register_rest_route( 'custom-plugin/v2', '/get-all-post-ids/', array(
'methods' => 'GET',
'callback' => 'dt_get_all_post_ids',
)
);
}
// Return all post IDs
function dt_get_all_post_ids() {
if ( false === ( $all_post_ids = get_transient( 'dt_all_post_ids' ) ) ) {
$all_post_ids = get_posts( array(
'numberposts' => -1,
'post_type' => 'post',
'fields' => 'ids',
) );
// cache for 2 hours
set_transient( 'dt_all_post_ids', $all_post_ids, 60*60*2 );
}
return $all_post_ids;
}
?>
Please guide how can i resolve this issue.
Thanks.
A: I may have the answer to this.
I had POST in my code, but I was trying to look at the URL through a browser.
Make sure you're using the method you specify.
| Q: Custom route for WP-API gives "rest_no_route" value I am following this tutorial to create custom end points to WP-API .
I am always getting this error on hitting /wp-json/custom-plugin/v2/get-all-post-ids/ on postman to test :
{
"code": "rest_no_route",
"message": "No route was found matching
the URL and request method",
"data":
{
"status": 404
}
}
I have created a custom-plugin.php file in /plugins/custom-plugin/ directory .
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
add_action( 'rest_api_init', 'dt_register_api_hooks' );
function dt_register_api_hooks() {
register_rest_route( 'custom-plugin/v2', '/get-all-post-ids/', array(
'methods' => 'GET',
'callback' => 'dt_get_all_post_ids',
)
);
}
// Return all post IDs
function dt_get_all_post_ids() {
if ( false === ( $all_post_ids = get_transient( 'dt_all_post_ids' ) ) ) {
$all_post_ids = get_posts( array(
'numberposts' => -1,
'post_type' => 'post',
'fields' => 'ids',
) );
// cache for 2 hours
set_transient( 'dt_all_post_ids', $all_post_ids, 60*60*2 );
}
return $all_post_ids;
}
?>
Please guide how can i resolve this issue.
Thanks.
A: I may have the answer to this.
I had POST in my code, but I was trying to look at the URL through a browser.
Make sure you're using the method you specify.
| wordpress | {
"language": "en",
"length": 188,
"provenance": "stackexchange_00019.jsonl.gz:464718",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/223771"
} | [
0.0494384765625,
-0.0189666748046875,
0.0188751220703125,
0.005161285400390625,
0.002117156982421875,
-0.03033447265625,
0.06494140625,
-0.0105133056640625,
-0.0114593505859375,
0.015625,
-0.03057861328125,
-0.001552581787109375,
-0.036163330078125,
-0.0186309814453125,
-0.0214996337890625,
-0.05224609375,
0.0458984375,
-0.01119232177734375,
0.034210205078125,
-0.01971435546875,
0.0302276611328125,
0.00921630859375,
0.00997161865234375,
0.09869384765625,
0.014862060546875,
-0.0185394287109375,
0.00887298583984375,
-0.04840087890625,
-0.00824737548828125,
-0.041839599609375,
-0.000301361083984375,
0.050048828125,
0.01788330078125,
0.005859375,
-0.01073455810546875,
-0.036163330078125,
0.033416748046875,
-0.00920867919921875,
-0.01224517822265625,
0.031951904296875,
0.04205322265625,
-0.03497314453125,
0.0268402099609375,
0.0180511474609375,
-0.00888824462890625,
0.01122283935546875,
0.0165557861328125,
-0.0396728515625,
0.041900634765625,
0.037353515625,
-0.0169677734375,
-0.022674560546875,
-0.0272064208984375,
0.01348876953125,
-0.01134490966796875,
-0.0286712646484375,
0.002475738525390625,
-0.0299835205078125,
0.039093017578125,
-0.0056610107421875,
-0.0180816650390625,
-0.037445068359375,
0.0338134765625,
-0.018768310546875,
0.0036106109619140625,
0.002838134765625,
0.0565185546875,
0.01299285888671875,
-0.013671875,
0.001605987548828125,
-0.00797271728515625,
0.0032596588134765625,
0.00461578369140625,
-0.0015611648559570312,
-0.0225982666015625,
-0.03704833984375,
0.03033447265625,
-0.0209197998046875,
0.0013370513916015625,
0.0010957717895507812,
0.020599365234375,
-0.04754638671875,
0.00717926025390625,
0.017578125,
-0.01403045654296875,
0.0248870849609375,
-0.00850677490234375,
-0.0047760009765625,
-0.0428466796875,
-0.0125885009765625,
-0.0269012451171875,
-0.0643310546875,
-0.040771484375,
0.0024929046630859375,
0.01282501220703125,
-0.0258636474609375,
0.002025604248046875,
0.0260467529296875,
-0.01148223876953125,
0.01529693603515625,
0.0238189697265625,
-0.06072998046875,
0.08026123046875,
-0.04901123046875,
0.0213775634765625,
0.018280029296875,
0.006153106689453125,
-0.00331878662109375,
0.052093505859375,
0.0102691650390625,
0.0015668869018554688,
0.0899658203125,
0.005138397216796875,
0.038787841796875,
-0.06060791015625,
-0.047821044921875,
-0.054290771484375,
-0.022064208984375,
-0.0300750732421875,
-0.021026611328125,
0.003963470458984375,
0.00473785400390625,
0.022918701171875,
-0.0002944469451904297,
-0.017333984375,
-0.0164794921875,
-0.0286102294921875,
-0.0225372314453125,
-0.0006933212280273438,
-0.004169464111328125,
-0.0266876220703125,
0.043853759765625,
0.07037353515625,
-0.003345489501953125,
-0.0254058837890625,
-0.009063720703125,
0.01068115234375,
0.023193359375,
0.004383087158203125,
0.005767822265625,
-0.0102081298828125,
-0.0038051605224609375,
0.0289764404296875,
-0.01494598388671875,
0.0283355712890625,
0.00638580322265625,
0.0305328369140625,
0.0235748291015625,
-0.001995086669921875,
-0.01128387451171875,
-0.00994110107421875,
0.039276123046875,
0.0157318115234375,
0.0269317626953125,
0.0234222412109375,
-0.00725555419921875,
0.051483154296875,
-0.030975341796875,
-0.0082855224609375,
-0.0270233154296875,
0.021484375,
-0.03411865234375,
-0.0187835693359375,
-0.035614013671875,
-0.0596923828125,
0.029052734375,
-0.0267333984375,
-0.00447845458984375,
0.025238037109375,
0.09014892578125,
0.0233306884765625,
-0.02899169921875,
-0.0289459228515625,
0.017547607421875,
-0.0075836181640625,
-0.00225067138671875,
-0.02838134765625,
0.0014486312866210938,
0.04522705078125,
-0.0230560302734375,
-0.019378662109375,
-0.0240325927734375,
0.0272064208984375,
0.02569580078125,
-0.09619140625,
0.11199951171875,
0.021759033203125,
0.11834716796875,
-0.00228118896484375,
0.00007081031799316406,
0.08441162109375,
0.041900634765625,
-0.0260162353515625,
0.033477783203125,
-0.01160430908203125,
-0.024383544921875,
-0.0040740966796875,
0.0009908676147460938,
-0.012298583984375,
0.0014286041259765625,
-0.05963134765625,
-0.00574493408203125,
0.00563812255859375,
0.03082275390625,
-0.01081085205078125,
0.01235198974609375,
-0.0175323486328125,
0.031890869140625,
-0.0184478759765625,
0.0225677490234375,
0.0197296142578125,
0.0078277587890625,
-0.03179931640625,
0.0164947509765625,
-0.0004897117614746094,
0.0017185211181640625,
-0.027862548828125,
-0.0191192626953125,
-0.03692626953125,
0.02789306640625,
-0.06207275390625,
0.00824737548828125,
-0.07000732421875,
0.004512786865234375,
0.0477294921875,
-0.0011281967163085938,
0.016510009765625,
-0.0109405517578125,
0.08062744140625,
0.0137481689453125,
0.01580810546875,
-0.01087188720703125,
0.0011510848999023438,
0.0148468017578125,
-0.0291290283203125,
-0.004116058349609375,
0.0022125244140625,
-0.00829315185546875,
0.018798828125,
0.025115966796875,
0.0416259765625,
0.01169586181640625,
0.0042877197265625,
-0.0164031982421875,
0.036590576171875,
-0.038604736328125,
0.0084075927734375,
-0.0258941650390625,
-0.005229949951171875,
0.01461029052734375,
0.0039215087890625,
0.0181427001953125,
0.01322174072265625,
-0.01465606689453125,
0.0288238525390625,
0.037506103515625,
-0.0198211669921875,
-0.0560302734375,
0.008514404296875,
-0.022979736328125,
0.032135009765625,
-0.057220458984375,
-0.054351806640625,
-0.002544403076171875,
0.0221710205078125,
0.01318359375,
0.049285888671875,
0.044952392578125,
-0.0187835693359375,
0.0014019012451171875,
0.01074981689453125,
0.017181396484375,
0.0017795562744140625,
0.0116729736328125,
0.0538330078125,
0.01207733154296875,
-0.0252227783203125,
-0.0176544189453125,
0.043487548828125,
0.019439697265625,
-0.015167236328125,
0.0305328369140625,
-0.0178070068359375,
-0.0012845993041992188,
-0.00623321533203125,
-0.06292724609375,
0.006603240966796875,
0.0167236328125,
0.011932373046875,
0.00785064697265625,
0.02349853515625,
0.0272369384765625,
-0.0113067626953125,
0.037841796875,
0.00957489013671875,
-0.01433563232421875,
0.01337432861328125,
-0.0574951171875,
0.042816162109375,
-0.03564453125,
0.0210418701171875,
0.061767578125,
0.005748748779296875,
0.0003132820129394531,
-0.00023174285888671875,
0.017791748046875,
-0.0157012939453125,
0.04046630859375,
0.01468658447265625,
-0.05584716796875,
-0.00250244140625,
0.01136016845703125,
0.0191192626953125,
0.09576416015625,
-0.032684326171875,
-0.07049560546875,
-0.0131988525390625,
0.039093017578125,
-0.1064453125,
-0.11004638671875,
0.06805419921875,
-0.0034885406494140625,
-0.0225677490234375,
-0.020111083984375,
-0.025299072265625,
-0.01165008544921875,
-0.0239715576171875,
-0.0299072265625,
-0.0273895263671875,
-0.0178680419921875,
-0.06353759765625,
-0.06353759765625,
-0.08154296875,
0.0023899078369140625,
-0.0024356842041015625,
0.0165252685546875,
0.0123748779296875,
0.05029296875,
0.01482391357421875,
-0.029296875,
0.0100250244140625,
0.0526123046875,
-0.0390625,
-0.04132080078125,
-0.0304107666015625,
0.015716552734375,
0.0113067626953125,
-0.002471923828125,
0.0265045166015625,
0.0263824462890625,
-0.0236358642578125,
0.0004703998565673828,
-0.020721435546875,
0.014434814453125,
0.00829315185546875,
-0.004119873046875,
0.032012939453125,
0.03497314453125,
0.032318115234375,
-0.0085601806640625,
-0.0009775161743164062,
-0.02386474609375,
-0.03216552734375,
0.04071044921875,
0.041412353515625,
-0.017974853515625,
-0.0104827880859375,
0.0117340087890625,
-0.0007648468017578125,
-0.0243072509765625,
0.0255126953125,
-0.035064697265625,
0.050201416015625,
-0.0021152496337890625,
0.0009598731994628906,
-0.01531219482421875,
0.04998779296875,
0.001056671142578125,
-0.00966644287109375,
0.0033550262451171875,
-0.0009469985961914062,
-0.0167236328125,
-0.0187225341796875,
-0.05181884765625,
-0.0209503173828125,
0.0290985107421875,
-0.0100555419921875,
-0.0218505859375,
0.01302337646484375,
-0.0187225341796875,
0.02325439453125,
0.042755126953125,
-0.001495361328125,
-0.0134429931640625,
-0.015960693359375,
-0.00978851318359375,
-0.0025997161865234375,
-0.01197052001953125,
-0.0128631591796875,
-0.003055572509765625,
0.01502227783203125,
0.0039520263671875,
-0.01433563232421875,
-0.009765625,
0.0127410888671875,
-0.031402587890625,
0.0277557373046875,
-0.01288604736328125,
0.040313720703125,
-0.036865234375,
0.029205322265625,
-0.0133056640625,
0.034210205078125,
-0.04864501953125,
-0.021820068359375,
0.0016937255859375,
-0.06439208984375,
-0.010955810546875,
-0.0257110595703125,
0.036407470703125,
0.029876708984375,
-0.0200653076171875,
0.01065826416015625,
0.047271728515625,
0.025726318359375,
0.01461029052734375,
0.00992584228515625,
-0.007843017578125,
-0.00151824951171875,
0.01467132568359375,
0.01236724853515625,
-0.00936126708984375,
-0.03839111328125,
-0.0165863037109375,
-0.0018606185913085938,
0.02581787109375,
-0.01123809814453125,
-0.01016998291015625,
0.0024204254150390625,
-0.0204925537109375,
-0.0531005859375,
-0.0300445556640625,
-0.030120849609375,
0.019500732421875,
-0.0218658447265625,
0.0136566162109375,
-0.0518798828125,
-0.0677490234375,
0.0484619140625,
0.0033626556396484375,
-0.024871826171875,
-0.002300262451171875,
0.06072998046875,
0.023040771484375,
-0.03131103515625,
-0.02691650390625,
-0.0082550048828125,
0.01499176025390625,
0.007633209228515625,
0.017486572265625,
-0.0089263916015625,
-0.0169830322265625,
0.061279296875,
-0.00887298583984375,
-0.031463623046875,
0.034637451171875,
0.040802001953125,
-0.01128387451171875,
-0.0260009765625,
0.00962066650390625,
-0.042510986328125,
-0.012054443359375,
0.03961181640625,
-0.005764007568359375,
-0.01102447509765625,
0.019287109375,
0.024261474609375,
-0.06427001953125,
0.043060302734375,
-0.01094818115234375,
-0.030426025390625,
0.0224609375,
-0.017730712890625,
0.028045654296875,
0.01383209228515625,
0.004154205322265625,
0.0093231201171875,
-0.031829833984375,
0.0032806396484375,
0.044189453125,
0.044677734375,
0.018341064453125,
0.0281982421875,
0.04937744140625,
0.00782012939453125,
-0.0245819091796875,
-0.01309967041015625,
0.08306884765625,
-0.0303192138671875,
-0.06951904296875,
0.00780487060546875,
-0.029510498046875,
0.04840087890625,
0.04241943359375,
-0.018890380859375,
0.057159423828125,
0.03143310546875,
-0.0239410400390625,
-0.023040771484375,
-0.052947998046875,
-0.004322052001953125,
-0.074462890625,
0.01168060302734375,
0.033233642578125,
-0.0280303955078125,
-0.053131103515625,
0.097412109375,
0.035125732421875,
-0.0015621185302734375,
-0.0157012939453125,
0.0198822021484375,
0.0080718994140625,
0.062347412109375,
0.0311431884765625,
-0.049224853515625,
0.0097198486328125,
0.0172119140625,
-0.028717041015625,
-0.0528564453125,
0.0194244384765625,
0.058929443359375,
0.08306884765625,
0.022125244140625,
-0.0523681640625,
-0.0103302001953125,
-0.048797607421875,
-0.0241241455078125,
0.017120361328125,
0.00211334228515625,
-0.0294342041015625,
-0.035675048828125,
0.0027332305908203125,
0.019287109375,
0.0238800048828125,
0.022369384765625,
-0.004779815673828125,
0.01983642578125,
0.0208892822265625,
-0.04071044921875,
0.00682830810546875,
-0.01666259765625,
-0.0168914794921875,
-0.0215911865234375,
-0.031463623046875,
-0.01004791259765625,
0.029815673828125,
0.009918212890625,
-0.020599365234375,
-0.032989501953125,
0.03826904296875,
-0.018402099609375,
0.036590576171875,
-0.01305389404296875,
-0.03118896484375,
-0.01352691650390625,
0.018035888671875,
0.031219482421875,
0.018310546875,
-0.0185394287109375,
-0.01389312744140625,
-0.0117034912109375,
-0.0137786865234375,
0.062225341796875,
-0.002349853515625,
-0.01806640625,
-0.0260009765625,
0.0022525787353515625,
0.031158447265625,
-0.0050048828125,
0.00435638427734375,
-0.00537109375,
0.016876220703125,
-0.0029735565185546875,
0.07598876953125,
-0.01192474365234375,
0.051971435546875,
-0.0243682861328125,
0.042999267578125,
-0.00015473365783691406,
0.0069580078125,
-0.01004791259765625,
-0.00817108154296875,
-0.024017333984375,
-0.051727294921875,
-0.01244354248046875,
0.028839111328125,
-0.0457763671875,
0.039337158203125,
0.049652099609375,
0.006610870361328125,
-0.0025043487548828125,
-0.0036678314208984375,
0.0007290840148925781,
-0.01274871826171875,
0.0154571533203125,
0.0159149169921875,
0.00629425048828125,
0.017242431640625,
-0.019134521484375,
-0.00856781005859375,
0.0053253173828125,
0.0031585693359375,
-0.004810333251953125,
0.00745391845703125,
0.0003407001495361328,
-0.0158538818359375,
-0.02789306640625,
0.03497314453125,
0.1129150390625,
0.0217742919921875,
0.05206298828125,
0.0247650146484375,
0.00655364990234375,
0.03387451171875,
0.025390625,
0.026123046875,
-0.037872314453125,
0.0560302734375,
0.011627197265625,
-0.01381683349609375,
0.05194091796875,
-0.041595458984375,
-0.004482269287109375,
-0.019989013671875,
-0.004177093505859375,
-0.011871337890625,
0.00911712646484375,
-0.02288818359375,
-0.0150299072265625,
0.0193328857421875,
-0.005748748779296875,
0.0109710693359375,
0.002643585205078125,
0.0019683837890625,
0.021636962890625,
-0.03656005859375,
0.001384735107421875,
0.01004791259765625,
0.00133514404296875,
-0.0190582275390625,
-0.003978729248046875,
-0.0125274658203125,
0.0288238525390625,
0.00524139404296875,
-0.027862548828125,
0.0295562744140625,
-0.02264404296875,
0.0131683349609375,
0.00737762451171875,
-0.0009684562683105469,
-0.0401611328125,
0.0283050537109375,
-0.0291900634765625,
-0.0160980224609375,
0.0426025390625,
0.0023059844970703125,
0.025054931640625,
0.0074310302734375,
0.013397216796875,
-0.01041412353515625,
-0.032928466796875,
-0.0180816650390625,
0.010650634765625,
-0.039215087890625,
-0.00739288330078125,
0.053466796875,
-0.0146484375,
0.027008056640625,
0.0400390625,
-0.0115814208984375,
-0.00661468505859375,
-0.005466461181640625,
0.09539794921875,
-0.05316162109375,
-0.003154754638671875,
0.0183258056640625,
0.01334381103515625,
0.00603485107421875,
-0.01505279541015625,
0.01116943359375,
-0.043304443359375,
-0.0010890960693359375,
-0.003528594970703125,
0.0063629150390625,
-0.008270263671875,
0.01226806640625,
-0.02099609375,
0.10205078125,
-0.010406494140625,
-0.0065765380859375,
0.0275726318359375,
0.042999267578125,
-0.0233306884765625,
0.03997802734375,
-0.034698486328125,
0.066162109375,
0.006305694580078125,
-0.019866943359375,
-0.04644775390625,
0.003452301025390625,
-0.0247802734375,
0.0087890625,
0.077880859375,
0.0299530029296875,
-0.044891357421875,
-0.02081298828125,
-0.008697509765625,
-0.0038356781005859375,
-0.041412353515625,
0.056915283203125,
0.0145111083984375,
0.046600341796875,
0.05169677734375,
-0.056732177734375,
0.02783203125,
-0.0283660888671875,
0.01305389404296875,
0.022125244140625,
0.025665283203125,
0.037078857421875,
-0.01294708251953125,
0.0026721954345703125,
-0.0265960693359375,
0.00039005279541015625,
0.02581787109375,
-0.0028247833251953125,
0.011566162109375,
0.0286712646484375,
0.0166473388671875,
-0.050018310546875,
-0.031982421875,
-0.0233917236328125,
0.035675048828125,
-0.0032939910888671875,
0.0139617919921875,
0.01433563232421875,
0.009857177734375,
0.035247802734375,
-0.0021419525146484375,
0.0004277229309082031,
0.008148193359375,
-0.002193450927734375,
0.03729248046875,
0.03900146484375,
0.01611328125,
-0.0287933349609375,
0.00475311279296875,
0.033172607421875,
0.051849365234375,
-0.042022705078125,
-0.0531005859375,
0.01076507568359375,
0.0006475448608398438,
0.015838623046875,
0.0305328369140625,
0.046539306640625,
-0.0120849609375,
0.00861358642578125,
-0.0179901123046875,
0.0260009765625,
0.0204925537109375,
0.0198211669921875,
0.0025787353515625,
-0.01450347900390625,
-0.04949951171875,
0.0205078125,
-0.050323486328125,
0.018585205078125,
0.0107879638671875,
0.042327880859375,
0.006458282470703125,
0.0538330078125,
-0.007720947265625,
-0.0179595947265625,
0.013519287109375,
0.02166748046875,
0.0084075927734375,
-0.032135009765625,
-0.004486083984375,
-0.08514404296875,
0.055450439453125,
0.014495849609375,
-0.00839996337890625,
0.02203369140625,
0.02557373046875,
0.01934814453125,
-0.02093505859375,
-0.0182952880859375,
0.053253173828125,
-0.0208282470703125,
-0.032623291015625,
-0.01922607421875,
-0.060272216796875,
-0.01363372802734375,
-0.0245361328125,
0.0194549560546875,
0.00899505615234375,
-0.01285552978515625,
-0.0172576904296875,
0.06011962890625,
-0.0055999755859375,
-0.020172119140625,
0.01331329345703125,
-0.00843048095703125,
0.055908203125,
0.0006847381591796875,
-0.02569580078125,
-0.0012006759643554688,
-0.07861328125,
0.008148193359375,
0.00804901123046875,
0.007335662841796875,
0.004314422607421875,
0.0511474609375,
-0.00843048095703125,
0.01343536376953125,
-0.0035114288330078125,
-0.0207672119140625,
0.0308380126953125,
0.035736083984375,
0.01454925537109375,
0.0280609130859375,
-0.044036865234375,
-0.021209716796875,
-0.02960205078125,
0.02227783203125,
0.0046234130859375,
0.0579833984375,
-0.0140533447265625,
0.021514892578125,
-0.036865234375,
0.005916595458984375,
-0.0302734375,
-0.01654052734375,
-0.0022830963134765625,
0.022857666015625,
0.01081085205078125,
0.0005774497985839844,
-0.0068359375,
0.0506591796875,
0.0118408203125,
0.0017719268798828125,
0.048370361328125,
-0.03607177734375,
0.013671875,
0.004119873046875,
-0.034271240234375,
-0.033111572265625,
-0.051055908203125,
-0.0577392578125,
0.0194091796875,
0.0251007080078125,
0.02398681640625,
-0.049652099609375,
0.039459228515625,
0.01116943359375,
-0.016326904296875,
0.0234375,
-0.03521728515625,
0.052490234375,
0.031524658203125,
-0.033050537109375,
0.0207672119140625,
-0.039154052734375,
-0.035430908203125,
-0.005535125732421875,
-0.0062255859375,
-0.03057861328125,
-0.0178375244140625,
0.019866943359375,
-0.01290130615234375,
0.028472900390625,
0.0418701171875,
0.01105499267578125,
0.017120361328125,
-0.01555633544921875,
-0.0084381103515625,
-0.0138397216796875,
0.00036835670471191406,
-0.03558349609375,
-0.059783935546875,
0.0191650390625,
0.005474090576171875,
-0.0064697265625,
-0.005245208740234375,
-0.0202178955078125,
0.00762939453125,
-0.01416015625,
-0.0268096923828125,
-0.005889892578125,
0.0247039794921875,
-0.039398193359375,
-0.0028095245361328125,
-0.04541015625,
0.0260009765625,
-0.00989532470703125,
0.01465606689453125,
-0.022125244140625,
-0.0129852294921875,
-0.0181427001953125,
0.025115966796875,
-0.0013980865478515625,
-0.0205841064453125,
-0.006740570068359375,
0.0123443603515625,
-0.046051025390625,
-0.01047515869140625,
-0.02001953125,
0.0173187255859375,
0.0110321044921875,
-0.01580810546875,
-0.004322052001953125,
0.007354736328125,
-0.03265380859375,
-0.07208251953125,
0.01476287841796875,
-0.074951171875,
-0.01666259765625,
0.0029277801513671875,
0.0161895751953125,
0.0288238525390625,
-0.029144287109375,
-0.07916259765625,
0.060302734375,
-0.0102996826171875,
-0.03851318359375,
-0.10223388671875,
-0.033111572265625,
0.0224761962890625,
0.031707763671875,
-0.04071044921875,
-0.02655029296875,
-0.08636474609375,
0.060089111328125,
0.01514434814453125,
0.0253753662109375,
0.0170440673828125,
0.0047607421875,
-0.03369140625,
0.0224151611328125,
0.00666046142578125,
0.016265869140625,
0.0380859375,
-0.0095062255859375,
0.045623779296875,
0.05584716796875,
-0.03326416015625,
0.0201873779296875,
-0.029266357421875,
-0.0219879150390625,
-0.022796630859375,
-0.0494384765625,
0.01849365234375,
0.044647216796875,
0.058624267578125,
0.044921875,
-0.0009002685546875,
-0.08807373046875,
-0.004436492919921875,
-0.03997802734375,
-0.03216552734375,
-0.0211334228515625,
0.0124969482421875,
-0.05462646484375,
-0.00600433349609375,
0.0026493072509765625,
0.0335693359375,
0.007122039794921875,
-0.04901123046875,
0.01323699951171875,
-0.04669189453125,
-0.00936126708984375,
-0.0069122314453125,
0.0206298828125,
0.0032711029052734375,
-0.002483367919921875,
-0.008087158203125,
-0.0170440673828125,
-0.021820068359375,
0.0227813720703125,
-0.02227783203125,
-0.016815185546875,
-0.00038170814514160156,
-0.0408935546875,
0.007904052734375,
0.0484619140625,
-0.0009517669677734375,
0.0167388916015625,
-0.0222320556640625,
-0.023345947265625,
-0.0178375244140625,
0.0033416748046875,
0.0049896240234375,
0.0028705596923828125,
0.0183563232421875,
-0.032135009765625,
-0.001617431640625,
0.04803466796875,
0.00487518310546875,
0.06512451171875,
0.02142333984375,
0.0256805419921875,
-0.0173187255859375,
-0.01226043701171875,
0.00007534027099609375,
-0.028778076171875,
-0.00677490234375,
0.032958984375,
-0.0266876220703125,
-0.033721923828125,
0.019439697265625,
0.03253173828125,
0.0106048583984375,
-0.0013246536254882812
]
|
0b9e368e3c142940dc6d257240f9259aff60fe9c | Wordpress Stackexchange
Q: How to hide "Filter user list" from "All Users" screen Is there a way to remove the "Filter user list" from the top of the "All Users" screen for non-admins?
For clarification its the section which lists totals for each user role type and filters the table when clicked eg:
All (5) | Administrator (1) | Editor (3) | Subscriber (1)
A: You can use the views_users filter to alter it. Here's an example:
/**
* Remove the users view
*/
add_filter( 'views_users', '__return_empty_array' );
if you want to remove it for every user.
Here's another example how you could remove it for non-admins (PHP 5.4+):
/**
* Remove the users view for non-admins
*/
add_filter( 'views_users', function( $views )
{
return current_user_can( 'manage_options' ) ? $views : [];
} );
| Q: How to hide "Filter user list" from "All Users" screen Is there a way to remove the "Filter user list" from the top of the "All Users" screen for non-admins?
For clarification its the section which lists totals for each user role type and filters the table when clicked eg:
All (5) | Administrator (1) | Editor (3) | Subscriber (1)
A: You can use the views_users filter to alter it. Here's an example:
/**
* Remove the users view
*/
add_filter( 'views_users', '__return_empty_array' );
if you want to remove it for every user.
Here's another example how you could remove it for non-admins (PHP 5.4+):
/**
* Remove the users view for non-admins
*/
add_filter( 'views_users', function( $views )
{
return current_user_can( 'manage_options' ) ? $views : [];
} );
| wordpress | {
"language": "en",
"length": 132,
"provenance": "stackexchange_00019.jsonl.gz:464725",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/223803"
} | [
0.0908203125,
0.00620269775390625,
0.03936767578125,
-0.0262451171875,
0.0214385986328125,
-0.035675048828125,
0.0792236328125,
-0.033233642578125,
0.026824951171875,
0.0278472900390625,
-0.0057525634765625,
-0.0280609130859375,
0.0012865066528320312,
-0.030242919921875,
-0.03607177734375,
-0.033782958984375,
0.00817108154296875,
0.007537841796875,
0.0293426513671875,
-0.01363372802734375,
0.0164642333984375,
-0.0162200927734375,
0.017120361328125,
-0.0015201568603515625,
-0.0164947509765625,
0.024322509765625,
0.0287017822265625,
-0.02154541015625,
0.002086639404296875,
-0.013275146484375,
-0.002971649169921875,
0.0008196830749511719,
-0.0219573974609375,
0.01611328125,
0.0297393798828125,
0.021270751953125,
-0.03460693359375,
0.0256500244140625,
0.05523681640625,
-0.046295166015625,
0.021728515625,
-0.006908416748046875,
-0.05084228515625,
0.04022216796875,
-0.036163330078125,
-0.046661376953125,
0.03912353515625,
-0.0007004737854003906,
0.032196044921875,
0.0024700164794921875,
0.0247039794921875,
0.0215301513671875,
0.03948974609375,
-0.04827880859375,
-0.006862640380859375,
0.0223388671875,
0.006443023681640625,
0.032135009765625,
0.02972412109375,
-0.006809234619140625,
-0.036651611328125,
0.0159912109375,
0.017333984375,
-0.0279693603515625,
-0.025115966796875,
-0.0022754669189453125,
-0.01535797119140625,
0.0120697021484375,
-0.028167724609375,
-0.0119781494140625,
0.021453857421875,
-0.0274810791015625,
0.01092529296875,
-0.01226806640625,
-0.0223846435546875,
-0.006328582763671875,
0.016998291015625,
0.0123138427734375,
0.0231170654296875,
-0.0178680419921875,
-0.01837158203125,
-0.0101165771484375,
-0.06744384765625,
0.03582763671875,
-0.06671142578125,
0.0223388671875,
-0.0225067138671875,
-0.00112152099609375,
0.0005207061767578125,
0.005916595458984375,
-0.0041351318359375,
-0.0105133056640625,
-0.01413726806640625,
0.040008544921875,
-0.00777435302734375,
-0.01116943359375,
0.045501708984375,
0.06573486328125,
-0.0173492431640625,
-0.049224853515625,
0.002353668212890625,
-0.019256591796875,
-0.04986572265625,
-0.0066070556640625,
-0.00484466552734375,
0.046417236328125,
-0.011383056640625,
0.050994873046875,
0.0243988037109375,
0.0281829833984375,
0.036468505859375,
-0.045257568359375,
-0.038238525390625,
-0.0017061233520507812,
-0.0251617431640625,
-0.0019388198852539062,
-0.06463623046875,
0.00865936279296875,
-0.0159454345703125,
0.00296783447265625,
-0.007045745849609375,
0.01210784912109375,
-0.04022216796875,
0.0029449462890625,
0.0163726806640625,
-0.01438140869140625,
-0.021240234375,
0.018768310546875,
-0.003368377685546875,
-0.005374908447265625,
-0.035003662109375,
0.011322021484375,
0.059539794921875,
0.0496826171875,
0.0171661376953125,
-0.007701873779296875,
0.0183563232421875,
-0.0121612548828125,
0.0010051727294921875,
0.02972412109375,
0.00641632080078125,
-0.04315185546875,
-0.0145416259765625,
0.00482940673828125,
-0.0018749237060546875,
0.026702880859375,
0.007419586181640625,
0.01499176025390625,
0.008148193359375,
-0.0284271240234375,
-0.034027099609375,
-0.0257110595703125,
0.00988006591796875,
0.032928466796875,
0.0224151611328125,
0.042083740234375,
0.039337158203125,
-0.00418853759765625,
-0.0288238525390625,
-0.0013475418090820312,
0.00376129150390625,
-0.0035648345947265625,
0.016632080078125,
0.021484375,
-0.01120758056640625,
0.00940704345703125,
0.004474639892578125,
-0.0016832351684570312,
0.026458740234375,
-0.071533203125,
0.007312774658203125,
-0.01428985595703125,
0.03997802734375,
0.00672149658203125,
0.0128021240234375,
0.050079345703125,
0.0125579833984375,
0.01503753662109375,
0.004833221435546875,
0.0164947509765625,
-0.014404296875,
-0.045379638671875,
0.0002593994140625,
-0.0005669593811035156,
-0.059326171875,
-0.01248931884765625,
0.01255035400390625,
0.0273895263671875,
0.0235748291015625,
0.0150299072265625,
0.07537841796875,
0.0240478515625,
0.0207672119140625,
-0.026580810546875,
0.023284912109375,
-0.0467529296875,
-0.0189208984375,
-0.033233642578125,
-0.004123687744140625,
0.0202789306640625,
0.05426025390625,
-0.000457763671875,
0.003978729248046875,
-0.0379638671875,
-0.0537109375,
-0.0226287841796875,
-0.00899505615234375,
0.032135009765625,
0.000148773193359375,
0.0165252685546875,
0.007293701171875,
-0.0027828216552734375,
-0.03057861328125,
0.01214599609375,
-0.006565093994140625,
-0.00957489013671875,
0.01369476318359375,
0.034759521484375,
0.0246124267578125,
0.0130462646484375,
0.03564453125,
0.000057816505432128906,
0.0328369140625,
-0.00960540771484375,
0.03778076171875,
-0.024505615234375,
-0.011444091796875,
-0.0201263427734375,
0.045867919921875,
-0.025970458984375,
0.035430908203125,
0.0390625,
0.036224365234375,
0.035125732421875,
-0.040130615234375,
-0.00836181640625,
-0.018280029296875,
-0.0313720703125,
-0.0017118453979492188,
0.0457763671875,
0.0240936279296875,
0.053558349609375,
-0.002368927001953125,
0.01004791259765625,
0.08355712890625,
-0.046539306640625,
-0.0049285888671875,
0.00807952880859375,
-0.0265655517578125,
-0.00905609130859375,
0.035125732421875,
-0.008514404296875,
0.0255126953125,
-0.033447265625,
0.00482177734375,
0.040283203125,
-0.0016918182373046875,
0.03753662109375,
0.0033550262451171875,
-0.034454345703125,
0.0085296630859375,
-0.04302978515625,
-0.0216064453125,
-0.0197906494140625,
-0.0250396728515625,
-0.0194244384765625,
-0.0182952880859375,
-0.0081024169921875,
-0.022674560546875,
-0.0290374755859375,
0.054443359375,
0.0428466796875,
-0.005977630615234375,
0.008880615234375,
0.003780364990234375,
-0.0029888153076171875,
-0.0238037109375,
0.009307861328125,
-0.0297393798828125,
-0.0108795166015625,
0.0169219970703125,
0.01019287109375,
0.043212890625,
0.00452423095703125,
0.0244293212890625,
0.00528717041015625,
0.042083740234375,
0.0196380615234375,
0.0009717941284179688,
-0.024871826171875,
-0.00016033649444580078,
0.0140838623046875,
0.00582122802734375,
0.024078369140625,
-0.0263214111328125,
-0.0193328857421875,
-0.05621337890625,
-0.0447998046875,
0.02447509765625,
-0.04534912109375,
0.039764404296875,
0.07525634765625,
0.0174407958984375,
-0.0124053955078125,
0.0119781494140625,
-0.028656005859375,
-0.003570556640625,
0.01215362548828125,
0.0067901611328125,
0.015594482421875,
-0.0235137939453125,
0.06085205078125,
0.0094757080078125,
0.00988006591796875,
-0.0260467529296875,
-0.04571533203125,
-0.025146484375,
0.0038394927978515625,
-0.03515625,
0.0213470458984375,
-0.016357421875,
-0.0249786376953125,
-0.0404052734375,
0.0126495361328125,
-0.028076171875,
0.00856781005859375,
0.032257080078125,
-0.0018796920776367188,
0.006183624267578125,
-0.008941650390625,
-0.00844573974609375,
0.0154266357421875,
0.0013818740844726562,
0.054718017578125,
-0.01335906982421875,
-0.0165252685546875,
0.003765106201171875,
0.07470703125,
0.000286102294921875,
-0.07470703125,
-0.0271453857421875,
0.002048492431640625,
-0.01522064208984375,
0.01000213623046875,
-0.0013532638549804688,
-0.0190887451171875,
-0.0094146728515625,
0.004425048828125,
-0.0073394775390625,
-0.00262451171875,
0.00952911376953125,
-0.0193328857421875,
0.0017805099487304688,
-0.0133514404296875,
0.00493621826171875,
-0.0142059326171875,
-0.007595062255859375,
0.006000518798828125,
-0.000029027462005615234,
-0.03570556640625,
-0.0170135498046875,
0.00452423095703125,
-0.023193359375,
0.034698486328125,
0.01253509521484375,
-0.0283050537109375,
0.0192108154296875,
0.004276275634765625,
0.0196685791015625,
0.00861358642578125,
-0.0166473388671875,
-0.011199951171875,
-0.0089874267578125,
0.023956298828125,
0.04168701171875,
0.02264404296875,
0.0250396728515625,
-0.01175689697265625,
-0.000576019287109375,
0.00881195068359375,
0.0076446533203125,
0.01503753662109375,
0.016357421875,
0.036102294921875,
-0.07867431640625,
0.0760498046875,
0.03564453125,
-0.01507568359375,
-0.0207366943359375,
-0.03497314453125,
0.0259246826171875,
0.10614013671875,
-0.05078125,
-0.0221710205078125,
-0.01995849609375,
0.00278472900390625,
0.0127716064453125,
-0.041107177734375,
-0.019683837890625,
-0.02276611328125,
-0.1134033203125,
0.005710601806640625,
-0.0110626220703125,
-0.03631591796875,
-0.0177001953125,
-0.00669097900390625,
-0.06365966796875,
-0.039520263671875,
0.0386962890625,
-0.033355712890625,
-0.0016775131225585938,
-0.002605438232421875,
-0.01702880859375,
-0.03955078125,
-0.03948974609375,
-0.01113128662109375,
-0.041168212890625,
-0.0005397796630859375,
-0.0294952392578125,
0.010467529296875,
-0.002155303955078125,
0.031707763671875,
-0.013275146484375,
0.01812744140625,
0.021392822265625,
0.005847930908203125,
-0.033203125,
-0.034576416015625,
0.0155487060546875,
0.006740570068359375,
-0.03662109375,
-0.0029964447021484375,
-0.03192138671875,
-0.03948974609375,
-0.0173492431640625,
-0.0156707763671875,
-0.0248565673828125,
-0.0030612945556640625,
-0.00909423828125,
0.0008835792541503906,
-0.053497314453125,
-0.05560302734375,
-0.048553466796875,
-0.02056884765625,
-0.035308837890625,
0.006488800048828125,
-0.03594970703125,
-0.06707763671875,
0.0139312744140625,
-0.01323699951171875,
-0.020782470703125,
0.02276611328125,
0.02825927734375,
0.0098114013671875,
-0.02154541015625,
-0.02838134765625,
0.01317596435546875,
0.0380859375,
-0.049957275390625,
0.0684814453125,
0.042144775390625,
-0.0095367431640625,
0.036529541015625,
-0.003917694091796875,
-0.00688934326171875,
0.007755279541015625,
0.043701171875,
-0.00458526611328125,
-0.04541015625,
0.0270538330078125,
-0.01534271240234375,
-0.01088714599609375,
-0.005344390869140625,
0.01416778564453125,
0.0029125213623046875,
0.0179443359375,
-0.000028133392333984375,
0.0299224853515625,
-0.0535888671875,
-0.015045166015625,
-0.051849365234375,
0.00411224365234375,
-0.052886962890625,
0.04119873046875,
0.00982666015625,
0.01239013671875,
0.031036376953125,
0.0207672119140625,
0.01483154296875,
-0.0169219970703125,
0.0255584716796875,
-0.036224365234375,
0.0504150390625,
-0.02374267578125,
-0.00408172607421875,
-0.028533935546875,
-0.00797271728515625,
0.0479736328125,
-0.013427734375,
-0.05523681640625,
0.0194854736328125,
-0.031768798828125,
0.0291290283203125,
0.0306243896484375,
0.0213165283203125,
0.0292816162109375,
0.010162353515625,
0.0085296630859375,
-0.0014705657958984375,
-0.0267181396484375,
0.030426025390625,
-0.0300750732421875,
0.0298309326171875,
-0.00550079345703125,
0.01111602783203125,
0.02825927734375,
0.050689697265625,
-0.019012451171875,
0.047332763671875,
-0.0139923095703125,
0.019256591796875,
0.0010709762573242188,
-0.00499725341796875,
-0.0034770965576171875,
0.041046142578125,
0.0035762786865234375,
-0.023345947265625,
0.037384033203125,
-0.022003173828125,
-0.00786590576171875,
0.04791259765625,
0.01389312744140625,
0.06451416015625,
0.016143798828125,
-0.048126220703125,
-0.016021728515625,
-0.01593017578125,
0.0430908203125,
-0.0026111602783203125,
-0.048248291015625,
-0.037841796875,
-0.01593017578125,
0.0003724098205566406,
-0.0291748046875,
0.00449371337890625,
-0.0216827392578125,
-0.0193939208984375,
-0.036865234375,
0.0125579833984375,
-0.06365966796875,
-0.039886474609375,
-0.01216888427734375,
-0.038299560546875,
-0.0053558349609375,
-0.00661468505859375,
-0.04840087890625,
-0.05206298828125,
0.01383209228515625,
-0.0005817413330078125,
0.046630859375,
-0.01131439208984375,
0.035614013671875,
-0.0283355712890625,
-0.0117034912109375,
-0.00586700439453125,
0.0038928985595703125,
0.04974365234375,
0.02197265625,
-0.050689697265625,
-0.00351715087890625,
-0.06390380859375,
-0.01099395751953125,
-0.05755615234375,
-0.034637451171875,
-0.0313720703125,
0.020904541015625,
0.00807952880859375,
0.024383544921875,
-0.00424957275390625,
-0.0283050537109375,
-0.0009036064147949219,
-0.0023784637451171875,
0.0164947509765625,
0.01885986328125,
-0.020904541015625,
0.07208251953125,
-0.031524658203125,
0.0207977294921875,
-0.00559234619140625,
0.038787841796875,
-0.0035610198974609375,
0.00040340423583984375,
0.01094818115234375,
-0.01488494873046875,
-0.004856109619140625,
0.005443572998046875,
-0.0421142578125,
-0.03363037109375,
0.041717529296875,
-0.01568603515625,
0.03729248046875,
-0.0109710693359375,
0.0123443603515625,
-0.035675048828125,
-0.0228271484375,
-0.033599853515625,
0.0234375,
-0.0209197998046875,
-0.007843017578125,
0.010467529296875,
0.003108978271484375,
-0.00829315185546875,
-0.0003612041473388672,
-0.0010023117065429688,
0.0045318603515625,
-0.0195770263671875,
-0.01580810546875,
0.06402587890625,
0.07781982421875,
-0.032867431640625,
0.030029296875,
0.047088623046875,
-0.00847625732421875,
0.0188140869140625,
-0.0292510986328125,
-0.02740478515625,
-0.0015850067138671875,
0.037017822265625,
0.006542205810546875,
0.01396942138671875,
0.05230712890625,
-0.01012420654296875,
0.01100921630859375,
0.078369140625,
0.0543212890625,
-0.12384033203125,
0.004917144775390625,
-0.008270263671875,
0.009368896484375,
0.034149169921875,
-0.0008306503295898438,
-0.030120849609375,
-0.0765380859375,
0.063232421875,
-0.036895751953125,
-0.0178985595703125,
0.011016845703125,
-0.014129638671875,
-0.018463134765625,
-0.0022830963134765625,
0.00567626953125,
-0.00687408447265625,
0.07196044921875,
-0.054840087890625,
-0.054718017578125,
0.00139617919921875,
0.0005507469177246094,
0.0258026123046875,
0.01751708984375,
-0.0333251953125,
-0.08099365234375,
-0.0251007080078125,
0.0183258056640625,
-0.0562744140625,
0.039947509765625,
-0.02178955078125,
-0.0126495361328125,
0.037811279296875,
-0.039825439453125,
0.0384521484375,
0.0151214599609375,
-0.0782470703125,
0.011566162109375,
-0.033111572265625,
-0.0379638671875,
-0.01220703125,
-0.00661468505859375,
0.01027679443359375,
-0.01122283935546875,
-0.0070343017578125,
-0.007793426513671875,
-0.01358795166015625,
0.06976318359375,
-0.0145416259765625,
-0.0380859375,
0.0113677978515625,
-0.0009870529174804688,
-0.00485992431640625,
0.033111572265625,
0.017852783203125,
-0.0014019012451171875,
-0.01177978515625,
0.02392578125,
-0.03826904296875,
-0.0126495361328125,
0.0260162353515625,
-0.06829833984375,
0.00971221923828125,
-0.01442718505859375,
0.0406494140625,
0.0135040283203125,
-0.006103515625,
-0.01311492919921875,
-0.035919189453125,
-0.0194854736328125,
0.0416259765625,
0.00815582275390625,
0.067138671875,
-0.002155303955078125,
-0.008056640625,
0.03448486328125,
0.031280517578125,
0.0173187255859375,
0.0128631591796875,
-0.0249786376953125,
-0.00899505615234375,
0.0226898193359375,
0.03314208984375,
0.01157379150390625,
0.03466796875,
-0.0012369155883789062,
0.030029296875,
-0.00847625732421875,
-0.045135498046875,
0.0254974365234375,
-0.041656494140625,
-0.026214599609375,
0.0079803466796875,
0.01377105712890625,
0.0212554931640625,
0.02569580078125,
0.01241302490234375,
-0.0156707763671875,
0.01213836669921875,
0.00762176513671875,
-0.0181884765625,
0.01120758056640625,
0.00774383544921875,
0.00862884521484375,
-0.051300048828125,
-0.01271820068359375,
-0.0255279541015625,
0.04217529296875,
0.0242156982421875,
-0.001972198486328125,
0.0389404296875,
0.01837158203125,
-0.0015430450439453125,
-0.0010128021240234375,
0.00439453125,
0.00814056396484375,
-0.0180206298828125,
0.006992340087890625,
0.01299285888671875,
0.0161895751953125,
-0.04296875,
0.0081634521484375,
0.026397705078125,
0.0230865478515625,
-0.0272064208984375,
-0.061309814453125,
0.017242431640625,
0.0264892578125,
0.00408935546875,
0.028472900390625,
-0.005947113037109375,
-0.013458251953125,
0.08624267578125,
-0.04974365234375,
-0.005237579345703125,
0.005588531494140625,
0.026397705078125,
-0.02294921875,
-0.034454345703125,
0.01361846923828125,
-0.00667572021484375,
-0.025665283203125,
-0.0280914306640625,
0.0266571044921875,
-0.0101165771484375,
0.040435791015625,
-0.028045654296875,
0.08624267578125,
-0.0024738311767578125,
-0.017181396484375,
-0.005931854248046875,
-0.03375244140625,
0.0218505859375,
-0.050506591796875,
-0.0294036865234375,
-0.01458740234375,
0.041961669921875,
0.0105133056640625,
-0.0206298828125,
0.0187835693359375,
0.0236358642578125,
-0.0072174072265625,
-0.022216796875,
-0.002552032470703125,
-0.0189056396484375,
-0.00611114501953125,
0.0007457733154296875,
0.0293426513671875,
0.040313720703125,
-0.00505828857421875,
-0.017059326171875,
0.042999267578125,
0.0611572265625,
-0.02386474609375,
0.035064697265625,
-0.016845703125,
-0.044403076171875,
-0.01873779296875,
-0.03277587890625,
0.053253173828125,
-0.007320404052734375,
-0.0570068359375,
-0.00360107421875,
-0.03875732421875,
-0.01413726806640625,
0.0265655517578125,
0.0216522216796875,
-0.0269012451171875,
0.040985107421875,
0.053375244140625,
-0.027069091796875,
0.01020050048828125,
0.00035309791564941406,
0.031005859375,
-0.01280975341796875,
-0.0004987716674804688,
-0.00563812255859375,
-0.00835418701171875,
0.005336761474609375,
-0.00911712646484375,
0.014923095703125,
0.01023101806640625,
0.08349609375,
-0.019805908203125,
0.001407623291015625,
-0.036590576171875,
0.0277557373046875,
-0.048553466796875,
-0.052581787109375,
0.06402587890625,
-0.0105438232421875,
-0.0263671875,
-0.0010919570922851562,
-0.05731201171875,
0.01393890380859375,
0.043426513671875,
-0.0321044921875,
0.039642333984375,
0.004608154296875,
-0.004261016845703125,
-0.056732177734375,
0.01445770263671875,
-0.004863739013671875,
-0.016021728515625,
-0.009063720703125,
0.01715087890625,
0.026214599609375,
0.0196075439453125,
-0.049407958984375,
0.0285797119140625,
0.01071929931640625,
-0.0004355907440185547,
-0.012939453125,
0.0149993896484375,
-0.0266571044921875,
0.0302734375,
-0.0140228271484375,
0.00009918212890625,
-0.002166748046875,
-0.0023136138916015625,
0.004962921142578125,
0.0255279541015625,
-0.020965576171875,
0.03155517578125,
-0.0015020370483398438,
-0.03582763671875,
-0.007465362548828125,
0.0253753662109375,
-0.0093231201171875,
0.007709503173828125,
-0.028656005859375,
-0.01212310791015625,
-0.036712646484375,
0.0231781005859375,
-0.033935546875,
-0.003841400146484375,
-0.01244354248046875,
0.015899658203125,
-0.000050127506256103516,
-0.07928466796875,
-0.10723876953125,
0.01018524169921875,
0.0293731689453125,
0.0301361083984375,
-0.1146240234375,
0.078369140625,
-0.0164794921875,
0.048248291015625,
-0.01971435546875,
0.0131683349609375,
0.005954742431640625,
0.031158447265625,
-0.01369476318359375,
0.01528167724609375,
0.002166748046875,
0.004383087158203125,
0.0284423828125,
-0.0163421630859375,
0.006488800048828125,
0.0287933349609375,
0.01352691650390625,
0.0085906982421875,
-0.03790283203125,
0.06243896484375,
-0.0732421875,
-0.01049041748046875,
-0.036224365234375,
0.04156494140625,
0.003612518310546875,
-0.0418701171875,
0.00687408447265625,
0.002513885498046875,
-0.034423828125,
0.0001150965690612793,
-0.003566741943359375,
0.01227569580078125,
-0.031280517578125,
-0.06341552734375,
0.0855712890625,
-0.0153045654296875,
-0.0301971435546875,
-0.0096588134765625,
0.0281829833984375,
-0.003215789794921875,
-0.007045745849609375,
-0.00029015541076660156,
-0.02825927734375,
-0.004566192626953125,
0.002147674560546875,
0.0225067138671875,
-0.006317138671875,
0.0277252197265625,
0.0200958251953125,
-0.057342529296875,
0.0154266357421875,
-0.00011676549911499023,
-0.00548553466796875,
-0.0208740234375,
0.006381988525390625,
0.0312042236328125,
0.040557861328125,
0.006702423095703125,
0.0242462158203125,
0.038055419921875,
-0.017333984375,
-0.01378631591796875,
0.007213592529296875,
-0.040924072265625,
-0.040802001953125,
0.0538330078125,
0.05535888671875,
0.02374267578125,
0.006732940673828125,
-0.072265625,
-0.037628173828125,
0.02032470703125,
-0.0273284912109375,
0.0235137939453125,
-0.10107421875,
-0.0157012939453125,
0.0185546875,
-0.03741455078125,
0.0287628173828125,
-0.0016775131225585938,
-0.057159423828125,
0.006473541259765625,
-0.00704193115234375,
0.00902557373046875,
-0.06878662109375,
0.047637939453125,
-0.04400634765625,
-0.0193939208984375,
-0.09283447265625,
-0.0154876708984375,
-0.016693115234375,
-0.0960693359375,
-0.061248779296875,
-0.06732177734375,
-0.0758056640625,
0.026519775390625,
0.06951904296875,
-0.035797119140625,
0.06829833984375,
-0.03802490234375,
0.01715087890625,
-0.011199951171875,
0.0313720703125,
-0.00820159912109375,
0.0238037109375,
0.0051116943359375,
0.042724609375,
0.0206146240234375,
0.052154541015625,
-0.0079498291015625,
0.04718017578125,
-0.0411376953125,
0.06475830078125,
0.04180908203125,
-0.036529541015625,
0.08673095703125,
-0.015716552734375,
-0.00370025634765625,
0.03057861328125,
-0.008331298828125,
-0.0200958251953125,
0.0168914794921875,
0.00867462158203125,
0.0219573974609375,
0.00865936279296875
]
|
a26deecba3363a5146fca1ac6a5624f8782a13a8 | Wordpress Stackexchange
Q: Get blog title with REST v2 I can't find the answer after searching, so...
How do I get the title of a site using the REST API v2? All I can find in the API docs are the posts, pages, tags,...
A: You can get it easily by making a GET request to: http://yourdomain.com/wp-json/. You will see your site name, description, url and home...
| Q: Get blog title with REST v2 I can't find the answer after searching, so...
How do I get the title of a site using the REST API v2? All I can find in the API docs are the posts, pages, tags,...
A: You can get it easily by making a GET request to: http://yourdomain.com/wp-json/. You will see your site name, description, url and home...
A: I recommend WP REST JMESPath for fields filtering and other output modifications.
Example: /wp-json/wp/v2/pages?_query=[0:2].{id: id, title: title.rendered} means get last two pages; get id field; transform title.rendered --> title
Kilo bytes not problem for nowadays internet, but such JSON filtering can be applied to other rest queries.
Also, such filtered response can be passed directly to React component as props without messing existing component props.
| wordpress | {
"language": "en",
"length": 131,
"provenance": "stackexchange_00019.jsonl.gz:464756",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/223919"
} | [
-0.05450439453125,
-0.0157470703125,
-0.05035400390625,
0.040130615234375,
-0.038482666015625,
-0.02484130859375,
-0.0006322860717773438,
0.0032825469970703125,
0.010986328125,
0.032318115234375,
-0.011322021484375,
0.0189361572265625,
-0.0226593017578125,
-0.0164947509765625,
-0.018798828125,
-0.0189666748046875,
0.045166015625,
-0.0096435546875,
0.039398193359375,
0.0089263916015625,
-0.0038299560546875,
0.0322265625,
0.0301971435546875,
0.06951904296875,
0.0301513671875,
-0.0150604248046875,
0.055511474609375,
-0.0032863616943359375,
0.00881195068359375,
-0.00794219970703125,
0.028717041015625,
-0.027679443359375,
0.01125335693359375,
0.0012292861938476562,
0.015350341796875,
-0.017578125,
0.044464111328125,
-0.00992584228515625,
0.007171630859375,
0.032867431640625,
0.0201263427734375,
-0.01435089111328125,
0.0186920166015625,
0.029632568359375,
0.004207611083984375,
-0.019561767578125,
0.0216064453125,
-0.029693603515625,
-0.008209228515625,
0.005489349365234375,
0.0157928466796875,
0.0028476715087890625,
0.0210418701171875,
0.020416259765625,
-0.0104522705078125,
-0.004596710205078125,
0.09173583984375,
-0.05718994140625,
0.043792724609375,
-0.1156005859375,
-0.0750732421875,
-0.01215362548828125,
0.07666015625,
0.049102783203125,
-0.0035228729248046875,
0.021942138671875,
0.07867431640625,
0.0160369873046875,
0.0230255126953125,
0.01153564453125,
-0.0171661376953125,
0.00458526611328125,
0.01349639892578125,
-0.0121002197265625,
-0.02069091796875,
-0.0261077880859375,
-0.0170135498046875,
-0.047698974609375,
0.0311737060546875,
-0.01113128662109375,
0.0204315185546875,
-0.0190887451171875,
-0.0021514892578125,
0.01329803466796875,
0.01139068603515625,
0.0284271240234375,
-0.00482940673828125,
-0.0272216796875,
-0.0231170654296875,
-0.00771331787109375,
-0.01305389404296875,
-0.056640625,
-0.0494384765625,
0.04620361328125,
0.0218963623046875,
-0.0251922607421875,
0.01203155517578125,
0.04010009765625,
-0.01403045654296875,
0.0185699462890625,
-0.0164794921875,
-0.0185394287109375,
0.0002130270004272461,
-0.0196533203125,
0.0206451416015625,
-0.027374267578125,
-0.021087646484375,
-0.042388916015625,
0.04217529296875,
0.01708984375,
-0.04620361328125,
0.0770263671875,
0.0126495361328125,
0.00847625732421875,
-0.0360107421875,
-0.0011053085327148438,
-0.021331787109375,
0.0019283294677734375,
-0.0074920654296875,
0.006687164306640625,
-0.01171875,
0.01080322265625,
0.013336181640625,
0.053436279296875,
-0.007274627685546875,
0.0254364013671875,
0.00676727294921875,
-0.03375244140625,
-0.048553466796875,
0.0009493827819824219,
0.0193939208984375,
0.05072021484375,
-0.0390625,
-0.008392333984375,
-0.059295654296875,
-0.0025234222412109375,
-0.0019321441650390625,
0.0309600830078125,
-0.0034427642822265625,
-0.0286407470703125,
0.0088653564453125,
0.004489898681640625,
0.023590087890625,
-0.020233154296875,
-0.01934814453125,
-0.0250091552734375,
-0.0010929107666015625,
0.03778076171875,
0.010589599609375,
0.01390838623046875,
0.003986358642578125,
0.01007080078125,
-0.016693115234375,
0.038055419921875,
0.0333251953125,
-0.017486572265625,
0.0256805419921875,
-0.0203094482421875,
0.05181884765625,
-0.01611328125,
0.01480865478515625,
0.0030040740966796875,
0.0280914306640625,
0.031707763671875,
0.00786590576171875,
0.0027294158935546875,
0.0038928985595703125,
0.0008215904235839844,
0.0210723876953125,
0.021087646484375,
0.004779815673828125,
-0.0265960693359375,
0.011383056640625,
0.0011034011840820312,
-0.009918212890625,
0.00510406494140625,
-0.020965576171875,
-0.004913330078125,
0.0209503173828125,
0.02069091796875,
0.0034275054931640625,
-0.021240234375,
0.0156707763671875,
0.008331298828125,
-0.0175933837890625,
-0.0019969940185546875,
0.026763916015625,
0.052215576171875,
-0.010101318359375,
0.0257568359375,
0.0244140625,
0.0205078125,
-0.01226043701171875,
0.01324462890625,
-0.0269012451171875,
-0.039306640625,
0.0250244140625,
0.00855255126953125,
-0.035064697265625,
0.0124664306640625,
-0.0257720947265625,
0.004039764404296875,
-0.0099945068359375,
0.03436279296875,
0.03424072265625,
-0.029388427734375,
0.0150909423828125,
-0.004131317138671875,
0.0230865478515625,
0.03814697265625,
0.00577545166015625,
-0.003971099853515625,
-0.0180206298828125,
-0.0090179443359375,
-0.02911376953125,
-0.0092010498046875,
-0.0202789306640625,
-0.0182342529296875,
-0.0025005340576171875,
-0.036468505859375,
-0.0108642578125,
0.037078857421875,
-0.01546478271484375,
0.0199127197265625,
0.06268310546875,
-0.028961181640625,
0.005191802978515625,
-0.034332275390625,
0.10528564453125,
-0.006099700927734375,
0.0266876220703125,
-0.01055145263671875,
0.0269927978515625,
0.0496826171875,
-0.0032253265380859375,
-0.007579803466796875,
0.01025390625,
-0.052520751953125,
0.01448822021484375,
0.043365478515625,
0.0015497207641601562,
0.0168304443359375,
-0.0014677047729492188,
0.051361083984375,
0.040679931640625,
-0.0121612548828125,
-0.0060882568359375,
0.024566650390625,
0.029693603515625,
0.06500244140625,
-0.0264739990234375,
-0.01375579833984375,
0.015625,
-0.055023193359375,
-0.0163726806640625,
0.0618896484375,
-0.01125335693359375,
0.00833892822265625,
-0.01143646240234375,
-0.0099334716796875,
0.01468658447265625,
-0.03900146484375,
-0.036834716796875,
-0.0219268798828125,
0.0089874267578125,
0.046783447265625,
0.04632568359375,
0.07269287109375,
-0.03717041015625,
0.007274627685546875,
0.013824462890625,
0.07220458984375,
-0.0022945404052734375,
0.078857421875,
0.08349609375,
-0.0101318359375,
-0.01763916015625,
-0.05419921875,
-0.003662109375,
0.050140380859375,
-0.0005440711975097656,
0.015106201171875,
-0.0222015380859375,
-0.0048370361328125,
0.01061248779296875,
-0.0308685302734375,
-0.00891876220703125,
0.0226898193359375,
0.024810791015625,
0.05841064453125,
0.044586181640625,
0.0513916015625,
0.0025806427001953125,
0.044342041015625,
-0.01378631591796875,
0.01247406005859375,
0.0242462158203125,
-0.046478271484375,
0.0267333984375,
-0.02362060546875,
0.0305023193359375,
0.0516357421875,
0.005985260009765625,
-0.01065826416015625,
0.004055023193359375,
-0.021728515625,
0.005832672119140625,
-0.0258941650390625,
-0.0151519775390625,
0.0238494873046875,
-0.071044921875,
0.04168701171875,
0.01079559326171875,
0.01458740234375,
0.0019702911376953125,
-0.038360595703125,
-0.025665283203125,
-0.0013561248779296875,
-0.1356201171875,
-0.111572265625,
0.04052734375,
-0.02392578125,
-0.022552490234375,
-0.00807952880859375,
-0.0237579345703125,
-0.01629638671875,
0.0142974853515625,
-0.0214996337890625,
0.0211944580078125,
-0.033599853515625,
-0.049835205078125,
-0.03729248046875,
-0.09246826171875,
-0.0185546875,
-0.01007080078125,
0.0142974853515625,
-0.0030059814453125,
0.004848480224609375,
-0.003482818603515625,
-0.014678955078125,
-0.0005970001220703125,
0.06756591796875,
0.017242431640625,
-0.0347900390625,
-0.016448974609375,
0.01543426513671875,
-0.0230712890625,
0.019500732421875,
-0.018524169921875,
0.0038433074951171875,
-0.017608642578125,
-0.0127716064453125,
-0.007152557373046875,
0.009124755859375,
0.0013418197631835938,
-0.0014019012451171875,
0.01137542724609375,
0.0011644363403320312,
-0.016143798828125,
-0.041229248046875,
-0.0310821533203125,
-0.0112152099609375,
-0.057830810546875,
-0.03607177734375,
0.051605224609375,
-0.01554107666015625,
-0.033203125,
-0.002010345458984375,
-0.00487518310546875,
-0.0037994384765625,
-0.0002378225326538086,
-0.0215301513671875,
0.01079559326171875,
-0.008544921875,
0.00411224365234375,
0.00563812255859375,
0.0675048828125,
0.004825592041015625,
-0.036376953125,
0.0224761962890625,
0.00917816162109375,
-0.034027099609375,
0.025177001953125,
-0.07403564453125,
-0.01428985595703125,
0.043365478515625,
-0.0017461776733398438,
0.0203704833984375,
-0.00720977783203125,
-0.04254150390625,
0.0055389404296875,
0.0712890625,
-0.0091552734375,
-0.0185394287109375,
0.01116943359375,
0.025848388671875,
-0.047760009765625,
-0.0262908935546875,
-0.01409912109375,
-0.01099395751953125,
-0.078857421875,
0.005889892578125,
-0.0239105224609375,
-0.0189056396484375,
-0.01361083984375,
0.0102691650390625,
-0.01273345947265625,
-0.044677734375,
0.02008056640625,
-0.02197265625,
0.0011529922485351562,
-0.01654052734375,
0.0058135986328125,
-0.03143310546875,
-0.016937255859375,
-0.0113983154296875,
-0.02557373046875,
-0.0198211669921875,
0.0155792236328125,
0.0276947021484375,
-0.00403594970703125,
-0.00347900390625,
-0.0021762847900390625,
0.039764404296875,
-0.004619598388671875,
0.031707763671875,
-0.0115509033203125,
-0.01396942138671875,
-0.00418853759765625,
0.017669677734375,
-0.01910400390625,
-0.00916290283203125,
-0.0120849609375,
-0.01134490966796875,
-0.033111572265625,
0.000007510185241699219,
0.0036029815673828125,
0.0082855224609375,
0.038604736328125,
-0.0246124267578125,
-0.03509521484375,
-0.03680419921875,
0.0259552001953125,
0.021881103515625,
0.008880615234375,
0.0213775634765625,
-0.040496826171875,
-0.0213775634765625,
0.0621337890625,
0.0321044921875,
-0.0169219970703125,
-0.0089569091796875,
0.05517578125,
0.007137298583984375,
-0.035247802734375,
-0.056915283203125,
0.0016002655029296875,
0.040496826171875,
-0.0189666748046875,
0.0606689453125,
0.00571441650390625,
-0.0469970703125,
0.129150390625,
-0.006832122802734375,
0.0127105712890625,
0.0189361572265625,
-0.01107025146484375,
-0.004589080810546875,
-0.03240966796875,
0.022796630859375,
0.002521514892578125,
-0.01195526123046875,
0.00855255126953125,
-0.01262664794921875,
-0.02056884765625,
0.00905609130859375,
0.0185699462890625,
-0.056549072265625,
0.073974609375,
0.0083770751953125,
-0.0109710693359375,
0.00981903076171875,
0.008392333984375,
-0.0106964111328125,
-0.0006418228149414062,
0.008270263671875,
-0.04156494140625,
-0.026763916015625,
0.004207611083984375,
-0.05731201171875,
-0.01044464111328125,
-0.052154541015625,
0.0264129638671875,
-0.07720947265625,
-0.03424072265625,
-0.0178375244140625,
-0.0221099853515625,
0.06671142578125,
-0.0024394989013671875,
-0.054931640625,
0.029937744140625,
-0.013641357421875,
0.031219482421875,
0.032745361328125,
0.0304107666015625,
0.0150909423828125,
0.022125244140625,
0.002071380615234375,
-0.0063018798828125,
0.0269775390625,
0.0214385986328125,
-0.0162506103515625,
0.071533203125,
0.0208892822265625,
0.012115478515625,
0.01029205322265625,
0.10540771484375,
0.0116729736328125,
0.0626220703125,
-0.0265045166015625,
0.0323486328125,
0.006504058837890625,
0.019012451171875,
0.01364898681640625,
-0.004848480224609375,
0.019775390625,
-0.00543975830078125,
-0.0040283203125,
-0.01123046875,
0.0196533203125,
0.03253173828125,
0.0122222900390625,
0.00980377197265625,
-0.0318603515625,
0.0002989768981933594,
-0.025604248046875,
-0.01100921630859375,
-0.0105743408203125,
-0.032867431640625,
-0.01013946533203125,
-0.0185089111328125,
0.00469970703125,
0.03021240234375,
0.024444580078125,
0.0155029296875,
-0.0203857421875,
0.0474853515625,
0.0372314453125,
-0.026611328125,
-0.018096923828125,
0.0255279541015625,
0.03436279296875,
-0.0540771484375,
-0.0275726318359375,
-0.00835418701171875,
0.01641845703125,
-0.01496124267578125,
0.0029296875,
-0.03582763671875,
0.020904541015625,
-0.0285797119140625,
0.022125244140625,
-0.065185546875,
0.040283203125,
-0.06268310546875,
0.00335693359375,
0.032073974609375,
0.0302581787109375,
-0.017791748046875,
-0.0294342041015625,
-0.0222625732421875,
-0.0131988525390625,
0.033966064453125,
-0.01287841796875,
-0.0014123916625976562,
-0.031768798828125,
0.00705718994140625,
0.02935791015625,
0.01255035400390625,
0.005802154541015625,
0.0122833251953125,
-0.0011644363403320312,
-0.01255035400390625,
0.0032444000244140625,
-0.01873779296875,
0.10198974609375,
-0.0024127960205078125,
0.06781005859375,
0.023101806640625,
0.038818359375,
-0.051605224609375,
-0.011810302734375,
0.0173797607421875,
-0.061920166015625,
-0.04449462890625,
-0.023468017578125,
-0.0286712646484375,
0.055084228515625,
0.029541015625,
-0.0008678436279296875,
-0.009033203125,
-0.0141143798828125,
0.00222015380859375,
-0.0030040740966796875,
0.0031375885009765625,
-0.00267791748046875,
-0.04376220703125,
0.03961181640625,
-0.01026153564453125,
0.0305938720703125,
-0.03509521484375,
-0.0003256797790527344,
-0.0010519027709960938,
-0.011566162109375,
-0.005199432373046875,
0.026885986328125,
-0.026641845703125,
0.0255584716796875,
0.080322265625,
-0.006317138671875,
0.040863037109375,
0.0421142578125,
-0.0031795501708984375,
0.01073455810546875,
0.0264739990234375,
-0.03936767578125,
-0.04510498046875,
0.02117919921875,
0.00882720947265625,
-0.0285186767578125,
0.027557373046875,
-0.030792236328125,
0.01435089111328125,
-0.0215606689453125,
0.05755615234375,
-0.0002199411392211914,
0.005832672119140625,
0.0219268798828125,
-0.032867431640625,
0.026214599609375,
-0.01073455810546875,
-0.0207977294921875,
-0.0254058837890625,
0.027099609375,
-0.033782958984375,
-0.039215087890625,
-0.01213836669921875,
-0.004001617431640625,
-0.0183258056640625,
-0.0184173583984375,
0.0562744140625,
0.024932861328125,
-0.004749298095703125,
0.007843017578125,
-0.008148193359375,
0.0298614501953125,
-0.0185546875,
0.0106353759765625,
0.006351470947265625,
-0.02392578125,
-0.0472412109375,
0.04022216796875,
0.001239776611328125,
-0.00817108154296875,
-0.0207061767578125,
0.005641937255859375,
-0.022186279296875,
0.051116943359375,
-0.03826904296875,
0.01360321044921875,
0.0237579345703125,
-0.052734375,
0.0163726806640625,
-0.00890350341796875,
0.007537841796875,
-0.007343292236328125,
-0.01006317138671875,
0.00954437255859375,
-0.0190887451171875,
-0.0263671875,
-0.0231170654296875,
-0.0596923828125,
0.07061767578125,
-0.02105712890625,
-0.02392578125,
-0.0049896240234375,
-0.007411956787109375,
0.019195556640625,
-0.0004267692565917969,
0.0293426513671875,
-0.009490966796875,
0.038238525390625,
0.007694244384765625,
0.04266357421875,
-0.01324462890625,
0.00392913818359375,
-0.0249481201171875,
0.0452880859375,
0.026031494140625,
-0.0177001953125,
0.0070953369140625,
0.029296875,
-0.03564453125,
-0.002986907958984375,
-0.041107177734375,
0.054412841796875,
0.0222625732421875,
0.0031986236572265625,
-0.044158935546875,
-0.00420379638671875,
0.000579833984375,
0.0145721435546875,
0.041168212890625,
0.00864410400390625,
-0.0298919677734375,
-0.0584716796875,
-0.0220794677734375,
0.035736083984375,
-0.0193023681640625,
0.045501708984375,
0.0240020751953125,
0.0253448486328125,
0.049041748046875,
-0.0296783447265625,
0.0300445556640625,
-0.0107269287109375,
0.01312255859375,
0.0311737060546875,
0.0192413330078125,
0.00687408447265625,
0.0291748046875,
-0.00948333740234375,
-0.026641845703125,
0.0092315673828125,
0.02032470703125,
-0.01097869873046875,
-0.009796142578125,
0.059661865234375,
0.0736083984375,
-0.021270751953125,
0.03173828125,
-0.04742431640625,
0.0701904296875,
0.022491455078125,
0.02850341796875,
0.0025463104248046875,
0.021575927734375,
-0.005161285400390625,
0.011993408203125,
0.024383544921875,
0.039947509765625,
-0.036163330078125,
0.054962158203125,
0.02508544921875,
0.023834228515625,
-0.06201171875,
-0.0189666748046875,
0.03057861328125,
0.07293701171875,
-0.03802490234375,
0.00101470947265625,
0.002658843994140625,
0.0068359375,
0.0113067626953125,
-0.0290069580078125,
0.0298309326171875,
-0.002590179443359375,
0.004390716552734375,
0.00443267822265625,
0.0223388671875,
0.03662109375,
-0.01023101806640625,
0.0289306640625,
0.038421630859375,
-0.039398193359375,
0.043792724609375,
-0.022613525390625,
0.0269775390625,
-0.0099639892578125,
0.043792724609375,
0.0006585121154785156,
0.056243896484375,
-0.08245849609375,
-0.016448974609375,
0.00826263427734375,
0.0201873779296875,
0.018096923828125,
-0.0256500244140625,
-0.0159912109375,
-0.05865478515625,
0.033905029296875,
0.0283203125,
0.067626953125,
-0.0051422119140625,
0.0537109375,
0.03271484375,
-0.0127410888671875,
0.01161956787109375,
0.00839996337890625,
-0.005046844482421875,
0.044158935546875,
-0.035369873046875,
-0.0174102783203125,
-0.00789642333984375,
-0.045074462890625,
0.0231475830078125,
-0.056671142578125,
0.04119873046875,
-0.051025390625,
0.06158447265625,
-0.00197601318359375,
-0.006221771240234375,
0.0128326416015625,
-0.0159149169921875,
0.01259613037109375,
-0.0230712890625,
-0.0546875,
0.0188446044921875,
-0.042816162109375,
-0.0438232421875,
0.009124755859375,
0.0292510986328125,
-0.01287841796875,
0.0127105712890625,
-0.03680419921875,
-0.004535675048828125,
0.01218414306640625,
-0.004604339599609375,
-0.00437164306640625,
0.0599365234375,
0.019073486328125,
0.01107025146484375,
-0.09063720703125,
-0.048309326171875,
-0.043731689453125,
0.002716064453125,
0.00958251953125,
0.01131439208984375,
0.03369140625,
0.0312347412109375,
-0.054351806640625,
0.004444122314453125,
-0.044921875,
-0.023468017578125,
-0.04144287109375,
0.042266845703125,
0.019866943359375,
-0.0008902549743652344,
-0.0914306640625,
0.0594482421875,
-0.00010448694229125977,
0.03369140625,
0.08905029296875,
-0.0253143310546875,
-0.006031036376953125,
-0.03759765625,
0.0085906982421875,
-0.032135009765625,
-0.0142364501953125,
-0.01508331298828125,
-0.015838623046875,
0.0213775634765625,
0.0115814208984375,
-0.005069732666015625,
-0.00733184814453125,
0.0257415771484375,
-0.0190887451171875,
0.0184478759765625,
0.00847625732421875,
0.03826904296875,
0.0439453125,
-0.0400390625,
0.03564453125,
-0.0156707763671875,
-0.0253753662109375,
0.054290771484375,
-0.01611328125,
0.000018596649169921875,
-0.0143890380859375,
0.0570068359375,
-0.018157958984375,
-0.0560302734375,
0.0094146728515625,
-0.00942230224609375,
-0.0100860595703125,
-0.054290771484375,
0.02197265625,
-0.042816162109375,
-0.0123443603515625,
-0.007781982421875,
-0.050994873046875,
0.006381988525390625,
0.01534271240234375,
-0.0097198486328125,
-0.0007266998291015625,
0.01049041748046875,
-0.04656982421875,
0.02197265625,
-0.018096923828125,
0.04095458984375,
-0.02789306640625,
-0.025787353515625,
-0.030548095703125,
0.007404327392578125,
-0.0262603759765625,
0.006317138671875,
0.022796630859375,
-0.042999267578125,
-0.01294708251953125,
-0.040191650390625,
-0.0207977294921875,
-0.024200439453125,
0.00423431396484375,
0.02410888671875,
-0.0250701904296875,
0.03167724609375,
0.005168914794921875,
0.0257568359375,
0.0556640625,
0.0129241943359375,
-0.006496429443359375,
0.0102386474609375,
-0.006103515625,
-0.030792236328125,
-0.057708740234375,
0.01392364501953125,
-0.045745849609375,
-0.041351318359375,
-0.032867431640625,
-0.01328277587890625,
-0.01303863525390625,
-0.046142578125,
-0.030853271484375,
0.051544189453125,
-0.0089263916015625,
-0.0239105224609375,
-0.080322265625,
-0.01073455810546875,
0.0227203369140625,
-0.0103302001953125,
-0.02984619140625,
-0.0216064453125,
-0.060455322265625,
0.02398681640625,
0.020843505859375,
0.045654296875,
-0.00734710693359375,
0.035919189453125,
-0.032989501953125,
0.031890869140625,
-0.0019683837890625,
0.004852294921875,
0.017120361328125,
-0.01033782958984375,
0.0140380859375,
0.0169677734375,
-0.061004638671875,
0.003284454345703125,
-0.036651611328125,
0.02227783203125,
-0.025665283203125,
-0.0291595458984375,
-0.00019037723541259766,
-0.0107269287109375,
0.0218658447265625,
0.053497314453125,
0.0012054443359375,
-0.025054931640625,
0.00037384033203125,
-0.00421142578125,
-0.02313232421875,
-0.026458740234375,
0.007965087890625,
-0.042144775390625,
-0.00445556640625,
-0.0187530517578125,
-0.00769805908203125,
0.0124969482421875,
-0.0513916015625,
-0.0297698974609375,
0.0010881423950195312,
-0.041473388671875,
-0.01172637939453125,
0.0009851455688476562,
-0.0496826171875,
0.067138671875,
-0.03094482421875,
0.01296234130859375,
-0.0058746337890625,
0.05572509765625,
0.02685546875,
-0.01375579833984375,
0.00182342529296875,
-0.0245513916015625,
0.0020351409912109375,
0.00969696044921875,
0.01934814453125,
0.00878143310546875,
0.0069580078125,
-0.03668212890625,
-0.026611328125,
0.0226287841796875,
0.033782958984375,
0.017547607421875,
-0.027496337890625,
0.0193023681640625,
0.02703857421875,
0.00640869140625,
0.00972747802734375,
0.0552978515625,
0.004146575927734375,
0.04754638671875,
-0.0289459228515625,
-0.0206451416015625,
-0.007671356201171875,
-0.040740966796875,
-0.0015954971313476562,
0.0130767822265625,
-0.017608642578125,
-0.054290771484375,
0.0142669677734375,
-0.003551483154296875,
0.0180816650390625,
0.0234832763671875
]
|
0db034b3335f9a38e6bb9b3b3bcb561c3a0514b9 | Wordpress Stackexchange
Q: How to modify the new WordPress 4.5 link inline toolbar I had my own plugin that add custom links options to the old wordpress link edition window (data attribute, nofollow etc).
The new inline link toolbar introduced in WordPress 4.5 is ... not what I want! All options need one more click: writers are not anymore paying attention to links properties, and it's a big problem.
How to do one of the following:
*
*Either disable the new wordpress inline toolbar (programmatically)?
*Write code (JS or PHP) to add buttons to this toolbar?
| Q: How to modify the new WordPress 4.5 link inline toolbar I had my own plugin that add custom links options to the old wordpress link edition window (data attribute, nofollow etc).
The new inline link toolbar introduced in WordPress 4.5 is ... not what I want! All options need one more click: writers are not anymore paying attention to links properties, and it's a big problem.
How to do one of the following:
*
*Either disable the new wordpress inline toolbar (programmatically)?
*Write code (JS or PHP) to add buttons to this toolbar?
| wordpress | {
"language": "en",
"length": 94,
"provenance": "stackexchange_00019.jsonl.gz:464781",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/224014"
} | [
0.052032470703125,
-0.039337158203125,
0.00421905517578125,
-0.002643585205078125,
-0.00745391845703125,
-0.038665771484375,
0.076416015625,
0.0049896240234375,
-0.00037741661071777344,
-0.005336761474609375,
0.01155853271484375,
0.00264739990234375,
-0.03924560546875,
-0.039093017578125,
0.01873779296875,
-0.02813720703125,
0.0479736328125,
0.0018568038940429688,
0.049530029296875,
-0.0246429443359375,
0.0261383056640625,
-0.0099945068359375,
0.036651611328125,
0.083984375,
0.0103302001953125,
0.01177215576171875,
0.06646728515625,
-0.035186767578125,
0.022247314453125,
-0.00991058349609375,
0.0178375244140625,
-0.036834716796875,
0.005939483642578125,
0.03912353515625,
-0.033599853515625,
-0.0282745361328125,
-0.019134521484375,
0.041961669921875,
0.02496337890625,
-0.014068603515625,
0.048553466796875,
-0.026519775390625,
-0.048553466796875,
0.0023326873779296875,
-0.033447265625,
-0.013397216796875,
0.04583740234375,
-0.0234222412109375,
0.022979736328125,
0.01087188720703125,
0.00021159648895263672,
0.0211029052734375,
0.006988525390625,
-0.016845703125,
-0.0212860107421875,
-0.02996826171875,
0.018310546875,
0.0026760101318359375,
0.00794219970703125,
0.0350341796875,
-0.0009646415710449219,
0.03240966796875,
-0.0185699462890625,
-0.041900634765625,
0.023956298828125,
-0.00949859619140625,
0.01513671875,
0.021636962890625,
-0.004199981689453125,
0.03631591796875,
0.012237548828125,
-0.01195526123046875,
0.002834320068359375,
-0.00888824462890625,
0.0126800537109375,
-0.0038318634033203125,
0.0037021636962890625,
0.007305145263671875,
0.008819580078125,
0.0194854736328125,
0.0187530517578125,
0.049346923828125,
-0.043487548828125,
-0.027923583984375,
0.021087646484375,
-0.01297760009765625,
-0.0117950439453125,
-0.0219573974609375,
-0.01279449462890625,
-0.0025768280029296875,
-0.01457977294921875,
-0.068359375,
0.02484130859375,
0.030120849609375,
-0.0160369873046875,
-0.013702392578125,
0.0245361328125,
0.00013911724090576172,
0.005397796630859375,
-0.01168060302734375,
0.028900146484375,
-0.0533447265625,
0.02740478515625,
-0.00792694091796875,
-0.034759521484375,
-0.0216064453125,
0.0211639404296875,
0.01192474365234375,
0.01441192626953125,
0.040435791015625,
-0.0184783935546875,
0.0096893310546875,
0.039306640625,
0.036346435546875,
-0.0287933349609375,
-0.0200653076171875,
0.01849365234375,
0.0203857421875,
-0.0160980224609375,
0.037994384765625,
-0.015411376953125,
-0.0020847320556640625,
-0.01428985595703125,
0.056854248046875,
0.0057373046875,
0.016632080078125,
0.022552490234375,
-0.00780487060546875,
0.0032196044921875,
-0.0189361572265625,
-0.0308685302734375,
0.020263671875,
0.061767578125,
0.041351318359375,
0.01311492919921875,
-0.01309967041015625,
0.0225677490234375,
-0.0170440673828125,
0.0076141357421875,
0.02423095703125,
-0.0180206298828125,
-0.040771484375,
-0.0003943443298339844,
-0.0111083984375,
0.0284881591796875,
-0.001285552978515625,
0.0272216796875,
0.0362548828125,
-0.0004425048828125,
-0.01556396484375,
0.04534912109375,
0.0118255615234375,
0.040069580078125,
0.007732391357421875,
-0.030120849609375,
-0.0228271484375,
0.036834716796875,
-0.0297698974609375,
-0.01506805419921875,
-0.061737060546875,
-0.0024738311767578125,
0.0131378173828125,
0.0220489501953125,
-0.01154327392578125,
0.0043182373046875,
-0.042083740234375,
-0.0038661956787109375,
0.00921630859375,
0.03350830078125,
0.07342529296875,
0.0149993896484375,
-0.0655517578125,
0.00533294677734375,
0.02362060546875,
-0.0196380615234375,
0.0284881591796875,
0.0157318115234375,
0.0029582977294921875,
0.0142669677734375,
0.029937744140625,
0.0001417398452758789,
-0.0273895263671875,
0.07354736328125,
-0.048736572265625,
-0.05462646484375,
0.0274200439453125,
-0.005504608154296875,
0.07623291015625,
0.048248291015625,
0.00909423828125,
0.0094451904296875,
-0.032562255859375,
0.01495361328125,
0.0127105712890625,
0.02874755859375,
-0.00231170654296875,
-0.0036792755126953125,
0.0159912109375,
0.0011043548583984375,
-0.0498046875,
-0.025299072265625,
-0.0025501251220703125,
-0.0025386810302734375,
0.019378662109375,
-0.07000732421875,
0.0187835693359375,
-0.03399658203125,
0.044677734375,
0.0238189697265625,
0.01415252685546875,
0.005985260009765625,
-0.009796142578125,
-0.0294189453125,
0.027801513671875,
-0.02130126953125,
-0.0020046234130859375,
-0.00568389892578125,
0.01519775390625,
0.0261688232421875,
-0.006160736083984375,
0.042510986328125,
0.016876220703125,
0.04986572265625,
0.0078277587890625,
0.03228759765625,
-0.0709228515625,
0.010345458984375,
-0.047271728515625,
0.0325927734375,
-0.0167388916015625,
-0.01457977294921875,
0.038909912109375,
0.0262298583984375,
0.04681396484375,
-0.00914764404296875,
-0.028594970703125,
-0.0015554428100585938,
-0.08148193359375,
0.02923583984375,
0.058502197265625,
0.03863525390625,
-0.0301055908203125,
-0.0237579345703125,
-0.0290069580078125,
-0.02484130859375,
0.02508544921875,
0.065673828125,
-0.053009033203125,
0.007480621337890625,
0.01021575927734375,
0.023529052734375,
-0.0087738037109375,
0.031402587890625,
0.05206298828125,
0.024444580078125,
0.018829345703125,
0.0279083251953125,
0.033203125,
-0.031982421875,
0.02716064453125,
-0.01983642578125,
0.0311737060546875,
0.00034308433532714844,
-0.005096435546875,
0.07952880859375,
-0.0015506744384765625,
0.04595947265625,
0.0305328369140625,
-0.048309326171875,
0.02777099609375,
0.0101776123046875,
0.0027523040771484375,
-0.0129241943359375,
-0.029510498046875,
0.024658203125,
-0.034393310546875,
-0.062042236328125,
0.040313720703125,
-0.005146026611328125,
-0.0343017578125,
-0.0285491943359375,
-0.005168914794921875,
0.07012939453125,
-0.015960693359375,
0.020843505859375,
0.009521484375,
0.044464111328125,
-0.059722900390625,
-0.019256591796875,
-0.04620361328125,
0.0192413330078125,
-0.006378173828125,
-0.0298919677734375,
0.02850341796875,
0.0158843994140625,
-0.04296875,
-0.005245208740234375,
-0.019866943359375,
0.0230865478515625,
-0.00995635986328125,
0.0311279296875,
0.06591796875,
-0.01605224609375,
0.02886962890625,
0.003284454345703125,
-0.027587890625,
-0.020751953125,
0.0323486328125,
0.006229400634765625,
-0.0080718994140625,
-0.038665771484375,
0.04266357421875,
0.01531982421875,
-0.019378662109375,
-0.01312255859375,
-0.03155517578125,
-0.052581787109375,
-0.004154205322265625,
-0.082763671875,
-0.0048370361328125,
-0.0290679931640625,
-0.03564453125,
-0.033050537109375,
0.06561279296875,
-0.01690673828125,
0.0109405517578125,
0.10693359375,
-0.00493621826171875,
0.00235748291015625,
-0.017913818359375,
-0.0268402099609375,
-0.0217742919921875,
-0.036285400390625,
0.004688262939453125,
0.0028553009033203125,
-0.005096435546875,
0.0044097900390625,
0.0276947021484375,
0.0068206787109375,
-0.018829345703125,
0.0139923095703125,
-0.0253448486328125,
-0.0208740234375,
-0.00702667236328125,
0.00308990478515625,
-0.0311431884765625,
0.0025539398193359375,
-0.013031005859375,
0.061370849609375,
0.0171356201171875,
-0.00933074951171875,
-0.0036220550537109375,
0.0153656005859375,
0.0283050537109375,
0.0263671875,
-0.0033779144287109375,
-0.01270294189453125,
0.0181884765625,
-0.006809234619140625,
-0.036285400390625,
0.005084991455078125,
0.01849365234375,
-0.01256561279296875,
0.00748443603515625,
-0.0259246826171875,
-0.0281982421875,
0.0034732818603515625,
0.030853271484375,
0.0202484130859375,
0.0059051513671875,
0.047607421875,
-0.0099945068359375,
0.033538818359375,
-0.00789642333984375,
-0.006282806396484375,
-0.054229736328125,
0.0220947265625,
-0.0214385986328125,
0.0251312255859375,
0.00449371337890625,
0.00771331787109375,
0.006671905517578125,
0.0026340484619140625,
-0.024444580078125,
0.0185546875,
0.0213775634765625,
-0.07025146484375,
-0.00506591796875,
-0.001804351806640625,
-0.007129669189453125,
0.0179595947265625,
0.045745849609375,
-0.0092315673828125,
0.0065155029296875,
0.00881195068359375,
-0.018218994140625,
-0.00194549560546875,
-0.0118865966796875,
-0.0648193359375,
-0.002613067626953125,
-0.027862548828125,
0.031219482421875,
0.0264129638671875,
-0.004619598388671875,
-0.0625,
0.08331298828125,
-0.050537109375,
0.00978851318359375,
0.0255889892578125,
0.02008056640625,
-0.06976318359375,
0.01849365234375,
-0.0819091796875,
-0.007785797119140625,
-0.035491943359375,
0.0285797119140625,
-0.09442138671875,
0.0051422119140625,
-0.047393798828125,
0.0572509765625,
-0.001056671142578125,
0.033599853515625,
-0.053955078125,
0.01290130615234375,
-0.0036525726318359375,
-0.013702392578125,
0.0330810546875,
0.01294708251953125,
-0.02447509765625,
0.0390625,
0.0251922607421875,
-0.0140380859375,
0.0026454925537109375,
-0.0220947265625,
-0.0657958984375,
0.0189208984375,
-0.0097503662109375,
0.0419921875,
0.026947021484375,
-0.0236968994140625,
-0.05389404296875,
-0.040008544921875,
-0.01494598388671875,
0.017364501953125,
-0.0045318603515625,
-0.00463104248046875,
-0.051788330078125,
-0.07958984375,
0.030670166015625,
-0.0211029052734375,
-0.0007958412170410156,
-0.007137298583984375,
0.0587158203125,
0.017547607421875,
-0.007244110107421875,
0.0458984375,
0.0034618377685546875,
0.027984619140625,
0.0087738037109375,
0.0107421875,
0.0251312255859375,
-0.0142059326171875,
0.0145721435546875,
0.0037059783935546875,
0.0199127197265625,
-0.009185791015625,
0.0182342529296875,
0.0158233642578125,
0.0009417533874511719,
0.0198974609375,
0.017333984375,
-0.0181884765625,
0.03265380859375,
0.01031494140625,
0.0002808570861816406,
-0.00545501708984375,
0.0080718994140625,
0.02984619140625,
-0.05914306640625,
-0.0307159423828125,
-0.014892578125,
0.01470184326171875,
-0.007701873779296875,
0.032379150390625,
0.02197265625,
-0.0019292831420898438,
0.0062255859375,
-0.00644683837890625,
-0.0184783935546875,
0.027862548828125,
0.01392364501953125,
-0.0006771087646484375,
0.0281524658203125,
0.0010671615600585938,
-0.0279083251953125,
-0.00450897216796875,
-0.006908416748046875,
0.06048583984375,
0.024658203125,
-0.02825927734375,
-0.0112762451171875,
0.01126861572265625,
0.0069580078125,
-0.01143646240234375,
-0.0019369125366210938,
0.025604248046875,
0.004428863525390625,
-0.0029468536376953125,
0.0029811859130859375,
-0.00913238525390625,
-0.01117706298828125,
-0.0191802978515625,
0.06768798828125,
0.0214080810546875,
0.00710296630859375,
0.007678985595703125,
0.057525634765625,
0.0207977294921875,
0.0201873779296875,
-0.006931304931640625,
0.032745361328125,
0.022613525390625,
0.0173797607421875,
0.01074981689453125,
-0.004291534423828125,
0.003108978271484375,
-0.0219879150390625,
0.0012025833129882812,
-0.0016756057739257812,
-0.00933837890625,
0.0237579345703125,
0.04974365234375,
-0.004791259765625,
-0.006198883056640625,
0.002315521240234375,
-0.045684814453125,
0.0020961761474609375,
0.045379638671875,
0.006938934326171875,
-0.055419921875,
-0.0212860107421875,
0.0263671875,
0.022064208984375,
-0.0321044921875,
-0.017242431640625,
-0.00426483154296875,
-0.03271484375,
-0.0251617431640625,
0.0031528472900390625,
-0.055938720703125,
0.000010251998901367188,
0.024383544921875,
0.0270538330078125,
-0.004314422607421875,
-0.022735595703125,
-0.0277557373046875,
-0.01605224609375,
-0.0313720703125,
0.0039215087890625,
0.08453369140625,
0.00872039794921875,
0.024993896484375,
-0.041015625,
-0.01611328125,
-0.01300811767578125,
0.0006561279296875,
0.031829833984375,
-0.005008697509765625,
-0.01149749755859375,
-0.0016736984252929688,
-0.0284881591796875,
-0.038482666015625,
-0.06280517578125,
-0.0048065185546875,
-0.0684814453125,
0.018951416015625,
0.005283355712890625,
0.0219573974609375,
-0.0180206298828125,
-0.0077667236328125,
-0.0298004150390625,
0.0297088623046875,
0.0233154296875,
0.03973388671875,
0.0211334228515625,
-0.00826263427734375,
0.0242919921875,
0.032196044921875,
0.040496826171875,
0.01348114013671875,
0.007167816162109375,
-0.049774169921875,
0.031494140625,
-0.03326416015625,
-0.07891845703125,
-0.03326416015625,
-0.01812744140625,
0.05010986328125,
0.030731201171875,
-0.0243377685546875,
0.0308685302734375,
-0.057403564453125,
-0.00862884521484375,
-0.02215576171875,
0.0469970703125,
-0.07421875,
0.019805908203125,
0.0101776123046875,
0.0005674362182617188,
0.0035400390625,
0.01165771484375,
0.006134033203125,
-0.019134521484375,
0.029083251953125,
-0.00954437255859375,
-0.0280609130859375,
-0.04205322265625,
0.03582763671875,
0.037384033203125,
-0.031707763671875,
0.02972412109375,
-0.00615692138671875,
-0.006572723388671875,
0.053619384765625,
-0.0276641845703125,
0.0498046875,
0.054931640625,
0.06890869140625,
-0.0216217041015625,
-0.0164031982421875,
0.0167236328125,
-0.040313720703125,
0.039337158203125,
0.055389404296875,
0.06304931640625,
-0.1090087890625,
0.021270751953125,
0.0052032470703125,
-0.01751708984375,
0.033905029296875,
-0.01300811767578125,
-0.00836944580078125,
0.01085662841796875,
0.02459716796875,
-0.024658203125,
-0.0264129638671875,
0.00482177734375,
0.0130157470703125,
-0.0297088623046875,
0.02410888671875,
0.0340576171875,
0.018096923828125,
-0.0113983154296875,
0.0029277801513671875,
-0.003856658935546875,
0.01395416259765625,
-0.0187225341796875,
-0.01345062255859375,
0.0098724365234375,
-0.035430908203125,
-0.055419921875,
0.00655364990234375,
-0.024078369140625,
-0.01934814453125,
0.09442138671875,
0.031494140625,
0.046844482421875,
0.0467529296875,
0.022216796875,
0.0240020751953125,
-0.014862060546875,
0.02105712890625,
0.0029048919677734375,
-0.033721923828125,
-0.002666473388671875,
0.0128631591796875,
0.0038604736328125,
0.0208282470703125,
0.008819580078125,
-0.0438232421875,
0.03021240234375,
0.0906982421875,
0.0533447265625,
-0.0131988525390625,
-0.035308837890625,
0.042633056640625,
-0.036407470703125,
-0.0077972412109375,
-0.051025390625,
0.04534912109375,
-0.0634765625,
-0.010162353515625,
-0.03131103515625,
-0.0181121826171875,
-0.0305328369140625,
-0.08831787109375,
-0.051513671875,
0.1229248046875,
-0.038055419921875,
0.042572021484375,
0.005535125732421875,
0.04730224609375,
0.003376007080078125,
0.038818359375,
0.004222869873046875,
0.030670166015625,
-0.016510009765625,
0.005634307861328125,
-0.0161895751953125,
-0.00670623779296875,
-0.00728607177734375,
0.0352783203125,
0.04248046875,
0.014862060546875,
-0.041900634765625,
-0.0194854736328125,
0.0244903564453125,
0.024932861328125,
-0.0011453628540039062,
0.03314208984375,
-0.0213623046875,
-0.0237274169921875,
0.01247406005859375,
0.007465362548828125,
0.0239410400390625,
0.0386962890625,
-0.043670654296875,
0.0181121826171875,
0.0084991455078125,
0.00595855712890625,
-0.0233612060546875,
0.02142333984375,
0.0181427001953125,
-0.0245513916015625,
-0.0238800048828125,
0.01666259765625,
0.01373291015625,
0.0214080810546875,
-0.005069732666015625,
-0.0184783935546875,
-0.0099945068359375,
-0.0162200927734375,
0.0253753662109375,
-0.0238037109375,
-0.0401611328125,
-0.034881591796875,
-0.008056640625,
-0.0015621185302734375,
-0.0821533203125,
-0.0601806640625,
-0.002536773681640625,
-0.01018524169921875,
0.01250457763671875,
0.0086822509765625,
0.014129638671875,
-0.05303955078125,
-0.033477783203125,
0.045013427734375,
0.042694091796875,
-0.00812530517578125,
-0.047393798828125,
0.004398345947265625,
-0.037994384765625,
0.007511138916015625,
-0.0338134765625,
-0.01348114013671875,
-0.0231475830078125,
-0.0023784637451171875,
-0.0243988037109375,
0.0133209228515625,
0.0286102294921875,
0.005218505859375,
-0.0019254684448242188,
0.008148193359375,
-0.044677734375,
0.005718231201171875,
-0.01367950439453125,
-0.017669677734375,
0.0218353271484375,
-0.0021305084228515625,
-0.00225067138671875,
0.0263824462890625,
0.0301513671875,
0.0176849365234375,
-0.0160369873046875,
0.01519012451171875,
-0.037261962890625,
0.032470703125,
-0.0438232421875,
-0.04681396484375,
-0.0135955810546875,
0.05767822265625,
0.01284027099609375,
-0.03472900390625,
0.01373291015625,
0.023162841796875,
-0.0146026611328125,
-0.01457977294921875,
0.02166748046875,
-0.006404876708984375,
-0.01552581787109375,
-0.044891357421875,
0.055816650390625,
0.059295654296875,
0.03631591796875,
0.003772735595703125,
0.0117340087890625,
0.07818603515625,
0.001811981201171875,
0.055816650390625,
0.006805419921875,
0.0168914794921875,
0.01381683349609375,
0.0173187255859375,
0.0268096923828125,
0.05438232421875,
-0.043304443359375,
-0.0215911865234375,
0.04461669921875,
-0.03857421875,
-0.0077362060546875,
0.04461669921875,
-0.0163421630859375,
-0.00957489013671875,
-0.0164337158203125,
0.010162353515625,
-0.0275421142578125,
-0.00881195068359375,
0.0231475830078125,
0.033111572265625,
-0.0019931793212890625,
0.033966064453125,
-0.037841796875,
0.0005583763122558594,
-0.006622314453125,
-0.0030384063720703125,
0.04205322265625,
0.04339599609375,
0.002716064453125,
0.02392578125,
0.0171356201171875,
-0.009857177734375,
0.004146575927734375,
0.0096893310546875,
-0.00955963134765625,
-0.01094818115234375,
0.0161895751953125,
-0.004398345947265625,
-0.006053924560546875,
0.05560302734375,
0.0189361572265625,
-0.01326751708984375,
0.0280303955078125,
-0.004669189453125,
0.0021114349365234375,
-0.016204833984375,
0.0232696533203125,
-0.0311431884765625,
-0.03515625,
-0.0250244140625,
-0.00917816162109375,
0.01136016845703125,
0.0131072998046875,
0.005138397216796875,
0.010223388671875,
0.032257080078125,
0.004962921142578125,
0.01629638671875,
0.024627685546875,
0.0462646484375,
0.037872314453125,
-0.022003173828125,
-0.0016994476318359375,
-0.00012230873107910156,
-0.0254974365234375,
0.0141754150390625,
-0.0006818771362304688,
-0.0031223297119140625,
0.00197601318359375,
-0.041412353515625,
-0.0105133056640625,
0.00469970703125,
0.018310546875,
-0.024627685546875,
0.005039215087890625,
0.001922607421875,
-0.001804351806640625,
0.0010747909545898438,
0.049346923828125,
0.001373291015625,
-0.001705169677734375,
-0.0421142578125,
-0.010955810546875,
-0.037506103515625,
-0.038055419921875,
-0.05218505859375,
-0.004413604736328125,
0.071044921875,
0.027252197265625,
-0.103515625,
0.0469970703125,
-0.03131103515625,
0.044586181640625,
0.0029087066650390625,
0.0214080810546875,
-0.007293701171875,
0.03021240234375,
-0.05303955078125,
-0.0479736328125,
-0.0247650146484375,
0.03253173828125,
-0.056732177734375,
-0.001033782958984375,
-0.0210418701171875,
-0.0094146728515625,
0.0287628173828125,
0.0186920166015625,
0.02862548828125,
0.06060791015625,
0.01053619384765625,
-0.016998291015625,
0.0104522705078125,
-0.02801513671875,
-0.004192352294921875,
-0.0311431884765625,
0.0092010498046875,
-0.073486328125,
-0.0335693359375,
0.024566650390625,
-0.045166015625,
-0.036590576171875,
-0.06317138671875,
-0.097900390625,
0.071533203125,
-0.0103912353515625,
-0.041595458984375,
-0.01543426513671875,
-0.01280975341796875,
-0.00955963134765625,
-0.006931304931640625,
-0.008636474609375,
-0.01474761962890625,
-0.01232147216796875,
0.039398193359375,
0.004669189453125,
0.036529541015625,
-0.023590087890625,
0.0048065185546875,
-0.0161895751953125,
0.04400634765625,
0.05633544921875,
0.0068359375,
-0.0198516845703125,
0.0006785392761230469,
-0.0039520263671875,
-0.0280914306640625,
-0.062042236328125,
-0.0290374755859375,
0.003620147705078125,
0.06536865234375,
0.004230499267578125,
0.00023305416107177734,
-0.0213775634765625,
-0.007030487060546875,
0.0193328857421875,
0.039794921875,
0.0035953521728515625,
-0.01708984375,
0.041656494140625,
-0.01331329345703125,
-0.0284576416015625,
0.0033283233642578125,
0.0014629364013671875,
-0.0230865478515625,
-0.002582550048828125,
0.02001953125,
0.0015096664428710938,
-0.0191192626953125,
0.038421630859375,
-0.02325439453125,
-0.0236358642578125,
0.020233154296875,
0.00555419921875,
-0.08074951171875,
0.0435791015625,
0.0809326171875,
-0.04705810546875,
0.0088653564453125,
0.0083465576171875,
-0.0200653076171875,
0.04425048828125,
-0.036590576171875,
0.027435302734375,
-0.007495880126953125,
-0.055023193359375,
0.0246734619140625,
-0.0164642333984375,
0.04644775390625,
-0.067138671875,
-0.053924560546875,
-0.0097808837890625,
0.021270751953125,
-0.0214080810546875,
0.01134490966796875,
-0.00267791748046875,
0.01136016845703125,
-0.013946533203125,
0.1168212890625,
0.0229644775390625,
0.00933837890625,
-0.0024890899658203125,
0.026031494140625,
0.0087738037109375,
-0.0306549072265625,
0.0203399658203125,
-0.0218353271484375,
0.0175933837890625,
0.0307769775390625,
0.0259857177734375,
-0.0151519775390625,
0.032440185546875,
-0.021728515625,
-0.00006085634231567383,
0.0024204254150390625
]
|
c53e5f13b4ce5305bec36e5694cdf511a3ae6a52 | Wordpress Stackexchange
Q: get_the_terms in descending alphabetical order I'm displaying a list of terms that a post is assigned to by using the following:
<?php
$terms = get_the_terms( $post->ID , 'winetype' );
$sep = ', ';
foreach ( $terms as $term ) {
echo $term->name;
echo $sep;
} ?>
But we would like the output to be in descending alphabetical order (Z-A), I can't find a way to use order => DESC on this, any suggestions?
Many thanks in advanced.
A: You could try this:
// Get posts terms
$terms = wp_get_post_terms( $post->ID, 'winetype', array( 'order' => 'DESC') );
$sep = ', ';
foreach ( $terms as $term ) {
echo $term->name;
echo $sep;
}
| Q: get_the_terms in descending alphabetical order I'm displaying a list of terms that a post is assigned to by using the following:
<?php
$terms = get_the_terms( $post->ID , 'winetype' );
$sep = ', ';
foreach ( $terms as $term ) {
echo $term->name;
echo $sep;
} ?>
But we would like the output to be in descending alphabetical order (Z-A), I can't find a way to use order => DESC on this, any suggestions?
Many thanks in advanced.
A: You could try this:
// Get posts terms
$terms = wp_get_post_terms( $post->ID, 'winetype', array( 'order' => 'DESC') );
$sep = ', ';
foreach ( $terms as $term ) {
echo $term->name;
echo $sep;
}
A: Use wp_get_post_terms() instead:
<?php
$names = wp_get_post_terms(
$post->ID,
'winetype',
array(
'orderby' => 'name',
'order' => 'DESC',
'fields' => 'names'
);
echo implode(', ', $names); // to avoid trailing separator
Updated by virtue of to @Pieter Goosen comment.
$terms = get_the_terms( $post->ID , 'winetype' );
if($terms) { // check the variable is not empty
// compare terms
function cmp($a, $b)
{
return strcmp($b->name, $a->name); // in reverse order to get DESC
}
// sort terms using comparison function
usort($terms, 'cmp');
// get names from objects
function my_function($z)
{
return $z->name;
}
// map names array using my_function()
$term_names = array_map('my_function', $terms);
// define separator
$separator = ', ';
// get string by imploding the array using the separator
$term_names = implode($separator, $term_names);
echo $term_names; // OR return
}
| wordpress | {
"language": "en",
"length": 241,
"provenance": "stackexchange_00019.jsonl.gz:464786",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/224029"
} | [
0.056640625,
0.01324462890625,
-0.02239990234375,
-0.0173797607421875,
0.038604736328125,
-0.049560546875,
0.068115234375,
-0.0247955322265625,
0.055908203125,
0.0443115234375,
-0.028472900390625,
-0.042388916015625,
0.006366729736328125,
-0.0113372802734375,
-0.07403564453125,
-0.04833984375,
0.039154052734375,
-0.0114288330078125,
0.052886962890625,
0.00446319580078125,
0.004779815673828125,
0.0404052734375,
0.04205322265625,
0.003936767578125,
0.00616455078125,
-0.005344390869140625,
0.08636474609375,
-0.01068878173828125,
0.0210418701171875,
-0.015106201171875,
0.0219879150390625,
-0.0211639404296875,
-0.01059722900390625,
0.003387451171875,
0.0638427734375,
0.041229248046875,
0.0171966552734375,
0.007007598876953125,
0.07501220703125,
0.0009717941284179688,
0.02032470703125,
-0.004665374755859375,
-0.001895904541015625,
0.013702392578125,
-0.0131988525390625,
-0.02850341796875,
0.02020263671875,
-0.0253753662109375,
-0.0023651123046875,
-0.0121002197265625,
0.039337158203125,
-0.0285186767578125,
0.05181884765625,
-0.038360595703125,
0.0029659271240234375,
0.021209716796875,
-0.01003265380859375,
-0.00955963134765625,
0.0177764892578125,
-0.021820068359375,
-0.01248931884765625,
-0.0008263587951660156,
0.0240936279296875,
0.0017042160034179688,
-0.01515960693359375,
0.033721923828125,
0.015777587890625,
0.0017948150634765625,
-0.07061767578125,
-0.031646728515625,
0.0199737548828125,
-0.061553955078125,
0.0247802734375,
-0.02813720703125,
0.041229248046875,
-0.03948974609375,
-0.042236328125,
-0.0372314453125,
0.034332275390625,
0.0156707763671875,
0.036895751953125,
0.01702880859375,
-0.05303955078125,
0.020050048828125,
-0.0345458984375,
-0.0089111328125,
-0.01119232177734375,
-0.0230865478515625,
-0.00004124641418457031,
-0.042388916015625,
-0.01537322998046875,
0.0313720703125,
-0.029815673828125,
-0.003391265869140625,
-0.0139923095703125,
-0.03668212890625,
0.0262451171875,
0.038970947265625,
-0.0237274169921875,
-0.00946044921875,
-0.0177001953125,
-0.04083251953125,
0.0108489990234375,
-0.031890869140625,
-0.00997161865234375,
-0.057861328125,
0.002780914306640625,
0.0212860107421875,
0.033935546875,
0.052490234375,
-0.034210205078125,
0.030181884765625,
-0.0262298583984375,
-0.06134033203125,
0.0030727386474609375,
0.01453399658203125,
-0.046417236328125,
0.044464111328125,
0.050628662109375,
-0.000023305416107177734,
0.01300048828125,
0.036224365234375,
-0.01300048828125,
0.026123046875,
-0.018829345703125,
0.0089263916015625,
0.00687408447265625,
-0.046844482421875,
0.004245758056640625,
0.0036411285400390625,
-0.040252685546875,
0.0290069580078125,
0.045074462890625,
-0.0018701553344726562,
-0.01447296142578125,
-0.0171356201171875,
-0.01030731201171875,
-0.0165863037109375,
-0.022979736328125,
0.0284271240234375,
0.01114654541015625,
-0.0099639892578125,
0.0287933349609375,
0.0024890899658203125,
0.0241546630859375,
-0.01035308837890625,
0.0083770751953125,
0.0162353515625,
0.00907135009765625,
-0.0013446807861328125,
0.02685546875,
-0.0152587890625,
0.058868408203125,
-0.00807952880859375,
-0.07330322265625,
0.005870819091796875,
-0.0277862548828125,
-0.0185394287109375,
-0.050750732421875,
-0.048492431640625,
0.03173828125,
-0.0020847320556640625,
-0.01099395751953125,
-0.0017232894897460938,
-0.0303955078125,
-0.00724029541015625,
-0.0176544189453125,
-0.012603759765625,
0.02301025390625,
-0.004695892333984375,
0.031219482421875,
-0.00794219970703125,
0.02587890625,
0.0164794921875,
-0.00197601318359375,
0.0088348388671875,
-0.0205841064453125,
-0.04974365234375,
0.028778076171875,
0.0167999267578125,
-0.03289794921875,
-0.0216064453125,
-0.03216552734375,
0.010772705078125,
-0.03167724609375,
0.037078857421875,
-0.01021575927734375,
0.003864288330078125,
0.029327392578125,
-0.001697540283203125,
0.0082855224609375,
0.04180908203125,
-0.03521728515625,
0.0176239013671875,
-0.00031113624572753906,
-0.02142333984375,
-0.03314208984375,
-0.005397796630859375,
-0.0177764892578125,
-0.0011606216430664062,
-0.0175018310546875,
-0.02935791015625,
-0.00559234619140625,
0.0426025390625,
-0.0279083251953125,
0.005481719970703125,
-0.00928497314453125,
0.0021076202392578125,
0.003192901611328125,
0.041168212890625,
0.03228759765625,
0.0169219970703125,
-0.04913330078125,
0.00688934326171875,
-0.03240966796875,
0.0006170272827148438,
-0.00946044921875,
0.024261474609375,
-0.01468658447265625,
0.0177001953125,
-0.00804901123046875,
-0.043212890625,
-0.0008144378662109375,
0.035125732421875,
0.032135009765625,
0.00830078125,
-0.0182342529296875,
0.0005292892456054688,
0.026031494140625,
0.0183258056640625,
-0.0056610107421875,
0.00992584228515625,
0.03570556640625,
0.07379150390625,
-0.0014429092407226562,
-0.00601959228515625,
0.0406494140625,
-0.0487060546875,
0.016326904296875,
0.0296783447265625,
0.0312347412109375,
0.0361328125,
-0.0135040283203125,
-0.0223846435546875,
0.08453369140625,
0.0186767578125,
0.0279083251953125,
-0.02734375,
0.0125885009765625,
0.058807373046875,
0.0177459716796875,
0.043792724609375,
0.0012073516845703125,
0.0374755859375,
0.0129547119140625,
0.02691650390625,
0.00270843505859375,
0.019775390625,
-0.00400543212890625,
0.0126953125,
-0.004047393798828125,
-0.0513916015625,
-0.01343536376953125,
-0.025543212890625,
-0.0006184577941894531,
0.0237884521484375,
0.00807952880859375,
0.0023517608642578125,
-0.047271728515625,
0.015106201171875,
0.036163330078125,
0.036163330078125,
-0.0043182373046875,
0.01268768310546875,
0.0295562744140625,
-0.062286376953125,
-0.01448822021484375,
-0.003154754638671875,
-0.02081298828125,
-0.027679443359375,
0.0162353515625,
0.049102783203125,
0.018829345703125,
-0.00876617431640625,
-0.017730712890625,
-0.04193115234375,
0.0165252685546875,
0.055572509765625,
-0.0950927734375,
-0.0186614990234375,
-0.007030487060546875,
0.080322265625,
-0.013824462890625,
-0.013427734375,
-0.04034423828125,
0.0496826171875,
-0.021697998046875,
-0.0033397674560546875,
0.01116943359375,
-0.016448974609375,
-0.0100555419921875,
0.038604736328125,
0.0214385986328125,
-0.0238800048828125,
-0.0150146484375,
0.0268707275390625,
0.0026721954345703125,
-0.031890869140625,
-0.02508544921875,
0.0016651153564453125,
-0.096923828125,
-0.03204345703125,
0.0301513671875,
0.08148193359375,
-0.00862884521484375,
-0.0458984375,
0.00983428955078125,
0.05767822265625,
-0.059173583984375,
-0.059967041015625,
0.0190582275390625,
-0.06597900390625,
-0.01468658447265625,
-0.013397216796875,
-0.047393798828125,
0.0099639892578125,
0.0022907257080078125,
0.01029205322265625,
-0.03802490234375,
0.004688262939453125,
-0.043670654296875,
-0.01349639892578125,
-0.037872314453125,
0.022003173828125,
-0.003448486328125,
0.02294921875,
0.01163482666015625,
0.03521728515625,
0.033538818359375,
-0.036529541015625,
0.0301666259765625,
0.04412841796875,
-0.0208587646484375,
0.045928955078125,
-0.00998687744140625,
-0.044677734375,
0.0093536376953125,
-0.0197601318359375,
0.0187835693359375,
0.00531768798828125,
0.0205841064453125,
0.00943756103515625,
-0.0190582275390625,
0.0305023193359375,
0.031585693359375,
-0.0217437744140625,
-0.0006794929504394531,
0.040374755859375,
0.0205078125,
-0.0195159912109375,
-0.01226043701171875,
-0.00908660888671875,
-0.019805908203125,
0.003246307373046875,
0.01244354248046875,
-0.017425537109375,
-0.05596923828125,
0.0294036865234375,
-0.0253448486328125,
-0.007724761962890625,
0.0012750625610351562,
-0.0230712890625,
0.019256591796875,
0.0012826919555664062,
-0.028167724609375,
0.0155181884765625,
0.0296478271484375,
-0.01513671875,
0.00835418701171875,
0.0174560546875,
0.0193939208984375,
0.03314208984375,
-0.037506103515625,
0.0016937255859375,
-0.072998046875,
0.04217529296875,
-0.057861328125,
0.0258026123046875,
-0.0609130859375,
-0.0347900390625,
-0.01293182373046875,
0.1080322265625,
-0.05181884765625,
0.0179901123046875,
-0.026824951171875,
-0.01412200927734375,
0.0016765594482421875,
-0.0296630859375,
-0.0968017578125,
-0.00876617431640625,
-0.08154296875,
-0.0117645263671875,
-0.0177154541015625,
-0.034393310546875,
-0.0172576904296875,
0.0304718017578125,
-0.061004638671875,
-0.0221405029296875,
0.026153564453125,
-0.070556640625,
0.0021076202392578125,
0.05401611328125,
-0.0151519775390625,
0.02362060546875,
-0.021240234375,
-0.03436279296875,
-0.055328369140625,
-0.0079498291015625,
0.03546142578125,
-0.005458831787109375,
-0.026763916015625,
-0.04766845703125,
0.017242431640625,
0.053436279296875,
-0.006610870361328125,
-0.0155792236328125,
-0.005615234375,
0.020416259765625,
-0.004680633544921875,
-0.0008115768432617188,
-0.0264892578125,
-0.0243682861328125,
-0.0026302337646484375,
-0.027618408203125,
-0.0215911865234375,
0.015716552734375,
-0.0283355712890625,
0.046875,
-0.006622314453125,
-0.0180206298828125,
-0.03680419921875,
-0.0184326171875,
0.01611328125,
0.00878143310546875,
-0.00579071044921875,
0.02093505859375,
-0.0161590576171875,
-0.0311279296875,
0.012481689453125,
0.045440673828125,
-0.0262908935546875,
-0.0016107559204101562,
0.05511474609375,
0.0263214111328125,
-0.02288818359375,
-0.0216522216796875,
0.0004954338073730469,
0.02178955078125,
-0.03277587890625,
0.018951416015625,
0.005580902099609375,
-0.00696563720703125,
0.036376953125,
-0.020111083984375,
-0.0162811279296875,
0.0240325927734375,
-0.0254058837890625,
0.01299285888671875,
-0.0193328857421875,
-0.0002582073211669922,
-0.0099639892578125,
0.04949951171875,
0.033538818359375,
-0.007724761962890625,
-0.06494140625,
0.011962890625,
0.0767822265625,
-0.0281524658203125,
0.0538330078125,
-0.03466796875,
-0.06134033203125,
0.03961181640625,
-0.040771484375,
-0.008270263671875,
0.018585205078125,
-0.0162811279296875,
0.0292510986328125,
-0.0137176513671875,
0.0233154296875,
-0.0008006095886230469,
0.0071258544921875,
0.002941131591796875,
0.0394287109375,
-0.0105133056640625,
0.030853271484375,
-0.00685882568359375,
-0.004001617431640625,
0.047943115234375,
-0.00563812255859375,
-0.0489501953125,
0.015777587890625,
-0.0357666015625,
-0.0005106925964355469,
0.033111572265625,
-0.022918701171875,
0.0209503173828125,
0.0413818359375,
0.028411865234375,
0.03643798828125,
-0.0462646484375,
0.03546142578125,
0.0026378631591796875,
-0.0025043487548828125,
-0.00637054443359375,
-0.005886077880859375,
-0.03717041015625,
0.09173583984375,
-0.026458740234375,
0.040252685546875,
-0.0182647705078125,
-0.0223388671875,
-0.0191497802734375,
0.05560302734375,
0.03668212890625,
-0.0491943359375,
0.0021514892578125,
0.04248046875,
0.021697998046875,
-0.0304718017578125,
-0.0286102294921875,
-0.006988525390625,
0.03857421875,
-0.02984619140625,
0.003108978271484375,
0.035797119140625,
0.0017423629760742188,
-0.029205322265625,
0.0191650390625,
0.01383209228515625,
0.00562286376953125,
-0.03143310546875,
-0.0187530517578125,
0.0121612548828125,
0.0181884765625,
-0.01285552978515625,
0.023223876953125,
-0.0172882080078125,
0.010589599609375,
-0.0209197998046875,
-0.0162200927734375,
-0.0218505859375,
-0.00362396240234375,
-0.019256591796875,
-0.0146484375,
0.0133056640625,
-0.0213470458984375,
-0.0291748046875,
0.00140380859375,
-0.0274200439453125,
0.0283050537109375,
-0.029510498046875,
0.042022705078125,
-0.027374267578125,
0.00035500526428222656,
-0.054046630859375,
0.034393310546875,
0.028961181640625,
0.04290771484375,
-0.03436279296875,
0.040863037109375,
-0.09521484375,
-0.0026645660400390625,
-0.0168609619140625,
-0.0513916015625,
-0.0301361083984375,
-0.00998687744140625,
-0.0193634033203125,
-0.007289886474609375,
0.0021381378173828125,
0.01331329345703125,
0.006237030029296875,
0.01085662841796875,
-0.0203704833984375,
-0.045501708984375,
0.0126190185546875,
0.03643798828125,
-0.0083770751953125,
0.06884765625,
0.0063629150390625,
0.006618499755859375,
-0.0244598388671875,
-0.00969696044921875,
-0.0010061264038085938,
-0.0777587890625,
-0.0310211181640625,
0.01971435546875,
-0.029571533203125,
0.027923583984375,
-0.004817962646484375,
-0.0150604248046875,
0.0312347412109375,
0.01358795166015625,
0.0208282470703125,
-0.002964019775390625,
-0.060455322265625,
0.0076751708984375,
-0.0275115966796875,
0.040313720703125,
-0.04071044921875,
0.01366424560546875,
0.00974273681640625,
-0.0167388916015625,
0.049346923828125,
-0.02325439453125,
0.0223846435546875,
0.0472412109375,
0.00249481201171875,
-0.00424957275390625,
0.0079345703125,
0.0181427001953125,
0.0064239501953125,
-0.0200653076171875,
0.0180816650390625,
-0.0026092529296875,
0.0282440185546875,
0.03778076171875,
-0.049774169921875,
0.051513671875,
0.0044708251953125,
-0.018157958984375,
0.00458526611328125,
-0.04669189453125,
-0.01004791259765625,
-0.0197906494140625,
0.02630615234375,
-0.0035839080810546875,
0.013092041015625,
0.01995849609375,
-0.00960540771484375,
-0.00995635986328125,
0.030853271484375,
-0.0350341796875,
-0.033447265625,
0.0206756591796875,
-0.04901123046875,
-0.01358795166015625,
0.01030731201171875,
-0.0165557861328125,
0.0195770263671875,
-0.0254364013671875,
0.0338134765625,
-0.01318359375,
-0.0679931640625,
-0.0176239013671875,
0.031494140625,
-0.0138397216796875,
-0.0269012451171875,
-0.0174713134765625,
-0.00415802001953125,
-0.01265716552734375,
-0.059539794921875,
-0.0107269287109375,
-0.0357666015625,
-0.0044403076171875,
0.022979736328125,
-0.0335693359375,
-0.00023221969604492188,
0.056060791015625,
-0.03692626953125,
0.020965576171875,
0.02886962890625,
-0.06109619140625,
0.0027103424072265625,
0.00861358642578125,
-0.02203369140625,
0.00962066650390625,
-0.0107574462890625,
0.005126953125,
-0.05072021484375,
0.017242431640625,
-0.0303497314453125,
-0.04095458984375,
0.0816650390625,
0.0074462890625,
-0.03277587890625,
0.0218353271484375,
0.05908203125,
-0.0262298583984375,
0.0020294189453125,
0.037017822265625,
-0.043212890625,
-0.0008416175842285156,
0.0186767578125,
0.0038909912109375,
-0.004390716552734375,
-0.00540924072265625,
-0.0665283203125,
0.04388427734375,
-0.024505615234375,
0.033172607421875,
-0.0004820823669433594,
0.01125335693359375,
-0.0012598037719726562,
-0.0040283203125,
-0.03680419921875,
0.06524658203125,
-0.007015228271484375,
0.052764892578125,
-0.08880615234375,
-0.0239105224609375,
-0.00395965576171875,
0.054168701171875,
0.02911376953125,
-0.0169677734375,
-0.0011501312255859375,
0.020965576171875,
0.09527587890625,
0.06744384765625,
0.0325927734375,
0.0024623870849609375,
0.0293426513671875,
-0.0012464523315429688,
0.0199127197265625,
0.01395416259765625,
0.029998779296875,
-0.025634765625,
-0.00714874267578125,
0.055999755859375,
0.0197601318359375,
0.00893402099609375,
-0.031951904296875,
-0.0016736984252929688,
-0.05169677734375,
-0.034698486328125,
0.0294952392578125,
-0.007129669189453125,
0.031341552734375,
0.0616455078125,
0.078125,
-0.038360595703125,
-0.029327392578125,
-0.0308990478515625,
0.06622314453125,
0.0003676414489746094,
0.03643798828125,
0.0670166015625,
0.024322509765625,
0.072509765625,
-0.0305328369140625,
0.023162841796875,
-0.03448486328125,
-0.019805908203125,
0.0187835693359375,
0.014068603515625,
0.006572723388671875,
-0.04522705078125,
0.0076446533203125,
0.048431396484375,
0.032684326171875,
-0.03338623046875,
-0.037109375,
0.017120361328125,
0.00817108154296875,
0.037139892578125,
-0.0142669677734375,
0.0311279296875,
0.038330078125,
0.06060791015625,
-0.042144775390625,
-0.0162506103515625,
0.0298614501953125,
0.048583984375,
-0.005199432373046875,
-0.0147705078125,
-0.031768798828125,
-0.045257568359375,
-0.0255584716796875,
0.028839111328125,
0.0244903564453125,
0.0272064208984375,
-0.01003265380859375,
0.04119873046875,
-0.01092529296875,
0.0160064697265625,
-0.01190185546875,
0.03228759765625,
-0.01580810546875,
0.02099609375,
-0.00429534912109375,
0.0029506683349609375,
-0.0306854248046875,
0.0128631591796875,
0.021728515625,
-0.0082244873046875,
0.0462646484375,
0.055572509765625,
-0.03192138671875,
-0.01934814453125,
0.040557861328125,
-0.0125579833984375,
-0.00707244873046875,
0.01001739501953125,
0.006603240966796875,
0.039947509765625,
-0.0055694580078125,
-0.0025787353515625,
0.054595947265625,
0.0233154296875,
-0.035858154296875,
0.1134033203125,
-0.015380859375,
0.0416259765625,
0.008941650390625,
-0.020050048828125,
-0.0135345458984375,
-0.0142974853515625,
-0.035858154296875,
-0.0048370361328125,
-0.04931640625,
-0.045989990234375,
0.031768798828125,
0.0404052734375,
0.01290130615234375,
0.005115509033203125,
0.0269012451171875,
-0.0364990234375,
0.03302001953125,
0.018585205078125,
0.01213836669921875,
0.0312042236328125,
0.0088958740234375,
0.0030384063720703125,
-0.031646728515625,
-0.01514434814453125,
0.00421905517578125,
0.0185699462890625,
0.0030231475830078125,
0.0205841064453125,
0.003986358642578125,
0.03167724609375,
-0.020477294921875,
-0.007320404052734375,
-0.032806396484375,
-0.0457763671875,
0.07183837890625,
-0.0263824462890625,
-0.038909912109375,
-0.006710052490234375,
-0.00933074951171875,
0.01235198974609375,
0.042388916015625,
-0.0257415771484375,
-0.0064544677734375,
-0.0164031982421875,
0.0194244384765625,
-0.011566162109375,
0.0789794921875,
0.0017766952514648438,
-0.0135040283203125,
-0.0251617431640625,
-0.01959228515625,
0.04046630859375,
0.049591064453125,
-0.006999969482421875,
0.0014333724975585938,
0.0308074951171875,
-0.0189056396484375,
0.031982421875,
0.00846099853515625,
0.047393798828125,
0.030853271484375,
0.0047454833984375,
0.00528717041015625,
0.0191192626953125,
-0.00650787353515625,
0.02471923828125,
0.015625,
-0.007099151611328125,
0.035552978515625,
-0.025909423828125,
0.01172637939453125,
-0.0189971923828125,
0.058319091796875,
0.027435302734375,
0.0108795166015625,
-0.0292205810546875,
0.017547607421875,
-0.05853271484375,
-0.0025539398193359375,
-0.06011962890625,
-0.025909423828125,
0.04486083984375,
0.0247344970703125,
0.04730224609375,
0.040557861328125,
-0.03472900390625,
-0.0222930908203125,
0.030029296875,
-0.029541015625,
0.03253173828125,
-0.0299072265625,
-0.0374755859375,
-0.0081634521484375,
-0.01207733154296875,
-0.04998779296875,
0.0118255615234375,
0.01284027099609375,
-0.04168701171875,
0.005107879638671875,
-0.0306854248046875,
-0.01470184326171875,
-0.02288818359375,
0.0010585784912109375,
0.0033016204833984375,
-0.01503753662109375,
-0.0150299072265625,
0.0174713134765625,
0.00582122802734375,
0.047119140625,
0.0305633544921875,
-0.004337310791015625,
0.035125732421875,
0.006317138671875,
-0.080078125,
-0.06842041015625,
0.05303955078125,
-0.059539794921875,
-0.0217742919921875,
0.035308837890625,
0.005832672119140625,
0.04412841796875,
-0.00919342041015625,
-0.047698974609375,
0.00792694091796875,
0.00792694091796875,
-0.044158935546875,
-0.0384521484375,
-0.0204010009765625,
0.01108551025390625,
-0.0128173828125,
-0.00879669189453125,
-0.00604248046875,
-0.057098388671875,
0.02935791015625,
0.00766754150390625,
0.043426513671875,
0.01110076904296875,
0.020599365234375,
-0.005855560302734375,
0.0238037109375,
0.00885772705078125,
-0.01033782958984375,
-0.0213623046875,
0.000032782554626464844,
-0.0017681121826171875,
0.0235443115234375,
-0.01751708984375,
-0.02606201171875,
0.022216796875,
0.0012178421020507812,
0.003147125244140625,
-0.068359375,
-0.02886962890625,
-0.02972412109375,
0.0235748291015625,
0.019439697265625,
0.005153656005859375,
-0.009307861328125,
-0.00159454345703125,
0.0214691162109375,
-0.009674072265625,
0.010345458984375,
0.01316070556640625,
-0.027557373046875,
-0.0119781494140625,
-0.01788330078125,
-0.01959228515625,
0.027130126953125,
-0.02252197265625,
-0.03314208984375,
0.00009435415267944336,
-0.027313232421875,
-0.0170135498046875,
-0.0172576904296875,
0.00531768798828125,
0.00220489501953125,
-0.0276336669921875,
-0.041015625,
-0.020721435546875,
0.0091094970703125,
-0.0301666259765625,
-0.03271484375,
-0.036712646484375,
0.01007080078125,
0.0127105712890625,
0.004016876220703125,
0.00865936279296875,
0.037017822265625,
0.02606201171875,
0.031890869140625,
-0.04888916015625,
0.0127716064453125,
0.0300445556640625,
-0.01666259765625,
-0.04547119140625,
0.056793212890625,
0.047210693359375,
0.07086181640625,
0.000007092952728271484,
0.040313720703125,
0.00946807861328125,
0.042388916015625,
-0.024566650390625,
-0.037200927734375,
0.00608062744140625,
-0.03839111328125,
0.0019483566284179688,
0.00035262107849121094,
-0.00676727294921875,
-0.00336456298828125,
-0.0038013458251953125,
0.022064208984375,
-0.0176239013671875,
0.01186370849609375
]
|
248c44ad1f397fae894c3081f3e155154bab9fa0 | Wordpress Stackexchange
Q: wp_insert_user role not working I have be trying this all day but it is not working how do I set a role for the current user I am inserting with the wp_insert_user() function
$userdata = array(
'user_login' => $username,
'user_email' => $email,
'user_pass' => $password,
'user_url' => $website,
'first_name' => $first_name,
'last_name' => $last_name,
'nickname' => $nickname,
'description' => $bio,
'role' => 'Editor'
);
$user = wp_insert_user( $userdata );
A: $WP_array = array (
'user_login' => $username,
'user_email' => $email,
'user_pass' => $password,
'user_url' => $website,
'first_name' => $first_name,
'last_name' => $last_name,
'nickname' => $nickname,
'description' => $bio,
) ;
$id = wp_insert_user( $WP_array ) ;
wp_update_user( array ('ID' => $id, 'role' => 'editor') ) ;
Since you are looking for working solutions, this one should work, and it is only the helpful answer candidate. I am ware that this may not be the best solution, maybe not even close, but it should work.
| Q: wp_insert_user role not working I have be trying this all day but it is not working how do I set a role for the current user I am inserting with the wp_insert_user() function
$userdata = array(
'user_login' => $username,
'user_email' => $email,
'user_pass' => $password,
'user_url' => $website,
'first_name' => $first_name,
'last_name' => $last_name,
'nickname' => $nickname,
'description' => $bio,
'role' => 'Editor'
);
$user = wp_insert_user( $userdata );
A: $WP_array = array (
'user_login' => $username,
'user_email' => $email,
'user_pass' => $password,
'user_url' => $website,
'first_name' => $first_name,
'last_name' => $last_name,
'nickname' => $nickname,
'description' => $bio,
) ;
$id = wp_insert_user( $WP_array ) ;
wp_update_user( array ('ID' => $id, 'role' => 'editor') ) ;
Since you are looking for working solutions, this one should work, and it is only the helpful answer candidate. I am ware that this may not be the best solution, maybe not even close, but it should work.
A: After digging deeper, and checking on my end, I found this script will work just fine.
$userdata = array(
'user_login' => $username,
'user_email' => $email,
'user_pass' => $password,
'user_url' => $website,
'first_name' => $first_name,
'last_name' => $last_name,
'nickname' => $nickname,
'description' => $bio,
'role' => 'editor'
);
$user = wp_insert_user( $userdata );
Yet, there isn't anything mysterious in this script. Looks like the roles need to use lowercase, and you need to blame this function, that I found after days of analysis.
/wp-includes/class-wp-roles.php
284: /**
285: * Whether role name is currently in the list of available roles.
286: *
287: * @since 2.0.0
288: * @access public
289: *
290: * @param string $role Role name to look up.
291: * @return bool
292: */
293: public function is_role( $role ) {
You can check for your self if you write code like this in functions.php.
$r = new WP_Roles();
var_dump("editor", $r->is_role("editor"));
var_dump("Editor", $r->is_role("Editor"));
die();
You will get the end result like this.
string(6) "editor" bool(true) string(6) "Editor" bool(false)
This means the editor for the role name is OK and the Editor is not OK.
We must make a note that if you set an empty role like this 'role' => "" this will result in setting no roles at all (like @TheBeast experienced at the first place with Editor name where at the end no role has been set).
On the other hand if you would omit 'role' key then your user will take the default role. The default role is usually the editor, but it is up to you to customize since that info you can get via get_option('default_role'), end set via set_option function.
In the past I found indications that the code from @TheBeast would actually work. (https://wordpress.org/support/topic/wp_insert_user-function-user-roles?replies=3)
What is actually important for us is a process of adding roles. You can write like:
add_action( 'init', 'plugin_add_role');
function plugin_add_role( 'reviewer', 'Reviewer', $caps );
In here your $caps capabilities are something like:
$caps = array(
'read' => true,
'edit_posts' => true,
'edit_others_posts' => true,
'edit_private_posts' => true,
'edit_published_posts' => true,
'read_private_posts' => true,
'edit_pages' => true,
'edit_others_pages' => true,
'edit_private_pages' => true,
'edit_published_pages' => true,
'read_private_pages' => true,
);
You can read more about capabilities in the codex https://codex.wordpress.org/Roles_and_Capabilities.
A: just user lower case & in two words roles using underline instead of space
'role' => 'Editor' -------> 'role' => 'editor'
'role' => 'Shop manager' -------> 'role' => 'shop_manager'
| wordpress | {
"language": "en",
"length": 558,
"provenance": "stackexchange_00019.jsonl.gz:464799",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/224091"
} | [
0.06158447265625,
-0.0212554931640625,
-0.0087127685546875,
-0.01593017578125,
0.00481414794921875,
-0.048065185546875,
0.0660400390625,
-0.00638580322265625,
0.0201873779296875,
0.03277587890625,
0.00020551681518554688,
-0.02471923828125,
0.002689361572265625,
-0.03424072265625,
-0.02685546875,
-0.00605010986328125,
-0.0200958251953125,
0.00823211669921875,
-0.030609130859375,
-0.0266876220703125,
0.0023403167724609375,
-0.042205810546875,
-0.01331329345703125,
-0.01555633544921875,
-0.000823974609375,
0.0345458984375,
0.0256500244140625,
-0.0206451416015625,
0.005859375,
0.005863189697265625,
0.01154327392578125,
-0.0289764404296875,
-0.0019273757934570312,
0.0238494873046875,
-0.00040268898010253906,
0.002956390380859375,
0.035614013671875,
-0.00307464599609375,
0.032073974609375,
0.0164642333984375,
0.01477813720703125,
0.02313232421875,
-0.00042700767517089844,
0.032501220703125,
-0.0171661376953125,
-0.0950927734375,
0.04718017578125,
-0.01230621337890625,
0.01261138916015625,
-0.02099609375,
0.032440185546875,
0.027374267578125,
0.05859375,
-0.0159149169921875,
-0.005550384521484375,
0.0251312255859375,
-0.0008301734924316406,
0.0231170654296875,
0.035247802734375,
-0.012115478515625,
-0.02960205078125,
-0.006500244140625,
0.01468658447265625,
-0.0106353759765625,
0.0218048095703125,
-0.004566192626953125,
0.06072998046875,
0.0438232421875,
-0.05670166015625,
-0.0175323486328125,
0.00774383544921875,
-0.013824462890625,
-0.01541900634765625,
-0.01549530029296875,
-0.0171356201171875,
0.0274505615234375,
0.0242767333984375,
0.00739288330078125,
-0.006877899169921875,
0.0159454345703125,
-0.0099334716796875,
-0.0136260986328125,
-0.025909423828125,
-0.01513671875,
0.006481170654296875,
-0.0012149810791015625,
-0.01479339599609375,
0.00010371208190917969,
-0.019683837890625,
0.0184326171875,
-0.0165557861328125,
-0.01158905029296875,
0.012542724609375,
0.01371002197265625,
-0.026763916015625,
0.00212860107421875,
0.021240234375,
0.050994873046875,
-0.0085296630859375,
0.0103607177734375,
-0.0262298583984375,
-0.027923583984375,
0.00846099853515625,
-0.03570556640625,
0.01160430908203125,
0.043182373046875,
-0.004383087158203125,
-0.03985595703125,
-0.01190185546875,
0.00811004638671875,
-0.00677490234375,
-0.036041259765625,
0.01229095458984375,
-0.0253448486328125,
-0.0003044605255126953,
0.006744384765625,
-0.01502227783203125,
0.031463623046875,
0.00421905517578125,
0.01171875,
-0.015899658203125,
0.02484130859375,
-0.01117706298828125,
-0.031097412109375,
-0.01012420654296875,
-0.0225067138671875,
-0.01050567626953125,
-0.016754150390625,
-0.024383544921875,
-0.0190582275390625,
-0.042510986328125,
0.04290771484375,
0.1549072265625,
0.0482177734375,
0.0282440185546875,
-0.0135955810546875,
0.032470703125,
-0.025787353515625,
-0.006313323974609375,
0.0301666259765625,
-0.031341552734375,
-0.0236053466796875,
0.0124359130859375,
-0.0278472900390625,
0.00936126708984375,
0.0267333984375,
0.025238037109375,
0.019866943359375,
0.0187225341796875,
-0.0360107421875,
-0.0198974609375,
-0.0012826919555664062,
-0.03729248046875,
0.0198516845703125,
0.07391357421875,
-0.01294708251953125,
0.017852783203125,
-0.0189361572265625,
0.064453125,
0.0269622802734375,
0.0200042724609375,
0.009002685546875,
0.048553466796875,
-0.03485107421875,
-0.043670654296875,
-0.0093231201171875,
-0.0877685546875,
-0.01367950439453125,
0.032073974609375,
0.005588531494140625,
0.0173187255859375,
0.00514984130859375,
0.019073486328125,
0.01629638671875,
0.0022869110107421875,
0.00904083251953125,
0.004058837890625,
0.0120849609375,
0.001094818115234375,
0.0079498291015625,
-0.02215576171875,
-0.0303955078125,
0.0079193115234375,
-0.006649017333984375,
-0.0018587112426757812,
-0.0084381103515625,
0.004474639892578125,
0.0008959770202636719,
0.015777587890625,
0.0257110595703125,
-0.0258941650390625,
0.031829833984375,
-0.0177001953125,
-0.0158843994140625,
-0.0053253173828125,
-0.0273284912109375,
0.0029239654541015625,
-0.00586700439453125,
-0.019134521484375,
0.032012939453125,
0.048370361328125,
-0.0167236328125,
0.028594970703125,
-0.0433349609375,
-0.0904541015625,
0.00403594970703125,
-0.03466796875,
0.0390625,
0.0225982666015625,
-0.0000010728836059570312,
0.0093231201171875,
-0.006473541259765625,
-0.00342559814453125,
-0.06463623046875,
-0.052459716796875,
0.01488494873046875,
-0.02935791015625,
0.0305938720703125,
-0.0239105224609375,
0.0732421875,
-0.04046630859375,
-0.03497314453125,
-0.03253173828125,
-0.03033447265625,
0.030731201171875,
-0.031829833984375,
-0.0014476776123046875,
-0.0301971435546875,
0.040130615234375,
-0.011322021484375,
0.040740966796875,
0.007274627685546875,
0.0362548828125,
-0.00792694091796875,
-0.044708251953125,
0.011138916015625,
-0.0137176513671875,
-0.044189453125,
-0.0198516845703125,
0.06585693359375,
0.03759765625,
0.018707275390625,
0.004913330078125,
0.00608062744140625,
0.0147857666015625,
-0.05731201171875,
0.0269927978515625,
-0.023895263671875,
0.0248260498046875,
0.07916259765625,
-0.004932403564453125,
0.0018215179443359375,
-0.01009368896484375,
-0.07318115234375,
-0.01222991943359375,
0.05029296875,
-0.041412353515625,
0.0292510986328125,
-0.0107879638671875,
-0.0321044921875,
-0.0169219970703125,
-0.0662841796875,
0.033843994140625,
-0.06317138671875,
-0.009368896484375,
0.00612640380859375,
0.01229095458984375,
0.0026798248291015625,
-0.01438140869140625,
-0.01537322998046875,
0.0113983154296875,
-0.004276275634765625,
0.00614166259765625,
0.021087646484375,
-0.00107574462890625,
0.00986480712890625,
-0.033721923828125,
-0.003948211669921875,
0.0168609619140625,
0.0224761962890625,
-0.004276275634765625,
0.018524169921875,
0.03204345703125,
-0.006015777587890625,
0.01073455810546875,
-0.002178192138671875,
0.032806396484375,
-0.0003178119659423828,
0.0297088623046875,
-0.03375244140625,
0.0202789306640625,
-0.0030364990234375,
-0.041717529296875,
0.07373046875,
-0.0127105712890625,
-0.039459228515625,
0.0162506103515625,
-0.0298614501953125,
0.01480865478515625,
-0.0188751220703125,
0.01212310791015625,
0.041748046875,
0.0113525390625,
-0.0269775390625,
-0.0003521442413330078,
-0.03521728515625,
-0.0279541015625,
0.0290069580078125,
-0.0017862319946289062,
-0.042236328125,
-0.004329681396484375,
0.06402587890625,
0.0189971923828125,
0.0122222900390625,
0.01081085205078125,
-0.0276031494140625,
-0.004199981689453125,
0.01291656494140625,
-0.032257080078125,
-0.033721923828125,
-0.0020046234130859375,
-0.08935546875,
-0.01097869873046875,
-0.014007568359375,
-0.053466796875,
0.0106048583984375,
0.0280303955078125,
0.00506591796875,
-0.0022602081298828125,
-0.0122222900390625,
-0.0161590576171875,
-0.021728515625,
-0.040435791015625,
0.01544952392578125,
0.003173828125,
0.00855255126953125,
-0.00537109375,
0.050384521484375,
0.006622314453125,
-0.019134521484375,
-0.01248931884765625,
0.01071929931640625,
-0.018768310546875,
-0.0299072265625,
0.0130615234375,
0.0029964447021484375,
-0.00698089599609375,
-0.003414154052734375,
0.038909912109375,
0.0292510986328125,
-0.041168212890625,
0.0007610321044921875,
0.0265960693359375,
-0.03741455078125,
0.03692626953125,
0.0242156982421875,
-0.040679931640625,
0.0234222412109375,
0.0775146484375,
-0.031768798828125,
0.03570556640625,
0.00312042236328125,
-0.0061798095703125,
0.01074981689453125,
-0.0268402099609375,
-0.0273284912109375,
0.017303466796875,
-0.0030117034912109375,
-0.0286407470703125,
0.015167236328125,
-0.0137939453125,
0.0030422210693359375,
-0.0171661376953125,
-0.0017299652099609375,
-0.0266265869140625,
0.041961669921875,
-0.004428863525390625,
-0.019927978515625,
0.00951385498046875,
-0.013427734375,
0.0240020751953125,
-0.01056671142578125,
0.0079803466796875,
-0.035980224609375,
-0.07135009765625,
0.041595458984375,
-0.023193359375,
0.0254058837890625,
-0.05938720703125,
-0.033203125,
-0.01146697998046875,
0.10882568359375,
-0.0020503997802734375,
0.0008230209350585938,
0.0355224609375,
0.0175323486328125,
-0.07318115234375,
-0.00963592529296875,
-0.0863037109375,
0.017303466796875,
0.04229736328125,
-0.01279449462890625,
-0.01471710205078125,
0.026031494140625,
-0.0251312255859375,
0.0233306884765625,
0.01214599609375,
-0.002498626708984375,
0.036224365234375,
-0.06201171875,
0.0113067626953125,
0.0287628173828125,
-0.020538330078125,
0.00949859619140625,
-0.02886962890625,
-0.0295867919921875,
-0.10906982421875,
-0.018646240234375,
-0.0015001296997070312,
0.07171630859375,
0.0001876354217529297,
0.01715087890625,
-0.046661376953125,
0.026580810546875,
0.022674560546875,
0.032745361328125,
0.005687713623046875,
0.0018863677978515625,
0.014373779296875,
-0.0137786865234375,
0.005062103271484375,
-0.007213592529296875,
-0.0209808349609375,
-0.04254150390625,
-0.01026153564453125,
-0.006206512451171875,
-0.04876708984375,
0.004245758056640625,
-0.030059814453125,
-0.0013170242309570312,
-0.05194091796875,
-0.0217742919921875,
0.0247650146484375,
0.032562255859375,
0.0100250244140625,
0.01152801513671875,
-0.01580810546875,
-0.0616455078125,
0.06622314453125,
-0.061492919921875,
0.004352569580078125,
0.00614166259765625,
0.1051025390625,
0.00662994384765625,
0.0019016265869140625,
-0.011077880859375,
0.0139312744140625,
0.04376220703125,
0.0206756591796875,
0.029541015625,
0.0289764404296875,
-0.031890869140625,
0.01056671142578125,
0.0450439453125,
0.014312744140625,
-0.01580810546875,
0.01323699951171875,
0.0151214599609375,
-0.0160980224609375,
0.0194854736328125,
0.0252532958984375,
-0.0110015869140625,
-0.034881591796875,
-0.006855010986328125,
-0.0233612060546875,
0.03302001953125,
0.034454345703125,
-0.0017299652099609375,
0.035125732421875,
-0.0135345458984375,
-0.0576171875,
0.00498199462890625,
-0.0390625,
-0.0036144256591796875,
0.01384735107421875,
-0.00768280029296875,
0.01267242431640625,
0.003078460693359375,
-0.01132965087890625,
-0.00870513916015625,
-0.029388427734375,
0.01271820068359375,
0.0305938720703125,
-0.03173828125,
0.00551605224609375,
-0.009063720703125,
-0.01068115234375,
0.070068359375,
0.0224609375,
-0.052825927734375,
0.02716064453125,
-0.017547607421875,
0.020843505859375,
0.01384735107421875,
0.0263214111328125,
0.0302581787109375,
0.0191802978515625,
-0.002437591552734375,
-0.00475311279296875,
0.01678466796875,
0.0111083984375,
-0.0157928466796875,
0.018707275390625,
0.0005311965942382812,
-0.0092620849609375,
-0.0023593902587890625,
0.037994384765625,
-0.01015472412109375,
0.0261688232421875,
-0.00992584228515625,
0.055419921875,
0.061004638671875,
0.0065155029296875,
0.0066680908203125,
0.0204010009765625,
-0.00450897216796875,
-0.0237579345703125,
0.0116729736328125,
-0.0204010009765625,
0.006641387939453125,
0.02020263671875,
0.03497314453125,
-0.0023632049560546875,
-0.00888824462890625,
-0.0013608932495117188,
-0.03607177734375,
0.0173492431640625,
0.0423583984375,
-0.054443359375,
-0.10784912109375,
-0.007354736328125,
0.063232421875,
0.0282745361328125,
-0.095458984375,
0.01140594482421875,
0.0144195556640625,
-0.0184783935546875,
0.01448822021484375,
0.01263427734375,
0.0031528472900390625,
-0.033172607421875,
-0.03216552734375,
0.002712249755859375,
-0.03253173828125,
-0.0109710693359375,
-0.0083770751953125,
0.0216522216796875,
-0.0281219482421875,
-0.029205322265625,
0.028656005859375,
-0.01303863525390625,
0.0041046142578125,
-0.064453125,
0.03802490234375,
-0.05438232421875,
-0.01319122314453125,
0.054840087890625,
0.013427734375,
-0.0087890625,
-0.00958251953125,
-0.03759765625,
-0.0187225341796875,
0.0081024169921875,
0.0034732818603515625,
-0.0276031494140625,
-0.020233154296875,
0.006626129150390625,
0.0277862548828125,
-0.01267242431640625,
-0.0255126953125,
-0.01134490966796875,
0.02032470703125,
0.0217437744140625,
0.05987548828125,
-0.005889892578125,
0.056854248046875,
0.0016851425170898438,
0.03448486328125,
0.017333984375,
0.0189361572265625,
-0.033172607421875,
-0.01044464111328125,
-0.0032749176025390625,
-0.0079193115234375,
0.01145172119140625,
-0.053497314453125,
0.035400390625,
0.01169586181640625,
0.0675048828125,
0.0027484893798828125,
0.0191497802734375,
-0.01302337646484375,
-0.001186370849609375,
-0.0164337158203125,
0.005184173583984375,
-0.007328033447265625,
-0.024139404296875,
0.0523681640625,
-0.0261383056640625,
-0.006195068359375,
-0.007236480712890625,
0.0352783203125,
-0.014404296875,
-0.022705078125,
-0.01080322265625,
0.00768280029296875,
-0.06353759765625,
0.036285400390625,
0.07940673828125,
0.0101165771484375,
0.06463623046875,
0.0011987686157226562,
0.0178070068359375,
0.043487548828125,
-0.0074920654296875,
-0.0255889892578125,
0.01186370849609375,
0.041015625,
-0.0051727294921875,
-0.00218963623046875,
0.0159454345703125,
-0.01117706298828125,
0.040863037109375,
0.0732421875,
0.0675048828125,
-0.085693359375,
0.0171356201171875,
-0.00856781005859375,
-0.040618896484375,
0.046661376953125,
-0.02685546875,
-0.00821685791015625,
-0.034759521484375,
0.08282470703125,
-0.0205841064453125,
-0.0222930908203125,
0.0276947021484375,
-0.019683837890625,
-0.006298065185546875,
-0.017181396484375,
0.0018157958984375,
0.017822265625,
0.034332275390625,
0.005401611328125,
-0.01146697998046875,
0.0228118896484375,
-0.00811767578125,
0.02532958984375,
-0.00811767578125,
0.01317596435546875,
-0.06048583984375,
-0.005260467529296875,
-0.0164642333984375,
-0.025054931640625,
0.0030193328857421875,
-0.006198883056640625,
0.08843994140625,
0.0386962890625,
0.0205078125,
-0.009490966796875,
0.04083251953125,
-0.0020618438720703125,
-0.024749755859375,
-0.043121337890625,
0.007038116455078125,
0.0088653564453125,
-0.0406494140625,
0.0294036865234375,
-0.015777587890625,
-0.034698486328125,
-0.00003212690353393555,
-0.00524139404296875,
0.05474853515625,
-0.0300445556640625,
-0.01555633544921875,
0.00691986083984375,
0.0162506103515625,
0.017822265625,
0.0011425018310546875,
-0.006328582763671875,
-0.05377197265625,
-0.050933837890625,
-0.004528045654296875,
-0.056182861328125,
0.0117034912109375,
-0.01134490966796875,
-0.0550537109375,
0.1048583984375,
0.006000518798828125,
0.0262298583984375,
0.01157379150390625,
0.03826904296875,
-0.0294036865234375,
0.0031223297119140625,
-0.0268402099609375,
0.0494384765625,
0.0029087066650390625,
0.0048675537109375,
-0.00006151199340820312,
0.017181396484375,
-0.002773284912109375,
0.0033931732177734375,
0.048126220703125,
0.0313720703125,
-0.042236328125,
-0.01306915283203125,
-0.0163421630859375,
-0.00815582275390625,
-0.0173797607421875,
0.0645751953125,
-0.01016998291015625,
-0.0022106170654296875,
0.00007992982864379883,
-0.014617919921875,
0.037567138671875,
-0.0496826171875,
-0.042266845703125,
-0.003932952880859375,
0.0149078369140625,
-0.0005164146423339844,
-0.0231170654296875,
0.0570068359375,
-0.058502197265625,
-0.01029205322265625,
0.052734375,
-0.038330078125,
0.007541656494140625,
0.00922393798828125,
0.058380126953125,
-0.034820556640625,
0.00424957275390625,
-0.0268707275390625,
0.06011962890625,
0.031982421875,
-0.005733489990234375,
0.018341064453125,
0.0236053466796875,
0.0001310110092163086,
-0.00492095947265625,
-0.00894927978515625,
0.01013946533203125,
0.007762908935546875,
0.038116455078125,
0.045928955078125,
0.024993896484375,
-0.0262908935546875,
0.0102691650390625,
0.067626953125,
0.065673828125,
-0.042724609375,
-0.011016845703125,
0.0257415771484375,
0.03448486328125,
0.0010595321655273438,
0.0189361572265625,
0.033477783203125,
-0.037811279296875,
0.01385498046875,
-0.0197601318359375,
0.005954742431640625,
-0.0124664306640625,
-0.0036029815673828125,
-0.0031147003173828125,
0.022186279296875,
-0.00905609130859375,
0.02117919921875,
-0.024505615234375,
0.0015344619750976562,
0.0114593505859375,
-0.00627899169921875,
0.00794219970703125,
0.0174407958984375,
0.049041748046875,
0.01519012451171875,
0.004520416259765625,
0.0209197998046875,
-0.031524658203125,
-0.007511138916015625,
-0.00787353515625,
-0.046295166015625,
-0.0217437744140625,
0.0261993408203125,
-0.00930023193359375,
0.027587890625,
0.004611968994140625,
0.0218048095703125,
0.0017108917236328125,
-0.01355743408203125,
0.005863189697265625,
-0.0277557373046875,
-0.011077880859375,
-0.0110321044921875,
0.0222930908203125,
0.007598876953125,
0.011962890625,
-0.032623291015625,
0.06256103515625,
0.0256195068359375,
-0.00930023193359375,
0.02996826171875,
-0.00984954833984375,
-0.017791748046875,
-0.0005311965942382812,
-0.0146636962890625,
0.037322998046875,
0.00640106201171875,
-0.062255859375,
0.0157470703125,
-0.08612060546875,
-0.06292724609375,
0.043853759765625,
0.036773681640625,
-0.018341064453125,
0.01383209228515625,
-0.0074310302734375,
-0.0296478271484375,
0.041717529296875,
0.0086212158203125,
-0.00476837158203125,
0.0184173583984375,
0.013397216796875,
-0.0209808349609375,
-0.0013446807861328125,
0.005222320556640625,
0.017730712890625,
0.00522613525390625,
0.01097869873046875,
0.048797607421875,
-0.016845703125,
0.0081634521484375,
-0.051727294921875,
0.0161895751953125,
-0.059906005859375,
-0.0379638671875,
0.02679443359375,
0.01296234130859375,
-0.01511383056640625,
0.0011920928955078125,
-0.04400634765625,
0.037139892578125,
0.00830078125,
0.024200439453125,
0.025909423828125,
-0.0287933349609375,
0.0152130126953125,
0.0218048095703125,
0.035980224609375,
-0.0164794921875,
0.0016155242919921875,
-0.061798095703125,
-0.037139892578125,
0.05865478515625,
0.016326904296875,
0.005596160888671875,
0.034637451171875,
-0.032196044921875,
-0.03839111328125,
-0.0142364501953125,
-0.045135498046875,
-0.049346923828125,
0.011260986328125,
0.0275115966796875,
-0.0244293212890625,
0.00634765625,
-0.006145477294921875,
-0.032562255859375,
0.0261077880859375,
-0.0022792816162109375,
0.0181884765625,
-0.07476806640625,
0.04779052734375,
0.056854248046875,
0.0777587890625,
0.01012420654296875,
0.0251007080078125,
0.037078857421875,
-0.0114898681640625,
-0.0027561187744140625,
-0.03271484375,
-0.0203704833984375,
-0.0278778076171875,
-0.007965087890625,
0.0180816650390625,
-0.017730712890625,
-0.057373046875,
-0.09967041015625,
0.002223968505859375,
0.01308441162109375,
-0.001041412353515625,
-0.0540771484375,
0.0173187255859375,
0.0001837015151977539,
0.04229736328125,
-0.03436279296875,
-0.04632568359375,
0.04364013671875,
0.08306884765625,
-0.038177490234375,
0.01953125,
-0.021881103515625,
-0.07440185546875,
-0.039520263671875,
0.005489349365234375,
0.0226593017578125,
0.0179901123046875,
-0.05242919921875,
0.03936767578125,
-0.03857421875,
0.083740234375,
-0.058135986328125,
-0.007781982421875,
-0.0022563934326171875,
0.0159149169921875,
-0.0240936279296875,
-0.056304931640625,
0.01009368896484375,
-0.040435791015625,
-0.0207061767578125,
-0.043670654296875,
0.019866943359375,
0.02166748046875,
-0.0482177734375,
-0.0841064453125,
0.051544189453125,
-0.03955078125,
-0.037841796875,
-0.002124786376953125,
-0.00571441650390625,
-0.005519866943359375,
0.0046539306640625,
0.0037994384765625,
-0.025909423828125,
-0.0195159912109375,
0.01470947265625,
0.0005693435668945312,
-0.00262451171875,
0.01253509521484375,
0.0028533935546875,
-0.04058837890625,
0.004055023193359375,
0.0108642578125,
-0.0253753662109375,
0.035675048828125,
-0.00373077392578125,
0.0257568359375,
0.06256103515625,
-0.00934600830078125,
-0.01904296875,
-0.01995849609375,
-0.070556640625,
-0.042694091796875,
-0.019256591796875,
0.0107269287109375,
0.016387939453125,
0.058258056640625,
0.060821533203125,
-0.0002505779266357422,
-0.0399169921875,
-0.006107330322265625,
-0.044097900390625,
-0.04901123046875,
0.004169464111328125,
0.0103607177734375,
-0.034423828125,
0.01476287841796875,
0.0010137557983398438,
-0.0183258056640625,
0.0027923583984375,
-0.0164337158203125,
-0.01454925537109375,
-0.00463104248046875,
0.00800323486328125,
-0.00836181640625,
0.01611328125,
0.0256805419921875,
0.064208984375,
-0.0462646484375,
-0.01308441162109375,
0.0005273818969726562,
-0.002227783203125,
0.0087890625,
-0.017852783203125,
-0.01413726806640625,
0.017059326171875,
-0.057159423828125,
-0.0111083984375,
-0.006519317626953125,
0.0254974365234375,
-0.02117919921875,
-0.00853729248046875,
0.01007843017578125,
0.01436614990234375,
-0.0265960693359375,
-0.00678253173828125,
0.0200042724609375,
0.0693359375,
-0.00302886962890625,
0.07421875,
-0.0182037353515625,
-0.017791748046875,
-0.0312347412109375,
0.027923583984375,
-0.00841522216796875,
-0.0019521713256835938,
0.0222625732421875,
-0.01444244384765625,
0.0191192626953125,
0.02972412109375,
0.03070068359375,
0.0028705596923828125,
-0.004558563232421875,
-0.0085601806640625,
0.00711822509765625,
-0.00485992431640625
]
|
0dc0f2aaa553a5805047450db58fb8f1850287a4 | Wordpress Stackexchange
Q: How to Merge Two Authors Into One? I have several posts in my WordPress site. Some posts belong to Author1 while others belong to Author2. Is there a way (plugin?) to merge the authors (For e.g. merge Author1 into Author2) and have all posts with one author name?
Edit: With "merge", the meaning is to be read as "Remove one author, assign all posts to another".
A: Yes, this is a good question and the answer is basic Wordpress 101 (core), contrary to the two comments above. No plugin necessary. You simply go to Users and delete the author (user) that you don't want to keep. Wordpress then asks you if you want to delete their content or attribute it to another user. Choose the author (user) you wish to keep and it will attribute all their posts across. Users/authors merged.
| Q: How to Merge Two Authors Into One? I have several posts in my WordPress site. Some posts belong to Author1 while others belong to Author2. Is there a way (plugin?) to merge the authors (For e.g. merge Author1 into Author2) and have all posts with one author name?
Edit: With "merge", the meaning is to be read as "Remove one author, assign all posts to another".
A: Yes, this is a good question and the answer is basic Wordpress 101 (core), contrary to the two comments above. No plugin necessary. You simply go to Users and delete the author (user) that you don't want to keep. Wordpress then asks you if you want to delete their content or attribute it to another user. Choose the author (user) you wish to keep and it will attribute all their posts across. Users/authors merged.
| wordpress | {
"language": "en",
"length": 142,
"provenance": "stackexchange_00019.jsonl.gz:464835",
"question_score": "10",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/224228"
} | [
0.03070068359375,
0.0168914794921875,
-0.0264892578125,
-0.009002685546875,
0.00899505615234375,
-0.0253753662109375,
0.0157928466796875,
-0.03179931640625,
-0.03338623046875,
0.03057861328125,
0.003765106201171875,
0.038818359375,
-0.01471710205078125,
-0.015380859375,
-0.0017032623291015625,
-0.00827789306640625,
0.014129638671875,
-0.0007638931274414062,
0.01537322998046875,
0.000010311603546142578,
-0.002361297607421875,
0.004276275634765625,
0.013824462890625,
0.01160430908203125,
0.032073974609375,
-0.0092010498046875,
0.034088134765625,
-0.0090484619140625,
0.00525665283203125,
-0.0295867919921875,
0.0185546875,
0.0029315948486328125,
-0.005573272705078125,
0.0302734375,
-0.011810302734375,
0.0033397674560546875,
-0.00403594970703125,
0.02728271484375,
0.03021240234375,
-0.01088714599609375,
0.0157623291015625,
0.0189208984375,
-0.0264739990234375,
0.0565185546875,
-0.048492431640625,
-0.0596923828125,
0.0217132568359375,
-0.00611114501953125,
0.042266845703125,
-0.01555633544921875,
-0.0256500244140625,
0.0233154296875,
-0.01318359375,
-0.0301361083984375,
-0.01067352294921875,
-0.01056671142578125,
0.054412841796875,
-0.043487548828125,
0.037017822265625,
-0.0535888671875,
-0.057281494140625,
-0.02392578125,
0.0439453125,
0.00428009033203125,
0.00894927978515625,
0.0167388916015625,
0.00008827447891235352,
0.0227203369140625,
-0.006717681884765625,
0.0184173583984375,
0.00913238525390625,
-0.048126220703125,
0.00733184814453125,
0.01090240478515625,
-0.01336669921875,
-0.029449462890625,
-0.0010633468627929688,
-0.02740478515625,
0.016754150390625,
0.0244293212890625,
-0.0023746490478515625,
0.00775146484375,
0.009429931640625,
-0.050201416015625,
-0.0015621185302734375,
-0.039764404296875,
-0.0108489990234375,
0.002162933349609375,
-0.04547119140625,
-0.0098114013671875,
-0.0298919677734375,
-0.07110595703125,
-0.0677490234375,
0.047271728515625,
0.0217132568359375,
-0.00426483154296875,
0.051239013671875,
0.07952880859375,
-0.00666046142578125,
0.0202178955078125,
-0.014617919921875,
-0.03802490234375,
0.017333984375,
-0.047576904296875,
0.0184326171875,
0.044158935546875,
-0.005146026611328125,
-0.008544921875,
0.034454345703125,
0.01544952392578125,
0.00003892183303833008,
0.046600341796875,
-0.022796630859375,
-0.03973388671875,
0.040618896484375,
0.0269317626953125,
-0.04669189453125,
0.09228515625,
0.0201873779296875,
0.05615234375,
-0.0248260498046875,
0.00580596923828125,
-0.056549072265625,
0.041168212890625,
-0.0230712890625,
-0.0266265869140625,
0.0133209228515625,
0.02728271484375,
0.0174560546875,
-0.0159912109375,
-0.0142822265625,
0.034210205078125,
0.07769775390625,
0.0140228271484375,
-0.0065460205078125,
0.0011968612670898438,
0.0293426513671875,
0.0193023681640625,
-0.01258087158203125,
-0.00957489013671875,
0.021728515625,
-0.01227569580078125,
-0.0223541259765625,
-0.00464630126953125,
-0.01885986328125,
0.0195770263671875,
0.0037822723388671875,
0.027191162109375,
-0.00298309326171875,
-0.0455322265625,
0.0217742919921875,
-0.043365478515625,
0.00710296630859375,
-0.00994873046875,
0.046295166015625,
-0.05230712890625,
0.0239715576171875,
-0.04058837890625,
0.06195068359375,
-0.02801513671875,
0.013885498046875,
0.008941650390625,
0.042510986328125,
0.0230560302734375,
0.01568603515625,
-0.01047515869140625,
-0.0259857177734375,
0.006488800048828125,
0.01233673095703125,
-0.08123779296875,
-0.0116729736328125,
-0.0128326416015625,
0.021514892578125,
0.0120697021484375,
0.006927490234375,
0.05047607421875,
0.0290374755859375,
-0.00649261474609375,
-0.0005807876586914062,
0.06842041015625,
0.01305389404296875,
-0.01380157470703125,
0.0221099853515625,
-0.0208892822265625,
-0.05584716796875,
0.029998779296875,
0.0139007568359375,
0.048095703125,
0.015716552734375,
-0.0007119178771972656,
0.05914306640625,
0.01230621337890625,
-0.00740814208984375,
0.01209259033203125,
-0.025634765625,
-0.020050048828125,
0.008148193359375,
0.01812744140625,
-0.01416015625,
0.00327301025390625,
0.004512786865234375,
0.0128936767578125,
-0.004364013671875,
-0.009307861328125,
-0.06842041015625,
0.0278778076171875,
-0.021209716796875,
0.039215087890625,
-0.0038127899169921875,
0.035919189453125,
0.01062774658203125,
0.0013570785522460938,
-0.0214080810546875,
-0.016326904296875,
-0.0014743804931640625,
-0.005565643310546875,
0.01129150390625,
-0.00942230224609375,
0.0174713134765625,
-0.003978729248046875,
-0.0009317398071289062,
0.038238525390625,
-0.01605224609375,
-0.01117706298828125,
0.046051025390625,
-0.049407958984375,
-0.004810333251953125,
-0.05767822265625,
-0.01580810546875,
-0.01336669921875,
-0.06536865234375,
0.06622314453125,
0.041107177734375,
0.0256500244140625,
-0.01410675048828125,
0.0100555419921875,
0.044342041015625,
-0.0244598388671875,
0.0045623779296875,
0.0235748291015625,
0.00921630859375,
-0.01203155517578125,
-0.01078033447265625,
0.044525146484375,
0.023895263671875,
-0.00409698486328125,
0.01003265380859375,
0.034027099609375,
0.04705810546875,
0.09442138671875,
-0.02984619140625,
-0.005435943603515625,
0.001995086669921875,
-0.09600830078125,
0.033172607421875,
0.036407470703125,
-0.03643798828125,
-0.0272216796875,
-0.0101776123046875,
-0.0160980224609375,
0.017822265625,
-0.1136474609375,
-0.0300140380859375,
-0.052581787109375,
0.0245208740234375,
-0.0028533935546875,
0.01488494873046875,
0.00653839111328125,
-0.04107666015625,
0.00637054443359375,
0.0254974365234375,
0.006244659423828125,
0.0192718505859375,
0.003276824951171875,
-0.00445556640625,
-0.0003275871276855469,
-0.01384735107421875,
0.0028514862060546875,
0.0178680419921875,
-0.00632476806640625,
-0.012603759765625,
-0.01253509521484375,
-0.01092529296875,
-0.001590728759765625,
0.004016876220703125,
0.0005960464477539062,
0.0290679931640625,
0.011138916015625,
-0.04638671875,
-0.03912353515625,
-0.0074462890625,
0.04541015625,
-0.0005335807800292969,
0.01190948486328125,
-0.01520538330078125,
0.006011962890625,
0.043121337890625,
-0.0765380859375,
0.062042236328125,
-0.032073974609375,
0.052734375,
0.075927734375,
0.034271240234375,
-0.00921630859375,
-0.0114898681640625,
0.01441192626953125,
0.013763427734375,
0.01238250732421875,
0.00269317626953125,
-0.0301666259765625,
-0.0006160736083984375,
-0.0126800537109375,
0.0215606689453125,
0.046722412109375,
-0.005786895751953125,
-0.024658203125,
-0.010498046875,
0.049346923828125,
-0.0316162109375,
-0.019012451171875,
0.0008077621459960938,
-0.0280609130859375,
-0.0140228271484375,
0.0089263916015625,
-0.01230621337890625,
0.0002040863037109375,
0.03607177734375,
-0.00200653076171875,
0.02935791015625,
-0.024261474609375,
-0.059295654296875,
-0.0164947509765625,
-0.0750732421875,
0.0028533935546875,
-0.0004558563232421875,
0.0141754150390625,
0.0149078369140625,
-0.0045318603515625,
-0.00655364990234375,
-0.0276336669921875,
-0.0040740966796875,
0.057098388671875,
0.00075531005859375,
-0.0124969482421875,
-0.01342010498046875,
0.0208740234375,
-0.002300262451171875,
0.0186614990234375,
0.0282440185546875,
0.016204833984375,
-0.028045654296875,
-0.01947021484375,
-0.01184844970703125,
0.01061248779296875,
0.0224456787109375,
0.00469970703125,
-0.002971649169921875,
0.03057861328125,
0.041168212890625,
-0.0199432373046875,
0.01190948486328125,
-0.004261016845703125,
-0.0229339599609375,
-0.01238250732421875,
-0.00015485286712646484,
-0.022308349609375,
-0.028594970703125,
0.0034084320068359375,
0.007480621337890625,
0.00211334228515625,
-0.02264404296875,
0.005771636962890625,
-0.00437164306640625,
0.006328582763671875,
0.02203369140625,
0.0213775634765625,
-0.00727081298828125,
-0.03997802734375,
0.0123291015625,
-0.025787353515625,
-0.0138397216796875,
-0.023681640625,
0.0033283233642578125,
-0.014678955078125,
-0.028961181640625,
0.041900634765625,
-0.004810333251953125,
0.00850677490234375,
-0.019012451171875,
-0.0264739990234375,
-0.007488250732421875,
0.05926513671875,
-0.01026153564453125,
-0.0152587890625,
0.02520751953125,
0.0011234283447265625,
-0.00489044189453125,
0.0005993843078613281,
-0.0389404296875,
-0.036041259765625,
0.022918701171875,
0.0238800048828125,
0.00537109375,
0.01491546630859375,
-0.050811767578125,
0.05877685546875,
0.01035308837890625,
0.0160675048828125,
0.010284423828125,
-0.01412200927734375,
0.0114898681640625,
0.0283660888671875,
-0.01033782958984375,
0.0207977294921875,
-0.00971221923828125,
-0.036407470703125,
-0.0794677734375,
-0.00658416748046875,
-0.038787841796875,
0.048614501953125,
-0.008941650390625,
0.036468505859375,
-0.03485107421875,
0.036407470703125,
-0.0276031494140625,
0.032684326171875,
-0.007411956787109375,
0.0252227783203125,
-0.0210113525390625,
-0.027740478515625,
-0.0133209228515625,
-0.037567138671875,
0.009796142578125,
-0.039154052734375,
-0.0160064697265625,
-0.026397705078125,
-0.061859130859375,
0.00925445556640625,
-0.055511474609375,
-0.0173492431640625,
-0.0728759765625,
-0.045562744140625,
-0.016357421875,
0.0283966064453125,
0.00675201416015625,
0.0026702880859375,
-0.06414794921875,
-0.0828857421875,
0.051300048828125,
-0.005641937255859375,
-0.005035400390625,
0.01163482666015625,
0.09710693359375,
0.00934600830078125,
-0.01055145263671875,
-0.060760498046875,
-0.0248565673828125,
0.00970458984375,
0.00978851318359375,
0.0211334228515625,
0.0235137939453125,
0.007190704345703125,
-0.0279693603515625,
-0.0131378173828125,
-0.01479339599609375,
-0.0205841064453125,
0.0499267578125,
-0.0179901123046875,
-0.013641357421875,
0.020416259765625,
-0.0357666015625,
0.040863037109375,
0.0193939208984375,
0.00225830078125,
-0.0009350776672363281,
0.0128631591796875,
0.03399658203125,
0.0018186569213867188,
-0.0199737548828125,
-0.038421630859375,
-0.06488037109375,
0.0206756591796875,
-0.0322265625,
0.01483917236328125,
0.0065765380859375,
0.0016841888427734375,
0.01849365234375,
-0.01004791259765625,
-0.02142333984375,
-0.057952880859375,
-0.039093017578125,
-0.034027099609375,
-0.00377655029296875,
-0.05999755859375,
-0.03411865234375,
-0.01094818115234375,
-0.0172119140625,
0.088134765625,
0.0242156982421875,
-0.045318603515625,
0.01409912109375,
-0.02008056640625,
0.0225677490234375,
-0.006816864013671875,
0.000014841556549072266,
0.046722412109375,
0.0262603759765625,
-0.006671905517578125,
-0.00540924072265625,
-0.0089874267578125,
-0.0000451207160949707,
-0.035919189453125,
0.006938934326171875,
-0.0031185150146484375,
-0.004734039306640625,
-0.033111572265625,
0.071533203125,
0.01153564453125,
-0.00555419921875,
-0.0205841064453125,
0.06219482421875,
0.033233642578125,
0.041290283203125,
0.0213165283203125,
-0.0222320556640625,
0.0014181137084960938,
0.006771087646484375,
-0.046905517578125,
-0.050811767578125,
-0.008331298828125,
0.034820556640625,
0.04998779296875,
0.040985107421875,
-0.01312255859375,
0.004222869873046875,
-0.00791168212890625,
-0.0028858184814453125,
-0.0044097900390625,
0.00858306884765625,
-0.004467010498046875,
0.0211639404296875,
0.00740814208984375,
-0.00623321533203125,
-0.00675201416015625,
0.00876617431640625,
-0.06597900390625,
0.01160430908203125,
0.0185699462890625,
-0.0179290771484375,
-0.00727081298828125,
0.004215240478515625,
-0.0013484954833984375,
0.00856781005859375,
-0.0177459716796875,
-0.00926971435546875,
-0.009765625,
0.00970458984375,
-0.04034423828125,
-0.0206451416015625,
0.08551025390625,
0.0031070709228515625,
0.025238037109375,
-0.035552978515625,
-0.01483154296875,
0.0289154052734375,
-0.0193634033203125,
0.093017578125,
0.0291290283203125,
-0.0499267578125,
0.00530242919921875,
-0.046661376953125,
-0.007266998291015625,
-0.006671905517578125,
-0.006153106689453125,
-0.0648193359375,
-0.0097198486328125,
-0.004474639892578125,
0.018157958984375,
-0.00811004638671875,
0.0016756057739257812,
0.00885772705078125,
0.006908416748046875,
-0.023223876953125,
0.000017523765563964844,
-0.00543975830078125,
0.05908203125,
0.008636474609375,
0.0626220703125,
0.016754150390625,
0.030059814453125,
-0.035186767578125,
-0.026641845703125,
-0.003238677978515625,
-0.048797607421875,
-0.0122222900390625,
0.01861572265625,
-0.038909912109375,
-0.0023651123046875,
0.0114898681640625,
0.0056915283203125,
-0.002166748046875,
-0.00799560546875,
0.007549285888671875,
-0.0022449493408203125,
0.031982421875,
0.00927734375,
-0.0261993408203125,
0.051025390625,
-0.0200653076171875,
0.0198822021484375,
-0.0233917236328125,
-0.0265960693359375,
-0.00033092498779296875,
-0.01340484619140625,
-0.0169219970703125,
0.0482177734375,
0.0106353759765625,
-0.0059967041015625,
-0.0279693603515625,
-0.0050048828125,
-0.0037212371826171875,
0.0168609619140625,
0.02197265625,
-0.03375244140625,
-0.046478271484375,
0.005580902099609375,
0.0325927734375,
0.01087188720703125,
-0.0284271240234375,
0.0117340087890625,
0.0158843994140625,
-0.0132904052734375,
0.006725311279296875,
0.01010894775390625,
0.0223846435546875,
-0.058929443359375,
0.0306243896484375,
0.005680084228515625,
-0.005584716796875,
0.0188140869140625,
-0.0010633468627929688,
0.0160369873046875,
0.0219573974609375,
0.01003265380859375,
0.02838134765625,
-0.0027332305908203125,
0.01213836669921875,
0.01079559326171875,
0.0026378631591796875,
-0.045074462890625,
-0.011749267578125,
0.0057525634765625,
-0.0293121337890625,
0.07025146484375,
0.0149078369140625,
0.04248046875,
-0.0294647216796875,
0.0178680419921875,
0.03851318359375,
0.01097869873046875,
-0.0249786376953125,
0.0775146484375,
-0.033935546875,
0.0235595703125,
-0.0193328857421875,
0.0380859375,
0.050262451171875,
0.0279998779296875,
0.00954437255859375,
-0.01387786865234375,
0.0311126708984375,
0.0221710205078125,
-0.030609130859375,
-0.060821533203125,
0.0013647079467773438,
0.023773193359375,
-0.0005278587341308594,
0.037322998046875,
0.01544189453125,
-0.06597900390625,
-0.002532958984375,
0.0197601318359375,
0.048004150390625,
-0.005001068115234375,
-0.031890869140625,
0.02728271484375,
0.0174560546875,
-0.0112762451171875,
0.020782470703125,
0.0260162353515625,
-0.07476806640625,
-0.07012939453125,
0.033447265625,
-0.059906005859375,
0.0068206787109375,
0.011505126953125,
-0.09832763671875,
0.1143798828125,
0.0213775634765625,
0.059814453125,
-0.0151214599609375,
0.037872314453125,
-0.015838623046875,
0.0047149658203125,
-0.046600341796875,
0.0731201171875,
-0.00542449951171875,
0.057708740234375,
-0.07568359375,
-0.01873779296875,
0.01666259765625,
0.028564453125,
0.08892822265625,
0.020721435546875,
-0.01522064208984375,
-0.00255584716796875,
0.0285797119140625,
0.00110626220703125,
-0.04656982421875,
0.058837890625,
0.0250091552734375,
-0.017547607421875,
0.0206756591796875,
0.025390625,
0.0465087890625,
-0.0312042236328125,
-0.0150146484375,
0.02947998046875,
0.0118255615234375,
0.03448486328125,
-0.0198211669921875,
-0.01055908203125,
0.0111541748046875,
-0.0299072265625,
-0.006237030029296875,
-0.0157470703125,
0.038482666015625,
0.00745391845703125,
0.0556640625,
0.006580352783203125,
0.0157012939453125,
-0.0036296844482421875,
0.0546875,
0.0205230712890625,
-0.00119781494140625,
0.049041748046875,
0.01136016845703125,
-0.0107421875,
0.0302581787109375,
0.017791748046875,
0.01102447509765625,
0.0250396728515625,
0.0159454345703125,
0.01027679443359375,
0.02410888671875,
-0.03564453125,
-0.0245208740234375,
0.058258056640625,
0.040130615234375,
-0.0172882080078125,
-0.049407958984375,
0.014495849609375,
-0.0256195068359375,
0.007747650146484375,
-0.0209197998046875,
-0.01263427734375,
-0.0694580078125,
-0.0286407470703125,
-0.00812530517578125,
-0.017425537109375,
-0.0110321044921875,
0.01153564453125,
0.00004214048385620117,
0.00717926025390625,
0.0197601318359375,
0.00313568115234375,
-0.053436279296875,
0.0204925537109375,
0.0035552978515625,
0.030242919921875,
0.0208740234375,
0.037872314453125,
0.0309295654296875,
-0.020355224609375,
-0.016510009765625,
0.01210784912109375,
0.03167724609375,
0.0023174285888671875,
-0.06597900390625,
-0.048126220703125,
0.055755615234375,
0.0455322265625,
0.02288818359375,
-0.0158538818359375,
0.0577392578125,
0.04742431640625,
-0.04144287109375,
-0.0252685546875,
0.0019702911376953125,
-0.01531219482421875,
0.0060882568359375,
-0.0231475830078125,
0.0137786865234375,
-0.0139007568359375,
-0.0223236083984375,
-0.01287078857421875,
0.0240020751953125,
0.008087158203125,
-0.01091766357421875,
-0.038665771484375,
0.016876220703125,
-0.0560302734375,
0.0025310516357421875,
0.018096923828125,
-0.0147247314453125,
0.010345458984375,
-0.0927734375,
0.0122222900390625,
-0.07806396484375,
-0.055694580078125,
0.01345062255859375,
0.0205078125,
-0.047271728515625,
0.03631591796875,
0.00826263427734375,
-0.037567138671875,
0.032928466796875,
0.0021762847900390625,
0.00872802734375,
0.060516357421875,
0.00408935546875,
0.007755279541015625,
-0.058746337890625,
-0.0264892578125,
-0.018218994140625,
0.00795745849609375,
0.0435791015625,
-0.0223846435546875,
0.05047607421875,
0.022674560546875,
-0.01163482666015625,
0.003704071044921875,
-0.0548095703125,
-0.0161895751953125,
0.019287109375,
-0.057708740234375,
-0.023284912109375,
0.0214996337890625,
-0.02545166015625,
-0.006153106689453125,
0.01425933837890625,
-0.04595947265625,
-0.016937255859375,
-0.005405426025390625,
0.0258636474609375,
0.0009331703186035156,
0.00936126708984375,
-0.022125244140625,
-0.008087158203125,
-0.0218353271484375,
-0.022430419921875,
0.033477783203125,
0.01312255859375,
-0.0036602020263671875,
0.01422882080078125,
0.02490234375,
-0.040924072265625,
-0.0020999908447265625,
-0.0213775634765625,
-0.0294952392578125,
0.0163726806640625,
0.07318115234375,
-0.087158203125,
0.0087127685546875,
-0.005603790283203125,
-0.0153961181640625,
0.007495880126953125,
0.058807373046875,
0.01544189453125,
-0.07989501953125,
0.004344940185546875,
-0.01007843017578125,
0.0265045166015625,
-0.0032939910888671875,
0.0008082389831542969,
-0.0112457275390625,
0.006587982177734375,
-0.041717529296875,
-0.0013570785522460938,
-0.0321044921875,
-0.03839111328125,
0.01113128662109375,
0.02496337890625,
-0.0018472671508789062,
-0.0298614501953125,
-0.083251953125,
-0.0188446044921875,
0.005191802978515625,
-0.016876220703125,
0.016510009765625,
0.009490966796875,
-0.030029296875,
-0.042938232421875,
-0.01465606689453125,
-0.076904296875,
0.004241943359375,
0.043975830078125,
-0.032989501953125,
-0.0545654296875,
-0.0716552734375,
-0.0025157928466796875,
-0.1011962890625,
0.013885498046875,
0.00630950927734375,
-0.01454925537109375,
0.0213623046875,
0.0240631103515625,
0.037689208984375,
0.0594482421875,
-0.0005617141723632812,
-0.041839599609375,
-0.015960693359375,
-0.00521087646484375,
0.021392822265625,
-0.0482177734375,
0.0192108154296875,
-0.066650390625,
-0.020599365234375,
-0.06170654296875,
0.03350830078125,
0.0189971923828125,
-0.01739501953125,
-0.04241943359375,
0.051666259765625,
-0.0241546630859375,
-0.0283203125,
-0.04779052734375,
0.007083892822265625,
0.0021209716796875,
0.00742340087890625,
-0.00461578369140625,
-0.014404296875,
-0.038970947265625,
0.0188751220703125,
-0.0282745361328125,
0.03570556640625,
0.0035572052001953125,
-0.0234222412109375,
0.0221099853515625,
0.0005736351013183594,
0.0072021484375,
-0.038421630859375,
0.0214385986328125,
-0.00241851806640625,
0.0276031494140625,
0.0526123046875,
-0.01401519775390625,
0.03179931640625,
-0.0189056396484375,
-0.037689208984375,
-0.007434844970703125,
-0.00884246826171875,
-0.0228118896484375,
0.00220489501953125,
0.0294342041015625,
0.055816650390625,
0.0197906494140625,
-0.037506103515625,
-0.00780487060546875,
-0.0185394287109375,
0.00135040283203125,
-0.002712249755859375,
0.010528564453125,
-0.05572509765625,
-0.00836944580078125,
0.0075836181640625,
-0.03338623046875,
0.012054443359375,
-0.006317138671875,
-0.0460205078125,
0.0009140968322753906,
-0.032745361328125,
-0.007366180419921875,
-0.05938720703125,
0.040008544921875,
0.0236358642578125,
-0.022674560546875,
0.0098419189453125,
-0.00135040283203125,
-0.00981903076171875,
0.01214599609375,
-0.000007033348083496094,
0.0272369384765625,
0.01300811767578125,
-0.05267333984375,
0.003932952880859375,
0.005008697509765625,
0.041961669921875,
-0.03887939453125,
-0.036468505859375,
-0.04425048828125,
0.037078857421875,
0.004955291748046875,
0.037353515625,
-0.008026123046875,
0.0284881591796875,
0.0294189453125,
0.0653076171875,
-0.0207977294921875,
-0.033294677734375,
-0.0180206298828125,
0.00737762451171875,
-0.0318603515625,
0.017578125,
0.00872039794921875,
-0.0264739990234375,
0.0047149658203125,
0.0089569091796875,
0.038177490234375,
-0.04766845703125,
0.0391845703125,
0.0242156982421875,
0.035797119140625,
0.030853271484375
]
|
b6ba1ae4f6b3c5a8b8a7a45a1cea5bdcf9476344 | Wordpress Stackexchange
Q: Remove All Query Arg Is there a way to remove all query arg parameter in the URL added via add_query_arg(); without knowing the query key available for removal?
I'm looking for this kind of function remove_query_arg_all(); currently I'm removing the query_arg via preg_match REQUEST_URI, but not sure if it will cause any problem in the future.
A: You can explode URL by ? and take the first part:
$url = explode( '?', esc_url_raw( add_query_arg( array() ) ) );
$no_query_args = $url[0];
| Q: Remove All Query Arg Is there a way to remove all query arg parameter in the URL added via add_query_arg(); without knowing the query key available for removal?
I'm looking for this kind of function remove_query_arg_all(); currently I'm removing the query_arg via preg_match REQUEST_URI, but not sure if it will cause any problem in the future.
A: You can explode URL by ? and take the first part:
$url = explode( '?', esc_url_raw( add_query_arg( array() ) ) );
$no_query_args = $url[0];
A: You can do this in one line if your aim is to remove all of the params from the current $_GET
remove_query_arg(array_keys($_GET))
| wordpress | {
"language": "en",
"length": 105,
"provenance": "stackexchange_00019.jsonl.gz:464853",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/224296"
} | [
0.09619140625,
-0.0011434555053710938,
0.011566162109375,
-0.0270538330078125,
0.022674560546875,
-0.05841064453125,
0.081787109375,
-0.0016984939575195312,
-0.03314208984375,
0.0310211181640625,
0.058349609375,
-0.0276641845703125,
-0.0221710205078125,
-0.055633544921875,
-0.0064544677734375,
-0.016021728515625,
0.01727294921875,
-0.01309967041015625,
-0.0267791748046875,
-0.032470703125,
0.01514434814453125,
-0.0161590576171875,
0.0057220458984375,
0.08929443359375,
0.02020263671875,
0.0296783447265625,
0.012054443359375,
-0.003955841064453125,
0.015411376953125,
0.003108978271484375,
0.005680084228515625,
-0.0257568359375,
0.0126800537109375,
0.043548583984375,
-0.033050537109375,
-0.01334381103515625,
0.00921630859375,
0.0019054412841796875,
0.0191497802734375,
0.005458831787109375,
0.027923583984375,
-0.02362060546875,
-0.042083740234375,
0.0021610260009765625,
-0.0258026123046875,
-0.027496337890625,
0.03106689453125,
-0.006023406982421875,
-0.01103973388671875,
-0.0055999755859375,
0.009796142578125,
0.01629638671875,
0.024566650390625,
0.01049041748046875,
-0.017974853515625,
-0.032958984375,
0.03118896484375,
-0.0377197265625,
0.02142333984375,
-0.00896453857421875,
-0.02667236328125,
0.0125885009765625,
0.0269317626953125,
-0.025909423828125,
-0.009307861328125,
0.0155029296875,
-0.0160064697265625,
0.01061248779296875,
-0.06768798828125,
-0.0225982666015625,
0.0299835205078125,
-0.060638427734375,
-0.0217132568359375,
0.0191192626953125,
-0.015533447265625,
-0.02197265625,
0.02142333984375,
-0.00713348388671875,
-0.0017652511596679688,
0.0283660888671875,
0.040283203125,
-0.031402587890625,
-0.04736328125,
0.012908935546875,
0.0199737548828125,
0.0017805099487304688,
0.006786346435546875,
-0.0240020751953125,
-0.0152130126953125,
-0.040618896484375,
-0.0213165283203125,
-0.0576171875,
-0.00884246826171875,
-0.014801025390625,
-0.01139068603515625,
-0.04736328125,
0.00627899169921875,
-0.0225067138671875,
0.01070404052734375,
-0.007053375244140625,
-0.0198516845703125,
-0.0223388671875,
-0.013397216796875,
0.0009145736694335938,
0.0009832382202148438,
0.062347412109375,
0.0185699462890625,
0.035858154296875,
0.03485107421875,
0.004940032958984375,
0.0255584716796875,
0.01035308837890625,
-0.026397705078125,
0.0219879150390625,
-0.0369873046875,
0.0267486572265625,
-0.0416259765625,
-0.002475738525390625,
-0.0350341796875,
0.05108642578125,
0.009490966796875,
0.0242462158203125,
-0.0312347412109375,
-0.036956787109375,
0.025177001953125,
-0.007724761962890625,
-0.0181121826171875,
0.0034084320068359375,
-0.04931640625,
0.0244598388671875,
-0.0301971435546875,
0.0159149169921875,
0.048980712890625,
0.0250701904296875,
-0.003879547119140625,
-0.02911376953125,
0.0026397705078125,
-0.0233917236328125,
0.0090179443359375,
0.00769805908203125,
0.042999267578125,
-0.05853271484375,
-0.0260772705078125,
0.05108642578125,
-0.00522613525390625,
0.0006151199340820312,
0.005062103271484375,
0.0123748779296875,
0.017913818359375,
-0.01213836669921875,
-0.034576416015625,
-0.002193450927734375,
0.049163818359375,
0.0015974044799804688,
-0.060272216796875,
0.0222930908203125,
0.050262451171875,
-0.0268096923828125,
-0.068115234375,
-0.04962158203125,
-0.027557373046875,
-0.0105133056640625,
0.02020263671875,
-0.0328369140625,
-0.041961669921875,
-0.00921630859375,
-0.00833892822265625,
-0.00656890869140625,
0.01151275634765625,
0.019561767578125,
-0.031646728515625,
-0.024169921875,
0.0073089599609375,
0.0206298828125,
0.0020694732666015625,
0.03460693359375,
0.0208587646484375,
0.0316162109375,
-0.009246826171875,
0.05157470703125,
0.007251739501953125,
-0.049774169921875,
0.041839599609375,
-0.02752685546875,
-0.0941162109375,
0.08154296875,
-0.00803375244140625,
0.07623291015625,
0.014007568359375,
-0.01287078857421875,
0.10626220703125,
0.0226593017578125,
-0.01163482666015625,
0.0171661376953125,
0.027374267578125,
-0.0295867919921875,
-0.00876617431640625,
-0.0272064208984375,
0.004421234130859375,
-0.016876220703125,
0.005176544189453125,
0.00794219970703125,
-0.01268768310546875,
0.006679534912109375,
-0.0596923828125,
0.01763916015625,
-0.0227813720703125,
0.0259246826171875,
-0.033721923828125,
0.03753662109375,
0.0256195068359375,
0.006839752197265625,
-0.054901123046875,
0.04254150390625,
0.01505279541015625,
0.0191650390625,
0.031982421875,
0.00983428955078125,
-0.01959228515625,
0.01448822021484375,
-0.032470703125,
-0.01107025146484375,
-0.0452880859375,
0.029144287109375,
0.0765380859375,
-0.046783447265625,
0.01233673095703125,
-0.054412841796875,
0.06353759765625,
-0.03741455078125,
-0.024444580078125,
0.06585693359375,
0.06048583984375,
0.0654296875,
-0.0042266845703125,
0.01212310791015625,
0.01947021484375,
-0.05316162109375,
-0.00472259521484375,
0.0380859375,
0.043212890625,
0.0235443115234375,
0.01100921630859375,
-0.006633758544921875,
0.032745361328125,
-0.05419921875,
0.0158538818359375,
-0.022308349609375,
-0.002788543701171875,
0.0287628173828125,
-0.00611114501953125,
-0.00583648681640625,
-0.0016536712646484375,
-0.037841796875,
0.009857177734375,
0.00704193115234375,
-0.0133819580078125,
-0.0258331298828125,
-0.0290069580078125,
0.0237274169921875,
-0.005828857421875,
-0.04718017578125,
-0.0266876220703125,
-0.016693115234375,
0.0081024169921875,
0.0164337158203125,
0.01861572265625,
0.029754638671875,
-0.002094268798828125,
-0.0003371238708496094,
0.0134735107421875,
0.00580596923828125,
-0.02691650390625,
0.00357818603515625,
0.02764892578125,
-0.0164642333984375,
-0.028350830078125,
0.0230255126953125,
-0.0301513671875,
-0.0076446533203125,
0.00693511962890625,
0.043182373046875,
0.0499267578125,
-0.01026153564453125,
-0.0189666748046875,
-0.0140380859375,
0.02764892578125,
-0.01416778564453125,
0.00017130374908447266,
-0.003299713134765625,
0.0286102294921875,
-0.0014448165893554688,
-0.00745391845703125,
0.01543426513671875,
0.004291534423828125,
-0.0377197265625,
-0.0193634033203125,
-0.053497314453125,
0.01953125,
-0.010528564453125,
0.0426025390625,
0.0819091796875,
0.0321044921875,
-0.02984619140625,
0.00998687744140625,
-0.02130126953125,
-0.01500701904296875,
0.0046234130859375,
0.0015392303466796875,
0.03338623046875,
-0.1021728515625,
0.03271484375,
0.002353668212890625,
-0.00563812255859375,
0.00682830810546875,
-0.036773681640625,
-0.0017547607421875,
-0.0147705078125,
-0.08404541015625,
-0.07177734375,
0.051483154296875,
0.007511138916015625,
-0.04425048828125,
0.0245208740234375,
-0.01514434814453125,
0.00803375244140625,
0.028533935546875,
-0.0194854736328125,
0.036376953125,
-0.03167724609375,
-0.078857421875,
-0.0204620361328125,
-0.053680419921875,
0.04443359375,
-0.00473785400390625,
-0.0008440017700195312,
0.0123291015625,
0.06402587890625,
0.03070068359375,
-0.0123748779296875,
0.039154052734375,
-0.020965576171875,
-0.012451171875,
-0.00151824951171875,
0.005657196044921875,
-0.011138916015625,
0.0272369384765625,
-0.02935791015625,
0.07659912109375,
0.0775146484375,
-0.05084228515625,
0.037445068359375,
0.017608642578125,
0.01444244384765625,
0.00855255126953125,
-0.00885772705078125,
-0.0080718994140625,
-0.002605438232421875,
-0.0180816650390625,
-0.054229736328125,
0.00909423828125,
-0.00949859619140625,
-0.0261688232421875,
0.0161895751953125,
0.012451171875,
-0.011932373046875,
0.0018606185913085938,
-0.0120086669921875,
0.0234222412109375,
0.01261138916015625,
0.026885986328125,
-0.01123046875,
0.00022351741790771484,
-0.0036449432373046875,
0.02001953125,
-0.025482177734375,
0.040374755859375,
-0.03289794921875,
-0.005573272705078125,
0.018218994140625,
-0.0103607177734375,
0.0369873046875,
-0.058868408203125,
0.020751953125,
0.01318359375,
0.0290069580078125,
0.00022208690643310547,
0.037384033203125,
-0.034088134765625,
-0.026214599609375,
-0.056365966796875,
0.04461669921875,
-0.0184783935546875,
-0.0352783203125,
-0.031219482421875,
0.02001953125,
-0.031494140625,
-0.07177734375,
0.028106689453125,
-0.0164031982421875,
-0.043548583984375,
0.0099029541015625,
-0.01812744140625,
-0.02557373046875,
-0.0250701904296875,
-0.0302886962890625,
-0.0259552001953125,
-0.01959228515625,
0.03875732421875,
-0.0265350341796875,
0.0168304443359375,
-0.0014858245849609375,
0.00672149658203125,
-0.028411865234375,
-0.0335693359375,
-0.00018548965454101562,
-0.0517578125,
-0.01548004150390625,
0.00907135009765625,
0.045135498046875,
-0.004436492919921875,
-0.01433563232421875,
-0.02044677734375,
0.038421630859375,
0.022705078125,
-0.01267242431640625,
0.00270843505859375,
-0.030181884765625,
-0.032257080078125,
0.036163330078125,
0.005481719970703125,
-0.01036834716796875,
0.007110595703125,
0.016265869140625,
-0.007099151611328125,
-0.01427459716796875,
-0.031585693359375,
-0.0270233154296875,
0.0223236083984375,
-0.038055419921875,
-0.043792724609375,
-0.0272979736328125,
-0.01273345947265625,
-0.0016021728515625,
-0.01378631591796875,
-0.00775146484375,
-0.007343292236328125,
-0.0369873046875,
0.04461669921875,
-0.0131683349609375,
-0.017120361328125,
-0.00920867919921875,
0.055450439453125,
0.0184326171875,
-0.01438140869140625,
0.0275115966796875,
-0.0121917724609375,
0.0105438232421875,
-0.017364501953125,
0.0191497802734375,
-0.01348114013671875,
-0.004573822021484375,
0.0227508544921875,
-0.051177978515625,
0.028350830078125,
-0.0281219482421875,
0.05584716796875,
-0.004596710205078125,
-0.033538818359375,
0.04058837890625,
0.0010128021240234375,
-0.00841522216796875,
0.0135040283203125,
0.0157470703125,
-0.0265655517578125,
0.042694091796875,
-0.0020294189453125,
-0.00951385498046875,
-0.00746917724609375,
0.0017023086547851562,
-0.036102294921875,
0.025177001953125,
-0.0036144256591796875,
-0.007965087890625,
0.0019664764404296875,
-0.0198974609375,
-0.0005049705505371094,
-0.0216827392578125,
-0.0020809173583984375,
-0.00473785400390625,
0.053558349609375,
-0.05535888671875,
0.03961181640625,
-0.027008056640625,
-0.045684814453125,
-0.033355712890625,
0.0011014938354492188,
0.0323486328125,
0.01275634765625,
-0.0182342529296875,
-0.006092071533203125,
-0.0118560791015625,
-0.0233917236328125,
-0.0263671875,
0.037017822265625,
0.040435791015625,
0.0300445556640625,
0.044769287109375,
-0.0261993408203125,
-0.0208740234375,
0.0295867919921875,
-0.0357666015625,
0.0103912353515625,
-0.01007843017578125,
0.0005483627319335938,
0.0135650634765625,
0.0394287109375,
-0.05224609375,
0.05059814453125,
-0.004425048828125,
-0.0263214111328125,
-0.005519866943359375,
0.01477813720703125,
0.00614166259765625,
-0.0002219676971435547,
0.00562286376953125,
-0.007537841796875,
0.059906005859375,
-0.0181121826171875,
-0.01007080078125,
0.03033447265625,
0.0205535888671875,
0.01412200927734375,
-0.00476837158203125,
-0.010223388671875,
-0.01361083984375,
-0.01479339599609375,
0.0294036865234375,
0.042999267578125,
-0.012176513671875,
-0.0224609375,
-0.043548583984375,
-0.005878448486328125,
0.0083160400390625,
-0.00824737548828125,
0.0113677978515625,
-0.0321044921875,
-0.00882720947265625,
0.0215301513671875,
-0.020477294921875,
-0.02093505859375,
-0.0247344970703125,
0.00691986083984375,
-0.042022705078125,
-0.0194854736328125,
-0.01165771484375,
0.019378662109375,
-0.04217529296875,
-0.019744873046875,
0.058441162109375,
0.0138702392578125,
0.0496826171875,
-0.0307769775390625,
-0.018157958984375,
0.0540771484375,
-0.00469207763671875,
0.0494384765625,
-0.004795074462890625,
-0.042022705078125,
-0.0245208740234375,
-0.04534912109375,
-0.01081085205078125,
-0.0008878707885742188,
-0.03424072265625,
-0.0082855224609375,
-0.0093536376953125,
0.00891876220703125,
0.0258026123046875,
-0.007572174072265625,
0.016143798828125,
0.0188446044921875,
0.0188140869140625,
-0.01055145263671875,
0.058837890625,
-0.00379180908203125,
-0.00667572021484375,
-0.010650634765625,
0.0189666748046875,
-0.0141143798828125,
-0.0015230178833007812,
0.01074981689453125,
-0.024688720703125,
0.016693115234375,
-0.0347900390625,
-0.0361328125,
-0.01280975341796875,
-0.01245880126953125,
0.000637054443359375,
0.01186370849609375,
-0.007526397705078125,
0.003162384033203125,
-0.0190582275390625,
0.0004711151123046875,
-0.0286102294921875,
0.041290283203125,
-0.02215576171875,
0.0185394287109375,
-0.0035076141357421875,
0.002490997314453125,
0.04150390625,
-0.01255035400390625,
0.043670654296875,
-0.0180511474609375,
-0.0122833251953125,
-0.004634857177734375,
-0.01261138916015625,
-0.023590087890625,
0.04132080078125,
0.06787109375,
-0.0077362060546875,
0.0584716796875,
0.04449462890625,
0.0170745849609375,
0.06561279296875,
-0.015655517578125,
0.010009765625,
0.014923095703125,
0.02142333984375,
-0.0088653564453125,
0.03900146484375,
0.0269927978515625,
-0.0019779205322265625,
0.00838470458984375,
0.037689208984375,
0.03369140625,
-0.07305908203125,
0.0196380615234375,
0.0091705322265625,
0.038330078125,
0.07958984375,
0.024658203125,
0.0186614990234375,
0.0021820068359375,
-0.038604736328125,
-0.0010843276977539062,
-0.0198516845703125,
-0.01739501953125,
0.01222991943359375,
-0.0004439353942871094,
-0.02032470703125,
-0.00978851318359375,
-0.0087127685546875,
-0.02923583984375,
0.0242919921875,
0.0295257568359375,
-0.00171661376953125,
-0.04547119140625,
0.01074981689453125,
0.0516357421875,
-0.01403045654296875,
-0.08984375,
0.042449951171875,
0.005954742431640625,
-0.0276641845703125,
0.0009317398071289062,
0.005840301513671875,
0.0250091552734375,
0.047332763671875,
-0.0246429443359375,
0.01071929931640625,
0.0177764892578125,
-0.00914764404296875,
-0.0047454833984375,
-0.040802001953125,
-0.0005869865417480469,
0.006008148193359375,
-0.0307464599609375,
0.01800537109375,
-0.036651611328125,
-0.01416015625,
0.0168304443359375,
0.05535888671875,
0.051605224609375,
-0.09332275390625,
0.0087127685546875,
0.03802490234375,
0.0037994384765625,
0.0016222000122070312,
-0.020294189453125,
-0.04058837890625,
-0.055450439453125,
-0.0081024169921875,
-0.032135009765625,
-0.0226287841796875,
0.02001953125,
-0.047698974609375,
-0.09246826171875,
0.118408203125,
0.006153106689453125,
0.033050537109375,
0.0022182464599609375,
0.042327880859375,
-0.0377197265625,
0.0135650634765625,
-0.0294189453125,
0.06475830078125,
0.04620361328125,
0.01593017578125,
-0.028350830078125,
-0.0110321044921875,
0.00215911865234375,
0.022003173828125,
0.07220458984375,
0.0049285888671875,
-0.00323486328125,
-0.0001093149185180664,
0.0567626953125,
0.051727294921875,
-0.0010471343994140625,
-0.00537872314453125,
0.025390625,
0.056915283203125,
0.09429931640625,
-0.0531005859375,
0.037078857421875,
-0.0045623779296875,
0.040802001953125,
0.038116455078125,
0.0064239501953125,
0.016387939453125,
-0.00847625732421875,
0.0226593017578125,
-0.02349853515625,
0.004985809326171875,
0.01224517822265625,
0.01061248779296875,
0.044189453125,
0.0163726806640625,
0.007343292236328125,
-0.002529144287109375,
-0.037933349609375,
0.0019817352294921875,
0.037322998046875,
-0.00521087646484375,
0.000568389892578125,
0.039093017578125,
0.01525115966796875,
0.03399658203125,
-0.0235137939453125,
0.00746917724609375,
0.018768310546875,
-0.0198211669921875,
0.07037353515625,
0.027862548828125,
0.0174560546875,
-0.059722900390625,
-0.02630615234375,
0.0357666015625,
0.0789794921875,
-0.04229736328125,
-0.046478271484375,
0.011138916015625,
0.002361297607421875,
0.00911712646484375,
0.0026836395263671875,
0.0157318115234375,
-0.0143585205078125,
0.0125579833984375,
0.0015392303466796875,
-0.0038204193115234375,
0.01458740234375,
0.032562255859375,
-0.00966644287109375,
-0.0093841552734375,
-0.033599853515625,
-0.0017976760864257812,
-0.020782470703125,
-0.048370361328125,
-0.0247802734375,
0.042877197265625,
0.07769775390625,
0.001026153564453125,
0.0029296875,
-0.044097900390625,
-0.0233306884765625,
0.044830322265625,
-0.0095672607421875,
0.041656494140625,
-0.043182373046875,
-0.032318115234375,
-0.00405120849609375,
0.035888671875,
0.049072265625,
0.023712158203125,
0.04656982421875,
-0.005954742431640625,
-0.033233642578125,
0.018310546875,
0.005779266357421875,
-0.038818359375,
0.039276123046875,
-0.0380859375,
0.055908203125,
0.0256805419921875,
0.0019388198852539062,
-0.0304412841796875,
0.017425537109375,
0.039764404296875,
0.005603790283203125,
-0.0245208740234375,
0.01212310791015625,
-0.048828125,
0.03253173828125,
-0.01043701171875,
0.0262603759765625,
0.01012420654296875,
-0.020111083984375,
0.0013828277587890625,
-0.03680419921875,
-0.034820556640625,
0.027740478515625,
0.036651611328125,
-0.016998291015625,
0.022430419921875,
0.016693115234375,
-0.0008325576782226562,
0.0112762451171875,
-0.0197296142578125,
-0.00988006591796875,
-0.052032470703125,
0.005062103271484375,
-0.025787353515625,
-0.033233642578125,
-0.006298065185546875,
0.0218353271484375,
-0.0015468597412109375,
-0.024383544921875,
0.06072998046875,
-0.00580596923828125,
-0.0182342529296875,
0.03955078125,
-0.0287628173828125,
0.05645751953125,
0.04327392578125,
-0.003986358642578125,
0.0033550262451171875,
-0.0112152099609375,
-0.0225067138671875,
-0.0012960433959960938,
0.02935791015625,
0.03485107421875,
-0.0154571533203125,
0.05889892578125,
-0.047515869140625,
0.003772735595703125,
-0.03912353515625,
0.0204925537109375,
-0.03192138671875,
-0.0171966552734375,
-0.0142059326171875,
-0.0155181884765625,
0.0269775390625,
0.00600433349609375,
-0.019927978515625,
0.04193115234375,
0.050506591796875,
-0.0110321044921875,
0.041839599609375,
-0.03704833984375,
0.0733642578125,
0.03729248046875,
0.01299285888671875,
0.0186614990234375,
-0.005413055419921875,
-0.02490234375,
0.0182647705078125,
0.01512908935546875,
-0.01690673828125,
0.0015497207641601562,
0.0447998046875,
-0.08282470703125,
-0.0205230712890625,
0.0003592967987060547,
0.0174560546875,
0.0119476318359375,
-0.050262451171875,
-0.02325439453125,
-0.03173828125,
0.005496978759765625,
-0.0300750732421875,
-0.033355712890625,
-0.010650634765625,
-0.000537872314453125,
-0.005794525146484375,
-0.0660400390625,
-0.031158447265625,
0.0185394287109375,
0.0177459716796875,
0.007587432861328125,
-0.059051513671875,
0.056396484375,
-0.032012939453125,
0.0007309913635253906,
-0.01300811767578125,
-0.0225372314453125,
-0.01497650146484375,
-0.0126953125,
-0.033721923828125,
-0.023773193359375,
-0.06732177734375,
0.01727294921875,
-0.0352783203125,
0.0167083740234375,
0.0230712890625,
-0.00876617431640625,
-0.03302001953125,
0.0377197265625,
0.00846099853515625,
0.085205078125,
-0.03875732421875,
-0.00963592529296875,
0.00995635986328125,
0.01611328125,
-0.0218658447265625,
-0.06817626953125,
-0.0045318603515625,
-0.0312347412109375,
0.00283050537109375,
-0.0020542144775390625,
0.0212249755859375,
0.03619384765625,
-0.0034942626953125,
-0.06494140625,
0.061309814453125,
-0.0184173583984375,
-0.017913818359375,
-0.026214599609375,
0.048126220703125,
0.0191497802734375,
-0.026092529296875,
-0.0072021484375,
0.0261383056640625,
-0.01068115234375,
-0.0234527587890625,
0.00017940998077392578,
0.050079345703125,
0.0004138946533203125,
0.0110321044921875,
0.0030269622802734375,
0.03240966796875,
0.006313323974609375,
0.02099609375,
0.0253143310546875,
-0.03216552734375,
0.04400634765625,
0.0139007568359375,
-0.03717041015625,
0.0177764892578125,
0.018096923828125,
-0.006267547607421875,
-0.043975830078125,
0.012176513671875,
-0.01232147216796875,
0.03436279296875,
0.08111572265625,
0.087646484375,
0.026092529296875,
-0.05657958984375,
-0.0447998046875,
-0.005626678466796875,
0.056121826171875,
-0.049560546875,
0.0019893646240234375,
-0.06402587890625,
-0.03778076171875,
-0.02044677734375,
-0.0165863037109375,
0.004795074462890625,
-0.038421630859375,
-0.02764892578125,
-0.0003135204315185547,
0.0026397705078125,
0.0027484893798828125,
0.01418304443359375,
0.03582763671875,
0.0206146240234375,
-0.0196380615234375,
0.01271820068359375,
-0.0428466796875,
0.013916015625,
0.010040283203125,
-0.06561279296875,
-0.0212249755859375,
0.0009708404541015625,
0.03076171875,
0.03631591796875,
0.0158233642578125,
-0.0159759521484375,
0.007251739501953125,
0.01015472412109375,
-0.03302001953125,
0.0209503173828125,
0.026214599609375,
0.0226593017578125,
-0.03314208984375,
0.0391845703125,
0.0308074951171875,
0.0184478759765625,
0.00775146484375,
-0.0321044921875,
0.00199127197265625,
0.01253509521484375,
0.007175445556640625,
-0.007781982421875,
0.061981201171875,
-0.06109619140625,
-0.00891876220703125,
0.005809783935546875,
-0.025787353515625,
-0.050750732421875,
0.0276031494140625,
0.0098419189453125,
0.004329681396484375,
0.020263671875
]
|
e944b77f4381206370620c8ec4572780742dc604 | Wordpress Stackexchange
Q: How do I stop my blog from pinging back itself? I connect a lot of my posts to my new ones, and that is probably why I keep getting self pingbacks. Besides a plugin, is there a script I can use to get rid of this?
A: You could try this by putting code in functions.php in your theme.
function no_self_ping( &$links ) {
$home = get_option( 'home' );
foreach ( $links as $l => $link )
if ( 0 === strpos( $link, $home ) )
unset($links[$l]);
}
add_action( 'pre_ping', 'no_self_ping' );
Hope this helpful to you.
| Q: How do I stop my blog from pinging back itself? I connect a lot of my posts to my new ones, and that is probably why I keep getting self pingbacks. Besides a plugin, is there a script I can use to get rid of this?
A: You could try this by putting code in functions.php in your theme.
function no_self_ping( &$links ) {
$home = get_option( 'home' );
foreach ( $links as $l => $link )
if ( 0 === strpos( $link, $home ) )
unset($links[$l]);
}
add_action( 'pre_ping', 'no_self_ping' );
Hope this helpful to you.
A: I used a no trackback plugin for a few years (and I forget which one, there are a few available); it did seem silly to ping myself. Then I decided it was more like a way to connect posts, and stopped using it.
For a small amount of code, it's probably not much of a tradeoff between plugin or to try the code above. As an alternative to changing the theme, for a few projects especially on multisite where I do not want to alter themes others might use, I have used the My Custom Functions plugin to add small bits of code w/o having to mod functions.php
| wordpress | {
"language": "en",
"length": 207,
"provenance": "stackexchange_00019.jsonl.gz:464866",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/224347"
} | [
0.0667724609375,
-0.0047454833984375,
0.06256103515625,
0.01303863525390625,
-0.0008559226989746094,
-0.0215911865234375,
0.072265625,
-0.0712890625,
-0.0268096923828125,
0.04852294921875,
0.0258026123046875,
0.0085601806640625,
-0.02044677734375,
-0.02972412109375,
-0.00778961181640625,
-0.0139007568359375,
0.053436279296875,
-0.0189971923828125,
0.046539306640625,
0.01526641845703125,
0.0186767578125,
0.0487060546875,
0.0284881591796875,
0.0611572265625,
-0.0130157470703125,
0.03350830078125,
0.07574462890625,
-0.006603240966796875,
-0.0263824462890625,
-0.05352783203125,
0.00930023193359375,
0.021575927734375,
0.002117156982421875,
0.059356689453125,
-0.060699462890625,
0.000537872314453125,
0.007366180419921875,
0.036651611328125,
-0.00623321533203125,
0.027587890625,
0.001728057861328125,
-0.0021114349365234375,
0.0165863037109375,
0.0306549072265625,
-0.026123046875,
-0.035186767578125,
0.014404296875,
-0.0295562744140625,
0.006839752197265625,
-0.020538330078125,
0.0134735107421875,
0.00405120849609375,
0.027435302734375,
0.0252685546875,
-0.03851318359375,
-0.0233001708984375,
0.0191497802734375,
-0.021697998046875,
0.041046142578125,
-0.0450439453125,
-0.04205322265625,
-0.025421142578125,
0.04071044921875,
-0.0017871856689453125,
0.0006146430969238281,
0.006526947021484375,
0.048980712890625,
0.01142120361328125,
-0.043701171875,
0.004543304443359375,
0.0377197265625,
-0.0292205810546875,
0.01397705078125,
-0.01189422607421875,
-0.0443115234375,
-0.010345458984375,
0.015716552734375,
-0.042144775390625,
0.0184478759765625,
-0.025787353515625,
0.02056884765625,
-0.0231781005859375,
0.002460479736328125,
-0.00820159912109375,
-0.0311737060546875,
-0.01174163818359375,
0.006221771240234375,
-0.0000451207160949707,
-0.0183563232421875,
-0.0579833984375,
-0.0163726806640625,
-0.059539794921875,
-0.05303955078125,
0.02130126953125,
0.01067352294921875,
-0.030181884765625,
0.028961181640625,
0.0723876953125,
-0.0310516357421875,
-0.007076263427734375,
-0.052398681640625,
-0.0016651153564453125,
-0.01473236083984375,
-0.03240966796875,
0.0035343170166015625,
0.0445556640625,
-0.019073486328125,
-0.059356689453125,
0.026214599609375,
0.0231170654296875,
0.017669677734375,
0.0039825439453125,
-0.00370025634765625,
0.0003635883331298828,
-0.046295166015625,
0.00444793701171875,
-0.0238494873046875,
-0.02130126953125,
-0.00791168212890625,
-0.0026798248291015625,
-0.004718780517578125,
-0.006008148193359375,
-0.0074462890625,
0.0237884521484375,
-0.0033702850341796875,
-0.00901031494140625,
-0.0194244384765625,
-0.003322601318359375,
-0.007793426513671875,
0.0264129638671875,
-0.062164306640625,
0.007709503173828125,
0.09881591796875,
0.011322021484375,
0.0175628662109375,
-0.03912353515625,
0.039031982421875,
-0.0273895263671875,
-0.01261138916015625,
0.003505706787109375,
0.033355712890625,
-0.0494384765625,
-0.0706787109375,
0.01126861572265625,
0.0123138427734375,
-0.01375579833984375,
0.0168609619140625,
0.039642333984375,
0.008880615234375,
-0.00691986083984375,
0.0239410400390625,
-0.009490966796875,
0.025909423828125,
-0.004344940185546875,
0.042755126953125,
-0.03680419921875,
0.0283660888671875,
-0.0293426513671875,
0.01316070556640625,
-0.021820068359375,
0.028472900390625,
0.0007185935974121094,
0.0056304931640625,
-0.0234527587890625,
-0.036590576171875,
-0.0128173828125,
-0.04779052734375,
0.0002846717834472656,
0.0235748291015625,
-0.0274505615234375,
0.031768798828125,
0.0256805419921875,
0.01049041748046875,
-0.007129669189453125,
0.016448974609375,
-0.029266357421875,
-0.01020050048828125,
-0.0007081031799316406,
0.027435302734375,
-0.0134124755859375,
-0.031158447265625,
-0.04486083984375,
0.007495880126953125,
-0.004283905029296875,
-0.07318115234375,
0.051177978515625,
0.0256805419921875,
0.11004638671875,
0.007778167724609375,
0.040679931640625,
0.044891357421875,
-0.005847930908203125,
-0.04718017578125,
0.0249481201171875,
-0.01119232177734375,
-0.02734375,
-0.004878997802734375,
-0.016143798828125,
-0.000056743621826171875,
0.0144500732421875,
-0.01409912109375,
0.035888671875,
-0.036590576171875,
0.0166778564453125,
-0.044342041015625,
0.0033054351806640625,
-0.02239990234375,
0.038970947265625,
0.0457763671875,
0.0211944580078125,
-0.0159912109375,
-0.0036029815673828125,
0.025543212890625,
-0.06915283203125,
-0.0550537109375,
0.00685882568359375,
-0.034454345703125,
0.00977325439453125,
-0.006023406982421875,
0.0002422332763671875,
-0.034088134765625,
0.0030460357666015625,
-0.040283203125,
-0.035064697265625,
-0.00763702392578125,
-0.01558685302734375,
-0.053802490234375,
-0.0282440185546875,
-0.06353759765625,
-0.023040771484375,
-0.0205535888671875,
0.10919189453125,
-0.005779266357421875,
0.0240478515625,
0.007625579833984375,
0.001979827880859375,
0.00577545166015625,
-0.086669921875,
0.01061248779296875,
0.04315185546875,
0.047698974609375,
-0.035400390625,
-0.006954193115234375,
-0.01311492919921875,
-0.0294189453125,
-0.0916748046875,
0.002925872802734375,
-0.012420654296875,
0.03857421875,
0.0243682861328125,
-0.04736328125,
-0.044097900390625,
0.048553466796875,
-0.070556640625,
0.022216796875,
0.053497314453125,
-0.004673004150390625,
-0.014251708984375,
-0.00923919677734375,
-0.0022430419921875,
0.011505126953125,
0.0014104843139648438,
-0.0297393798828125,
0.0063323974609375,
0.0038471221923828125,
-0.0066375732421875,
0.0286712646484375,
0.0335693359375,
0.0292510986328125,
-0.031829833984375,
-0.0196533203125,
-0.0280609130859375,
0.0021820068359375,
-0.0301666259765625,
0.03350830078125,
-0.0260009765625,
-0.01412200927734375,
-0.0006260871887207031,
0.02313232421875,
-0.0236663818359375,
-0.027587890625,
0.02813720703125,
-0.01497650146484375,
-0.015045166015625,
-0.0144195556640625,
-0.05712890625,
-0.00225067138671875,
0.0037899017333984375,
-0.0191497802734375,
-0.00569915771484375,
0.0025634765625,
0.03411865234375,
-0.01285552978515625,
0.02337646484375,
0.031402587890625,
-0.0015306472778320312,
-0.045654296875,
-0.05706787109375,
0.037750244140625,
-0.01739501953125,
0.031280517578125,
0.0906982421875,
0.042724609375,
0.0208282470703125,
0.0188751220703125,
0.008514404296875,
0.035400390625,
0.00997161865234375,
-0.007236480712890625,
0.06591796875,
-0.12261962890625,
-0.00536346435546875,
0.0198516845703125,
0.0031147003173828125,
-0.0223541259765625,
-0.044219970703125,
-0.044952392578125,
-0.01922607421875,
-0.09222412109375,
-0.05474853515625,
0.01000213623046875,
-0.03271484375,
0.0037021636962890625,
-0.005054473876953125,
-0.0165863037109375,
-0.028961181640625,
0.019561767578125,
0.01194000244140625,
-0.00940704345703125,
-0.041351318359375,
-0.046661376953125,
-0.09326171875,
-0.04327392578125,
-0.00579071044921875,
-0.002201080322265625,
-0.0189666748046875,
0.013671875,
0.05303955078125,
0.012786865234375,
-0.041351318359375,
0.023651123046875,
0.0003151893615722656,
-0.033294677734375,
0.005218505859375,
-0.014373779296875,
-0.01800537109375,
-0.035797119140625,
0.01450347900390625,
-0.048126220703125,
-0.040557861328125,
0.024749755859375,
-0.021514892578125,
-0.03302001953125,
0.004634857177734375,
0.006313323974609375,
0.01059722900390625,
0.0220794677734375,
0.026031494140625,
0.006488800048828125,
-0.0237884521484375,
0.0007066726684570312,
-0.0033931732177734375,
-0.0180511474609375,
-0.0035305023193359375,
0.03204345703125,
-0.0325927734375,
-0.03546142578125,
0.003993988037109375,
0.02490234375,
-0.006946563720703125,
-0.0176239013671875,
0.0061187744140625,
0.012908935546875,
0.007843017578125,
0.045989990234375,
-0.0048980712890625,
0.01282501220703125,
-0.021759033203125,
0.0418701171875,
0.00884246826171875,
0.017730712890625,
-0.0233917236328125,
0.005695343017578125,
-0.05322265625,
0.0076141357421875,
0.03643798828125,
-0.016815185546875,
-0.004596710205078125,
0.00946807861328125,
-0.0065155029296875,
0.0239715576171875,
0.0616455078125,
-0.08172607421875,
-0.0003173351287841797,
0.03271484375,
0.027099609375,
-0.033599853515625,
-0.0298919677734375,
-0.09429931640625,
-0.0193939208984375,
-0.0175628662109375,
-0.0126190185546875,
-0.0309295654296875,
-0.012969970703125,
-0.01392364501953125,
-0.0096435546875,
-0.0034694671630859375,
-0.031097412109375,
0.0213623046875,
-0.055633544921875,
0.001575469970703125,
-0.047637939453125,
0.001739501953125,
-0.0947265625,
0.023162841796875,
-0.047515869140625,
-0.046142578125,
-0.0165863037109375,
-0.009063720703125,
0.019012451171875,
0.01910400390625,
-0.038543701171875,
0.002231597900390625,
0.02825927734375,
0.023406982421875,
-0.0204010009765625,
0.00897979736328125,
-0.027313232421875,
0.0201263427734375,
0.0318603515625,
0.0008563995361328125,
0.006008148193359375,
0.0309600830078125,
0.0226593017578125,
-0.056488037109375,
0.01241302490234375,
-0.0214385986328125,
-0.004955291748046875,
0.0280303955078125,
-0.05865478515625,
0.006824493408203125,
-0.050079345703125,
0.0016489028930664062,
0.050201416015625,
-0.00007081031799316406,
0.004596710205078125,
-0.066650390625,
0.0098419189453125,
-0.040679931640625,
-0.02142333984375,
-0.0214691162109375,
0.032470703125,
0.0278472900390625,
0.040618896484375,
0.01290130615234375,
0.01335906982421875,
0.0219268798828125,
0.002590179443359375,
-0.025177001953125,
0.07421875,
0.008880615234375,
0.0158843994140625,
0.06378173828125,
-0.04998779296875,
-0.00582122802734375,
-0.01049041748046875,
0.0235443115234375,
0.01218414306640625,
-0.004329681396484375,
-0.015838623046875,
-0.01218414306640625,
0.0279693603515625,
-0.0208740234375,
0.0117034912109375,
-0.03973388671875,
0.0269012451171875,
0.035308837890625,
-0.0242462158203125,
0.043609619140625,
-0.0203094482421875,
-0.0220947265625,
0.025634765625,
-0.09100341796875,
0.0199737548828125,
-0.0048675537109375,
0.0020542144775390625,
-0.01447296142578125,
-0.00640106201171875,
0.00421142578125,
-0.04547119140625,
0.00445556640625,
-0.0174713134765625,
0.0264434814453125,
-0.028076171875,
-0.0120697021484375,
-0.0299530029296875,
-0.006984710693359375,
0.057647705078125,
0.022216796875,
-0.056488037109375,
0.038177490234375,
-0.0121917724609375,
-0.05401611328125,
0.0215911865234375,
0.0178070068359375,
0.0171966552734375,
0.01439666748046875,
-0.03485107421875,
-0.0088653564453125,
0.01983642578125,
-0.004119873046875,
-0.04840087890625,
-0.020660400390625,
0.01776123046875,
-0.0195159912109375,
0.0029582977294921875,
0.0154266357421875,
0.0209808349609375,
-0.00485992431640625,
-0.0121002197265625,
0.006946563720703125,
0.007648468017578125,
0.01342010498046875,
0.017852783203125,
-0.012054443359375,
0.0260467529296875,
-0.019195556640625,
0.043487548828125,
-0.0518798828125,
0.026153564453125,
0.02294921875,
0.066162109375,
-0.01412200927734375,
-0.060699462890625,
0.0229949951171875,
-0.06451416015625,
-0.0110626220703125,
0.09130859375,
0.004116058349609375,
-0.06610107421875,
-0.04150390625,
-0.05548095703125,
0.0234527587890625,
-0.048492431640625,
0.012451171875,
-0.04693603515625,
0.0003845691680908203,
-0.01183319091796875,
-0.0460205078125,
-0.018585205078125,
-0.003414154052734375,
0.0128326416015625,
-0.03662109375,
-0.04425048828125,
0.0139312744140625,
-0.019134521484375,
0.0139007568359375,
-0.0194091796875,
-0.022003173828125,
0.01232147216796875,
-0.024322509765625,
-0.0007257461547851562,
-0.0243072509765625,
0.00989532470703125,
-0.072265625,
0.028411865234375,
-0.0007843971252441406,
-0.00843048095703125,
-0.06597900390625,
-0.00047397613525390625,
-0.05645751953125,
-0.01256561279296875,
0.004566192626953125,
-0.040374755859375,
-0.038116455078125,
-0.0384521484375,
0.04132080078125,
0.008880615234375,
0.0183258056640625,
-0.02398681640625,
-0.011962890625,
0.0122833251953125,
0.0170745849609375,
0.04144287109375,
-0.02130126953125,
0.014312744140625,
0.04461669921875,
0.0253143310546875,
0.01849365234375,
0.020782470703125,
0.0163421630859375,
-0.03717041015625,
0.03302001953125,
-0.06439208984375,
0.0067596435546875,
-0.0107269287109375,
0.0194244384765625,
-0.0176849365234375,
-0.032135009765625,
-0.0117340087890625,
-0.0008521080017089844,
-0.004161834716796875,
0.025390625,
-0.0019512176513671875,
0.0028400421142578125,
-0.007587432861328125,
-0.0219573974609375,
0.048431396484375,
-0.0189666748046875,
0.020294189453125,
-0.008758544921875,
0.0255889892578125,
-0.0274810791015625,
-0.0204315185546875,
-0.0273895263671875,
0.0011358261108398438,
-0.006988525390625,
0.018463134765625,
0.02301025390625,
-0.039398193359375,
0.01088714599609375,
0.00687408447265625,
-0.0024433135986328125,
-0.0258331298828125,
0.0190887451171875,
0.028106689453125,
-0.048004150390625,
0.039398193359375,
0.0007915496826171875,
-0.0077667236328125,
0.03778076171875,
-0.034515380859375,
-0.0110626220703125,
0.0155029296875,
0.041778564453125,
-0.01044464111328125,
0.005496978759765625,
0.00676727294921875,
0.0113983154296875,
0.024169921875,
-0.0211029052734375,
-0.01763916015625,
-0.03851318359375,
0.061859130859375,
0.03485107421875,
-0.0197601318359375,
0.019927978515625,
0.0018434524536132812,
0.0050811767578125,
0.0088653564453125,
0.0298919677734375,
0.0268096923828125,
-0.040313720703125,
0.0029850006103515625,
0.024627685546875,
0.038543701171875,
0.0006656646728515625,
0.01763916015625,
-0.0172882080078125,
-0.0169219970703125,
-0.0640869140625,
-0.03570556640625,
-0.01251983642578125,
-0.0247650146484375,
0.052490234375,
-0.0223846435546875,
-0.001495361328125,
0.031951904296875,
-0.032012939453125,
0.048431396484375,
-0.01342010498046875,
-0.048065185546875,
0.016876220703125,
-0.01049041748046875,
0.01529693603515625,
0.038330078125,
-0.0246734619140625,
0.0032863616943359375,
-0.01230621337890625,
-0.0171356201171875,
-0.0022735595703125,
-0.026153564453125,
0.049774169921875,
0.0191192626953125,
-0.03594970703125,
0.028839111328125,
-0.015838623046875,
-0.0273284912109375,
-0.04150390625,
-0.019287109375,
-0.044281005859375,
-0.002414703369140625,
-0.05145263671875,
-0.050689697265625,
0.0106964111328125,
-0.07550048828125,
-0.04876708984375,
0.1051025390625,
-0.026214599609375,
0.033966064453125,
-0.004863739013671875,
0.040740966796875,
0.025970458984375,
0.04241943359375,
-0.05548095703125,
0.076904296875,
0.066650390625,
0.01415252685546875,
-0.038421630859375,
-0.0029048919677734375,
-0.01776123046875,
0.00028204917907714844,
0.0234527587890625,
-0.005092620849609375,
0.0201416015625,
-0.018402099609375,
0.040069580078125,
0.03607177734375,
-0.0005321502685546875,
0.00830841064453125,
-0.0265045166015625,
0.034698486328125,
0.005649566650390625,
-0.07537841796875,
0.021728515625,
-0.0364990234375,
-0.028533935546875,
-0.0220184326171875,
-0.0026073455810546875,
-0.0234375,
0.01629638671875,
-0.00946044921875,
-0.0014667510986328125,
0.01861572265625,
-0.0165252685546875,
0.06494140625,
0.02587890625,
0.05853271484375,
0.030731201171875,
0.018646240234375,
-0.007415771484375,
-0.0236358642578125,
0.03857421875,
-0.01273345947265625,
0.01529693603515625,
0.03973388671875,
0.01378631591796875,
-0.0032196044921875,
-0.014801025390625,
0.0031757354736328125,
0.00543212890625,
0.00457763671875,
0.00911712646484375,
-0.00536346435546875,
0.0667724609375,
-0.048065185546875,
-0.052581787109375,
-0.00572967529296875,
0.035430908203125,
0.0010166168212890625,
-0.005626678466796875,
0.0213775634765625,
0.0009560585021972656,
-0.01180267333984375,
-0.02386474609375,
0.0002720355987548828,
-0.021728515625,
-0.01409149169921875,
0.0272674560546875,
-0.01531982421875,
0.00658416748046875,
-0.0008015632629394531,
0.0291595458984375,
0.0618896484375,
-0.00798797607421875,
-0.0000014901161193847656,
-0.005886077880859375,
-0.018829345703125,
-0.00650787353515625,
0.042999267578125,
0.0302886962890625,
0.044830322265625,
-0.04620361328125,
-0.015472412109375,
0.041290283203125,
0.00818634033203125,
-0.0272979736328125,
-0.0423583984375,
-0.007232666015625,
-0.045806884765625,
-0.0245819091796875,
0.02960205078125,
-0.0012607574462890625,
0.01152801513671875,
0.044891357421875,
0.04681396484375,
-0.045135498046875,
-0.00977325439453125,
0.07025146484375,
-0.0196075439453125,
0.0020503997802734375,
-0.04669189453125,
0.0135345458984375,
0.0184783935546875,
0.0074615478515625,
0.01486968994140625,
-0.0007424354553222656,
0.06915283203125,
-0.00507354736328125,
0.01345062255859375,
0.004261016845703125,
-0.01715087890625,
-0.00611114501953125,
-0.004467010498046875,
0.0251312255859375,
0.0029087066650390625,
-0.047149658203125,
-0.005218505859375,
-0.0153350830078125,
-0.0146026611328125,
0.01029205322265625,
0.024658203125,
-0.0247802734375,
0.02899169921875,
0.01287078857421875,
-0.00423431396484375,
0.02606201171875,
-0.008758544921875,
-0.0002694129943847656,
0.013519287109375,
0.0301055908203125,
-0.0028781890869140625,
-0.053466796875,
-0.027862548828125,
-0.017333984375,
0.024139404296875,
0.0094757080078125,
0.03118896484375,
0.0161590576171875,
0.0096588134765625,
0.01090240478515625,
-0.0109710693359375,
-0.0011882781982421875,
0.009063720703125,
-0.05755615234375,
-0.00339508056640625,
0.0175933837890625,
-0.00666046142578125,
-0.09454345703125,
0.0267791748046875,
0.026885986328125,
0.016265869140625,
0.0650634765625,
-0.032684326171875,
-0.00015842914581298828,
-0.0404052734375,
-0.00249481201171875,
-0.02789306640625,
0.0153350830078125,
-0.0012969970703125,
-0.030059814453125,
0.036773681640625,
0.00421905517578125,
0.0018224716186523438,
0.0848388671875,
-0.01557159423828125,
0.029815673828125,
-0.021697998046875,
-0.04290771484375,
-0.028533935546875,
0.0275115966796875,
-0.0237274169921875,
0.0180511474609375,
-0.01434326171875,
-0.02398681640625,
0.0290679931640625,
-0.0071563720703125,
0.00994110107421875,
-0.01020050048828125,
-0.048492431640625,
0.0162353515625,
-0.006824493408203125,
0.006683349609375,
-0.052490234375,
-0.0188140869140625,
0.022674560546875,
0.00632476806640625,
0.026336669921875,
0.008331298828125,
-0.0019588470458984375,
-0.02471923828125,
-0.0178070068359375,
-0.00849151611328125,
-0.0219268798828125,
-0.018341064453125,
0.044189453125,
0.0024871826171875,
0.038818359375,
-0.03546142578125,
0.018157958984375,
-0.01708984375,
-0.061248779296875,
0.044891357421875,
-0.0199127197265625,
0.040252685546875,
-0.024017333984375,
-0.004810333251953125,
-0.010986328125,
-0.0611572265625,
-0.027008056640625,
0.09130859375,
-0.01357269287109375,
-0.00856781005859375,
0.005306243896484375,
0.001926422119140625,
0.0134124755859375,
-0.01358795166015625,
-0.001617431640625,
0.025848388671875,
-0.054290771484375,
-0.03179931640625,
0.03765869140625,
-0.00958251953125,
0.01519775390625,
-0.033721923828125,
-0.03228759765625,
-0.0051727294921875,
0.022003173828125,
-0.00653076171875,
0.004673004150390625,
0.0199737548828125,
-0.01308441162109375,
-0.0289764404296875,
0.0180511474609375,
0.00920867919921875,
-0.0282440185546875,
-0.050933837890625,
-0.004619598388671875,
0.00899505615234375,
-0.010650634765625,
-0.0246429443359375,
-0.030487060546875,
-0.05316162109375,
0.01137542724609375,
0.029541015625,
0.044342041015625,
0.01910400390625,
-0.0013208389282226562,
0.0269317626953125,
0.050872802734375,
0.056671142578125,
0.029632568359375,
-0.004604339599609375,
-0.0026073455810546875,
0.037750244140625,
0.020416259765625,
-0.040283203125,
0.0290985107421875,
0.01209259033203125,
0.010040283203125,
-0.0005464553833007812,
-0.0021305084228515625,
0.005947113037109375,
0.0144805908203125,
0.025787353515625,
0.018096923828125,
-0.00435638427734375,
-0.0216064453125,
-0.07916259765625,
-0.033050537109375,
-0.0198211669921875,
-0.003910064697265625,
0.01155853271484375,
-0.0576171875,
0.036834716796875,
-0.0148773193359375,
0.0027790069580078125,
-0.006801605224609375,
-0.030517578125,
0.00843048095703125,
-0.01393890380859375,
0.01438140869140625,
-0.0011205673217773438,
0.0113372802734375,
-0.00533294677734375,
-0.0157470703125,
0.0012445449829101562,
0.0233612060546875,
-0.0312347412109375,
0.0191192626953125,
-0.00537872314453125,
0.01422119140625,
0.0086517333984375,
0.051910400390625,
-0.061798095703125,
-0.0267791748046875,
0.0200958251953125,
0.03729248046875,
-0.008392333984375,
-0.0198822021484375,
-0.0038127899169921875,
0.0117645263671875,
0.006412506103515625,
0.0272369384765625,
0.0194549560546875,
-0.0247955322265625,
-0.01194000244140625,
-0.003387451171875,
-0.0136871337890625,
0.0273590087890625,
0.00608062744140625,
0.0045623779296875,
-0.0274810791015625,
0.00519561767578125,
0.033233642578125,
-0.04730224609375,
0.0016345977783203125,
0.005977630615234375,
0.0054779052734375,
-0.046875,
0.048980712890625,
0.0201263427734375,
-0.00830841064453125,
0.0374755859375
]
|
e90957d9da6a985647dee7c60facd9de4b34602b | Wordpress Stackexchange
Q: How to change 'with_front" key from an existing custom post type? I have a CPT called 'experts', that has been created in a theme I bought, and I can't find out where nor where to change it.
I need to change a parameter to 'with_front' => false
Because my general permaling structure goes with /blog and I do'nt want experts to be in /blog/experts.
Is there a way I could do that adding something in the functions file?
I have tried this (How to set "with_front'=>false" to a plugin-generated cpt?) and various things, but could not get it to work.
Thanks :)
A: You could try the newly register_post_type_args filter to adjust it.
Here's an untested example:
/**
* Set 'with_front' to false for the 'experts' post type.
*/
add_filter( 'register_post_type_args', function( $args, $post_type )
{
if( 'teachers' === $post_type && is_array( $args ) )
$args['rewrite']['with_front'] = false;
return $args;
}, 99, 2 );
Updated with new info from @Agnes: the post type is teachers not experts.
| Q: How to change 'with_front" key from an existing custom post type? I have a CPT called 'experts', that has been created in a theme I bought, and I can't find out where nor where to change it.
I need to change a parameter to 'with_front' => false
Because my general permaling structure goes with /blog and I do'nt want experts to be in /blog/experts.
Is there a way I could do that adding something in the functions file?
I have tried this (How to set "with_front'=>false" to a plugin-generated cpt?) and various things, but could not get it to work.
Thanks :)
A: You could try the newly register_post_type_args filter to adjust it.
Here's an untested example:
/**
* Set 'with_front' to false for the 'experts' post type.
*/
add_filter( 'register_post_type_args', function( $args, $post_type )
{
if( 'teachers' === $post_type && is_array( $args ) )
$args['rewrite']['with_front'] = false;
return $args;
}, 99, 2 );
Updated with new info from @Agnes: the post type is teachers not experts.
A: Additionally, if the CPT has taxonomies associated with it, I've successfully used the following code to rewrite those as well:
/**
* Set 'with_front' to false for the 'portfolio_category' post taxonomy.
*/
add_filter( 'register_taxonomy_args', function( $args, $taxonomy )
{
if( 'portfolio_category' === $taxonomy && is_array( $args ) )
$args['rewrite']['with_front'] = false;
return $args;
}, 99, 2 );
In case that is helpful to anyone.
A: This solution works, added to parent theme functions.php:
add_filter( 'register_post_type_args', function( $args, $post_type )
{
$args['rewrite']['with_front'] = false;
return $args;
}, 10, 2 );
| wordpress | {
"language": "en",
"length": 258,
"provenance": "stackexchange_00019.jsonl.gz:464872",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/224371"
} | [
0.025238037109375,
-0.0008182525634765625,
0.018768310546875,
-0.002201080322265625,
0.00024890899658203125,
-0.012847900390625,
0.043121337890625,
-0.0341796875,
-0.02490234375,
0.01129150390625,
0.0189666748046875,
-0.00882720947265625,
-0.0178070068359375,
-0.049774169921875,
0.005306243896484375,
-0.03369140625,
0.015869140625,
-0.0171051025390625,
0.01568603515625,
-0.0294342041015625,
0.044677734375,
-0.026519775390625,
0.016143798828125,
0.01343536376953125,
0.035980224609375,
-0.037841796875,
0.048187255859375,
-0.02874755859375,
0.046295166015625,
-0.00022935867309570312,
0.043304443359375,
-0.027313232421875,
-0.007015228271484375,
0.05169677734375,
-0.0300140380859375,
0.0296783447265625,
-0.04034423828125,
0.0517578125,
0.0279998779296875,
0.01214599609375,
-0.001239776611328125,
0.006496429443359375,
-0.057037353515625,
0.0350341796875,
-0.0465087890625,
-0.043701171875,
-0.008453369140625,
-0.021331787109375,
0.0140533447265625,
-0.00023376941680908203,
-0.0269622802734375,
0.0227203369140625,
-0.00914764404296875,
-0.0130767822265625,
-0.001102447509765625,
-0.006267547607421875,
-0.037994384765625,
-0.01316070556640625,
0.01529693603515625,
0.0712890625,
0.04296875,
0.003055572509765625,
-0.0197906494140625,
-0.0408935546875,
0.00949859619140625,
0.00945281982421875,
-0.01013946533203125,
0.02783203125,
-0.050567626953125,
-0.005039215087890625,
0.02593994140625,
-0.052001953125,
0.0239105224609375,
-0.0126495361328125,
-0.047943115234375,
-0.03619384765625,
0.0199127197265625,
-0.01548004150390625,
0.0202178955078125,
-0.0270538330078125,
-0.0087890625,
0.022308349609375,
-0.037017822265625,
-0.03839111328125,
-0.006092071533203125,
-0.034881591796875,
-0.0117950439453125,
0.006511688232421875,
-0.01523590087890625,
-0.0220489501953125,
-0.007022857666015625,
-0.0280914306640625,
-0.017547607421875,
0.03448486328125,
-0.003513336181640625,
-0.0155792236328125,
0.03106689453125,
0.03436279296875,
0.00009876489639282227,
0.0070953369140625,
0.000014007091522216797,
-0.045745849609375,
0.0283966064453125,
-0.052093505859375,
-0.0026798248291015625,
0.05426025390625,
0.02044677734375,
0.0003006458282470703,
0.01081085205078125,
-0.0036678314208984375,
0.001674652099609375,
0.004222869873046875,
-0.03436279296875,
-0.0163421630859375,
-0.03369140625,
0.033782958984375,
-0.041290283203125,
0.01387786865234375,
-0.0012350082397460938,
0.054351806640625,
0.0028839111328125,
0.038238525390625,
0.053253173828125,
-0.063232421875,
0.0031757354736328125,
0.01132965087890625,
-0.0170135498046875,
-0.09906005859375,
0.01244354248046875,
0.0557861328125,
-0.03338623046875,
-0.0110015869140625,
0.10595703125,
0.028411865234375,
0.0236053466796875,
-0.044769287109375,
-0.004878997802734375,
-0.0413818359375,
-0.0418701171875,
0.0306243896484375,
-0.01279449462890625,
-0.0577392578125,
0.007904052734375,
-0.0196990966796875,
0.00727081298828125,
0.00830078125,
0.01316070556640625,
0.022918701171875,
-0.037445068359375,
-0.01543426513671875,
0.04254150390625,
-0.0467529296875,
0.046783447265625,
-0.007171630859375,
-0.0168609619140625,
-0.01441192626953125,
0.0168914794921875,
-0.005657196044921875,
-0.04278564453125,
-0.0341796875,
-0.0011539459228515625,
-0.025482177734375,
-0.01432037353515625,
-0.0758056640625,
-0.09112548828125,
0.043060302734375,
-0.0458984375,
-0.0118408203125,
0.02252197265625,
0.0109405517578125,
0.02313232421875,
-0.00733184814453125,
-0.01311492919921875,
0.019622802734375,
0.0024776458740234375,
0.0194244384765625,
-0.003246307373046875,
0.02716064453125,
0.025299072265625,
0.0604248046875,
0.017578125,
-0.032440185546875,
0.04681396484375,
-0.0269012451171875,
-0.044097900390625,
0.017364501953125,
0.0059661865234375,
0.040771484375,
0.0086517333984375,
0.0269622802734375,
0.01271820068359375,
0.011566162109375,
-0.00165557861328125,
-0.01739501953125,
0.0047607421875,
-0.02728271484375,
-0.0089569091796875,
-0.024749755859375,
-0.01520538330078125,
0.035919189453125,
0.0191497802734375,
0.01995849609375,
0.0025043487548828125,
-0.034912109375,
-0.07073974609375,
0.00616455078125,
-0.0250701904296875,
0.051666259765625,
0.047454833984375,
0.035003662109375,
-0.00966644287109375,
0.0145111083984375,
-0.01418304443359375,
0.0064849853515625,
-0.0210418701171875,
0.01474761962890625,
0.0225372314453125,
0.007320404052734375,
0.0041046142578125,
0.0258636474609375,
0.0012645721435546875,
-0.0011014938354492188,
-0.007537841796875,
0.00948333740234375,
0.039154052734375,
0.002689361572265625,
-0.003936767578125,
-0.01352691650390625,
0.0018091201782226562,
0.01013946533203125,
-0.04638671875,
0.0168609619140625,
0.043731689453125,
-0.00653839111328125,
-0.0360107421875,
0.022186279296875,
-0.01018524169921875,
-0.07501220703125,
-0.0298309326171875,
0.053375244140625,
0.0225067138671875,
0.01088714599609375,
0.0020275115966796875,
0.03143310546875,
0.007335662841796875,
-0.01421356201171875,
0.0209197998046875,
0.006511688232421875,
0.0198516845703125,
0.03662109375,
-0.00885009765625,
-0.01605224609375,
0.0384521484375,
-0.06036376953125,
0.0282440185546875,
0.0211639404296875,
-0.027435302734375,
-0.0151214599609375,
0.07183837890625,
-0.048980712890625,
0.00933837890625,
-0.082763671875,
-0.03009033203125,
-0.030914306640625,
0.0452880859375,
-0.0015115737915039062,
0.0182952880859375,
0.00501251220703125,
-0.049560546875,
0.033477783203125,
0.031341552734375,
0.01085662841796875,
-0.00015616416931152344,
0.038482666015625,
0.01495361328125,
0.004650115966796875,
-0.034149169921875,
0.004360198974609375,
-0.0062408447265625,
0.0014772415161132812,
-0.027313232421875,
-0.030242919921875,
-0.004970550537109375,
0.009246826171875,
0.0017652511596679688,
-0.03387451171875,
0.060272216796875,
0.049774169921875,
0.01055145263671875,
-0.0308837890625,
-0.00473785400390625,
0.021087646484375,
-0.0192108154296875,
0.03765869140625,
0.018402099609375,
-0.039703369140625,
-0.038543701171875,
-0.05035400390625,
0.029632568359375,
-0.034515380859375,
0.059295654296875,
0.0723876953125,
0.018463134765625,
-0.00115203857421875,
0.01800537109375,
-0.022735595703125,
0.0037384033203125,
0.04852294921875,
0.012542724609375,
-0.0477294921875,
-0.0169219970703125,
-0.005565643310546875,
0.025177001953125,
0.05621337890625,
-0.01300048828125,
-0.03857421875,
0.010711669921875,
0.047088623046875,
-0.01561737060546875,
-0.0008988380432128906,
-0.0064849853515625,
-0.03509521484375,
-0.0020923614501953125,
0.005615234375,
-0.018798828125,
-0.004608154296875,
0.034454345703125,
0.0007815361022949219,
0.045501708984375,
0.0233917236328125,
-0.027862548828125,
0.0196533203125,
-0.052978515625,
-0.017913818359375,
0.004673004150390625,
0.010833740234375,
0.01082611083984375,
0.050689697265625,
0.0227813720703125,
0.01432037353515625,
0.048736572265625,
0.01441192626953125,
-0.01395416259765625,
-0.0197906494140625,
0.041229248046875,
-0.035003662109375,
0.002864837646484375,
0.0003046989440917969,
-0.01531219482421875,
0.029693603515625,
-0.02410888671875,
-0.023040771484375,
-0.016021728515625,
-0.04302978515625,
-0.0193939208984375,
0.06146240234375,
0.0292510986328125,
-0.017547607421875,
0.00722503662109375,
-0.052947998046875,
-0.0265045166015625,
0.016754150390625,
-0.0241241455078125,
-0.0200042724609375,
-0.0111236572265625,
-0.0124359130859375,
-0.004047393798828125,
0.0274658203125,
0.044708251953125,
0.0201263427734375,
0.050079345703125,
-0.0138397216796875,
0.0295867919921875,
0.0198211669921875,
0.030242919921875,
-0.07330322265625,
-0.018890380859375,
-0.0216064453125,
0.0247802734375,
-0.0111083984375,
0.035552978515625,
-0.00125885009765625,
0.01502227783203125,
-0.0199737548828125,
-0.08062744140625,
0.03216552734375,
-0.06561279296875,
-0.008941650390625,
-0.0164642333984375,
0.003398895263671875,
0.0244903564453125,
0.0694580078125,
-0.0261688232421875,
0.004978179931640625,
-0.003620147705078125,
-0.0056610107421875,
-0.002773284912109375,
-0.05072021484375,
-0.0631103515625,
-0.01476287841796875,
-0.0228271484375,
0.005428314208984375,
-0.01039886474609375,
-0.01425933837890625,
-0.00797271728515625,
-0.0357666015625,
-0.00437164306640625,
-0.020416259765625,
0.0596923828125,
-0.0335693359375,
0.0018548965454101562,
0.0054168701171875,
-0.017486572265625,
-0.017547607421875,
-0.037261962890625,
0.0008521080017089844,
-0.11224365234375,
-0.0278778076171875,
0.01617431640625,
0.07513427734375,
-0.02685546875,
-0.0008883476257324219,
-0.0408935546875,
0.061309814453125,
0.04534912109375,
-0.03851318359375,
0.035369873046875,
-0.0265960693359375,
0.01438140869140625,
0.005420684814453125,
-0.0157623291015625,
-0.0093841552734375,
0.00093841552734375,
0.042816162109375,
-0.042938232421875,
-0.01316070556640625,
-0.00791168212890625,
-0.054351806640625,
0.0928955078125,
-0.0789794921875,
-0.0634765625,
-0.03179931640625,
-0.017791748046875,
0.0226287841796875,
0.00763702392578125,
-0.002040863037109375,
-0.066162109375,
-0.059600830078125,
0.012542724609375,
-0.025421142578125,
-0.020355224609375,
0.00946044921875,
0.07196044921875,
0.01214599609375,
-0.0011749267578125,
0.008148193359375,
-0.045013427734375,
0.0308837890625,
-0.03955078125,
0.005889892578125,
0.025299072265625,
-0.01336669921875,
0.006938934326171875,
-0.0264129638671875,
-0.017181396484375,
-0.0264739990234375,
0.1263427734375,
0.01348876953125,
-0.00913238525390625,
0.026763916015625,
-0.035797119140625,
-0.0009393692016601562,
-0.017669677734375,
-0.0010309219360351562,
0.012542724609375,
0.023651123046875,
0.00643157958984375,
-0.01442718505859375,
0.00421905517578125,
-0.0029754638671875,
-0.0213470458984375,
0.029815673828125,
0.0060882568359375,
0.006336212158203125,
0.020416259765625,
0.0033111572265625,
-0.01629638671875,
-0.034637451171875,
0.0007548332214355469,
-0.007007598876953125,
0.01445770263671875,
-0.0119476318359375,
0.0119476318359375,
0.034942626953125,
-0.01000213623046875,
-0.035919189453125,
-0.01096343994140625,
0.032470703125,
-0.0290985107421875,
-0.06634521484375,
-0.027862548828125,
-0.0234832763671875,
0.0287322998046875,
0.04180908203125,
-0.0163726806640625,
0.06549072265625,
0.04913330078125,
-0.021026611328125,
-0.0190887451171875,
-0.0450439453125,
0.0169830322265625,
-0.06903076171875,
0.03466796875,
0.031280517578125,
-0.0061187744140625,
0.00614166259765625,
0.031280517578125,
0.04656982421875,
0.005615234375,
-0.0266265869140625,
-0.0018339157104492188,
-0.0008449554443359375,
0.00606536865234375,
0.0230255126953125,
-0.00039458274841308594,
0.0203857421875,
-0.0321044921875,
0.037872314453125,
-0.028472900390625,
-0.0069580078125,
0.0289459228515625,
0.011993408203125,
0.010406494140625,
-0.004360198974609375,
-0.0012683868408203125,
0.017181396484375,
-0.0210723876953125,
0.0102996826171875,
0.00531005859375,
-0.028411865234375,
0.00450897216796875,
0.005908966064453125,
-0.003719329833984375,
-0.0126495361328125,
-0.01457977294921875,
-0.0092926025390625,
-0.0280914306640625,
-0.011138916015625,
0.0178070068359375,
-0.04583740234375,
0.012176513671875,
0.0309906005859375,
-0.01062774658203125,
-0.01035308837890625,
-0.0034694671630859375,
-0.0166778564453125,
-0.0274505615234375,
-0.00701904296875,
-0.006439208984375,
0.0212554931640625,
-0.0012617111206054688,
0.043731689453125,
-0.01479339599609375,
-0.0263214111328125,
0.0391845703125,
-0.001190185546875,
0.05517578125,
0.012176513671875,
-0.01422119140625,
0.00394439697265625,
-0.0195770263671875,
-0.01275634765625,
-0.044189453125,
-0.029510498046875,
-0.04864501953125,
0.0003654956817626953,
-0.00433349609375,
0.026641845703125,
-0.041168212890625,
-0.050537109375,
-0.0231170654296875,
-0.0004475116729736328,
0.0240325927734375,
0.048095703125,
0.004589080810546875,
0.01275634765625,
-0.01058197021484375,
-0.0111846923828125,
-0.01226806640625,
-0.01238250732421875,
-0.0155181884765625,
0.0116119384765625,
0.01451873779296875,
-0.09503173828125,
-0.01180267333984375,
0.0028095245361328125,
-0.054473876953125,
0.020599365234375,
0.01177215576171875,
-0.00011551380157470703,
0.032684326171875,
0.00429534912109375,
-0.00799560546875,
-0.01473236083984375,
-0.00841522216796875,
-0.0172271728515625,
0.051239013671875,
0.0099029541015625,
-0.00487518310546875,
0.038482666015625,
-0.01268768310546875,
-0.0138092041015625,
-0.0207672119140625,
0.000316619873046875,
0.004222869873046875,
0.0171966552734375,
-0.031829833984375,
0.01172637939453125,
0.0458984375,
0.0347900390625,
0.03753662109375,
0.027313232421875,
0.025482177734375,
-0.0014495849609375,
-0.00244903564453125,
-0.035003662109375,
0.0548095703125,
0.04022216796875,
0.015350341796875,
0.03375244140625,
0.03106689453125,
0.01219940185546875,
0.00540924072265625,
0.038330078125,
0.04217529296875,
-0.07080078125,
0.0191497802734375,
0.028778076171875,
0.0204925537109375,
0.02569580078125,
0.027069091796875,
-0.0002275705337524414,
0.0325927734375,
-0.01346588134765625,
-0.0160064697265625,
-0.006969451904296875,
0.0270843505859375,
0.031707763671875,
0.0033245086669921875,
-0.02490234375,
0.0560302734375,
0.0153350830078125,
-0.00855255126953125,
0.01201629638671875,
-0.0013484954833984375,
0.00853729248046875,
-0.03216552734375,
0.027008056640625,
-0.00531768798828125,
-0.03643798828125,
-0.10272216796875,
-0.01364898681640625,
0.00662994384765625,
-0.031585693359375,
0.049560546875,
-0.005146026611328125,
0.017852783203125,
0.008209228515625,
-0.0106353759765625,
-0.0015354156494140625,
-0.04107666015625,
0.0054931640625,
-0.042694091796875,
-0.044036865234375,
0.011962890625,
0.0196533203125,
-0.002254486083984375,
0.039031982421875,
0.00992584228515625,
-0.05926513671875,
-0.0141448974609375,
-0.054901123046875,
0.00911712646484375,
-0.047607421875,
0.01043701171875,
0.018768310546875,
0.0020809173583984375,
0.006866455078125,
0.01190948486328125,
-0.0236663818359375,
-0.030548095703125,
-0.0124969482421875,
-0.006855010986328125,
-0.05792236328125,
-0.0026950836181640625,
-0.0159454345703125,
-0.05181884765625,
0.1226806640625,
-0.0416259765625,
0.01277923583984375,
-0.00042629241943359375,
0.058013916015625,
-0.02313232421875,
0.0262298583984375,
-0.01302337646484375,
0.028594970703125,
-0.046722412109375,
0.0121917724609375,
-0.05780029296875,
-0.002033233642578125,
-0.024200439453125,
0.0293731689453125,
0.05767822265625,
0.012176513671875,
-0.019256591796875,
0.0193634033203125,
0.07452392578125,
0.036712646484375,
0.0019626617431640625,
0.0266876220703125,
-0.020263671875,
0.025726318359375,
-0.00518035888671875,
-0.0380859375,
0.03662109375,
-0.046630859375,
-0.04840087890625,
0.0025424957275390625,
0.029327392578125,
0.049530029296875,
-0.018768310546875,
-0.0250244140625,
-0.01386260986328125,
-0.021240234375,
0.0210723876953125,
-0.01898193359375,
0.0193023681640625,
0.05255126953125,
0.0791015625,
-0.006916046142578125,
0.05084228515625,
-0.038970947265625,
0.0740966796875,
0.016387939453125,
0.00756072998046875,
0.02215576171875,
0.0047607421875,
0.042755126953125,
-0.0159912109375,
-0.007244110107421875,
0.01910400390625,
0.0049285888671875,
0.0179595947265625,
0.056121826171875,
0.0216064453125,
0.00223541259765625,
0.055877685546875,
0.0411376953125,
0.0234527587890625,
-0.0498046875,
-0.010284423828125,
0.010101318359375,
-0.009613037109375,
-0.0189971923828125,
-0.021697998046875,
-0.002422332763671875,
-0.004901885986328125,
0.0005440711975097656,
-0.04302978515625,
0.039398193359375,
0.03515625,
0.017730712890625,
-0.0262908935546875,
-0.03338623046875,
-0.052032470703125,
0.04803466796875,
-0.08074951171875,
0.031036376953125,
0.016265869140625,
0.060211181640625,
0.0292205810546875,
0.024810791015625,
0.038360595703125,
-0.0186004638671875,
-0.027801513671875,
0.007045745849609375,
-0.0294647216796875,
0.037261962890625,
-0.038726806640625,
-0.0019989013671875,
-0.03582763671875,
0.036407470703125,
0.04638671875,
0.044219970703125,
0.0178070068359375,
-0.0069580078125,
0.03802490234375,
0.040191650390625,
0.0308685302734375,
-0.0067291259765625,
-0.004680633544921875,
-0.0537109375,
0.023040771484375,
0.01171875,
0.01108551025390625,
-0.01788330078125,
0.0209503173828125,
0.0316162109375,
-0.005603790283203125,
0.042999267578125,
0.006656646728515625,
0.025054931640625,
0.039337158203125,
0.01551055908203125,
0.036834716796875,
0.02093505859375,
-0.03399658203125,
0.0238800048828125,
-0.06524658203125,
-0.08831787109375,
0.0308685302734375,
0.03631591796875,
-0.0321044921875,
0.01558685302734375,
-0.006084442138671875,
0.0021152496337890625,
0.0017948150634765625,
-0.0207061767578125,
0.0242767333984375,
0.0109100341796875,
-0.01389312744140625,
0.01474761962890625,
-0.032440185546875,
-0.0011749267578125,
-0.006557464599609375,
0.010955810546875,
0.00923919677734375,
0.0733642578125,
0.003139495849609375,
0.00982666015625,
0.0310516357421875,
0.0084991455078125,
-0.0024356842041015625,
-0.00530242919921875,
0.028045654296875,
-0.0251007080078125,
0.021484375,
0.01262664794921875,
-0.044921875,
0.01235198974609375,
0.05120849609375,
-0.01483917236328125,
0.0231781005859375,
-0.0163116455078125,
0.0157012939453125,
-0.04583740234375,
-0.013702392578125,
-0.0218353271484375,
-0.04815673828125,
-0.053131103515625,
0.014434814453125,
0.00873565673828125,
0.0246124267578125,
-0.052703857421875,
-0.0111236572265625,
0.0306549072265625,
-0.033538818359375,
0.0379638671875,
-0.01042938232421875,
0.05096435546875,
0.0279693603515625,
0.0049285888671875,
-0.01146697998046875,
-0.00960540771484375,
-0.0249176025390625,
0.013671875,
0.003414154052734375,
0.0214080810546875,
-0.0014467239379882812,
-0.008697509765625,
-0.005889892578125,
0.001636505126953125,
0.00025153160095214844,
-0.01531982421875,
-0.01340484619140625,
0.025604248046875,
-0.028411865234375,
-0.051849365234375,
0.005401611328125,
-0.016448974609375,
-0.01280975341796875,
-0.015869140625,
0.00583648681640625,
-0.00754547119140625,
-0.0311431884765625,
-0.0180206298828125,
0.00495147705078125,
0.05389404296875,
-0.01230621337890625,
-0.04071044921875,
0.0241241455078125,
-0.07135009765625,
0.02398681640625,
-0.006893157958984375,
-0.04205322265625,
0.026702880859375,
0.038238525390625,
-0.0245361328125,
0.0190582275390625,
-0.049285888671875,
-0.048370361328125,
-0.0214691162109375,
0.0174560546875,
0.038116455078125,
-0.0019779205322265625,
0.0050506591796875,
0.004974365234375,
-0.01427459716796875,
0.06378173828125,
-0.06561279296875,
-0.005615234375,
0.00592041015625,
0.0258941650390625,
-0.034820556640625,
-0.0755615234375,
0.01702880859375,
-0.06658935546875,
-0.0174407958984375,
-0.0226898193359375,
-0.0231475830078125,
-0.021484375,
-0.0450439453125,
-0.04791259765625,
0.06097412109375,
-0.00634765625,
-0.0193328857421875,
-0.022674560546875,
-0.04583740234375,
-0.0187225341796875,
0.057861328125,
0.007465362548828125,
-0.04132080078125,
-0.037628173828125,
0.0262603759765625,
-0.01113128662109375,
0.06939697265625,
0.013031005859375,
-0.028472900390625,
-0.003582000732421875,
-0.007350921630859375,
0.0005688667297363281,
0.00395965576171875,
0.01025390625,
-0.00762176513671875,
0.026336669921875,
0.035247802734375,
-0.028350830078125,
0.01497650146484375,
-0.005245208740234375,
0.00597381591796875,
0.005550384521484375,
-0.0755615234375,
-0.006015777587890625,
-0.015411376953125,
0.049072265625,
-0.00787353515625,
0.00446319580078125,
-0.0252685546875,
0.005123138427734375,
-0.03814697265625,
0.029876708984375,
0.0181732177734375,
-0.0030689239501953125,
-0.03857421875,
-0.002788543701171875,
0.035736083984375,
-0.031646728515625,
0.0021648406982421875,
0.02789306640625,
-0.0184783935546875,
0.0011739730834960938,
0.0292205810546875,
-0.034881591796875,
0.00543212890625,
0.0316162109375,
0.0239410400390625,
-0.034393310546875,
-0.0167999267578125,
-0.019012451171875,
0.004909515380859375,
0.0018100738525390625,
-0.037078857421875,
-0.047821044921875,
0.0106964111328125,
0.0316162109375,
0.0273590087890625,
0.0011053085327148438,
0.01378631591796875,
0.0013532638549804688,
0.038970947265625,
-0.0142822265625,
-0.0107574462890625,
-0.0205078125,
-0.0316162109375,
0.007045745849609375,
0.033477783203125,
-0.0014944076538085938,
0.079833984375,
0.00397491455078125,
-0.028167724609375,
-0.00147247314453125,
0.01097869873046875,
-0.006683349609375,
-0.0186309814453125,
0.05242919921875,
-0.07000732421875,
0.010894775390625,
0.035736083984375,
-0.000690460205078125,
-0.007053375244140625,
0.0091705322265625,
0.0408935546875,
0.00731658935546875,
0.0013093948364257812
]
|
b3cced4d729bdcb6a5abd92358df094a11e4f324 | Wordpress Stackexchange
Q: Best practice to import/export specific pages and posts I just started using a local host to work on my website on my desktop (using LAMP from Bitnami).
The native wordpress export feature for pages and posts lets me choose date range, but only a month at a time.
Is there a method for exporting selected pieces of updated content up to a live site from local host?
| Q: Best practice to import/export specific pages and posts I just started using a local host to work on my website on my desktop (using LAMP from Bitnami).
The native wordpress export feature for pages and posts lets me choose date range, but only a month at a time.
Is there a method for exporting selected pieces of updated content up to a live site from local host?
| wordpress | {
"language": "en",
"length": 68,
"provenance": "stackexchange_00019.jsonl.gz:464877",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/224395"
} | [
0.022216796875,
-0.0214385986328125,
0.0174102783203125,
0.0108489990234375,
-0.037628173828125,
-0.0189666748046875,
0.0455322265625,
-0.0208587646484375,
0.0276641845703125,
-0.006702423095703125,
0.01328277587890625,
-0.0068359375,
-0.044342041015625,
-0.043670654296875,
-0.0188446044921875,
-0.0210723876953125,
0.047088623046875,
-0.03546142578125,
-0.0012254714965820312,
-0.0025997161865234375,
-0.022613525390625,
0.0390625,
-0.0032596588134765625,
0.03173828125,
0.055206298828125,
0.007633209228515625,
0.006011962890625,
0.0203857421875,
0.048492431640625,
0.0312042236328125,
0.0364990234375,
-0.076171875,
0.0160369873046875,
0.007022857666015625,
-0.00665283203125,
-0.00299072265625,
-0.001903533935546875,
0.00577545166015625,
-0.007106781005859375,
0.032318115234375,
-0.0102691650390625,
0.0193939208984375,
0.036895751953125,
-0.01904296875,
-0.01273345947265625,
-0.0261688232421875,
0.00196075439453125,
-0.0389404296875,
-0.0019140243530273438,
0.005413055419921875,
0.017547607421875,
-0.022705078125,
0.0111083984375,
0.035919189453125,
-0.033935546875,
-0.039459228515625,
-0.02679443359375,
0.059234619140625,
0.051422119140625,
-0.043243408203125,
-0.06640625,
-0.036285400390625,
0.0345458984375,
-0.0050506591796875,
0.01389312744140625,
-0.0013456344604492188,
0.024078369140625,
0.0251617431640625,
-0.06805419921875,
0.003841400146484375,
0.064208984375,
-0.039306640625,
0.028167724609375,
-0.0450439453125,
-0.00269317626953125,
0.0171356201171875,
-0.0166778564453125,
-0.007144927978515625,
0.023223876953125,
-0.01412200927734375,
-0.045166015625,
0.004222869873046875,
-0.0458984375,
-0.11077880859375,
0.06732177734375,
-0.03363037109375,
-0.0185546875,
0.005733489990234375,
-0.0255584716796875,
0.007678985595703125,
-0.0164337158203125,
0.000637054443359375,
-0.027099609375,
-0.007381439208984375,
-0.0038585662841796875,
-0.0113677978515625,
-0.040924072265625,
-0.0003292560577392578,
0.0021381378173828125,
0.020904541015625,
-0.002796173095703125,
-0.01267242431640625,
0.01361846923828125,
-0.0130462646484375,
0.01503753662109375,
0.0242919921875,
0.00007492303848266602,
-0.01068115234375,
0.047821044921875,
0.0236663818359375,
-0.01531219482421875,
0.055938720703125,
0.0296478271484375,
0.00955963134765625,
-0.01837158203125,
0.00495147705078125,
0.0157318115234375,
0.0180816650390625,
0.00791168212890625,
0.005878448486328125,
-0.0084381103515625,
0.0229949951171875,
-0.0426025390625,
0.00363922119140625,
0.005764007568359375,
0.01306915283203125,
0.006938934326171875,
-0.005878448486328125,
0.02923583984375,
0.0667724609375,
-0.027618408203125,
-0.018157958984375,
0.03912353515625,
-0.01206207275390625,
-0.023223876953125,
-0.04034423828125,
0.041717529296875,
-0.0019626617431640625,
0.0112762451171875,
0.025665283203125,
-0.0430908203125,
-0.010467529296875,
0.0167388916015625,
-0.0242767333984375,
0.0235748291015625,
-0.0157623291015625,
0.0008244514465332031,
0.05169677734375,
0.0161895751953125,
0.017578125,
0.0265350341796875,
-0.022735595703125,
0.017120361328125,
-0.00637054443359375,
0.029449462890625,
-0.06475830078125,
0.0215301513671875,
-0.047210693359375,
0.0460205078125,
-0.031890869140625,
0.0194244384765625,
-0.0081329345703125,
0.016632080078125,
-0.0019378662109375,
-0.026397705078125,
-0.0010442733764648438,
-0.0207977294921875,
-0.0007262229919433594,
0.024871826171875,
-0.0019016265869140625,
-0.02032470703125,
-0.0271453857421875,
0.0235443115234375,
-0.0210113525390625,
-0.03271484375,
0.042694091796875,
-0.021148681640625,
-0.0033054351806640625,
0.0203704833984375,
0.019561767578125,
0.0179595947265625,
-0.00861358642578125,
0.0174407958984375,
0.03857421875,
0.00775909423828125,
-0.0014848709106445312,
0.009429931640625,
0.02703857421875,
-0.0005283355712890625,
0.029815673828125,
-0.048492431640625,
-0.0040130615234375,
-0.036224365234375,
0.015869140625,
-0.0136260986328125,
-0.009796142578125,
0.01296234130859375,
0.015716552734375,
-0.00382232666015625,
-0.039886474609375,
-0.01003265380859375,
0.01885986328125,
-0.0227813720703125,
0.0340576171875,
-0.0120849609375,
0.00522613525390625,
-0.0040435791015625,
0.0239715576171875,
0.015106201171875,
-0.0019464492797851562,
0.00470733642578125,
0.01654052734375,
0.002391815185546875,
-0.07598876953125,
-0.06964111328125,
0.026458740234375,
-0.00986480712890625,
-0.01800537109375,
-0.009246826171875,
-0.0108489990234375,
0.00255584716796875,
-0.0080718994140625,
-0.0159759521484375,
0.0233917236328125,
0.015777587890625,
0.01387786865234375,
-0.035369873046875,
-0.00525665283203125,
-0.00872039794921875,
0.01021575927734375,
-0.0189666748046875,
0.04791259765625,
0.018646240234375,
0.030670166015625,
-0.02166748046875,
0.0134124755859375,
-0.00994873046875,
0.01184844970703125,
-0.0184173583984375,
0.0269317626953125,
0.016021728515625,
0.01922607421875,
0.006618499755859375,
0.056854248046875,
0.02960205078125,
0.00875091552734375,
0.033782958984375,
0.008697509765625,
0.0285186767578125,
0.050567626953125,
-0.027587890625,
0.00341796875,
0.01212310791015625,
-0.047088623046875,
-0.00614166259765625,
0.052398681640625,
-0.031585693359375,
0.007434844970703125,
-0.0205841064453125,
-0.01290130615234375,
0.00556182861328125,
-0.01087188720703125,
-0.0037384033203125,
0.0030384063720703125,
0.0021495819091796875,
0.001438140869140625,
0.031494140625,
0.0230560302734375,
-0.006671905517578125,
-0.01222991943359375,
0.010986328125,
-0.00861358642578125,
0.025421142578125,
0.051361083984375,
-0.016845703125,
0.06689453125,
-0.032196044921875,
-0.034576416015625,
0.042877197265625,
0.043212890625,
-0.028411865234375,
0.0032501220703125,
0.040771484375,
-0.011077880859375,
0.01788330078125,
-0.015869140625,
0.02264404296875,
-0.062103271484375,
-0.0159454345703125,
0.0007877349853515625,
0.0352783203125,
-0.00485992431640625,
-0.0243988037109375,
0.0005426406860351562,
-0.0140228271484375,
-0.0276336669921875,
0.06890869140625,
-0.0260162353515625,
0.0204010009765625,
-0.014312744140625,
0.0169219970703125,
0.0416259765625,
-0.0085601806640625,
0.002788543701171875,
-0.00505828857421875,
0.054779052734375,
0.04595947265625,
-0.0226898193359375,
-0.0212860107421875,
-0.00988006591796875,
-0.07080078125,
-0.045623779296875,
0.01140594482421875,
0.0116424560546875,
-0.05517578125,
-0.0484619140625,
-0.048980712890625,
-0.0343017578125,
-0.1275634765625,
-0.0731201171875,
-0.06842041015625,
0.0032806396484375,
0.01264190673828125,
0.01947021484375,
0.015899658203125,
-0.0050048828125,
0.025054931640625,
0.0146636962890625,
-0.0063018798828125,
-0.02960205078125,
-0.005451202392578125,
-0.07220458984375,
-0.05218505859375,
-0.07135009765625,
0.009368896484375,
-0.004482269287109375,
0.0062255859375,
0.091064453125,
0.0140533447265625,
-0.06573486328125,
-0.043304443359375,
0.0430908203125,
-0.047393798828125,
-0.028228759765625,
-0.01507568359375,
0.0361328125,
-0.0098724365234375,
0.021087646484375,
0.015350341796875,
0.013397216796875,
-0.033660888671875,
-0.029998779296875,
-0.0212249755859375,
0.03216552734375,
-0.0272064208984375,
-0.00727081298828125,
0.051605224609375,
-0.005405426025390625,
-0.0537109375,
-0.0484619140625,
-0.008697509765625,
0.0265655517578125,
-0.034454345703125,
-0.03082275390625,
-0.0080108642578125,
-0.02435302734375,
0.013702392578125,
-0.0190887451171875,
0.003025054931640625,
0.0194854736328125,
0.03790283203125,
-0.03497314453125,
-0.001514434814453125,
-0.0162811279296875,
-0.025665283203125,
-0.0184173583984375,
0.033905029296875,
-0.01500701904296875,
0.048492431640625,
0.0235595703125,
0.0089111328125,
-0.02001953125,
0.0211181640625,
-0.0546875,
-0.06719970703125,
0.036285400390625,
0.00099945068359375,
-0.005401611328125,
-0.0218353271484375,
-0.0303192138671875,
0.0077667236328125,
0.09063720703125,
-0.050811767578125,
0.00264739990234375,
-0.0021209716796875,
-0.0026226043701171875,
0.002410888671875,
-0.016754150390625,
-0.054473876953125,
0.00034117698669433594,
-0.01229095458984375,
-0.013671875,
-0.0152587890625,
-0.013885498046875,
-0.00670623779296875,
-0.0113677978515625,
-0.0006594657897949219,
-0.040771484375,
0.03240966796875,
0.0273895263671875,
-0.0031280517578125,
-0.04071044921875,
-0.02471923828125,
-0.037750244140625,
-0.011505126953125,
0.0057830810546875,
-0.0811767578125,
-0.01177978515625,
-0.040740966796875,
0.0533447265625,
0.0301666259765625,
-0.0372314453125,
-0.027618408203125,
0.019500732421875,
-0.019439697265625,
0.034637451171875,
-0.0172882080078125,
0.0130462646484375,
0.01219940185546875,
-0.014190673828125,
-0.004077911376953125,
-0.0279693603515625,
-0.0307159423828125,
-0.0560302734375,
-0.063720703125,
-0.01160430908203125,
-0.00799560546875,
0.035797119140625,
0.0034332275390625,
-0.011627197265625,
-0.05419921875,
-0.0171661376953125,
0.02191162109375,
0.024261474609375,
-0.005466461181640625,
-0.0016880035400390625,
-0.020416259765625,
-0.05303955078125,
0.06884765625,
0.0172119140625,
-0.01285552978515625,
-0.0214996337890625,
0.07958984375,
0.0128326416015625,
-0.0309295654296875,
-0.031219482421875,
0.0285491943359375,
0.0306549072265625,
0.002719879150390625,
0.07208251953125,
0.0302276611328125,
-0.00212860107421875,
0.0535888671875,
0.00559234619140625,
0.0040283203125,
-0.038909912109375,
0.0139923095703125,
0.01093292236328125,
0.0204620361328125,
-0.01279449462890625,
0.005939483642578125,
0.0693359375,
0.0372314453125,
0.01337432861328125,
-0.05908203125,
-0.000583648681640625,
0.04754638671875,
0.00914764404296875,
-0.0078277587890625,
-0.039947509765625,
-0.0020542144775390625,
0.0005235671997070312,
0.004680633544921875,
0.0221710205078125,
0.0230255126953125,
-0.00499725341796875,
-0.01335906982421875,
0.01433563232421875,
-0.0015497207641601562,
0.003078460693359375,
-0.0078887939453125,
-0.0006299018859863281,
0.01241302490234375,
0.0272064208984375,
0.005428314208984375,
0.0011186599731445312,
0.0033969879150390625,
0.00376129150390625,
-0.0157012939453125,
-0.052520751953125,
-0.040771484375,
0.01259613037109375,
0.0203094482421875,
0.027862548828125,
-0.018218994140625,
-0.0014333724975585938,
0.00472259521484375,
-0.00885009765625,
-0.0140228271484375,
0.01528167724609375,
-0.04156494140625,
-0.03515625,
-0.05291748046875,
-0.02349853515625,
-0.0160369873046875,
0.0182037353515625,
0.033843994140625,
-0.10101318359375,
0.04437255859375,
0.023345947265625,
0.04296875,
0.06146240234375,
-0.01043701171875,
0.02435302734375,
-0.0190887451171875,
0.0076141357421875,
-0.041046142578125,
-0.000008106231689453125,
-0.00923919677734375,
0.00850677490234375,
0.0251312255859375,
0.0150146484375,
0.01220703125,
-0.0009860992431640625,
0.0204010009765625,
0.001964569091796875,
-0.0175018310546875,
0.03924560546875,
0.0103607177734375,
-0.05059814453125,
-0.016357421875,
0.01043701171875,
0.0204315185546875,
-0.0086212158203125,
-0.00484466552734375,
-0.006317138671875,
-0.0179290771484375,
0.0037975311279296875,
0.00450897216796875,
-0.0308380126953125,
-0.00870513916015625,
-0.009979248046875,
0.0162200927734375,
-0.04150390625,
-0.0219879150390625,
-0.0022525787353515625,
0.03411865234375,
-0.0289764404296875,
-0.006641387939453125,
0.039337158203125,
0.0179595947265625,
0.03961181640625,
-0.05731201171875,
-0.025787353515625,
-0.037200927734375,
-0.008392333984375,
0.042816162109375,
-0.00432586669921875,
-0.054840087890625,
0.0017852783203125,
-0.048553466796875,
-0.027496337890625,
0.0009984970092773438,
0.0202484130859375,
-0.05316162109375,
-0.007259368896484375,
0.051177978515625,
0.029205322265625,
-0.013916015625,
-0.07635498046875,
-0.0251007080078125,
-0.0192108154296875,
0.0445556640625,
-0.00795745849609375,
0.00930023193359375,
0.067626953125,
-0.05419921875,
0.07525634765625,
0.0196533203125,
0.03369140625,
-0.017822265625,
-0.0268402099609375,
-0.0006861686706542969,
0.0011539459228515625,
-0.0225067138671875,
0.0124969482421875,
0.005748748779296875,
-0.0074310302734375,
0.0186614990234375,
-0.00864410400390625,
0.0035724639892578125,
-0.039794921875,
0.005268096923828125,
-0.0419921875,
0.03155517578125,
-0.07135009765625,
-0.06842041015625,
0.02294921875,
-0.00897216796875,
0.02667236328125,
0.0050048828125,
-0.0113525390625,
0.01020050048828125,
-0.013580322265625,
0.00806427001953125,
0.01885986328125,
0.027130126953125,
0.002834320068359375,
0.03155517578125,
-0.01233673095703125,
0.04541015625,
0.0169219970703125,
0.0235748291015625,
0.034210205078125,
0.02410888671875,
-0.0185546875,
-0.0111541748046875,
0.0071258544921875,
-0.00528717041015625,
-0.0179443359375,
-0.032501220703125,
-0.0170440673828125,
0.0306396484375,
0.048583984375,
0.071044921875,
-0.08685302734375,
0.0256195068359375,
0.0279998779296875,
-0.00901031494140625,
0.0218048095703125,
-0.04510498046875,
0.01132965087890625,
-0.0389404296875,
0.04510498046875,
0.0784912109375,
-0.01263427734375,
-0.014801025390625,
0.00298309326171875,
-0.0007033348083496094,
-0.01262664794921875,
0.022003173828125,
-0.005680084228515625,
-0.0301666259765625,
-0.031585693359375,
0.0308685302734375,
-0.037384033203125,
-0.028167724609375,
0.038299560546875,
-0.0294952392578125,
0.021728515625,
-0.029052734375,
0.0235443115234375,
-0.0079345703125,
0.00954437255859375,
-0.0543212890625,
-0.01385498046875,
0.0298919677734375,
0.045379638671875,
-0.0167694091796875,
-0.0245513916015625,
0.0302581787109375,
0.0026111602783203125,
-0.03546142578125,
-0.037445068359375,
0.0100860595703125,
0.031463623046875,
-0.02093505859375,
0.028167724609375,
0.00577545166015625,
-0.046051025390625,
-0.00841522216796875,
-0.03521728515625,
0.050933837890625,
-0.024810791015625,
-0.01258087158203125,
0.00775909423828125,
-0.0180206298828125,
0.0013780593872070312,
-0.00506591796875,
-0.00495147705078125,
-0.047515869140625,
-0.01995849609375,
-0.0169677734375,
-0.041290283203125,
-0.00150299072265625,
-0.0308074951171875,
-0.072265625,
0.12274169921875,
0.00714874267578125,
0.041839599609375,
0.00942230224609375,
0.052459716796875,
-0.037689208984375,
0.023468017578125,
-0.037872314453125,
0.06463623046875,
0.062408447265625,
0.007282257080078125,
-0.05413818359375,
-0.0193939208984375,
-0.01020050048828125,
0.0274200439453125,
0.037567138671875,
0.0082855224609375,
-0.01030731201171875,
0.0149078369140625,
0.060760498046875,
0.0274200439453125,
-0.004833221435546875,
0.027923583984375,
0.0008153915405273438,
0.0037021636962890625,
0.01413726806640625,
-0.034393310546875,
0.0226593017578125,
-0.0200042724609375,
-0.012237548828125,
0.028350830078125,
0.0126800537109375,
0.0185546875,
-0.00926971435546875,
-0.053955078125,
-0.01226806640625,
0.007289886474609375,
-0.003265380859375,
0.0270843505859375,
0.01151275634765625,
-0.0002999305725097656,
0.0057830810546875,
-0.051910400390625,
-0.024383544921875,
-0.016021728515625,
0.0164031982421875,
0.01099395751953125,
0.05157470703125,
0.040252685546875,
0.022857666015625,
0.07427978515625,
-0.0276641845703125,
0.0187225341796875,
-0.02301025390625,
-0.01045989990234375,
0.033905029296875,
0.043701171875,
0.034820556640625,
-0.01413726806640625,
-0.0400390625,
0.021881103515625,
0.0667724609375,
-0.0295562744140625,
-0.0260009765625,
0.0135498046875,
0.020660400390625,
0.004550933837890625,
-0.00997161865234375,
0.0208282470703125,
-0.018218994140625,
0.038543701171875,
0.0146331787109375,
-0.01107025146484375,
-0.002841949462890625,
0.007350921630859375,
0.0071868896484375,
0.032806396484375,
-0.0148468017578125,
0.0036163330078125,
0.005340576171875,
0.013763427734375,
0.01446533203125,
-0.02825927734375,
-0.0281829833984375,
0.03448486328125,
0.02117919921875,
0.041900634765625,
-0.01238250732421875,
0.028533935546875,
0.0465087890625,
-0.0014867782592773438,
-0.037445068359375,
-0.039093017578125,
0.0545654296875,
0.04766845703125,
0.013397216796875,
0.017181396484375,
0.08233642578125,
0.0672607421875,
-0.0394287109375,
-0.020782470703125,
0.033203125,
-0.00727081298828125,
-0.0073394775390625,
-0.06781005859375,
0.0188751220703125,
0.01381683349609375,
0.003734588623046875,
0.01171875,
-0.0173492431640625,
0.051666259765625,
-0.043304443359375,
0.07855224609375,
-0.02264404296875,
0.0021228790283203125,
0.08563232421875,
0.01239013671875,
0.11358642578125,
0.01346588134765625,
-0.0223541259765625,
0.007785797119140625,
-0.018798828125,
-0.01476287841796875,
-0.022857666015625,
0.01470947265625,
0.0100860595703125,
0.01291656494140625,
0.001796722412109375,
0.01454925537109375,
0.019378662109375,
-0.01806640625,
-0.01068878173828125,
0.038665771484375,
0.0281524658203125,
0.0035114288330078125,
-0.05804443359375,
-0.0271148681640625,
-0.04901123046875,
0.059417724609375,
0.01172637939453125,
0.0826416015625,
-0.022796630859375,
0.048065185546875,
0.0443115234375,
0.0146331787109375,
0.01214599609375,
0.006938934326171875,
0.03204345703125,
-0.01251983642578125,
0.01352691650390625,
-0.0222015380859375,
-0.02801513671875,
-0.0191650390625,
0.0231475830078125,
-0.034515380859375,
-0.01776123046875,
-0.05108642578125,
0.03369140625,
0.018890380859375,
0.01548004150390625,
-0.033721923828125,
0.007228851318359375,
0.04931640625,
-0.0107269287109375,
-0.0018911361694335938,
-0.03228759765625,
0.03411865234375,
0.02142333984375,
0.0145111083984375,
-0.026458740234375,
0.011322021484375,
-0.0281219482421875,
0.019317626953125,
0.02679443359375,
0.035675048828125,
-0.042572021484375,
0.02606201171875,
-0.0016326904296875,
0.0173187255859375,
0.00579833984375,
0.08245849609375,
0.0205841064453125,
0.0027484893798828125,
0.0322265625,
-0.00411224365234375,
0.01837158203125,
-0.0204925537109375,
-0.0216064453125,
0.006946563720703125,
0.0074310302734375,
0.0017375946044921875,
-0.003948211669921875,
-0.025238037109375,
-0.0276641845703125,
0.00986480712890625,
0.015716552734375,
-0.004886627197265625,
-0.00044536590576171875,
-0.034454345703125,
-0.0087738037109375,
0.0006356239318847656,
-0.01055908203125,
-0.022552490234375,
-0.004749298095703125,
0.0076751708984375,
0.0472412109375,
-0.040374755859375,
-0.01018524169921875,
-0.0173797607421875,
-0.0135345458984375,
-0.027801513671875,
-0.043212890625,
-0.038818359375,
0.042388916015625,
-0.0265960693359375,
0.0270843505859375,
0.056396484375,
-0.022552490234375,
-0.0230560302734375,
0.0259552001953125,
0.00982666015625,
0.08050537109375,
-0.01523590087890625,
-0.0249786376953125,
0.04229736328125,
-0.016265869140625,
-0.00811004638671875,
-0.031341552734375,
0.00249481201171875,
-0.03668212890625,
0.00856781005859375,
0.0237579345703125,
-0.03741455078125,
-0.002685546875,
-0.041717529296875,
-0.0806884765625,
0.056121826171875,
0.0006108283996582031,
-0.032012939453125,
0.00724029541015625,
0.0255889892578125,
0.004291534423828125,
-0.0302734375,
0.01338958740234375,
-0.01514434814453125,
-0.0071563720703125,
-0.007457733154296875,
-0.004405975341796875,
0.05694580078125,
-0.01055145263671875,
-0.0079803466796875,
0.005764007568359375,
0.0172882080078125,
0.01474761962890625,
-0.01189422607421875,
0.00453948974609375,
-0.005390167236328125,
0.045989990234375,
0.0733642578125,
-0.01004791259765625,
0.0024394989013671875,
0.01483917236328125,
-0.04486083984375,
-0.029449462890625,
-0.006656646728515625,
-0.0606689453125,
-0.003818511962890625,
0.11602783203125,
0.11712646484375,
0.041015625,
-0.057647705078125,
0.01342010498046875,
0.0048980712890625,
-0.033966064453125,
-0.0232696533203125,
0.018829345703125,
-0.04058837890625,
-0.025054931640625,
-0.01509857177734375,
-0.00041031837463378906,
0.018310546875,
-0.021942138671875,
0.0076141357421875,
-0.007091522216796875,
0.006378173828125,
-0.0100555419921875,
-0.026458740234375,
-0.0189666748046875,
0.050201416015625,
-0.021453857421875,
0.0125732421875,
0.02801513671875,
-0.0017995834350585938,
0.0279083251953125,
0.0555419921875,
0.007171630859375,
0.0031871795654296875,
0.0017452239990234375,
-0.0135955810546875,
0.019683837890625,
0.00867462158203125,
0.004085540771484375,
-0.006443023681640625,
0.01372528076171875,
0.0064849853515625,
0.005359649658203125,
0.008544921875,
-0.0118255615234375,
-0.004856109619140625,
-0.037322998046875,
0.0221405029296875,
-0.016326904296875,
0.0114898681640625,
-0.0177154541015625,
0.03326416015625,
-0.0592041015625,
0.00550079345703125,
-0.01244354248046875,
-0.028106689453125,
-0.00418853759765625,
-0.0188140869140625,
-0.015594482421875,
-0.044769287109375,
0.0122833251953125,
0.003879547119140625,
-0.0163726806640625,
0.0219573974609375
]
|
339a90064a57d481cd23737b008ae843bb06b549 | Wordpress Stackexchange
Q: How to get the registered sidebar's name by its id? Let's say I have this code in my "functions.php":
function mytheme_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Sidebar Name', 'mytheme' ),
'id' => 'sidebar-2',
'description' => '',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
) );
}
add_action( 'widgets_init', 'mytheme_widgets_init' );
How can I get that sidebar name by its id, some kind of this code?
get_dynamic_sidebar_name( 'sidebar-2' ); // -> Sidebar Name
A: Sidebars are stored in global variable $wp_registered_sidebars. You can get the sidebar properties using this variable.
global $wp_registered_sidebars;
if ( isset( $wp_registered_sidebars['sidebar-2'] ) ) {
echo $wp_registered_sidebars['sidebar-2']['name'];
}
Note that do not use it too early, either on/after widgets_init hook
or in a template file.
| Q: How to get the registered sidebar's name by its id? Let's say I have this code in my "functions.php":
function mytheme_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Sidebar Name', 'mytheme' ),
'id' => 'sidebar-2',
'description' => '',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
) );
}
add_action( 'widgets_init', 'mytheme_widgets_init' );
How can I get that sidebar name by its id, some kind of this code?
get_dynamic_sidebar_name( 'sidebar-2' ); // -> Sidebar Name
A: Sidebars are stored in global variable $wp_registered_sidebars. You can get the sidebar properties using this variable.
global $wp_registered_sidebars;
if ( isset( $wp_registered_sidebars['sidebar-2'] ) ) {
echo $wp_registered_sidebars['sidebar-2']['name'];
}
Note that do not use it too early, either on/after widgets_init hook
or in a template file.
| wordpress | {
"language": "en",
"length": 129,
"provenance": "stackexchange_00019.jsonl.gz:464878",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/224397"
} | [
-0.01519775390625,
-0.0088958740234375,
-0.017181396484375,
0.02398681640625,
0.0031185150146484375,
-0.0098876953125,
0.0225067138671875,
-0.022186279296875,
-0.0166473388671875,
0.036590576171875,
-0.027008056640625,
0.0283660888671875,
-0.00444793701171875,
0.00208282470703125,
-0.0032367706298828125,
-0.00490570068359375,
0.042266845703125,
0.005893707275390625,
0.04541015625,
-0.00861358642578125,
-0.01294708251953125,
0.0143585205078125,
0.044952392578125,
0.0511474609375,
0.039947509765625,
-0.09661865234375,
0.08062744140625,
-0.0225982666015625,
0.044891357421875,
-0.0227203369140625,
0.04119873046875,
-0.0061187744140625,
0.036865234375,
-0.039825439453125,
0.0548095703125,
0.05401611328125,
0.00762939453125,
-0.010772705078125,
0.037322998046875,
-0.01309967041015625,
0.05078125,
-0.050689697265625,
-0.00635528564453125,
-0.03265380859375,
-0.0028705596923828125,
0.0079193115234375,
0.004886627197265625,
-0.0200347900390625,
0.0219573974609375,
0.0005002021789550781,
0.0323486328125,
-0.00441741943359375,
0.0386962890625,
0.0191802978515625,
-0.0269317626953125,
0.0127410888671875,
0.00928497314453125,
-0.0404052734375,
0.034820556640625,
0.04486083984375,
-0.018829345703125,
-0.043792724609375,
0.038360595703125,
-0.0633544921875,
-0.01366424560546875,
0.0016736984252929688,
0.0228271484375,
0.0311279296875,
0.003971099853515625,
0.0028896331787109375,
0.01242828369140625,
-0.003284454345703125,
0.00305938720703125,
-0.0092926025390625,
-0.0068359375,
-0.0169830322265625,
-0.004222869873046875,
-0.0033016204833984375,
0.011260986328125,
-0.00005620718002319336,
-0.00008654594421386719,
-0.004364013671875,
-0.074462890625,
0.043792724609375,
-0.007450103759765625,
0.047882080078125,
-0.0268402099609375,
-0.0270538330078125,
-0.01064300537109375,
-0.004302978515625,
-0.0127105712890625,
-0.024261474609375,
0.0083465576171875,
0.012939453125,
0.0088958740234375,
-0.028839111328125,
0.055633544921875,
0.0809326171875,
-0.0254364013671875,
0.0006947517395019531,
-0.00799560546875,
-0.037261962890625,
0.027191162109375,
-0.054656982421875,
0.0296783447265625,
0.056793212890625,
0.005161285400390625,
-0.0006580352783203125,
0.0255126953125,
-0.0102996826171875,
0.004749298095703125,
-0.020233154296875,
0.006816864013671875,
-0.0112457275390625,
-0.05059814453125,
0.022918701171875,
-0.00901031494140625,
-0.03594970703125,
0.0156402587890625,
-0.014404296875,
-0.00705718994140625,
0.01042938232421875,
0.049957275390625,
0.012939453125,
0.0220794677734375,
0.0304412841796875,
-0.0126953125,
-0.0487060546875,
-0.022979736328125,
0.0083465576171875,
-0.0269622802734375,
0.00441741943359375,
0.045166015625,
0.044097900390625,
0.01458740234375,
-0.0215606689453125,
0.058258056640625,
0.034423828125,
0.01543426513671875,
0.004993438720703125,
-0.0113983154296875,
-0.01800537109375,
-0.00177001953125,
-0.0270538330078125,
-0.000659942626953125,
0.028533935546875,
0.018341064453125,
-0.0121002197265625,
-0.005390167236328125,
-0.02569580078125,
-0.002376556396484375,
-0.031494140625,
0.010894775390625,
0.051910400390625,
0.01158905029296875,
0.042755126953125,
0.047210693359375,
-0.012451171875,
-0.045440673828125,
-0.01337432861328125,
-0.003108978271484375,
-0.012725830078125,
-0.00984954833984375,
-0.002349853515625,
-0.0323486328125,
0.03424072265625,
0.019317626953125,
0.0015707015991210938,
0.019927978515625,
0.05328369140625,
-0.0169677734375,
-0.035919189453125,
-0.0192108154296875,
0.026275634765625,
-0.0035953521728515625,
0.03765869140625,
-0.00936126708984375,
-0.0338134765625,
0.01885986328125,
0.0201416015625,
-0.04071044921875,
-0.035125732421875,
-0.00904083251953125,
-0.003551483154296875,
-0.04327392578125,
0.01861572265625,
0.0164031982421875,
0.04058837890625,
0.0305938720703125,
0.0103912353515625,
0.0232391357421875,
0.01047515869140625,
-0.059844970703125,
0.03192138671875,
-0.0147247314453125,
-0.0143585205078125,
0.0243072509765625,
0.01471710205078125,
-0.006134033203125,
-0.0020236968994140625,
0.037017822265625,
-0.0399169921875,
0.043853759765625,
-0.0190582275390625,
-0.0665283203125,
0.01079559326171875,
-0.0219573974609375,
0.0249176025390625,
0.049072265625,
0.0153656005859375,
-0.0021419525146484375,
0.007568359375,
-0.022491455078125,
-0.01172637939453125,
-0.055908203125,
0.0073394775390625,
-0.005794525146484375,
0.0267333984375,
0.00557708740234375,
0.007183074951171875,
-0.011138916015625,
-0.0171661376953125,
0.00019919872283935547,
0.0208587646484375,
0.044921875,
-0.004116058349609375,
-0.0263214111328125,
-0.030914306640625,
0.031036376953125,
0.0099945068359375,
-0.034088134765625,
0.04376220703125,
-0.00001436471939086914,
0.030242919921875,
-0.011810302734375,
-0.0227508544921875,
-0.0029697418212890625,
-0.051544189453125,
0.03411865234375,
0.044891357421875,
0.025726318359375,
0.025115966796875,
0.0092926025390625,
0.0158538818359375,
0.0322265625,
-0.0361328125,
0.01114654541015625,
-0.01168060302734375,
-0.005283355712890625,
0.017120361328125,
-0.011505126953125,
0.007671356201171875,
0.020904541015625,
-0.005767822265625,
0.00353240966796875,
0.03173828125,
-0.02667236328125,
-0.00923919677734375,
-0.0209503173828125,
0.01763916015625,
-0.00927734375,
-0.07257080078125,
-0.00688934326171875,
-0.04473876953125,
0.07476806640625,
0.0259246826171875,
0.050445556640625,
0.03497314453125,
-0.04266357421875,
0.033660888671875,
0.0055694580078125,
-0.01453399658203125,
-0.016387939453125,
0.019683837890625,
0.06915283203125,
-0.0357666015625,
-0.067138671875,
-0.00417327880859375,
0.03173828125,
-0.0082855224609375,
-0.0086517333984375,
0.02532958984375,
-0.02239990234375,
-0.0066986083984375,
-0.026702880859375,
-0.0689697265625,
0.01227569580078125,
0.044891357421875,
-0.015869140625,
-0.0020904541015625,
-0.01479339599609375,
0.0701904296875,
0.00835418701171875,
0.0171356201171875,
0.0218048095703125,
0.01800537109375,
0.0565185546875,
-0.0239410400390625,
0.0161895751953125,
-0.0034046173095703125,
0.05963134765625,
0.04840087890625,
0.01422882080078125,
-0.021026611328125,
0.003448486328125,
-0.004150390625,
0.01502227783203125,
-0.02435302734375,
-0.0021648406982421875,
-0.015655517578125,
-0.0253143310546875,
0.051025390625,
0.0034809112548828125,
0.08447265625,
-0.0223541259765625,
-0.07379150390625,
0.0037479400634765625,
0.02581787109375,
-0.050201416015625,
-0.06280517578125,
-0.028961181640625,
-0.0018510818481445312,
-0.059356689453125,
-0.01021575927734375,
-0.0180511474609375,
0.0322265625,
-0.0208282470703125,
-0.0168914794921875,
0.016326904296875,
-0.043365478515625,
-0.06842041015625,
-0.05169677734375,
-0.057037353515625,
-0.0111083984375,
-0.01410675048828125,
0.0020465850830078125,
0.0190582275390625,
-0.007221221923828125,
0.0239715576171875,
0.0091400146484375,
0.06268310546875,
-0.00020325183868408203,
-0.004100799560546875,
0.00045609474182128906,
-0.031646728515625,
0.0050506591796875,
-0.02392578125,
-0.00679779052734375,
0.0032444000244140625,
-0.0035247802734375,
0.0005574226379394531,
0.0016660690307617188,
0.0228424072265625,
0.00749969482421875,
0.047027587890625,
0.0011014938354492188,
-0.04180908203125,
0.0169219970703125,
0.0297393798828125,
-0.04241943359375,
-0.022308349609375,
-0.038787841796875,
-0.04827880859375,
-0.003452301025390625,
0.0306854248046875,
0.02313232421875,
-0.0223541259765625,
0.0024089813232421875,
-0.0017032623291015625,
-0.0096435546875,
0.01922607421875,
-0.05517578125,
0.042755126953125,
0.0140838623046875,
0.0192718505859375,
-0.0023632049560546875,
-0.02410888671875,
-0.02923583984375,
-0.007030487060546875,
-0.03094482421875,
0.0193023681640625,
-0.01654052734375,
0.04144287109375,
-0.0292205810546875,
-0.0020503997802734375,
0.053924560546875,
0.00534820556640625,
0.0203399658203125,
-0.018035888671875,
-0.040374755859375,
-0.009796142578125,
0.057037353515625,
-0.04931640625,
-0.01406097412109375,
-0.002227783203125,
0.009765625,
-0.01128387451171875,
-0.046051025390625,
-0.0509033203125,
-0.016510009765625,
-0.10101318359375,
0.0221405029296875,
0.0042724609375,
-0.04559326171875,
-0.01065826416015625,
0.01273345947265625,
-0.048614501953125,
-0.0269775390625,
0.0328369140625,
-0.0697021484375,
0.015899658203125,
0.015960693359375,
0.004169464111328125,
-0.006427764892578125,
-0.0172576904296875,
-0.04730224609375,
-0.07537841796875,
-0.023406982421875,
0.0016126632690429688,
0.0716552734375,
0.0110626220703125,
-0.0258026123046875,
-0.0234832763671875,
0.0311737060546875,
0.0057220458984375,
0.01483917236328125,
0.00405120849609375,
0.0219573974609375,
-0.030670166015625,
-0.0012884140014648438,
0.01435089111328125,
-0.0158843994140625,
0.0019893646240234375,
0.003948211669921875,
-0.06622314453125,
-0.0182037353515625,
-0.0264739990234375,
-0.020233154296875,
0.033782958984375,
-0.05126953125,
-0.042022705078125,
-0.00749969482421875,
0.05780029296875,
0.009979248046875,
0.01247406005859375,
0.0280914306640625,
-0.002773284912109375,
-0.020477294921875,
0.0236053466796875,
-0.02825927734375,
-0.01392364501953125,
0.00745391845703125,
0.09906005859375,
0.0234375,
-0.00788116455078125,
-0.018218994140625,
0.0173187255859375,
0.06317138671875,
-0.001354217529296875,
0.00830841064453125,
0.0301971435546875,
-0.04541015625,
0.0278472900390625,
0.0440673828125,
-0.0278778076171875,
0.04296875,
0.042816162109375,
0.0198822021484375,
0.003997802734375,
-0.028472900390625,
-0.01468658447265625,
-0.0310211181640625,
0.0079803466796875,
-0.015869140625,
-0.0066070556640625,
0.0255126953125,
0.0367431640625,
-0.049346923828125,
0.0266571044921875,
-0.027435302734375,
0.026947021484375,
-0.01335906982421875,
-0.00872039794921875,
0.03826904296875,
-0.011871337890625,
0.00907135009765625,
-0.054412841796875,
0.00112152099609375,
-0.01213836669921875,
0.0291595458984375,
-0.051971435546875,
0.0399169921875,
-0.0075225830078125,
0.0167388916015625,
-0.0128936767578125,
0.0546875,
-0.00597381591796875,
0.0240020751953125,
0.0433349609375,
-0.01038360595703125,
-0.0001932382583618164,
0.0065460205078125,
0.0149383544921875,
-0.038482666015625,
0.047576904296875,
0.027374267578125,
0.047210693359375,
0.0103607177734375,
-0.0191497802734375,
0.0205841064453125,
0.04351806640625,
-0.01727294921875,
-0.0034732818603515625,
0.00937652587890625,
-0.0083770751953125,
-0.0203399658203125,
0.05474853515625,
0.04095458984375,
-0.0097198486328125,
-0.0299224853515625,
0.045196533203125,
0.023895263671875,
0.047882080078125,
0.0206451416015625,
-0.021484375,
0.0054779052734375,
-0.005580902099609375,
-0.0174713134765625,
-0.037811279296875,
0.02685546875,
0.04632568359375,
0.038818359375,
0.038055419921875,
-0.024383544921875,
-0.01204681396484375,
-0.037384033203125,
-0.0196380615234375,
0.0643310546875,
0.0008378028869628906,
-0.0460205078125,
-0.0557861328125,
-0.01538848876953125,
0.048919677734375,
-0.0277099609375,
0.019195556640625,
-0.027008056640625,
-0.01422119140625,
-0.01432037353515625,
0.021392822265625,
-0.031463623046875,
-0.0012598037719726562,
0.0006475448608398438,
-0.0264739990234375,
0.00946807861328125,
0.00858306884765625,
-0.060211181640625,
-0.057891845703125,
0.00800323486328125,
-0.0032367706298828125,
0.04339599609375,
-0.03192138671875,
0.04620361328125,
-0.048614501953125,
0.01275634765625,
-0.03924560546875,
0.0118560791015625,
0.025421142578125,
0.0211334228515625,
-0.024261474609375,
0.00473785400390625,
-0.016937255859375,
0.0035877227783203125,
0.0188751220703125,
-0.037200927734375,
-0.0242767333984375,
-0.02178955078125,
-0.0200042724609375,
0.0048065185546875,
0.0088348388671875,
0.0413818359375,
0.00008195638656616211,
0.021728515625,
-0.00780487060546875,
0.0161590576171875,
-0.0294952392578125,
0.05572509765625,
0.0178375244140625,
0.0333251953125,
0.01155853271484375,
-0.0007028579711914062,
-0.02447509765625,
-0.0114288330078125,
-0.008514404296875,
-0.01139068603515625,
0.00707244873046875,
-0.016571044921875,
0.01360321044921875,
-0.039794921875,
0.009368896484375,
-0.005001068115234375,
0.01248931884765625,
0.007732391357421875,
-0.005496978759765625,
0.01064300537109375,
-0.044952392578125,
0.0309600830078125,
0.0241851806640625,
0.0198516845703125,
-0.08074951171875,
-0.0869140625,
0.016143798828125,
0.041168212890625,
0.0179290771484375,
-0.040924072265625,
-0.039642333984375,
0.051055908203125,
-0.0869140625,
0.057861328125,
0.0604248046875,
0.038360595703125,
0.05206298828125,
-0.038421630859375,
0.0220794677734375,
0.033050537109375,
0.0011415481567382812,
0.00531005859375,
0.018310546875,
0.0833740234375,
0.0156707763671875,
-0.01380157470703125,
0.05255126953125,
-0.03863525390625,
0.0179290771484375,
0.004474639892578125,
0.047210693359375,
-0.03253173828125,
0.021240234375,
0.024261474609375,
-0.0289306640625,
-0.0221099853515625,
0.01036834716796875,
-0.026702880859375,
-0.023284912109375,
0.06256103515625,
-0.0159149169921875,
-0.0160064697265625,
0.03314208984375,
0.01042938232421875,
-0.013031005859375,
-0.0172576904296875,
0.052490234375,
0.0307159423828125,
0.04095458984375,
-0.004817962646484375,
-0.01531982421875,
0.02288818359375,
-0.041473388671875,
0.006671905517578125,
0.0180206298828125,
-0.0219879150390625,
-0.08172607421875,
0.0181427001953125,
0.013671875,
-0.01357269287109375,
0.0310821533203125,
-0.01042938232421875,
0.044921875,
0.0273284912109375,
0.010986328125,
0.007633209228515625,
-0.02801513671875,
0.035064697265625,
0.0294342041015625,
-0.02642822265625,
-0.019683837890625,
-0.005062103271484375,
-0.01331329345703125,
0.004322052001953125,
-0.006206512451171875,
-0.01418304443359375,
-0.0070648193359375,
-0.00806427001953125,
0.10968017578125,
-0.04620361328125,
-0.025421142578125,
-0.00013899803161621094,
0.00818634033203125,
0.01065826416015625,
-0.030914306640625,
0.022735595703125,
-0.0721435546875,
-0.04632568359375,
-0.0106048583984375,
-0.048919677734375,
-0.0220794677734375,
-0.0290374755859375,
-0.04327392578125,
0.07879638671875,
0.006618499755859375,
0.00714111328125,
0.0223541259765625,
0.035552978515625,
-0.033782958984375,
0.002124786376953125,
-0.03411865234375,
0.0105438232421875,
-0.003261566162109375,
0.00958251953125,
-0.02325439453125,
0.00798797607421875,
-0.0023975372314453125,
0.00923919677734375,
0.06378173828125,
0.00879669189453125,
0.03106689453125,
-0.0308380126953125,
-0.004894256591796875,
0.0413818359375,
-0.031005859375,
-0.01465606689453125,
0.0252532958984375,
-0.0085296630859375,
-0.00400543212890625,
-0.0218963623046875,
0.0322265625,
-0.08489990234375,
0.017120361328125,
0.03997802734375,
0.0030231475830078125,
0.0040130615234375,
-0.01953125,
-0.0015497207641601562,
0.0311431884765625,
-0.040618896484375,
-0.014312744140625,
-0.066162109375,
-0.02752685546875,
0.075927734375,
0.042999267578125,
0.0009822845458984375,
-0.0002338886260986328,
-0.040679931640625,
0.063232421875,
0.016754150390625,
-0.0017099380493164062,
-0.01502227783203125,
0.01427459716796875,
0.0001709461212158203,
0.0087432861328125,
-0.0037364959716796875,
0.048583984375,
-0.0309295654296875,
0.045379638671875,
0.026641845703125,
0.034820556640625,
-0.04150390625,
-0.039794921875,
0.0292205810546875,
0.06329345703125,
-0.0166168212890625,
-0.02227783203125,
0.0267486572265625,
0.0138092041015625,
-0.017425537109375,
0.0234375,
0.019287109375,
-0.0128631591796875,
0.0108184814453125,
0.0021152496337890625,
-0.0157318115234375,
0.02117919921875,
0.0195770263671875,
-0.003429412841796875,
-0.0251617431640625,
0.002635955810546875,
-0.0031414031982421875,
-0.067138671875,
0.01479339599609375,
0.023834228515625,
0.0660400390625,
0.0173492431640625,
0.027130126953125,
-0.00652313232421875,
-0.033050537109375,
-0.0137786865234375,
0.0258636474609375,
0.031402587890625,
0.00865936279296875,
-0.0238800048828125,
-0.0244293212890625,
0.04132080078125,
0.031646728515625,
0.01131439208984375,
0.0294952392578125,
0.041748046875,
0.03375244140625,
-0.0034732818603515625,
-0.004268646240234375,
0.018798828125,
-0.020111083984375,
0.05572509765625,
-0.0369873046875,
0.0239105224609375,
-0.032379150390625,
-0.0214080810546875,
-0.0238800048828125,
0.016265869140625,
0.0019378662109375,
-0.0067901611328125,
0.037506103515625,
0.00923919677734375,
0.0193634033203125,
0.054840087890625,
-0.0017919540405273438,
0.0271453857421875,
0.018402099609375,
-0.0902099609375,
-0.02838134765625,
0.0024967193603515625,
-0.0280914306640625,
0.02789306640625,
0.03778076171875,
-0.0204620361328125,
0.0119171142578125,
0.0055084228515625,
-0.005344390869140625,
-0.004993438720703125,
-0.0024700164794921875,
0.014251708984375,
0.04876708984375,
0.0192413330078125,
0.03948974609375,
-0.050872802734375,
-0.0245361328125,
0.00833892822265625,
-0.0003886222839355469,
0.050994873046875,
-0.058837890625,
0.05743408203125,
0.039093017578125,
-0.050048828125,
0.0367431640625,
-0.045501708984375,
-0.054931640625,
0.0215606689453125,
0.01959228515625,
0.00868988037109375,
0.0010395050048828125,
-0.0262908935546875,
0.058380126953125,
0.02471923828125,
-0.0133819580078125,
0.0435791015625,
-0.0166015625,
0.008453369140625,
-0.02130126953125,
-0.01641845703125,
-0.024383544921875,
-0.08349609375,
-0.0259246826171875,
0.04107666015625,
-0.00615692138671875,
0.0267333984375,
-0.0238037109375,
0.0076904296875,
0.01190948486328125,
-0.009246826171875,
0.0295562744140625,
-0.01334381103515625,
0.04815673828125,
0.0312042236328125,
-0.03369140625,
-0.042755126953125,
0.020111083984375,
-0.01445770263671875,
0.006755828857421875,
0.0133819580078125,
0.06854248046875,
-0.01517486572265625,
0.01531219482421875,
0.04290771484375,
0.0169677734375,
0.03643798828125,
-0.0406494140625,
0.003200531005859375,
0.03692626953125,
0.01555633544921875,
0.013702392578125,
-0.041656494140625,
-0.03936767578125,
-0.0926513671875,
0.003971099853515625,
0.039154052734375,
-0.049896240234375,
0.02105712890625,
-0.0294036865234375,
-0.019256591796875,
0.0252227783203125,
-0.0078277587890625,
-0.0223388671875,
-0.001857757568359375,
-0.0211029052734375,
0.02374267578125,
-0.0333251953125,
0.016143798828125,
-0.005214691162109375,
-0.00598907470703125,
-0.050079345703125,
0.0011396408081054688,
-0.0316162109375,
0.01165771484375,
-0.007411956787109375,
-0.0120086669921875,
-0.00565338134765625,
-0.0041961669921875,
0.02386474609375,
0.00274658203125,
0.0104217529296875,
0.039215087890625,
0.0270843505859375,
0.0015697479248046875,
0.039642333984375,
0.001834869384765625,
-0.0212554931640625,
-0.0733642578125,
-0.0137481689453125,
-0.0257110595703125,
0.0119781494140625,
-0.0191192626953125,
-0.00977325439453125,
-0.01313018798828125,
-0.03521728515625,
0.01551055908203125,
0.04473876953125,
0.0000673532485961914,
-0.01812744140625,
-0.031829833984375,
0.0158538818359375,
-0.0155792236328125,
0.0018863677978515625,
-0.002956390380859375,
-0.04150390625,
0.007450103759765625,
0.039764404296875,
0.0186920166015625,
0.0176239013671875,
0.0194244384765625,
0.0167694091796875,
-0.080078125,
-0.01195526123046875,
-0.033782958984375,
0.0203094482421875,
0.0035877227783203125,
0.0018978118896484375,
-0.0010547637939453125,
0.031341552734375,
-0.042205810546875,
-0.04254150390625,
-0.01129913330078125,
0.01537322998046875,
-0.0074920654296875,
-0.04058837890625,
-0.0289306640625,
-0.0003979206085205078,
0.0546875,
0.04681396484375,
0.0176849365234375,
-0.04315185546875,
-0.02227783203125,
0.002048492431640625,
-0.049835205078125,
-0.0265655517578125,
0.04388427734375,
-0.0941162109375,
-0.0335693359375,
0.01580810546875,
-0.0088958740234375,
-0.0185394287109375,
-0.0124053955078125,
-0.0469970703125,
-0.00955963134765625,
-0.0132293701171875,
0.01186370849609375,
-0.0416259765625,
-0.0098724365234375,
0.0219573974609375,
-0.0169677734375,
0.0154876708984375,
-0.0201568603515625,
0.020751953125,
0.01251983642578125,
0.005413055419921875,
0.0167388916015625,
0.0300140380859375,
-0.0235748291015625,
0.0165863037109375,
0.021087646484375,
0.02618408203125,
-0.0145263671875,
-0.021270751953125,
-0.04168701171875,
0.01016998291015625,
0.005817413330078125,
-0.007099151611328125,
0.01242828369140625,
0.0228118896484375,
0.025634765625,
0.06964111328125,
0.021026611328125,
0.068603515625,
0.02606201171875,
0.052947998046875,
-0.00029540061950683594,
-0.03094482421875,
0.040069580078125,
-0.072265625,
-0.0112762451171875,
0.0024051666259765625,
-0.010467529296875,
-0.0511474609375,
0.01654052734375,
0.0034275054931640625,
0.003574371337890625,
0.0218048095703125
]
|
73ba991ff0b5945fca76e4f7e0341e6a465bcb9e | Wordpress Stackexchange
Q: WP MultiSite API - Create new sites I'm building an app for iOS/Windows. I want to allow my users to register / create a new sub site on my domain via the app. How can I achieve this? Does the REST API allow this?
Thanks.
A: There is nothing in the core or in the rest API for this requirement.
You can try this plugin, https://github.com/remkade/multisite-json-api
Sorry, but I see no other chance and no more to say in this answer.
The core function to create a new site in the network of the installation is wpmu_create_blog. But there is no access from the REST API.
| Q: WP MultiSite API - Create new sites I'm building an app for iOS/Windows. I want to allow my users to register / create a new sub site on my domain via the app. How can I achieve this? Does the REST API allow this?
Thanks.
A: There is nothing in the core or in the rest API for this requirement.
You can try this plugin, https://github.com/remkade/multisite-json-api
Sorry, but I see no other chance and no more to say in this answer.
The core function to create a new site in the network of the installation is wpmu_create_blog. But there is no access from the REST API.
| wordpress | {
"language": "en",
"length": 107,
"provenance": "stackexchange_00019.jsonl.gz:464882",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/224413"
} | [
0.0062255859375,
-0.029144287109375,
-0.02130126953125,
0.021209716796875,
-0.0191497802734375,
-0.044281005859375,
0.03472900390625,
-0.006626129150390625,
-0.01062774658203125,
0.00539398193359375,
-0.032379150390625,
0.019317626953125,
-0.01922607421875,
-0.0147705078125,
0.0137176513671875,
-0.03887939453125,
0.0238494873046875,
-0.0151824951171875,
-0.00852203369140625,
-0.0198974609375,
-0.0036525726318359375,
0.007160186767578125,
-0.0150146484375,
0.044921875,
-0.00850677490234375,
-0.00579833984375,
0.00708770751953125,
0.004917144775390625,
-0.016632080078125,
-0.0177001953125,
0.0007696151733398438,
0.03314208984375,
0.0160064697265625,
0.01251220703125,
-0.004535675048828125,
0.0030841827392578125,
0.04461669921875,
-0.008056640625,
0.00592803955078125,
0.04034423828125,
0.01491546630859375,
-0.004558563232421875,
-0.015777587890625,
0.0239105224609375,
-0.00859832763671875,
-0.049591064453125,
0.032257080078125,
-0.038330078125,
0.007572174072265625,
-0.0242462158203125,
-0.0016508102416992188,
-0.0201568603515625,
0.01525115966796875,
-0.042449951171875,
-0.027099609375,
-0.0210113525390625,
0.03515625,
-0.034210205078125,
0.041290283203125,
-0.045867919921875,
-0.0506591796875,
-0.0079345703125,
0.04522705078125,
-0.0060882568359375,
0.00887298583984375,
0.015838623046875,
-0.0029163360595703125,
0.0202178955078125,
-0.0026149749755859375,
0.02996826171875,
-0.01446533203125,
-0.0281219482421875,
0.036285400390625,
0.005130767822265625,
-0.006427764892578125,
-0.04510498046875,
-0.0107879638671875,
-0.003978729248046875,
0.049957275390625,
-0.023956298828125,
0.0207366943359375,
-0.0091552734375,
0.036102294921875,
-0.057037353515625,
0.01027679443359375,
-0.053466796875,
0.005451202392578125,
0.0124053955078125,
-0.0546875,
0.00794219970703125,
-0.0333251953125,
-0.09490966796875,
-0.034698486328125,
0.04803466796875,
0.03155517578125,
-0.0079803466796875,
0.0139312744140625,
0.036224365234375,
-0.00732421875,
0.0265960693359375,
-0.00991058349609375,
-0.03759765625,
0.0291595458984375,
-0.0243682861328125,
0.034423828125,
0.05279541015625,
-0.00435638427734375,
-0.03851318359375,
0.037322998046875,
-0.01123046875,
-0.00920867919921875,
0.05731201171875,
0.01593017578125,
-0.018096923828125,
-0.03887939453125,
-0.00891876220703125,
0.0154266357421875,
-0.0239715576171875,
0.004062652587890625,
-0.061737060546875,
-0.0252838134765625,
0.0036468505859375,
0.00183868408203125,
0.0308837890625,
0.003326416015625,
0.021148681640625,
0.01053619384765625,
-0.0413818359375,
-0.038787841796875,
-0.0005755424499511719,
0.006072998046875,
0.04449462890625,
-0.00988006591796875,
0.0071258544921875,
-0.027587890625,
-0.0018625259399414062,
0.04034423828125,
0.059478759765625,
-0.00868988037109375,
0.0015726089477539062,
0.0245513916015625,
-0.016387939453125,
-0.040313720703125,
-0.0165557861328125,
0.0200653076171875,
0.0106658935546875,
0.01142120361328125,
0.01055145263671875,
0.025360107421875,
0.0250091552734375,
-0.0217742919921875,
-0.03338623046875,
0.007419586181640625,
-0.0001850128173828125,
0.053253173828125,
-0.038665771484375,
0.039764404296875,
-0.04150390625,
0.022491455078125,
-0.01197052001953125,
-0.007099151611328125,
-0.0038204193115234375,
0.0325927734375,
-0.030792236328125,
-0.0189361572265625,
0.0016765594482421875,
-0.0223541259765625,
-0.01071929931640625,
0.02606201171875,
0.048858642578125,
-0.00787353515625,
-0.0240936279296875,
0.035003662109375,
0.0142364501953125,
-0.022247314453125,
0.02008056640625,
0.030029296875,
0.00528717041015625,
0.01739501953125,
0.048065185546875,
0.0132598876953125,
-0.0254058837890625,
0.059326171875,
-0.007648468017578125,
-0.06866455078125,
0.06573486328125,
-0.000423431396484375,
0.10052490234375,
0.02789306640625,
0.01036834716796875,
0.027130126953125,
-0.00435638427734375,
0.0158233642578125,
-0.00975799560546875,
-0.00885009765625,
-0.036224365234375,
-0.01108551025390625,
0.0042266845703125,
-0.0152587890625,
-0.006702423095703125,
-0.036773681640625,
-0.020843505859375,
0.04119873046875,
0.037200927734375,
0.03546142578125,
0.0211334228515625,
-0.012298583984375,
0.0105743408203125,
0.01241302490234375,
0.005279541015625,
-0.0027332305908203125,
0.003894805908203125,
0.0181427001953125,
-0.05621337890625,
-0.037811279296875,
-0.00025534629821777344,
-0.00447845458984375,
0.01439666748046875,
0.0065765380859375,
0.0014677047729492188,
-0.017333984375,
0.002376556396484375,
-0.00946807861328125,
0.004177093505859375,
0.06805419921875,
-0.06695556640625,
0.007175445556640625,
-0.050262451171875,
0.051605224609375,
-0.00841522216796875,
-0.037384033203125,
0.04046630859375,
0.04571533203125,
0.01385498046875,
-0.0269317626953125,
0.02099609375,
0.01050567626953125,
-0.03753662109375,
-0.028594970703125,
0.0472412109375,
0.0242767333984375,
0.044830322265625,
0.0030059814453125,
0.004375457763671875,
0.049896240234375,
0.004726409912109375,
0.02069091796875,
-0.0090484619140625,
0.01465606689453125,
0.053466796875,
0.002410888671875,
-0.0081787109375,
-0.00295257568359375,
-0.0780029296875,
0.007572174072265625,
0.028228759765625,
-0.0164337158203125,
-0.00829315185546875,
0.011322021484375,
-0.046478271484375,
0.038360595703125,
-0.04949951171875,
-0.0550537109375,
0.0022869110107421875,
0.01439666748046875,
0.0214385986328125,
0.039581298828125,
0.0357666015625,
0.0023365020751953125,
-0.0011196136474609375,
0.0006814002990722656,
-0.0289306640625,
-0.005374908447265625,
0.0273895263671875,
0.051544189453125,
-0.004512786865234375,
-0.053802490234375,
-0.006191253662109375,
0.03973388671875,
0.0198211669921875,
-0.0283355712890625,
0.034759521484375,
-0.0645751953125,
-0.01934814453125,
0.0021495819091796875,
-0.05706787109375,
-0.02880859375,
-0.018524169921875,
0.036285400390625,
0.02960205078125,
0.034637451171875,
0.0029754638671875,
-0.0151214599609375,
0.019073486328125,
0.0374755859375,
-0.025115966796875,
0.0287933349609375,
-0.03375244140625,
0.036285400390625,
-0.0310211181640625,
-0.003414154052734375,
0.05426025390625,
-0.01323699951171875,
-0.00010496377944946289,
-0.0160675048828125,
-0.0038852691650390625,
-0.033905029296875,
-0.0016927719116210938,
0.006992340087890625,
-0.042755126953125,
0.0035400390625,
0.062347412109375,
0.017852783203125,
0.000858306884765625,
0.00997161865234375,
-0.019134521484375,
-0.00685882568359375,
0.0021533966064453125,
-0.041656494140625,
-0.034271240234375,
0.00461578369140625,
-0.045196533203125,
-0.0012121200561523438,
-0.0029773712158203125,
-0.0340576171875,
0.0035152435302734375,
0.021942138671875,
0.0036468505859375,
-0.026275634765625,
-0.0245208740234375,
-0.03387451171875,
-0.034942626953125,
-0.0450439453125,
0.002185821533203125,
0.0023937225341796875,
-0.0006933212280273438,
-0.0002741813659667969,
0.02581787109375,
-0.00064849853515625,
0.002262115478515625,
0.00397491455078125,
-0.015594482421875,
-0.0026683807373046875,
-0.06622314453125,
-0.00908660888671875,
-0.011962890625,
0.012939453125,
0.0004661083221435547,
0.0146331787109375,
0.046051025390625,
-0.01611328125,
0.00028324127197265625,
-0.004070281982421875,
-0.01470184326171875,
-0.00511932373046875,
-0.02105712890625,
0.014984130859375,
-0.016387939453125,
-0.0281219482421875,
-0.06427001953125,
-0.00853729248046875,
-0.01983642578125,
-0.057647705078125,
-0.006591796875,
0.03778076171875,
-0.00418853759765625,
0.0032558441162109375,
-0.00786590576171875,
-0.0077667236328125,
-0.045745849609375,
0.045989990234375,
-0.04705810546875,
0.035247802734375,
-0.01215362548828125,
-0.029937744140625,
-0.040557861328125,
0.06976318359375,
-0.00664520263671875,
-0.053985595703125,
0.00351715087890625,
-0.030792236328125,
-0.035186767578125,
-0.00255584716796875,
-0.054656982421875,
-0.0096893310546875,
0.0183258056640625,
-0.064697265625,
0.0202178955078125,
-0.051971435546875,
0.0020122528076171875,
-0.0191650390625,
0.061309814453125,
-0.0280914306640625,
0.0012826919555664062,
0.00919342041015625,
0.0110931396484375,
-0.03857421875,
-0.0126953125,
-0.06475830078125,
0.002109527587890625,
0.003490447998046875,
-0.00528717041015625,
-0.03204345703125,
0.0030384063720703125,
-0.0020198822021484375,
-0.028045654296875,
0.044158935546875,
-0.04217529296875,
0.0259246826171875,
-0.02685546875,
0.01113128662109375,
-0.03497314453125,
0.02777099609375,
-0.0880126953125,
0.00675201416015625,
-0.034515380859375,
-0.03619384765625,
-0.00928497314453125,
-0.0270843505859375,
0.032806396484375,
0.0243682861328125,
-0.0187835693359375,
0.012176513671875,
0.0333251953125,
-0.04248046875,
0.024139404296875,
-0.0438232421875,
0.0173797607421875,
0.003448486328125,
-0.00033926963806152344,
-0.031463623046875,
-0.019317626953125,
-0.034637451171875,
-0.0213470458984375,
0.01934814453125,
0.04461669921875,
-0.00026702880859375,
0.0004284381866455078,
-0.00041413307189941406,
0.00882720947265625,
0.0012006759643554688,
-0.03631591796875,
0.0237579345703125,
0.0179595947265625,
-0.020416259765625,
0.0210723876953125,
-0.0221710205078125,
0.0111083984375,
0.0230865478515625,
-0.0219573974609375,
-0.01085662841796875,
0.01532745361328125,
0.06103515625,
0.0121917724609375,
-0.0077362060546875,
-0.0445556640625,
0.0034351348876953125,
0.0294036865234375,
-0.00861358642578125,
0.0162506103515625,
0.0237274169921875,
0.0010595321655273438,
-0.016693115234375,
0.004520416259765625,
0.0175628662109375,
0.05487060546875,
-0.06976318359375,
0.018157958984375,
-0.0263519287109375,
0.0135345458984375,
0.0406494140625,
-0.033050537109375,
-0.0228424072265625,
-0.0186614990234375,
0.01258087158203125,
-0.004528045654296875,
0.0015201568603515625,
0.012725830078125,
-0.00848388671875,
-0.0249481201171875,
-0.05029296875,
0.031585693359375,
-0.0196685791015625,
-0.034332275390625,
-0.02313232421875,
0.01200103759765625,
-0.025299072265625,
-0.0189971923828125,
0.01337432861328125,
-0.04425048828125,
-0.037628173828125,
-0.0186309814453125,
0.037567138671875,
-0.06646728515625,
0.00543212890625,
-0.0028591156005859375,
-0.0165863037109375,
0.083251953125,
-0.0004093647003173828,
-0.0594482421875,
0.02679443359375,
-0.013580322265625,
0.049774169921875,
0.039764404296875,
-0.016571044921875,
0.031768798828125,
0.033599853515625,
-0.03106689453125,
-0.0128021240234375,
-0.01861572265625,
-0.014190673828125,
-0.061767578125,
-0.01561737060546875,
-0.01922607421875,
-0.010284423828125,
-0.0008749961853027344,
0.04595947265625,
-0.015960693359375,
0.039337158203125,
-0.0171051025390625,
0.039276123046875,
0.050323486328125,
0.0002865791320800781,
-0.00518798828125,
0.037567138671875,
-0.0280609130859375,
0.011688232421875,
-0.00812530517578125,
-0.0111846923828125,
0.0006685256958007812,
0.0474853515625,
0.033050537109375,
0.0128173828125,
-0.016448974609375,
-0.0033435821533203125,
-0.0257110595703125,
-0.00848388671875,
-0.01116943359375,
-0.056915283203125,
-0.04473876953125,
-0.003108978271484375,
0.0250244140625,
0.017669677734375,
-0.02569580078125,
0.01328277587890625,
-0.0266876220703125,
0.0007262229919433594,
0.01338958740234375,
-0.0241241455078125,
0.00921630859375,
-0.0202789306640625,
-0.0251922607421875,
-0.0197601318359375,
-0.027313232421875,
-0.02392578125,
0.0112457275390625,
0.01158905029296875,
-0.0273284912109375,
-0.04119873046875,
0.05804443359375,
-0.02508544921875,
-0.0213775634765625,
-0.054351806640625,
0.053436279296875,
-0.04925537109375,
-0.0010766983032226562,
0.031402587890625,
0.0107421875,
-0.010284423828125,
-0.00897216796875,
-0.0208892822265625,
-0.0236358642578125,
0.031585693359375,
0.0011224746704101562,
-0.0258636474609375,
-0.016815185546875,
0.032073974609375,
0.0121002197265625,
-0.01293182373046875,
-0.05816650390625,
-0.0139007568359375,
-0.005107879638671875,
0.029937744140625,
-0.0283203125,
-0.0287017822265625,
0.055419921875,
-0.0012159347534179688,
0.059844970703125,
0.02777099609375,
0.0255584716796875,
0.0018033981323242188,
-0.02728271484375,
0.0002225637435913086,
-0.1072998046875,
-0.04180908203125,
-0.010955810546875,
-0.03753662109375,
0.09375,
0.039337158203125,
0.00212860107421875,
0.03509521484375,
-0.0027408599853515625,
-0.00827789306640625,
-0.0236968994140625,
-0.0163421630859375,
-0.0246734619140625,
0.04278564453125,
-0.004810333251953125,
-0.021881103515625,
0.032623291015625,
-0.005222320556640625,
0.0212860107421875,
-0.0027637481689453125,
-0.027496337890625,
0.02471923828125,
0.006305694580078125,
-0.003070831298828125,
0.036956787109375,
0.07720947265625,
-0.03857421875,
0.0301666259765625,
0.01306915283203125,
-0.012237548828125,
0.040557861328125,
0.0232391357421875,
-0.04638671875,
-0.040435791015625,
0.00362396240234375,
0.0170135498046875,
-0.009521484375,
0.0225067138671875,
-0.0175933837890625,
0.00397491455078125,
0.043487548828125,
0.056365966796875,
-0.08270263671875,
0.01556396484375,
0.0161590576171875,
0.01702880859375,
0.00450897216796875,
-0.0079193115234375,
0.0165863037109375,
-0.021148681640625,
0.01849365234375,
-0.008514404296875,
-0.0165252685546875,
0.0009937286376953125,
-0.0216064453125,
-0.0240325927734375,
-0.0223846435546875,
0.04266357421875,
0.043487548828125,
0.05267333984375,
0.0238494873046875,
-0.03997802734375,
0.07513427734375,
-0.0104522705078125,
0.0169830322265625,
-0.0042266845703125,
-0.0140380859375,
-0.039581298828125,
0.01486968994140625,
0.0011682510375976562,
-0.014312744140625,
-0.020904541015625,
-0.01548004150390625,
0.0238189697265625,
0.057220458984375,
-0.032684326171875,
0.010711669921875,
0.046417236328125,
0.0064544677734375,
-0.0210418701171875,
-0.00524139404296875,
0.03277587890625,
-0.01009368896484375,
-0.04345703125,
0.021148681640625,
-0.043792724609375,
-0.023529052734375,
-0.0013055801391601562,
-0.01335906982421875,
0.034576416015625,
-0.0211029052734375,
-0.01134490966796875,
0.048858642578125,
0.013031005859375,
-0.0200347900390625,
-0.01198577880859375,
-0.01306915283203125,
-0.0787353515625,
-0.06402587890625,
-0.005859375,
-0.0550537109375,
0.0399169921875,
0.0191192626953125,
-0.0207977294921875,
0.08514404296875,
0.005199432373046875,
-0.0032444000244140625,
0.018341064453125,
0.039794921875,
-0.04608154296875,
0.0242156982421875,
-0.029815673828125,
0.0240020751953125,
0.0236053466796875,
0.0115966796875,
-0.03997802734375,
-0.00908660888671875,
-0.00713348388671875,
0.031585693359375,
0.022613525390625,
0.00970458984375,
-0.0308685302734375,
-0.0003807544708251953,
-0.000030159950256347656,
-0.023834228515625,
-0.0163726806640625,
0.061859130859375,
0.0208740234375,
0.003376007080078125,
0.052642822265625,
-0.0207061767578125,
0.016510009765625,
0.0130157470703125,
0.01377105712890625,
0.024444580078125,
-0.0013475418090820312,
-0.0125274658203125,
0.029510498046875,
-0.01317596435546875,
-0.00025773048400878906,
0.01214599609375,
-0.0186614990234375,
0.0396728515625,
-0.0074462890625,
0.0281524658203125,
-0.0289459228515625,
0.050201416015625,
0.10296630859375,
-0.05218505859375,
0.045928955078125,
-0.0250244140625,
0.016143798828125,
0.01320648193359375,
0.037506103515625,
-0.0010976791381835938,
0.02099609375,
0.005702972412109375,
0.046112060546875,
-0.050262451171875,
-0.004665374755859375,
0.018402099609375,
0.02313232421875,
-0.051513671875,
-0.06988525390625,
0.088134765625,
0.04779052734375,
0.0046539306640625,
-0.029449462890625,
0.01373291015625,
0.032135009765625,
0.0538330078125,
0.0401611328125,
0.1336669921875,
0.0017337799072265625,
0.0099334716796875,
-0.03515625,
-0.0016355514526367188,
0.037017822265625,
0.01503753662109375,
0.0116119384765625,
0.0157470703125,
-0.0136260986328125,
-0.003269195556640625,
-0.0234832763671875,
-0.0149078369140625,
-0.0004425048828125,
0.03955078125,
0.0269622802734375,
0.048309326171875,
-0.03472900390625,
-0.0240478515625,
-0.00563812255859375,
0.057098388671875,
0.0270538330078125,
-0.01953125,
-0.01474761962890625,
-0.085693359375,
0.06744384765625,
0.0152435302734375,
0.0154876708984375,
0.0670166015625,
0.0694580078125,
0.045257568359375,
-0.007274627685546875,
0.008209228515625,
0.04949951171875,
-0.0211334228515625,
0.01245880126953125,
-0.048248291015625,
-0.042877197265625,
-0.0222320556640625,
-0.04473876953125,
0.0148162841796875,
-0.0357666015625,
0.012786865234375,
-0.024322509765625,
0.03472900390625,
-0.016937255859375,
-0.0104827880859375,
0.0472412109375,
-0.0078582763671875,
0.04742431640625,
-0.007389068603515625,
-0.06756591796875,
0.0016336441040039062,
-0.0623779296875,
-0.022125244140625,
0.0156402587890625,
0.035980224609375,
-0.0185699462890625,
0.036468505859375,
0.01461029052734375,
0.0128936767578125,
0.04425048828125,
-0.0285797119140625,
-0.0215301513671875,
-0.00304412841796875,
0.039093017578125,
-0.0174102783203125,
-0.09661865234375,
-0.04461669921875,
-0.020538330078125,
0.0157928466796875,
-0.033538818359375,
0.09503173828125,
-0.0178070068359375,
-0.00006586313247680664,
-0.01038360595703125,
-0.0200347900390625,
0.004970550537109375,
-0.0222625732421875,
-0.007808685302734375,
0.0233154296875,
0.014617919921875,
0.00954437255859375,
-0.0301361083984375,
0.0159149169921875,
0.03338623046875,
-0.025146484375,
0.0261077880859375,
-0.03741455078125,
0.01415252685546875,
-0.01922607421875,
0.03271484375,
-0.03668212890625,
-0.034515380859375,
-0.038787841796875,
-0.00579071044921875,
0.00475311279296875,
0.00726318359375,
-0.0018224716186523438,
0.04473876953125,
-0.0312042236328125,
-0.033538818359375,
0.0099639892578125,
-0.0572509765625,
0.0171051025390625,
0.0284423828125,
-0.0195770263671875,
0.01407623291015625,
0.01396942138671875,
-0.0086822509765625,
-0.01184844970703125,
0.01495361328125,
-0.016448974609375,
0.0144195556640625,
0.0199127197265625,
-0.0031719207763671875,
0.0189971923828125,
0.005588531494140625,
-0.0268707275390625,
-0.0029926300048828125,
0.0347900390625,
-0.02069091796875,
-0.00856781005859375,
-0.0235137939453125,
-0.0231781005859375,
-0.04876708984375,
0.019744873046875,
0.02691650390625,
-0.01122283935546875,
0.006000518798828125,
-0.020477294921875,
-0.00102996826171875,
0.06341552734375,
-0.004116058349609375,
-0.05267333984375,
0.0146942138671875,
-0.033660888671875,
0.0455322265625,
0.004337310791015625,
-0.00664520263671875,
-0.00940704345703125,
0.001201629638671875,
-0.03265380859375,
-0.0250244140625,
-0.04058837890625,
0.015411376953125,
-0.027801513671875,
0.0088653564453125,
0.0161895751953125,
-0.01427459716796875,
-0.016387939453125,
0.023956298828125,
0.00618743896484375,
0.05389404296875,
0.006801605224609375,
0.0036468505859375,
0.007221221923828125,
-0.0190582275390625,
-0.03228759765625,
-0.0521240234375,
0.0149993896484375,
-0.08074951171875,
-0.026580810546875,
-0.04718017578125,
0.02471923828125,
0.03424072265625,
-0.03875732421875,
-0.088623046875,
0.0004825592041015625,
-0.02069091796875,
-0.04913330078125,
-0.08453369140625,
-0.0007600784301757812,
0.012298583984375,
-0.01282501220703125,
-0.048370361328125,
0.016845703125,
-0.02593994140625,
0.043304443359375,
0.00008571147918701172,
0.0218963623046875,
0.00952911376953125,
-0.0179443359375,
-0.000957489013671875,
0.0243988037109375,
0.023651123046875,
-0.01190948486328125,
0.0265350341796875,
-0.0219268798828125,
0.044281005859375,
0.06048583984375,
-0.02557373046875,
-0.020416259765625,
-0.006198883056640625,
-0.011444091796875,
-0.04449462890625,
-0.049224853515625,
-0.0245208740234375,
-0.03192138671875,
0.11566162109375,
0.06304931640625,
0.033966064453125,
-0.03973388671875,
0.004070281982421875,
-0.04034423828125,
-0.0161590576171875,
-0.02886962890625,
0.015777587890625,
-0.067138671875,
-0.01508331298828125,
0.007122039794921875,
0.013519287109375,
0.00786590576171875,
-0.0279388427734375,
0.0157318115234375,
-0.0084381103515625,
0.046722412109375,
0.0044403076171875,
0.005130767822265625,
-0.01299285888671875,
0.036834716796875,
-0.044281005859375,
-0.0224609375,
-0.016204833984375,
0.042449951171875,
-0.0195159912109375,
-0.051513671875,
-0.03216552734375,
-0.0108184814453125,
-0.026336669921875,
0.0027446746826171875,
-0.01953125,
0.01306915283203125,
-0.0192718505859375,
0.0004782676696777344,
0.0047454833984375,
0.03741455078125,
0.0083160400390625,
0.06494140625,
-0.007328033447265625,
0.035797119140625,
0.008270263671875,
0.005344390869140625,
-0.0032939910888671875,
0.0038280487060546875,
-0.03485107421875,
0.060089111328125,
-0.0274658203125,
-0.007659912109375,
-0.0146331787109375,
-0.01206207275390625,
-0.0038013458251953125,
0.031829833984375,
-0.027435302734375,
-0.047332763671875,
0.037322998046875,
0.00992584228515625,
0.0096893310546875,
0.0179443359375
]
|
ca123b50bcd2ef74450d4d86f11b3c64d93035d3 | Wordpress Stackexchange
Q: Meaning of "if ( is_home() && ! is_front_page() )" snippet? I see the following code a lot in index.php files. I understand that is_front_page() returns true when viewing the Site Front Page (whether displaying the blog posts index or a static page), while is_home() returns true when viewing the Blog Posts Index (whether displayed on the front page or on a static page). I am still somewhat stumped about the use of the following code -
<?php if ( have_posts() ) : ?>
<?php if ( is_home() && ! is_front_page() ) : ?>
<header>
<h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
</header>
<?php endif; ?>
Any explanation of why this piece of code is so popular is greatly appreciated.
A: Here is how to do it right:
if ( is_front_page() && is_home() ) {
// Default homepage
} elseif ( is_front_page()){
// Static homepage
} elseif ( is_home()){
// Blog page
} else {
// Everything else
}
This is the only (right) way to display or alter content with your homepage and your blog page.
| Q: Meaning of "if ( is_home() && ! is_front_page() )" snippet? I see the following code a lot in index.php files. I understand that is_front_page() returns true when viewing the Site Front Page (whether displaying the blog posts index or a static page), while is_home() returns true when viewing the Blog Posts Index (whether displayed on the front page or on a static page). I am still somewhat stumped about the use of the following code -
<?php if ( have_posts() ) : ?>
<?php if ( is_home() && ! is_front_page() ) : ?>
<header>
<h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
</header>
<?php endif; ?>
Any explanation of why this piece of code is so popular is greatly appreciated.
A: Here is how to do it right:
if ( is_front_page() && is_home() ) {
// Default homepage
} elseif ( is_front_page()){
// Static homepage
} elseif ( is_home()){
// Blog page
} else {
// Everything else
}
This is the only (right) way to display or alter content with your homepage and your blog page.
A: I am not sure about "popular", it doesn't seem so to me (but then I don't look at that many themes).
You seem to grasp fine what each conditional does, so this shouldn't be confusing to you. This combines conditions to check that blog index is being displayed and it's not at the front page.
Ah, the reason for single_post_title() I would guess is that it displays title for $wp_query->queried object (set up by main query as current context), rather than $post global (set up by iterating loop).
In some circumstances these will be same, but not in such case as condition checks for. The loop will contain posts, but queried object will be page (unless I am mixing things up :).
A: This will display the title of the page when a static page is set to show posts.
E.g.
I show posts on my homepage...
It'll do nothing.
If I, say, show posts on page titled News...
It'll show News in H1.
This is used so that the title of the page is shown, whenever posts are shown on a page, but nothing when blog posts are shown on the front page (home page).
We do it because if it's on home page... it will show the title of the first post, making it appear twice (once at the top in H1 and again when posts are looped through).
| wordpress | {
"language": "en",
"length": 407,
"provenance": "stackexchange_00019.jsonl.gz:464921",
"question_score": "36",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/224592"
} | [
0.043426513671875,
0.00946044921875,
0.03338623046875,
0.01727294921875,
0.0069732666015625,
-0.01172637939453125,
0.040191650390625,
-0.07025146484375,
0.0268096923828125,
-0.017333984375,
-0.07122802734375,
-0.01032257080078125,
-0.042938232421875,
-0.0132293701171875,
0.0025501251220703125,
-0.064208984375,
0.048736572265625,
-0.0304107666015625,
0.0482177734375,
0.00864410400390625,
0.014678955078125,
0.026214599609375,
0.034271240234375,
0.047271728515625,
0.0162353515625,
-0.095458984375,
0.0751953125,
-0.02545166015625,
0.023284912109375,
-0.027679443359375,
0.032684326171875,
0.0233917236328125,
0.0213775634765625,
0.00812530517578125,
-0.01378631591796875,
0.004085540771484375,
0.011566162109375,
0.00036978721618652344,
-0.0003104209899902344,
0.032928466796875,
0.01253509521484375,
0.00293731689453125,
-0.00604248046875,
0.0192108154296875,
-0.0096435546875,
-0.038116455078125,
-0.0036602020263671875,
-0.031829833984375,
-0.003086090087890625,
0.0031375885009765625,
0.0157928466796875,
-0.019378662109375,
0.01406097412109375,
0.01136016845703125,
-0.0119476318359375,
0.014434814453125,
0.007183074951171875,
-0.012115478515625,
0.055908203125,
-0.019989013671875,
-0.043304443359375,
-0.035614013671875,
0.040557861328125,
-0.0308990478515625,
-0.0011844635009765625,
-0.01165771484375,
-0.0123138427734375,
0.031494140625,
-0.06793212890625,
-0.041717529296875,
0.02520751953125,
-0.03997802734375,
-0.0015773773193359375,
-0.00846099853515625,
-0.0467529296875,
0.030853271484375,
-0.0079803466796875,
-0.01026153564453125,
0.02679443359375,
-0.0159912109375,
-0.043060302734375,
0.027557373046875,
-0.0611572265625,
-0.058074951171875,
0.01500701904296875,
-0.01320648193359375,
-0.0301361083984375,
-0.005840301513671875,
-0.0161895751953125,
-0.0174713134765625,
-0.00565338134765625,
-0.022796630859375,
-0.00824737548828125,
-0.027069091796875,
-0.01800537109375,
-0.0296478271484375,
0.0306854248046875,
0.07891845703125,
-0.06414794921875,
-0.033935546875,
-0.0277557373046875,
-0.01194000244140625,
-0.021728515625,
-0.02734375,
0.016021728515625,
0.0384521484375,
0.005847930908203125,
0.016632080078125,
0.03338623046875,
0.0183258056640625,
0.01174163818359375,
0.0133514404296875,
-0.05096435546875,
-0.050201416015625,
0.0006933212280273438,
0.037017822265625,
-0.07916259765625,
-0.0005769729614257812,
-0.002124786376953125,
-0.0010232925415039062,
0.022003173828125,
0.049591064453125,
0.036834716796875,
-0.07977294921875,
0.0426025390625,
0.02020263671875,
-0.032867431640625,
-0.05523681640625,
0.027191162109375,
0.056060791015625,
-0.0182342529296875,
-0.00963592529296875,
0.016998291015625,
-0.005863189697265625,
-0.03033447265625,
-0.0396728515625,
0.020965576171875,
-0.0105133056640625,
-0.015289306640625,
0.0259246826171875,
0.0034084320068359375,
-0.06561279296875,
-0.0160369873046875,
-0.006366729736328125,
0.0013628005981445312,
0.01285552978515625,
0.04339599609375,
0.0301666259765625,
-0.0300140380859375,
-0.054168701171875,
0.049163818359375,
-0.016357421875,
0.006244659423828125,
0.020263671875,
0.014984130859375,
0.0093536376953125,
-0.00959014892578125,
0.01026153564453125,
0.006744384765625,
-0.00022983551025390625,
0.014678955078125,
-0.015228271484375,
0.01020050048828125,
-0.0284423828125,
-0.0257110595703125,
0.00540924072265625,
-0.05029296875,
-0.0026340484619140625,
0.008697509765625,
-0.0254974365234375,
0.01535797119140625,
0.0011606216430664062,
-0.01306915283203125,
-0.00537872314453125,
-0.00022363662719726562,
0.0006895065307617188,
-0.0169830322265625,
-0.01099395751953125,
0.027618408203125,
0.058135986328125,
0.0027008056640625,
-0.01181793212890625,
0.02239990234375,
0.00782012939453125,
-0.040740966796875,
0.02203369140625,
0.0035381317138671875,
0.0296173095703125,
-0.0008769035339355469,
0.0035552978515625,
0.039794921875,
0.01523590087890625,
-0.052520751953125,
0.0440673828125,
-0.0043182373046875,
-0.01392364501953125,
-0.033172607421875,
-0.0232696533203125,
-0.01218414306640625,
-0.000048995018005371094,
0.03460693359375,
-0.0017595291137695312,
0.0020160675048828125,
0.0016946792602539062,
-0.0221710205078125,
-0.02349853515625,
-0.006603240966796875,
0.0186920166015625,
0.01113128662109375,
0.04290771484375,
0.000850677490234375,
-0.0001919269561767578,
-0.0012083053588867188,
-0.033294677734375,
-0.0208740234375,
0.0192108154296875,
-0.0251617431640625,
0.002307891845703125,
-0.0256805419921875,
0.00513458251953125,
-0.0235595703125,
0.0003116130828857422,
-0.028778076171875,
0.03369140625,
0.070068359375,
-0.02850341796875,
-0.007198333740234375,
-0.042572021484375,
0.015472412109375,
0.0201416015625,
-0.08343505859375,
0.03619384765625,
0.039947509765625,
0.01450347900390625,
-0.048187255859375,
-0.010772705078125,
-0.00556182861328125,
-0.033447265625,
0.005268096923828125,
0.05999755859375,
0.0233917236328125,
-0.0014781951904296875,
-0.01329803466796875,
0.005893707275390625,
0.05792236328125,
0.0067291259765625,
0.013519287109375,
-0.0013341903686523438,
0.0079345703125,
0.034423828125,
-0.060577392578125,
0.017547607421875,
0.03424072265625,
-0.06683349609375,
-0.01708984375,
0.07366943359375,
-0.006702423095703125,
0.0440673828125,
-0.033172607421875,
-0.01129913330078125,
-0.014404296875,
0.007579803466796875,
0.01056671142578125,
-0.0009050369262695312,
0.01690673828125,
-0.01654052734375,
0.00021791458129882812,
-0.00597381591796875,
-0.016265869140625,
0.0002956390380859375,
0.016937255859375,
0.00022339820861816406,
0.015625,
0.0687255859375,
0.032928466796875,
-0.0160369873046875,
-0.01329803466796875,
-0.03521728515625,
0.002685546875,
0.01313018798828125,
-0.0308685302734375,
0.01190185546875,
-0.036376953125,
-0.011810302734375,
0.003337860107421875,
-0.06121826171875,
-0.001995086669921875,
-0.00998687744140625,
0.0433349609375,
0.020965576171875,
0.0246124267578125,
0.0258331298828125,
-0.03570556640625,
0.079833984375,
-0.00800323486328125,
-0.018341064453125,
-0.049896240234375,
-0.0645751953125,
0.03662109375,
-0.0231781005859375,
0.0325927734375,
0.08502197265625,
0.0199737548828125,
0.01424407958984375,
0.0119476318359375,
0.0258941650390625,
0.01300048828125,
0.00360107421875,
-0.0172576904296875,
0.0280609130859375,
-0.052581787109375,
0.00794219970703125,
0.0179595947265625,
0.029144287109375,
0.0185699462890625,
-0.049468994140625,
0.027313232421875,
0.01496124267578125,
-0.0589599609375,
-0.0743408203125,
-0.045745849609375,
-0.05572509765625,
0.0234832763671875,
-0.00533294677734375,
-0.0103759765625,
-0.0017299652099609375,
0.00372314453125,
0.0120086669921875,
-0.015289306640625,
-0.0266265869140625,
-0.0225982666015625,
-0.0465087890625,
-0.0494384765625,
0.0053253173828125,
0.008331298828125,
0.010284423828125,
-0.0062408447265625,
0.037567138671875,
-0.00907135009765625,
-0.060028076171875,
-0.0107421875,
0.05682373046875,
-0.00604248046875,
0.0037975311279296875,
-0.00748443603515625,
-0.0157012939453125,
-0.0151519775390625,
0.0175933837890625,
-0.0199737548828125,
-0.02630615234375,
0.00992584228515625,
-0.0286102294921875,
-0.046539306640625,
-0.04071044921875,
-0.009429931640625,
0.0277557373046875,
0.04296875,
0.004192352294921875,
0.019775390625,
-0.02410888671875,
-0.032073974609375,
-0.006717681884765625,
-0.06683349609375,
0.009490966796875,
0.05877685546875,
-0.01371002197265625,
0.023651123046875,
-0.03302001953125,
-0.01129150390625,
-0.012664794921875,
0.03631591796875,
-0.038330078125,
0.0172882080078125,
-0.007587432861328125,
-0.01497650146484375,
-0.0215911865234375,
0.005626678466796875,
-0.01308441162109375,
-0.0109100341796875,
-0.0175628662109375,
0.00910186767578125,
-0.0178070068359375,
0.0205230712890625,
-0.039398193359375,
-0.0271453857421875,
0.016143798828125,
-0.0152130126953125,
-0.006023406982421875,
-0.00628662109375,
-0.01158905029296875,
0.00887298583984375,
0.054168701171875,
-0.08599853515625,
0.00463104248046875,
0.01023101806640625,
0.006420135498046875,
-0.021942138671875,
-0.011871337890625,
-0.08612060546875,
0.00040435791015625,
-0.056243896484375,
0.032379150390625,
-0.0145721435546875,
0.004306793212890625,
-0.0596923828125,
0.017669677734375,
-0.053497314453125,
-0.0267333984375,
0.0247955322265625,
0.026153564453125,
-0.00406646728515625,
0.035186767578125,
-0.0214691162109375,
0.038360595703125,
-0.006526947021484375,
-0.01947021484375,
-0.043975830078125,
-0.0232391357421875,
0.032989501953125,
0.0302886962890625,
0.00835418701171875,
-0.0572509765625,
-0.016021728515625,
0.0386962890625,
0.006008148193359375,
-0.0214080810546875,
0.0306396484375,
0.002971649169921875,
0.042083740234375,
-0.01432037353515625,
-0.0204620361328125,
-0.0269775390625,
-0.0033740997314453125,
0.01068115234375,
-0.0555419921875,
0.01213836669921875,
-0.01678466796875,
0.007198333740234375,
0.040771484375,
-0.03204345703125,
-0.0211639404296875,
-0.0118408203125,
-0.038330078125,
0.01568603515625,
-0.0343017578125,
0.0021953582763671875,
-0.01593017578125,
-0.039947509765625,
0.0281829833984375,
-0.019775390625,
-0.05889892578125,
0.01580810546875,
0.0645751953125,
0.040863037109375,
-0.0128631591796875,
-0.007518768310546875,
-0.002971649169921875,
0.032257080078125,
0.00466156005859375,
0.0423583984375,
0.035980224609375,
-0.0261077880859375,
0.0341796875,
0.01788330078125,
-0.0230255126953125,
0.0104522705078125,
0.09039306640625,
0.006011962890625,
-0.0257110595703125,
0.0157623291015625,
0.0059814453125,
-0.0274810791015625,
0.01361846923828125,
-0.0183868408203125,
0.0019054412841796875,
-0.0318603515625,
0.017486572265625,
-0.02069091796875,
0.037445068359375,
-0.0272064208984375,
-0.004024505615234375,
-0.004749298095703125,
0.062225341796875,
0.0290069580078125,
0.026763916015625,
0.006816864013671875,
-0.004505157470703125,
0.0212554931640625,
-0.016571044921875,
0.0168304443359375,
0.01319122314453125,
0.01044464111328125,
0.0202178955078125,
-0.0147705078125,
-0.023529052734375,
0.0007176399230957031,
0.007045745849609375,
0.04083251953125,
-0.025115966796875,
-0.06549072265625,
-0.0217437744140625,
0.00015676021575927734,
-0.0008702278137207031,
0.03167724609375,
0.0188751220703125,
0.050567626953125,
-0.0172119140625,
-0.029693603515625,
-0.0286102294921875,
-0.00994873046875,
-0.01534271240234375,
-0.05682373046875,
0.00608062744140625,
-0.00632476806640625,
-0.00443267822265625,
0.01702880859375,
0.057830810546875,
0.036956787109375,
0.0306243896484375,
-0.051849365234375,
-0.0062255859375,
0.02496337890625,
0.0018472671508789062,
0.00927734375,
0.0462646484375,
-0.00920867919921875,
-0.0026836395263671875,
0.05303955078125,
-0.0022525787353515625,
-0.01342010498046875,
0.02734375,
0.0215606689453125,
-0.00804901123046875,
-0.0043487548828125,
-0.008270263671875,
-0.0128326416015625,
-0.034271240234375,
0.05572509765625,
0.0185546875,
-0.06231689453125,
-0.037109375,
-0.004886627197265625,
0.02008056640625,
-0.005924224853515625,
-0.01479339599609375,
0.0179290771484375,
0.002307891845703125,
0.0531005859375,
-0.023223876953125,
-0.005001068115234375,
0.032440185546875,
0.030364990234375,
0.00021648406982421875,
-0.01473236083984375,
0.022705078125,
-0.030426025390625,
0.0117340087890625,
-0.040802001953125,
-0.0269927978515625,
0.041015625,
-0.00980377197265625,
0.0269317626953125,
-0.0205230712890625,
-0.030242919921875,
0.003810882568359375,
0.022552490234375,
0.04168701171875,
0.0100250244140625,
-0.10491943359375,
0.0273284912109375,
-0.07244873046875,
0.0029468536376953125,
-0.056427001953125,
-0.0540771484375,
-0.07000732421875,
-0.006809234619140625,
0.016204833984375,
0.0212860107421875,
-0.014862060546875,
-0.041229248046875,
-0.032989501953125,
0.01297760009765625,
0.037109375,
0.059722900390625,
-0.01007843017578125,
0.06390380859375,
0.0178680419921875,
0.051025390625,
0.0328369140625,
0.049102783203125,
-0.01067352294921875,
-0.0487060546875,
0.01354217529296875,
-0.025604248046875,
0.004924774169921875,
-0.02166748046875,
0.013214111328125,
-0.01097869873046875,
0.025604248046875,
-0.005123138427734375,
0.002803802490234375,
0.01110076904296875,
-0.0015811920166015625,
-0.01482391357421875,
-0.035980224609375,
-0.0005841255187988281,
-0.004673004150390625,
-0.0071563720703125,
0.01143646240234375,
0.0007200241088867188,
-0.00624847412109375,
-0.036346435546875,
0.0113067626953125,
0.028076171875,
-0.00734710693359375,
-0.006195068359375,
-0.0767822265625,
0.0714111328125,
0.10736083984375,
0.0309295654296875,
0.0704345703125,
0.033447265625,
0.0240936279296875,
0.038421630859375,
0.00606536865234375,
-0.05511474609375,
0.022308349609375,
0.02288818359375,
-0.013092041015625,
-0.010711669921875,
0.007457733154296875,
-0.0101776123046875,
0.033050537109375,
0.06549072265625,
0.06048583984375,
-0.07891845703125,
0.0021572113037109375,
0.0254364013671875,
-0.01678466796875,
0.04937744140625,
0.0203857421875,
0.01479339599609375,
0.0242919921875,
0.0218963623046875,
-0.002716064453125,
-0.00441741943359375,
0.0338134765625,
0.0027217864990234375,
-0.00519561767578125,
-0.0211639404296875,
0.0458984375,
0.0203094482421875,
-0.06658935546875,
0.00891876220703125,
0.05926513671875,
-0.040008544921875,
-0.0161895751953125,
0.0260772705078125,
-0.043243408203125,
-0.0207977294921875,
-0.046478271484375,
-0.02777099609375,
0.019561767578125,
-0.023406982421875,
0.0128021240234375,
-0.0123291015625,
-0.0113983154296875,
0.03533935546875,
-0.04486083984375,
0.051300048828125,
-0.0078277587890625,
-0.0122222900390625,
-0.040191650390625,
0.0086517333984375,
0.031341552734375,
0.027191162109375,
-0.045989990234375,
0.025909423828125,
-0.047088623046875,
-0.0016183853149414062,
-0.0260467529296875,
-0.10162353515625,
0.0665283203125,
-0.005512237548828125,
-0.02032470703125,
-0.0172119140625,
-0.00504302978515625,
0.0031337738037109375,
-0.033721923828125,
0.054656982421875,
-0.061614990234375,
-0.0191650390625,
0.00374603271484375,
-0.00989532470703125,
-0.045166015625,
-0.04296875,
-0.0523681640625,
0.052978515625,
-0.048614501953125,
0.058258056640625,
-0.0014476776123046875,
0.01067352294921875,
0.026702880859375,
0.004497528076171875,
-0.04901123046875,
0.042449951171875,
0.005420684814453125,
0.0517578125,
-0.045806884765625,
0.00972747802734375,
0.018280029296875,
0.0210418701171875,
0.01293182373046875,
0.007297515869140625,
-0.00036406517028808594,
-0.0130157470703125,
0.0259552001953125,
0.037628173828125,
-0.00438690185546875,
0.01320648193359375,
-0.06488037109375,
0.0086517333984375,
-0.0054168701171875,
-0.07293701171875,
0.0272979736328125,
-0.018585205078125,
-0.0419921875,
-0.020538330078125,
0.01290130615234375,
0.004352569580078125,
-0.006725311279296875,
0.0038852691650390625,
-0.0274810791015625,
-0.00400543212890625,
0.02093505859375,
-0.0183563232421875,
-0.013397216796875,
0.06396484375,
0.03887939453125,
-0.00576019287109375,
0.004169464111328125,
-0.025909423828125,
0.042083740234375,
0.00217437744140625,
0.017578125,
0.0128173828125,
0.0250701904296875,
-0.002193450927734375,
0.00786590576171875,
0.01396942138671875,
0.03863525390625,
-0.017333984375,
0.0677490234375,
0.0775146484375,
0.043426513671875,
0.0220794677734375,
0.0020198822021484375,
0.00803375244140625,
0.06890869140625,
-0.04034423828125,
-0.0308074951171875,
0.0004863739013671875,
-0.02667236328125,
-0.01227569580078125,
-0.004802703857421875,
-0.0340576171875,
-0.0150299072265625,
0.00833892822265625,
-0.047943115234375,
0.0093536376953125,
0.0294189453125,
-0.00432586669921875,
-0.00604248046875,
0.002887725830078125,
-0.01235198974609375,
0.002742767333984375,
-0.032196044921875,
0.0006380081176757812,
-0.004852294921875,
0.0281524658203125,
0.007465362548828125,
0.0198822021484375,
0.022735595703125,
0.00777435302734375,
-0.04296875,
0.045318603515625,
-0.035186767578125,
0.04736328125,
-0.09619140625,
-0.05908203125,
0.0063629150390625,
0.06622314453125,
0.02178955078125,
0.0291595458984375,
-0.0016765594482421875,
0.0102386474609375,
0.037078857421875,
0.01528167724609375,
0.0526123046875,
-0.00888824462890625,
0.0013885498046875,
-0.01085662841796875,
0.00304412841796875,
0.01509857177734375,
-0.019317626953125,
-0.001010894775390625,
0.0369873046875,
0.03533935546875,
-0.01032257080078125,
0.01499176025390625,
0.002063751220703125,
-0.01190948486328125,
0.03631591796875,
0.020233154296875,
0.04766845703125,
0.0207977294921875,
-0.033416748046875,
-0.0254364013671875,
-0.0217437744140625,
-0.003299713134765625,
0.01259613037109375,
0.0307159423828125,
0.022857666015625,
-0.01375579833984375,
-0.0026035308837890625,
0.004222869873046875,
0.00826263427734375,
-0.0228424072265625,
0.01009368896484375,
0.021820068359375,
0.0174102783203125,
0.0159912109375,
-0.03680419921875,
-0.021148681640625,
0.00775146484375,
0.0261993408203125,
0.00006651878356933594,
0.044647216796875,
-0.00229644775390625,
0.01139068603515625,
0.022186279296875,
0.03924560546875,
-0.04010009765625,
-0.017425537109375,
-0.0009794235229492188,
-0.044830322265625,
0.03375244140625,
0.013458251953125,
-0.042724609375,
0.0245361328125,
0.0296173095703125,
-0.024871826171875,
0.06549072265625,
-0.03924560546875,
-0.0064697265625,
-0.052032470703125,
-0.0092926025390625,
-0.0321044921875,
-0.034210205078125,
-0.00873565673828125,
0.02288818359375,
0.017242431640625,
0.0023746490478515625,
-0.043670654296875,
0.054046630859375,
0.0022869110107421875,
-0.05157470703125,
0.0257720947265625,
-0.0745849609375,
0.038909912109375,
0.031951904296875,
0.035003662109375,
-0.0298309326171875,
-0.00598907470703125,
0.003570556640625,
-0.0061798095703125,
0.022857666015625,
0.01702880859375,
-0.0007238388061523438,
-0.0081024169921875,
0.011810302734375,
0.010009765625,
0.015625,
-0.0472412109375,
0.0088348388671875,
0.05224609375,
0.0026721954345703125,
-0.021820068359375,
-0.00753021240234375,
-0.0152130126953125,
-0.0278167724609375,
-0.021087646484375,
0.01033782958984375,
-0.03802490234375,
-0.045806884765625,
-0.026580810546875,
-0.0250091552734375,
-0.00470733642578125,
-0.060638427734375,
0.061614990234375,
-0.06134033203125,
-0.04534912109375,
0.01947021484375,
-0.049957275390625,
0.015960693359375,
-0.014984130859375,
0.0013570785522460938,
-0.01702880859375,
0.0231781005859375,
-0.030792236328125,
0.0064849853515625,
0.00809478759765625,
0.0482177734375,
0.07403564453125,
-0.043426513671875,
-0.0269927978515625,
0.0006575584411621094,
0.0205230712890625,
0.04541015625,
-0.01515960693359375,
-0.00799560546875,
0.04241943359375,
-0.0085601806640625,
-0.0215301513671875,
-0.035400390625,
0.01092529296875,
-0.0291290283203125,
-0.036346435546875,
-0.0360107421875,
0.00312042236328125,
0.007274627685546875,
-0.031524658203125,
-0.0124359130859375,
0.08099365234375,
-0.01947021484375,
-0.0187225341796875,
-0.006561279296875,
-0.01117706298828125,
-0.0261077880859375,
0.0223846435546875,
0.01043701171875,
-0.0303955078125,
-0.004444122314453125,
0.0285491943359375,
0.0207977294921875,
0.04730224609375,
0.0273284912109375,
0.002414703369140625,
-0.00012290477752685547,
0.0202178955078125,
-0.00386810302734375,
0.0099639892578125,
-0.01910400390625,
0.008941650390625,
-0.0017490386962890625,
0.03558349609375,
-0.0259552001953125,
0.0029544830322265625,
0.00045561790466308594,
-0.0055084228515625,
0.0277862548828125,
-0.00927734375,
-0.0180206298828125,
-0.020965576171875,
0.0308990478515625,
-0.004657745361328125,
0.00036072731018066406,
-0.012603759765625,
-0.038909912109375,
-0.033843994140625,
-0.056396484375,
-0.007656097412109375,
0.0208282470703125,
-0.04638671875,
0.027130126953125,
-0.0212249755859375,
-0.042266845703125,
-0.024505615234375,
0.01367950439453125,
-0.08807373046875,
0.0253448486328125,
-0.018798828125,
-0.015472412109375,
-0.023284912109375,
-0.02020263671875,
0.0509033203125,
-0.032257080078125,
0.00934600830078125,
-0.003368377685546875,
0.02099609375,
0.018463134765625,
0.029266357421875,
0.0206756591796875,
0.036041259765625,
-0.0260009765625,
-0.042938232421875,
0.04437255859375,
0.01396942138671875,
0.051605224609375,
-0.03363037109375,
0.05072021484375,
0.00057220458984375,
-0.0250091552734375,
0.0103302001953125,
0.0304718017578125,
-0.00931549072265625,
-0.06219482421875,
0.0174560546875,
-0.01263427734375,
0.0625,
0.0038356781005859375,
0.01239776611328125,
-0.02606201171875,
0.019317626953125,
-0.0019025802612304688,
-0.003704071044921875,
-0.0052490234375,
0.0048065185546875,
-0.007488250732421875,
-0.0307769775390625,
0.0228118896484375,
-0.01409149169921875,
-0.0087432861328125,
0.01506805419921875
]
|
9b161931db4ad5345127eb73e18730bd4c8a4558 | Wordpress Stackexchange
Q: Which hook is fired when inserting media into a post I want to add numbering to each image when I insert them into the post.
For example if I insert 3 images into a post, there will be:
*
*Image 1
*Image 2
*Image 3
I looked through the WordPress documentation, but I can't find which hook is triggered when inserting images into a post.
A: The add_attachment action is fired when the wp_insert_attachment() function is called to add an item to the media library. Images are added to posts after going into the media library first. Even when adding via the post editor, items are added to the library with wp_insert_attachment() then to the post.
add_action( 'add_attachment', function( $post_ID ) {
// Do Stuff
});
This will not allow you to number items by post, only by instance in the media library. Whether that works for your purposes, I cannot answer.
https://codex.wordpress.org/Plugin_API/Action_Reference/add_attachment
| Q: Which hook is fired when inserting media into a post I want to add numbering to each image when I insert them into the post.
For example if I insert 3 images into a post, there will be:
*
*Image 1
*Image 2
*Image 3
I looked through the WordPress documentation, but I can't find which hook is triggered when inserting images into a post.
A: The add_attachment action is fired when the wp_insert_attachment() function is called to add an item to the media library. Images are added to posts after going into the media library first. Even when adding via the post editor, items are added to the library with wp_insert_attachment() then to the post.
add_action( 'add_attachment', function( $post_ID ) {
// Do Stuff
});
This will not allow you to number items by post, only by instance in the media library. Whether that works for your purposes, I cannot answer.
https://codex.wordpress.org/Plugin_API/Action_Reference/add_attachment
A: If you actually want to hook into the point when the author of a post inserts an image or other attachment into the Wordpress editor, use image_send_to_editor()
For example, if you wanted to wrap the image in a <div> or <figure> each time, you could do it like this:
function wrap_attachments($html, $id, $caption, $title, $align, $url) {
$src = wp_get_attachment_image_src( $id, $size, false );
$output = "<div id='post-$id media-$id' class='align$align'>";
$output .= "<img src='$src[0]' alt='$title' width='$src[1]' height='$src[2]' />";
$output .= "</div>";
return $output;
}
add_filter( 'image_send_to_editor', 'wrap_attachments', 10, 9 );
Additional explanation in this article.
A: From 5.5.0, there's a new hook wp_media_attach_action will monitor the event that fires after any attachment gets attached or detached more easily:
add_action('wp_media_attach_action', function (string $action, int $attachment_id) {
if ($action !== 'attach') return;
// do your stuff
});
Due to at/detach an attachment is just changing the value of post_parent for its post, this hook still won't get fired after the author inserts the attachment into any post editor, for that you'll need image_send_to_editor, but this hook won't work when using gutenberg editor: https://github.com/danielbachhuber/gutenberg-migration-guide/blob/master/filter-image-send-to-editor.md https://github.com/WordPress/gutenberg/issues/8472
Even the image_send_to_editor still won't get fired when the author is not inserting attachments into the editor by selecting them from the media library, but just directly copying and pasting images or manually writing raw HTML <img> tags, if you must catch these cases, the hook post_updated might be your last resort.
| wordpress | {
"language": "en",
"length": 389,
"provenance": "stackexchange_00019.jsonl.gz:464932",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/224633"
} | [
0.07440185546875,
-0.003162384033203125,
0.007785797119140625,
-0.005680084228515625,
0.017120361328125,
-0.034027099609375,
0.066650390625,
-0.03961181640625,
0.005092620849609375,
0.00464630126953125,
-0.016693115234375,
0.0159454345703125,
-0.00856781005859375,
-0.03009033203125,
0.0013036727905273438,
-0.0026798248291015625,
0.051422119140625,
-0.033721923828125,
0.03692626953125,
0.0142364501953125,
0.0010662078857421875,
0.0511474609375,
0.037841796875,
0.037689208984375,
0.004207611083984375,
0.0242919921875,
0.024261474609375,
-0.0216827392578125,
0.01092529296875,
0.002758026123046875,
0.0088653564453125,
-0.02178955078125,
0.034820556640625,
0.01012420654296875,
-0.030670166015625,
0.0654296875,
0.0195465087890625,
-0.00597381591796875,
0.0045318603515625,
0.0233001708984375,
0.02911376953125,
-0.0111236572265625,
0.042633056640625,
-0.01287078857421875,
0.02142333984375,
-0.0082550048828125,
0.01031494140625,
-0.0611572265625,
0.027984619140625,
-0.037506103515625,
-0.0090179443359375,
0.033050537109375,
-0.001270294189453125,
0.01323699951171875,
-0.007061004638671875,
0.021270751953125,
-0.060791015625,
0.048553466796875,
0.02044677734375,
0.0153656005859375,
-0.01331329345703125,
0.0027523040771484375,
0.007366180419921875,
-0.0301971435546875,
0.025970458984375,
0.003978729248046875,
0.02099609375,
0.0158233642578125,
-0.0594482421875,
0.007843017578125,
0.035980224609375,
-0.049560546875,
-0.04571533203125,
-0.031585693359375,
-0.00714874267578125,
0.01824951171875,
0.007167816162109375,
-0.034912109375,
-0.0111236572265625,
0.0195770263671875,
0.03778076171875,
0.007320404052734375,
0.00720977783203125,
-0.004589080810546875,
0.0282745361328125,
0.02532958984375,
0.0006241798400878906,
-0.0269775390625,
-0.026031494140625,
-0.0172271728515625,
-0.021240234375,
-0.005401611328125,
-0.005340576171875,
-0.030059814453125,
-0.0242767333984375,
-0.020599365234375,
0.01348876953125,
0.0028858184814453125,
-0.0056304931640625,
0.0088043212890625,
-0.006500244140625,
-0.049163818359375,
0.0253753662109375,
-0.0225067138671875,
0.017364501953125,
-0.00896453857421875,
0.0049896240234375,
-0.060150146484375,
0.00839996337890625,
0.0173492431640625,
-0.046051025390625,
0.051116943359375,
0.01458740234375,
0.0048675537109375,
0.0107574462890625,
-0.031646728515625,
-0.04473876953125,
0.06488037109375,
-0.00653839111328125,
0.0273590087890625,
-0.01117706298828125,
-0.006809234619140625,
0.003383636474609375,
-0.00244140625,
0.013458251953125,
-0.0081024169921875,
-0.02545166015625,
-0.019012451171875,
0.046356201171875,
-0.0205841064453125,
-0.0285797119140625,
0.042755126953125,
0.06341552734375,
-0.0094757080078125,
-0.005523681640625,
0.004383087158203125,
-0.0176544189453125,
0.004688262939453125,
-0.0141143798828125,
0.01030731201171875,
-0.006450653076171875,
-0.048492431640625,
-0.0124359130859375,
0.0020694732666015625,
0.0322265625,
0.01244354248046875,
-0.0011730194091796875,
0.0189208984375,
0.03680419921875,
-0.023223876953125,
0.042449951171875,
-0.048797607421875,
0.0127410888671875,
0.0269927978515625,
0.004085540771484375,
0.0347900390625,
0.052276611328125,
-0.01373291015625,
-0.019927978515625,
-0.0227508544921875,
0.019561767578125,
-0.0037708282470703125,
0.01313018798828125,
-0.032928466796875,
-0.0391845703125,
0.009246826171875,
-0.05450439453125,
-0.0049591064453125,
0.02642822265625,
0.07318115234375,
-0.019134521484375,
-0.002895355224609375,
-0.00200653076171875,
0.00827789306640625,
-0.018341064453125,
-0.0013151168823242188,
0.0014619827270507812,
0.0211639404296875,
0.0268402099609375,
0.07147216796875,
0.028106689453125,
-0.016815185546875,
0.10552978515625,
-0.0369873046875,
-0.040679931640625,
0.038543701171875,
0.021270751953125,
0.05389404296875,
0.000621795654296875,
0.021148681640625,
0.02764892578125,
0.047027587890625,
-0.031585693359375,
-0.031829833984375,
-0.001888275146484375,
0.0033111572265625,
0.0033168792724609375,
-0.006679534912109375,
0.0021076202392578125,
0.02783203125,
0.0239715576171875,
0.024932861328125,
0.004550933837890625,
0.005645751953125,
-0.01995849609375,
0.020660400390625,
-0.01165771484375,
0.032012939453125,
-0.052490234375,
0.004108428955078125,
0.0256195068359375,
-0.0178070068359375,
-0.0243988037109375,
-0.0042266845703125,
-0.0007405281066894531,
-0.005908966064453125,
-0.0423583984375,
0.0221099853515625,
-0.009033203125,
0.053192138671875,
-0.044036865234375,
-0.03216552734375,
-0.031463623046875,
-0.03277587890625,
0.06439208984375,
-0.0114593505859375,
-0.02337646484375,
-0.037109375,
0.004779815673828125,
0.00844573974609375,
-0.07366943359375,
0.052337646484375,
-0.040374755859375,
-0.01259613037109375,
-0.025634765625,
-0.020111083984375,
-0.0203094482421875,
-0.0831298828125,
0.0276947021484375,
0.056671142578125,
0.033447265625,
0.056671142578125,
0.004741668701171875,
-0.004444122314453125,
0.08001708984375,
0.039520263671875,
0.037261962890625,
-0.035369873046875,
0.000016510486602783203,
0.0560302734375,
-0.00240325927734375,
0.042816162109375,
-0.00891876220703125,
-0.057769775390625,
0.01102447509765625,
0.03607177734375,
-0.0025348663330078125,
-0.040130615234375,
-0.00466156005859375,
0.01010894775390625,
0.0230560302734375,
-0.0301666259765625,
-0.046356201171875,
0.0009074211120605469,
0.0139312744140625,
-0.003978729248046875,
0.0172576904296875,
-0.0004799365997314453,
-0.0189666748046875,
-0.005588531494140625,
0.0207366943359375,
-0.028106689453125,
-0.00213623046875,
0.0024127960205078125,
-0.024566650390625,
-0.00804901123046875,
-0.0167236328125,
0.01010894775390625,
0.0030517578125,
-0.0232086181640625,
-0.03472900390625,
0.017059326171875,
-0.04705810546875,
-0.023834228515625,
-0.022308349609375,
-0.05963134765625,
-0.006160736083984375,
-0.037506103515625,
-0.0634765625,
-0.038818359375,
-0.00498199462890625,
0.056365966796875,
0.0034694671630859375,
0.0016164779663085938,
-0.00966644287109375,
0.0174407958984375,
-0.0189208984375,
-0.03997802734375,
0.051025390625,
-0.043426513671875,
0.038330078125,
0.06787109375,
-0.042449951171875,
0.04443359375,
-0.007511138916015625,
-0.0021076202392578125,
-0.019744873046875,
0.0234222412109375,
0.0017108917236328125,
-0.0595703125,
0.0166778564453125,
0.0284423828125,
0.019195556640625,
0.038787841796875,
-0.037353515625,
-0.0504150390625,
-0.030609130859375,
-0.006954193115234375,
-0.0909423828125,
-0.07623291015625,
0.0276641845703125,
-0.087158203125,
0.0190582275390625,
-0.0110626220703125,
-0.04534912109375,
-0.032928466796875,
0.043182373046875,
0.00649261474609375,
-0.063720703125,
0.00933837890625,
0.044189453125,
-0.006420135498046875,
0.01197052001953125,
0.0241546630859375,
0.0155029296875,
0.021087646484375,
0.00482177734375,
0.08990478515625,
0.0095367431640625,
-0.0445556640625,
0.0220184326171875,
-0.0230865478515625,
-0.02197265625,
0.01708984375,
0.01468658447265625,
-0.020782470703125,
-0.0156707763671875,
-0.0050506591796875,
0.01776123046875,
0.02899169921875,
-0.030853271484375,
0.005260467529296875,
-0.005130767822265625,
-0.025421142578125,
-0.0049591064453125,
0.085693359375,
0.01727294921875,
-0.038970947265625,
0.04730224609375,
-0.054901123046875,
0.0218505859375,
-0.03900146484375,
-0.0192718505859375,
-0.003173828125,
0.0103607177734375,
0.0020732879638671875,
-0.0166778564453125,
0.00580596923828125,
-0.0111541748046875,
-0.0147552490234375,
0.015289306640625,
-0.01120758056640625,
0.010498046875,
-0.02471923828125,
-0.0211181640625,
-0.01050567626953125,
0.002475738525390625,
-0.00122833251953125,
0.0087890625,
-0.00324249267578125,
0.033966064453125,
-0.0276336669921875,
0.0208587646484375,
-0.0640869140625,
-0.0116424560546875,
0.0171966552734375,
-0.00713348388671875,
0.0335693359375,
-0.00492095947265625,
-0.01493072509765625,
0.00927734375,
0.0579833984375,
-0.046417236328125,
-0.02557373046875,
-0.0012445449829101562,
0.031402587890625,
-0.0021610260009765625,
-0.04815673828125,
0.012176513671875,
-0.032379150390625,
-0.007476806640625,
-0.0018558502197265625,
0.01375579833984375,
-0.01104736328125,
-0.032501220703125,
0.056854248046875,
-0.03155517578125,
0.0007119178771972656,
0.0203094482421875,
-0.006389617919921875,
-0.022216796875,
0.0517578125,
-0.028778076171875,
0.037841796875,
-0.019561767578125,
-0.013214111328125,
-0.104736328125,
-0.021148681640625,
-0.01265716552734375,
0.08099365234375,
0.019317626953125,
-0.06134033203125,
-0.0262298583984375,
0.03497314453125,
0.01107025146484375,
0.039459228515625,
-0.0007548332214355469,
0.023712158203125,
-0.0058441162109375,
-0.049591064453125,
0.009735107421875,
-0.04248046875,
0.0004892349243164062,
-0.0386962890625,
-0.0296630859375,
-0.0091552734375,
-0.0255889892578125,
0.0265655517578125,
-0.0172576904296875,
0.00688934326171875,
-0.048309326171875,
-0.0095977783203125,
0.01294708251953125,
0.01049041748046875,
0.01507568359375,
-0.004680633544921875,
-0.024810791015625,
-0.03375244140625,
-0.0225982666015625,
-0.04620361328125,
0.010406494140625,
0.0158233642578125,
0.07464599609375,
0.031341552734375,
0.02276611328125,
-0.03070068359375,
0.01019287109375,
0.0518798828125,
-0.002635955810546875,
0.019439697265625,
0.03192138671875,
-0.026641845703125,
-0.0008015632629394531,
0.04180908203125,
0.009002685546875,
-0.039703369140625,
0.0304107666015625,
-0.0020294189453125,
-0.00917816162109375,
0.007595062255859375,
-0.01369476318359375,
0.055328369140625,
0.0012865066528320312,
-0.0330810546875,
-0.03265380859375,
-0.0006184577941894531,
0.044677734375,
-0.0499267578125,
0.094970703125,
-0.013031005859375,
-0.0248260498046875,
-0.0040435791015625,
0.01824951171875,
0.0177764892578125,
-0.003631591796875,
0.015594482421875,
-0.005496978759765625,
0.00965118408203125,
0.0101776123046875,
0.03155517578125,
-0.005657196044921875,
0.007198333740234375,
0.0267333984375,
0.039276123046875,
0.0108184814453125,
0.007236480712890625,
0.004245758056640625,
-0.01195526123046875,
-0.00811767578125,
-0.0170135498046875,
-0.049468994140625,
0.0167388916015625,
0.029571533203125,
0.0173187255859375,
-0.0015954971313476562,
0.033538818359375,
0.033355712890625,
-0.01386260986328125,
-0.01406097412109375,
-0.01031494140625,
0.01523590087890625,
-0.05657958984375,
0.006557464599609375,
0.01654052734375,
-0.0279693603515625,
0.03155517578125,
-0.00643157958984375,
0.004917144775390625,
0.00586700439453125,
-0.010223388671875,
0.018035888671875,
0.0032558441162109375,
0.0185394287109375,
0.0195465087890625,
0.0012159347534179688,
-0.02093505859375,
0.02392578125,
0.0174407958984375,
-0.055999755859375,
0.0139007568359375,
0.025634765625,
0.06689453125,
-0.0278167724609375,
-0.04888916015625,
0.0185699462890625,
-0.040771484375,
-0.028839111328125,
0.038055419921875,
-0.01605224609375,
-0.056243896484375,
-0.0335693359375,
0.00128173828125,
0.024658203125,
-0.017791748046875,
0.0021915435791015625,
0.00815582275390625,
0.024383544921875,
0.0222930908203125,
-0.006801605224609375,
-0.0235443115234375,
0.00377655029296875,
0.00930023193359375,
-0.0263824462890625,
0.0020313262939453125,
-0.006481170654296875,
0.004131317138671875,
-0.01511383056640625,
0.002960205078125,
-0.010894775390625,
0.032928466796875,
-0.0171966552734375,
0.0246124267578125,
-0.00963592529296875,
-0.0174102783203125,
-0.03558349609375,
0.01406097412109375,
0.044586181640625,
0.02850341796875,
0.0181884765625,
-0.0121307373046875,
-0.007762908935546875,
-0.01013946533203125,
0.0633544921875,
0.007904052734375,
-0.01032257080078125,
-0.0369873046875,
-0.01187896728515625,
0.03387451171875,
-0.0196685791015625,
-0.0023708343505859375,
-0.0026569366455078125,
0.0146026611328125,
0.0004620552062988281,
0.06756591796875,
0.01465606689453125,
0.01251220703125,
-0.00041174888610839844,
0.0244140625,
0.0189056396484375,
-0.034393310546875,
-0.037109375,
-0.005779266357421875,
-0.03692626953125,
-0.055877685546875,
0.02838134765625,
0.07025146484375,
-0.005832672119140625,
-0.016876220703125,
-0.03009033203125,
0.009857177734375,
-0.0115509033203125,
0.00444793701171875,
-0.004627227783203125,
-0.0095672607421875,
-0.0017557144165039062,
0.042633056640625,
-0.013427734375,
0.0223846435546875,
-0.033477783203125,
0.0305938720703125,
-0.0003139972686767578,
0.0011014938354492188,
0.031341552734375,
-0.051666259765625,
0.026214599609375,
0.03778076171875,
-0.0225982666015625,
0.0029144287109375,
0.02752685546875,
0.0237884521484375,
0.02972412109375,
0.010345458984375,
0.01226806640625,
-0.011138916015625,
0.024139404296875,
0.00331878662109375,
-0.0294647216796875,
0.06512451171875,
0.00998687744140625,
-0.0065155029296875,
0.04638671875,
-0.03765869140625,
0.0255584716796875,
-0.01898193359375,
0.0213165283203125,
0.0207061767578125,
-0.0051727294921875,
-0.041229248046875,
-0.0421142578125,
0.0634765625,
-0.0137786865234375,
0.015472412109375,
-0.0034732818603515625,
0.053436279296875,
0.0307159423828125,
-0.007381439208984375,
0.03369140625,
0.0007014274597167969,
-0.00484466552734375,
-0.0017604827880859375,
-0.031524658203125,
-0.00848388671875,
0.01593017578125,
-0.046142578125,
0.01483917236328125,
-0.0291595458984375,
-0.009857177734375,
-0.01038360595703125,
0.0143280029296875,
-0.037841796875,
-0.04833984375,
0.0049285888671875,
-0.0266265869140625,
0.00403594970703125,
-0.0201263427734375,
0.0158843994140625,
0.031890869140625,
0.045013427734375,
0.0029144287109375,
-0.016876220703125,
0.0290374755859375,
-0.0281829833984375,
-0.048828125,
-0.01126861572265625,
0.0268402099609375,
0.05401611328125,
-0.0457763671875,
0.032684326171875,
-0.034332275390625,
0.02069091796875,
0.005741119384765625,
-0.0099639892578125,
0.03961181640625,
-0.06787109375,
0.00725555419921875,
0.028533935546875,
0.005588531494140625,
0.004405975341796875,
0.012939453125,
0.054962158203125,
-0.038238525390625,
-0.034881591796875,
0.03118896484375,
-0.0250244140625,
-0.0250244140625,
0.006504058837890625,
-0.053375244140625,
0.09112548828125,
-0.039520263671875,
0.0357666015625,
0.010498046875,
0.0277862548828125,
0.0125579833984375,
0.016265869140625,
-0.061920166015625,
0.02899169921875,
-0.016876220703125,
0.048797607421875,
-0.05780029296875,
0.01435089111328125,
0.0003674030303955078,
0.0119781494140625,
0.07330322265625,
0.0135040283203125,
-0.0039520263671875,
-0.029022216796875,
0.050201416015625,
0.037506103515625,
0.0015544891357421875,
0.02288818359375,
-0.003566741943359375,
-0.0100860595703125,
0.0318603515625,
0.0110015869140625,
0.046051025390625,
-0.0190582275390625,
-0.0283050537109375,
0.0203094482421875,
0.0040130615234375,
0.0025157928466796875,
-0.0026607513427734375,
0.03033447265625,
-0.04351806640625,
-0.002971649169921875,
0.041839599609375,
-0.023284912109375,
-0.0079498291015625,
0.065185546875,
0.026947021484375,
-0.00969696044921875,
-0.00464630126953125,
-0.035736083984375,
0.050048828125,
-0.008544921875,
0.046905517578125,
0.03289794921875,
0.02130126953125,
0.02557373046875,
0.026214599609375,
0.03277587890625,
0.03216552734375,
-0.0262298583984375,
0.0379638671875,
-0.002147674560546875,
0.002315521240234375,
-0.0565185546875,
0.004756927490234375,
0.041778564453125,
0.056732177734375,
-0.041351318359375,
-0.01947021484375,
0.0254974365234375,
0.0262908935546875,
-0.0007181167602539062,
-0.0088348388671875,
-0.0029544830322265625,
-0.061004638671875,
0.004077911376953125,
-0.0090484619140625,
-0.0241851806640625,
0.00897979736328125,
0.07318115234375,
0.002452850341796875,
0.0256805419921875,
-0.05255126953125,
-0.07293701171875,
-0.02288818359375,
0.0299224853515625,
0.0181121826171875,
0.038909912109375,
-0.03515625,
0.061920166015625,
-0.037933349609375,
-0.0014209747314453125,
-0.033416748046875,
0.0277252197265625,
-0.0026378631591796875,
0.047821044921875,
-0.039398193359375,
-0.0266265869140625,
0.01042938232421875,
0.03399658203125,
0.043365478515625,
0.060699462890625,
0.052825927734375,
0.031646728515625,
0.00159454345703125,
0.01415252685546875,
0.024749755859375,
-0.0255126953125,
-0.0181121826171875,
-0.03472900390625,
0.028411865234375,
0.0391845703125,
-0.0006670951843261719,
0.019287109375,
-0.005229949951171875,
0.057281494140625,
-0.03973388671875,
0.0019207000732421875,
-0.01143646240234375,
-0.04266357421875,
0.048736572265625,
-0.004360198974609375,
0.06927490234375,
-0.007419586181640625,
-0.0853271484375,
-0.00421905517578125,
-0.019744873046875,
-0.09967041015625,
0.0086822509765625,
0.031768798828125,
-0.055938720703125,
0.042877197265625,
0.003101348876953125,
-0.0176239013671875,
0.0005879402160644531,
-0.0024852752685546875,
0.0090179443359375,
0.01032257080078125,
0.00934600830078125,
0.0099029541015625,
0.004077911376953125,
0.018951416015625,
0.00901031494140625,
0.0116119384765625,
0.0030307769775390625,
0.05255126953125,
-0.016326904296875,
0.01268768310546875,
0.01654052734375,
0.0195770263671875,
-0.01152801513671875,
0.002361297607421875,
0.0056304931640625,
-0.0185394287109375,
-0.0004906654357910156,
-0.0197296142578125,
0.0037899017333984375,
0.00518035888671875,
0.0182037353515625,
-0.016571044921875,
-0.0296630859375,
-0.0238189697265625,
0.026824951171875,
0.03521728515625,
0.059478759765625,
-0.004344940185546875,
0.004364013671875,
-0.0150909423828125,
-0.03546142578125,
0.05889892578125,
0.045623779296875,
0.02740478515625,
0.00946807861328125,
-0.0274810791015625,
-0.0316162109375,
0.0020351409912109375,
-0.01483154296875,
-0.00905609130859375,
0.0208740234375,
-0.03204345703125,
-0.01238250732421875,
0.007061004638671875,
-0.00502777099609375,
-0.00829315185546875,
0.020172119140625,
0.004314422607421875,
0.00965118408203125,
-0.0413818359375,
-0.00971221923828125,
0.022247314453125,
0.049530029296875,
0.01132965087890625,
0.018463134765625,
-0.018829345703125,
-0.006317138671875,
-0.0050506591796875,
-0.01386260986328125,
-0.0181884765625,
-0.0697021484375,
0.0014925003051757812,
0.0263519287109375,
-0.042572021484375,
0.0195770263671875,
-0.042724609375,
0.006641387939453125,
0.01497650146484375,
0.0196990966796875,
-0.0728759765625,
0.037628173828125,
0.011016845703125,
0.0435791015625,
-0.025238037109375,
-0.0009756088256835938,
-0.00107574462890625,
0.040863037109375,
-0.0357666015625,
-0.07940673828125,
-0.032135009765625,
0.05078125,
-0.0626220703125,
0.03814697265625,
0.042022705078125,
-0.03558349609375,
0.005908966064453125,
0.0263519287109375,
0.036651611328125,
0.06524658203125,
0.006916046142578125,
-0.0244140625,
0.00045108795166015625,
0.01248931884765625,
0.00839996337890625,
-0.0328369140625,
0.00952911376953125,
-0.04144287109375,
-0.0102386474609375,
-0.0031871795654296875,
-0.0029582977294921875,
0.0223541259765625,
-0.037261962890625,
-0.0841064453125,
0.031402587890625,
-0.01236724853515625,
-0.043060302734375,
-0.05731201171875,
0.0305023193359375,
-0.0007848739624023438,
0.01043701171875,
-0.02130126953125,
0.015045166015625,
-0.008056640625,
0.033477783203125,
-0.0055084228515625,
-0.0109710693359375,
0.03466796875,
-0.038818359375,
-0.029449462890625,
-0.00957489013671875,
0.01038360595703125,
-0.01078033447265625,
0.0550537109375,
-0.041900634765625,
0.0745849609375,
0.04608154296875,
-0.056396484375,
0.0543212890625,
0.0011539459228515625,
0.0034637451171875,
-0.04486083984375,
-0.0231475830078125,
-0.0099334716796875,
0.0191497802734375,
0.11749267578125,
0.06414794921875,
0.0240325927734375,
-0.06048583984375,
0.04791259765625,
-0.00919342041015625,
-0.044189453125,
-0.01073455810546875,
0.0035457611083984375,
-0.0238189697265625,
-0.023895263671875,
-0.007068634033203125,
0.00666046142578125,
-0.017852783203125,
-0.0242156982421875,
-0.036041259765625,
-0.0220489501953125,
-0.0260467529296875,
0.021820068359375,
-0.01511383056640625,
-0.0364990234375,
0.0875244140625,
-0.0601806640625,
-0.025970458984375,
0.03973388671875,
0.01055908203125,
0.004299163818359375,
0.042083740234375,
0.0014867782592773438,
0.0034236907958984375,
-0.031036376953125,
0.033416748046875,
-0.0005826950073242188,
0.015777587890625,
-0.04180908203125,
-0.00006973743438720703,
0.0102691650390625,
0.0203704833984375,
-0.021484375,
0.0196533203125,
0.03363037109375,
0.046173095703125,
-0.0189361572265625,
0.059539794921875,
-0.017486572265625,
0.0313720703125,
-0.0004494190216064453,
0.0183868408203125,
-0.0169677734375,
0.0127716064453125,
0.03485107421875,
-0.03387451171875,
0.005855560302734375,
0.0301513671875,
0.00942230224609375,
-0.01319122314453125,
0.0266265869140625,
0.0217132568359375,
0.011016845703125,
0.01141357421875
]
|
b5bb01bfac21056b9cea08e93701b145357f1ecb | Wordpress Stackexchange
Q: Will a large postmeta table slow a site down? I have created a hit counter that stores all time hits and daily hits. This means that if a single post gets at least one view a day it will have 365 meta fields added to it by the end of the year. Multiply this by N posts and the number can grow considerably large. Will this ever be an issue? I know Wordpress caches stuff and this is why i am worried about it. Will all of these be loaded each time the post is loaded.
This will better explain what i have implemented.
$dailyhits = get_post_meta( $post->ID, 'hits_'.date('Y-m-d'), true );
if($dailyhits == null || $dailyhits == "" || $dailyhits == false) $dailyhits = 1;
else $dailyhits = $dailyhits + 1;
update_post_meta($post->ID, 'hits_'.date('Y-m-d'), $dailyhits);
A: "You should not write to the DB on front end requests" is the eleventh commandment. Your performance will deteriorate due to the writes locking down the table much more than the impact the size of the table will have.
You should probably write such data in files instead of DB, or at least use a different table.
| Q: Will a large postmeta table slow a site down? I have created a hit counter that stores all time hits and daily hits. This means that if a single post gets at least one view a day it will have 365 meta fields added to it by the end of the year. Multiply this by N posts and the number can grow considerably large. Will this ever be an issue? I know Wordpress caches stuff and this is why i am worried about it. Will all of these be loaded each time the post is loaded.
This will better explain what i have implemented.
$dailyhits = get_post_meta( $post->ID, 'hits_'.date('Y-m-d'), true );
if($dailyhits == null || $dailyhits == "" || $dailyhits == false) $dailyhits = 1;
else $dailyhits = $dailyhits + 1;
update_post_meta($post->ID, 'hits_'.date('Y-m-d'), $dailyhits);
A: "You should not write to the DB on front end requests" is the eleventh commandment. Your performance will deteriorate due to the writes locking down the table much more than the impact the size of the table will have.
You should probably write such data in files instead of DB, or at least use a different table.
| wordpress | {
"language": "en",
"length": 193,
"provenance": "stackexchange_00019.jsonl.gz:464963",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/224763"
} | [
0.0723876953125,
-0.013214111328125,
-0.03497314453125,
-0.072265625,
0.0249176025390625,
-0.035675048828125,
0.03271484375,
0.0238037109375,
0.031402587890625,
0.038543701171875,
-0.0340576171875,
-0.022491455078125,
0.02862548828125,
0.00518035888671875,
-0.044586181640625,
-0.028472900390625,
0.06683349609375,
-0.01467132568359375,
0.0750732421875,
0.035186767578125,
0.0155487060546875,
0.0732421875,
0.05224609375,
0.012359619140625,
0.0207061767578125,
-0.0367431640625,
0.00426483154296875,
-0.0255889892578125,
0.0223846435546875,
-0.0182647705078125,
0.01125335693359375,
0.028839111328125,
-0.01003265380859375,
0.0037746429443359375,
0.04461669921875,
0.01110076904296875,
0.0172576904296875,
0.013763427734375,
0.02996826171875,
-0.008453369140625,
0.016204833984375,
-0.00923919677734375,
0.0035037994384765625,
-0.031951904296875,
-0.00521087646484375,
-0.00196075439453125,
0.0181121826171875,
-0.040924072265625,
0.0134735107421875,
-0.036529541015625,
0.01262664794921875,
0.0819091796875,
0.0204925537109375,
-0.00261688232421875,
-0.007415771484375,
-0.0023555755615234375,
0.016845703125,
-0.0283966064453125,
0.0411376953125,
-0.0175933837890625,
-0.033111572265625,
-0.00984954833984375,
0.01806640625,
-0.0301666259765625,
-0.01529693603515625,
-0.0213470458984375,
-0.0010595321655273438,
0.02783203125,
-0.029449462890625,
-0.020660400390625,
0.0247344970703125,
-0.0093994140625,
0.01148223876953125,
-0.01052093505859375,
-0.0005426406860351562,
-0.0299072265625,
0.0111846923828125,
-0.02655029296875,
-0.01045989990234375,
0.032073974609375,
-0.01849365234375,
-0.002323150634765625,
-0.032470703125,
-0.035614013671875,
-0.0079193115234375,
-0.0280609130859375,
-0.019012451171875,
0.01187896728515625,
-0.01332855224609375,
-0.04913330078125,
-0.003429412841796875,
-0.035888671875,
-0.0157318115234375,
-0.0198822021484375,
-0.023162841796875,
-0.044952392578125,
0.01100921630859375,
0.031768798828125,
-0.0330810546875,
-0.035614013671875,
-0.002521514892578125,
-0.0081634521484375,
-0.038604736328125,
0.0078277587890625,
0.045745849609375,
0.0726318359375,
-0.043304443359375,
0.0010309219360351562,
0.082275390625,
0.0216217041015625,
0.035003662109375,
0.03668212890625,
-0.0019168853759765625,
0.01953125,
-0.03125,
0.01000213623046875,
-0.019775390625,
0.0032901763916015625,
-0.0120391845703125,
0.02642822265625,
-0.012847900390625,
-0.018280029296875,
-0.0244598388671875,
0.00276947021484375,
0.0116119384765625,
-0.021514892578125,
-0.037078857421875,
0.053436279296875,
-0.022613525390625,
0.0521240234375,
-0.0283355712890625,
-0.007904052734375,
0.025299072265625,
-0.00818634033203125,
-0.0262908935546875,
-0.0256195068359375,
0.006008148193359375,
-0.048614501953125,
-0.052215576171875,
0.039794921875,
-0.0406494140625,
-0.08880615234375,
-0.0292816162109375,
-0.0306396484375,
-0.006526947021484375,
0.03173828125,
0.012786865234375,
-0.0025310516357421875,
-0.01036834716796875,
-0.0321044921875,
-0.01091766357421875,
-0.03271484375,
0.034210205078125,
-0.0124053955078125,
-0.041259765625,
-0.027099609375,
-0.04034423828125,
0.001918792724609375,
-0.005496978759765625,
-0.017791748046875,
0.0499267578125,
0.003841400146484375,
-0.0277862548828125,
-0.01641845703125,
-0.033447265625,
-0.01328277587890625,
-0.038726806640625,
-0.0073699951171875,
0.023284912109375,
-0.014129638671875,
0.01174163818359375,
-0.032012939453125,
0.028717041015625,
-0.0237579345703125,
-0.0203399658203125,
0.00677490234375,
-0.0141754150390625,
-0.01522064208984375,
0.06353759765625,
-0.03997802734375,
-0.040679931640625,
-0.0209503173828125,
0.07513427734375,
-0.01654052734375,
-0.03692626953125,
0.05340576171875,
-0.00400543212890625,
0.0281524658203125,
0.006977081298828125,
-0.00494384765625,
0.015960693359375,
0.020721435546875,
-0.019256591796875,
0.04974365234375,
0.0311431884765625,
-0.02392578125,
-0.00046634674072265625,
0.0038394927978515625,
0.00801849365234375,
-0.060821533203125,
0.00644683837890625,
0.037841796875,
-0.031982421875,
0.0081634521484375,
-0.0865478515625,
0.0252685546875,
-0.0287628173828125,
0.04119873046875,
-0.01092529296875,
0.064208984375,
0.01209259033203125,
0.0053863525390625,
-0.032196044921875,
0.028076171875,
0.0267791748046875,
-0.0032978057861328125,
-0.0129241943359375,
-0.011138916015625,
-0.01055145263671875,
-0.00424957275390625,
-0.016082763671875,
0.005924224853515625,
-0.0216217041015625,
0.01934814453125,
0.0159759521484375,
0.00786590576171875,
-0.0264434814453125,
-0.0038623809814453125,
-0.019378662109375,
0.0082244873046875,
-0.0011854171752929688,
0.054046630859375,
0.037322998046875,
0.04345703125,
-0.0006847381591796875,
-0.0168609619140625,
0.0029315948486328125,
-0.1121826171875,
0.0215606689453125,
0.05078125,
0.021881103515625,
-0.031463623046875,
-0.018280029296875,
0.042877197265625,
-0.06890869140625,
-0.09649658203125,
-0.0120697021484375,
0.037567138671875,
-0.011962890625,
0.00909423828125,
-0.0026035308837890625,
0.006122589111328125,
0.0157928466796875,
-0.10247802734375,
0.0061187744140625,
0.034698486328125,
-0.030364990234375,
-0.02105712890625,
0.005184173583984375,
0.0025615692138671875,
0.01519012451171875,
0.03826904296875,
-0.01427459716796875,
0.019744873046875,
0.028533935546875,
-0.00910186767578125,
0.0257720947265625,
-0.00047326087951660156,
0.006160736083984375,
0.0085906982421875,
0.005176544189453125,
-0.058563232421875,
0.026031494140625,
-0.031829833984375,
-0.032379150390625,
0.0020122528076171875,
-0.020782470703125,
0.021636962890625,
0.038360595703125,
-0.048828125,
-0.03594970703125,
-0.00543212890625,
-0.03704833984375,
-0.007183074951171875,
-0.0037937164306640625,
-0.002655029296875,
0.0013036727905273438,
-0.018218994140625,
0.024078369140625,
0.0157623291015625,
0.0152740478515625,
0.0467529296875,
-0.01371002197265625,
0.037200927734375,
0.037078857421875,
-0.0078582763671875,
0.042633056640625,
-0.03363037109375,
0.03741455078125,
-0.0186614990234375,
0.041839599609375,
0.056732177734375,
-0.029205322265625,
0.024200439453125,
-0.01496124267578125,
0.023162841796875,
-0.02117919921875,
0.028289794921875,
-0.01497650146484375,
-0.054351806640625,
-0.01398468017578125,
-0.015411376953125,
0.0467529296875,
0.08544921875,
0.00960540771484375,
-0.031280517578125,
0.01509857177734375,
0.0528564453125,
-0.051666259765625,
-0.1019287109375,
-0.00959014892578125,
-0.0599365234375,
0.0015859603881835938,
-0.0517578125,
-0.026275634765625,
0.0027370452880859375,
-0.04901123046875,
0.0070648193359375,
-0.04949951171875,
-0.0230712890625,
0.034332275390625,
-0.0308837890625,
0.01291656494140625,
-0.02374267578125,
0.01342010498046875,
-0.0253143310546875,
-0.016357421875,
0.0635986328125,
-0.0305023193359375,
-0.0718994140625,
-0.044036865234375,
-0.03167724609375,
0.007171630859375,
0.0116424560546875,
0.011688232421875,
-0.0136566162109375,
-0.049652099609375,
0.0009670257568359375,
-0.04156494140625,
-0.0036296844482421875,
0.0033397674560546875,
-0.0226593017578125,
0.012298583984375,
-0.0164031982421875,
0.0236358642578125,
0.044219970703125,
-0.0237579345703125,
0.041839599609375,
0.0718994140625,
-0.012420654296875,
-0.006084442138671875,
-0.0166015625,
-0.0283355712890625,
-0.0592041015625,
0.0162506103515625,
0.01506805419921875,
-0.009918212890625,
-0.00738525390625,
0.055938720703125,
0.04986572265625,
0.0234375,
0.0274658203125,
-0.0265045166015625,
-0.01485443115234375,
-0.00887298583984375,
-0.04302978515625,
-0.02374267578125,
-0.0305328369140625,
0.010894775390625,
-0.03021240234375,
-0.009429931640625,
-0.051300048828125,
0.030426025390625,
-0.068115234375,
-0.00583648681640625,
0.04315185546875,
0.01641845703125,
0.035888671875,
-0.039642333984375,
-0.035125732421875,
-0.045654296875,
0.0426025390625,
-0.002124786376953125,
-0.002803802490234375,
-0.01216888427734375,
0.0032520294189453125,
-0.06646728515625,
-0.034088134765625,
-0.030548095703125,
0.017242431640625,
0.01629638671875,
-0.01279449462890625,
0.0016813278198242188,
-0.0040283203125,
-0.0199127197265625,
0.0635986328125,
-0.01519012451171875,
0.0009441375732421875,
0.001621246337890625,
-0.03961181640625,
0.025604248046875,
0.008392333984375,
0.0016069412231445312,
0.0005354881286621094,
0.018157958984375,
-0.06982421875,
-0.062744140625,
-0.0216217041015625,
0.0003533363342285156,
0.043609619140625,
-0.0006804466247558594,
-0.007415771484375,
0.0033435821533203125,
0.049041748046875,
0.006763458251953125,
0.0276336669921875,
0.0018749237060546875,
-0.0176849365234375,
-0.035064697265625,
0.0250701904296875,
0.0220489501953125,
-0.0153656005859375,
-0.03619384765625,
-0.0523681640625,
0.039154052734375,
-0.01000213623046875,
-0.029327392578125,
-0.005817413330078125,
-0.03533935546875,
0.0263519287109375,
-0.00746917724609375,
-0.034912109375,
-0.036224365234375,
0.03167724609375,
-0.046722412109375,
-0.0022907257080078125,
-0.0433349609375,
-0.0240020751953125,
0.0743408203125,
0.019073486328125,
0.01287078857421875,
-0.0042724609375,
0.062255859375,
-0.0114898681640625,
-0.046600341796875,
-0.083984375,
-0.0007028579711914062,
0.060546875,
-0.0206756591796875,
-0.01032257080078125,
0.0020313262939453125,
-0.057647705078125,
0.07012939453125,
0.008270263671875,
-0.006206512451171875,
-0.043365478515625,
0.06146240234375,
-0.006946563720703125,
0.01018524169921875,
-0.016143798828125,
-0.036285400390625,
0.055023193359375,
0.0313720703125,
-0.017303466796875,
-0.02435302734375,
-0.030242919921875,
0.041839599609375,
0.0014562606811523438,
0.025238037109375,
-0.03594970703125,
-0.02764892578125,
0.0068359375,
-0.0296173095703125,
0.022308349609375,
0.00955963134765625,
0.0016088485717773438,
0.0183868408203125,
0.02740478515625,
-0.0106658935546875,
-0.0092315673828125,
-0.01519012451171875,
0.0104827880859375,
-0.016510009765625,
0.03814697265625,
-0.01364898681640625,
-0.032958984375,
-0.00905609130859375,
0.04327392578125,
-0.0228118896484375,
-0.05816650390625,
0.0259552001953125,
-0.0194091796875,
-0.033782958984375,
0.05810546875,
0.04840087890625,
0.054168701171875,
0.0390625,
-0.00753021240234375,
-0.020721435546875,
0.005084991455078125,
0.0273895263671875,
-0.048980712890625,
-0.0105133056640625,
0.00066375732421875,
-0.0017108917236328125,
0.0477294921875,
0.0240631103515625,
-0.007488250732421875,
0.0272216796875,
-0.013885498046875,
0.08001708984375,
0.06060791015625,
0.041473388671875,
0.005451202392578125,
-0.029052734375,
-0.0226593017578125,
0.03997802734375,
-0.055419921875,
-0.03375244140625,
0.0202178955078125,
0.0228729248046875,
0.01210784912109375,
0.0160369873046875,
-0.0204925537109375,
0.00966644287109375,
-0.0169219970703125,
0.0019016265869140625,
0.0108489990234375,
0.0003867149353027344,
-0.01160430908203125,
-0.01197052001953125,
-0.0112457275390625,
0.00943756103515625,
-0.0008411407470703125,
0.0421142578125,
-0.0343017578125,
0.00281524658203125,
0.0150299072265625,
-0.05059814453125,
0.05615234375,
-0.0673828125,
-0.0738525390625,
-0.020965576171875,
-0.021087646484375,
-0.0059661865234375,
-0.003910064697265625,
-0.0219879150390625,
-0.0013608932495117188,
0.007053375244140625,
0.0282440185546875,
-0.007610321044921875,
0.06353759765625,
-0.041015625,
-0.01097869873046875,
-0.03680419921875,
0.0026760101318359375,
0.01812744140625,
-0.0005140304565429688,
-0.00815582275390625,
-0.02294921875,
-0.01629638671875,
-0.038055419921875,
0.0154876708984375,
0.0178070068359375,
-0.037384033203125,
0.001007080078125,
0.023162841796875,
0.0231475830078125,
0.02020263671875,
-0.040985107421875,
-0.0102996826171875,
-0.02667236328125,
0.0178375244140625,
-0.017791748046875,
-0.0477294921875,
0.034210205078125,
0.0246734619140625,
0.003437042236328125,
0.004856109619140625,
0.0221099853515625,
0.037078857421875,
-0.0083465576171875,
0.0133514404296875,
-0.041229248046875,
-0.00658416748046875,
-0.0048065185546875,
0.007659912109375,
0.0043792724609375,
0.00197601318359375,
-0.004608154296875,
0.0245208740234375,
-0.0182037353515625,
0.007537841796875,
-0.015869140625,
0.00011527538299560547,
-0.024169921875,
0.0085296630859375,
0.0232696533203125,
0.0201263427734375,
0.04656982421875,
-0.0145263671875,
-0.03515625,
-0.01097869873046875,
0.020172119140625,
0.0057373046875,
0.0024700164794921875,
-0.003742218017578125,
0.0025920867919921875,
0.03619384765625,
0.0152587890625,
0.033111572265625,
-0.0014295578002929688,
0.01358795166015625,
0.00791168212890625,
-0.00322723388671875,
0.0036602020263671875,
-0.0028896331787109375,
0.03497314453125,
-0.032501220703125,
-0.004375457763671875,
0.010589599609375,
-0.0201568603515625,
-0.0233306884765625,
-0.0118865966796875,
0.011993408203125,
-0.0133209228515625,
0.01153564453125,
-0.016448974609375,
-0.003509521484375,
0.0163116455078125,
-0.01483154296875,
-0.0167083740234375,
-0.019561767578125,
0.0225677490234375,
0.04998779296875,
-0.031280517578125,
0.0025882720947265625,
0.032623291015625,
-0.010223388671875,
-0.00897979736328125,
-0.0109405517578125,
-0.0164794921875,
-0.0189056396484375,
-0.04791259765625,
0.0166778564453125,
-0.037384033203125,
-0.0162811279296875,
0.03033447265625,
-0.0233306884765625,
0.00502777099609375,
-0.0226898193359375,
0.01788330078125,
-0.0107879638671875,
-0.0017671585083007812,
0.046905517578125,
0.041961669921875,
0.059967041015625,
0.0220489501953125,
0.022552490234375,
0.005840301513671875,
-0.0230712890625,
0.07110595703125,
-0.01387786865234375,
0.00498199462890625,
0.00930023193359375,
0.0173797607421875,
0.0246734619140625,
0.00919342041015625,
-0.00414276123046875,
-0.020660400390625,
-0.004180908203125,
-0.0242767333984375,
0.03118896484375,
-0.0168914794921875,
-0.016845703125,
0.0218963623046875,
-0.0217742919921875,
0.001445770263671875,
-0.0312042236328125,
0.0107574462890625,
-0.0299072265625,
0.0153656005859375,
-0.0167083740234375,
0.00426483154296875,
-0.02618408203125,
-0.040802001953125,
-0.01259613037109375,
0.057708740234375,
-0.018585205078125,
-0.03350830078125,
0.052032470703125,
0.031463623046875,
-0.049224853515625,
0.011627197265625,
-0.029449462890625,
0.07696533203125,
-0.01436614990234375,
0.043121337890625,
-0.046295166015625,
-0.00339508056640625,
0.0163726806640625,
0.0275726318359375,
0.07330322265625,
0.0222625732421875,
-0.009063720703125,
-0.0183258056640625,
0.032379150390625,
-0.0201416015625,
-0.06109619140625,
0.038818359375,
-0.051177978515625,
0.0233917236328125,
0.03887939453125,
-0.053680419921875,
0.006343841552734375,
0.0465087890625,
-0.049346923828125,
-0.01238250732421875,
-0.003299713134765625,
-0.0024013519287109375,
0.004886627197265625,
0.01837158203125,
-0.001895904541015625,
-0.004886627197265625,
-0.002529144287109375,
-0.0176239013671875,
0.029388427734375,
0.01386260986328125,
0.0304718017578125,
-0.06292724609375,
-0.0247802734375,
-0.013916015625,
0.047088623046875,
0.0010585784912109375,
0.0038814544677734375,
-0.00667572021484375,
0.0028057098388671875,
0.0268096923828125,
-0.0144195556640625,
-0.01751708984375,
0.037933349609375,
-0.0245819091796875,
0.06787109375,
0.02886962890625,
0.02728271484375,
-0.059295654296875,
-0.040008544921875,
0.03741455078125,
0.09912109375,
-0.04345703125,
-0.0242767333984375,
0.0008187294006347656,
-0.01117706298828125,
-0.0174407958984375,
-0.0007200241088867188,
-0.005229949951171875,
0.023895263671875,
0.036834716796875,
0.0146484375,
-0.0204620361328125,
-0.0113372802734375,
-0.0204010009765625,
-0.0038967132568359375,
0.01995849609375,
0.02423095703125,
0.01922607421875,
-0.017364501953125,
-0.0309906005859375,
0.030059814453125,
0.02996826171875,
0.0220794677734375,
0.0245513916015625,
0.0189971923828125,
-0.0027332305908203125,
-0.01169586181640625,
-0.0010232925415039062,
0.016265869140625,
-0.0027637481689453125,
-0.0411376953125,
-0.042022705078125,
0.059051513671875,
0.043731689453125,
0.00734710693359375,
0.03729248046875,
0.053680419921875,
0.0272979736328125,
-0.0313720703125,
-0.00614166259765625,
0.04736328125,
-0.04180908203125,
-0.032867431640625,
-0.0311126708984375,
-0.0012102127075195312,
0.0098876953125,
-0.0080108642578125,
0.005512237548828125,
0.05145263671875,
-0.0377197265625,
0.01605224609375,
-0.0038623809814453125,
0.02630615234375,
-0.022430419921875,
-0.0119781494140625,
0.032470703125,
0.002777099609375,
0.047454833984375,
-0.060791015625,
-0.002025604248046875,
0.004337310791015625,
-0.0501708984375,
0.001880645751953125,
0.034942626953125,
-0.040985107421875,
0.048248291015625,
-0.00799560546875,
0.00571441650390625,
0.00879669189453125,
0.0017833709716796875,
-0.01983642578125,
0.041412353515625,
0.052276611328125,
-0.0036468505859375,
-0.00458526611328125,
0.016021728515625,
0.01413726806640625,
0.01751708984375,
-0.022216796875,
0.1136474609375,
-0.037139892578125,
-0.004802703857421875,
0.0279998779296875,
0.002716064453125,
0.0290985107421875,
0.00852203369140625,
0.029632568359375,
-0.0021800994873046875,
-0.0007829666137695312,
-0.0228271484375,
-0.0160369873046875,
-0.04638671875,
0.06158447265625,
-0.0465087890625,
-0.053863525390625,
0.01337432861328125,
0.043426513671875,
-0.00881195068359375,
0.00359344482421875,
-0.0120391845703125,
0.01287078857421875,
0.017730712890625,
-0.0147552490234375,
0.019256591796875,
0.00876617431640625,
0.0115509033203125,
0.0228118896484375,
0.01445770263671875,
0.0003726482391357422,
0.020965576171875,
-0.0160675048828125,
0.048553466796875,
0.04327392578125,
-0.032989501953125,
0.025634765625,
0.03125,
-0.0217132568359375,
0.0221405029296875,
0.0224609375,
0.010589599609375,
0.02716064453125,
-0.0182952880859375,
0.00107574462890625,
0.0250396728515625,
0.0570068359375,
-0.01404571533203125,
0.0251922607421875,
-0.0113067626953125,
0.01450347900390625,
0.022613525390625,
0.043975830078125,
-0.004058837890625,
-0.02996826171875,
-0.033843994140625,
-0.0234527587890625,
-0.0279541015625,
-0.0308685302734375,
0.0213623046875,
-0.00948333740234375,
0.020660400390625,
-0.006641387939453125,
-0.0350341796875,
0.0281219482421875,
-0.0313720703125,
-0.02044677734375,
-0.00807952880859375,
0.01702880859375,
-0.04180908203125,
-0.0165252685546875,
-0.013153076171875,
-0.026153564453125,
-0.04248046875,
0.052001953125,
-0.0028438568115234375,
-0.01275634765625,
0.00217437744140625,
-0.0001919269561767578,
-0.00875091552734375,
-0.0379638671875,
-0.01374053955078125,
-0.004863739013671875,
0.00989532470703125,
-0.0119171142578125,
0.028533935546875,
-0.011444091796875,
-0.0285491943359375,
-0.08740234375,
-0.004383087158203125,
-0.0902099609375,
0.01042938232421875,
-0.0002455711364746094,
0.01245880126953125,
0.033294677734375,
-0.019866943359375,
-0.05645751953125,
0.0185546875,
-0.0083160400390625,
-0.0265655517578125,
-0.057861328125,
-0.0167999267578125,
-0.00726318359375,
0.02215576171875,
-0.022064208984375,
-0.00836944580078125,
-0.04620361328125,
0.033660888671875,
0.0284881591796875,
-0.0472412109375,
0.061859130859375,
-0.023406982421875,
-0.073974609375,
-0.006565093994140625,
0.003810882568359375,
0.00304412841796875,
-0.026611328125,
0.0391845703125,
0.03936767578125,
0.052764892578125,
-0.0012426376342773438,
0.11181640625,
0.019805908203125,
-0.0028018951416015625,
-0.02044677734375,
-0.006877899169921875,
-0.01544952392578125,
0.03369140625,
0.0924072265625,
0.0792236328125,
0.025177001953125,
-0.08544921875,
-0.0169830322265625,
-0.0163726806640625,
-0.01523590087890625,
-0.018341064453125,
0.01290130615234375,
-0.045135498046875,
-0.0137786865234375,
-0.035491943359375,
-0.0130462646484375,
0.03143310546875,
0.00421142578125,
0.0191192626953125,
0.0215301513671875,
0.06292724609375,
-0.0245208740234375,
-0.0159149169921875,
0.03265380859375,
0.01031494140625,
-0.0212554931640625,
-0.041412353515625,
0.017974853515625,
-0.01403045654296875,
-0.0196380615234375,
0.03082275390625,
0.004520416259765625,
0.016693115234375,
-0.01006317138671875,
0.022003173828125,
0.014251708984375,
0.0004398822784423828,
-0.0269927978515625,
0.0004286766052246094,
0.006053924560546875,
-0.00606536865234375,
-0.0099639892578125,
-0.016204833984375,
0.002361297607421875,
0.007080078125,
-0.0211029052734375,
0.0284881591796875,
0.0038280487060546875,
-0.01409149169921875,
-0.0166168212890625,
0.036407470703125,
-0.01328277587890625,
-0.01216888427734375,
0.0183563232421875,
-0.034942626953125,
0.0081939697265625,
-0.0303955078125,
0.005321502685546875,
-0.034637451171875,
-0.01934814453125,
-0.043670654296875,
-0.01010894775390625,
0.024200439453125
]
|
0f63ae544dc4b57532c0a2b6e42fb0afe59a2d22 | Wordpress Stackexchange
Q: Listing a post's categories and subcategories Is there a way to display the parent categories and subcategories for a particular post (ie. for use on single.php).
I've tried using get_the_category_list(), but it displays a list like this:
*
*Subcat1
*ParentCat1
*Subcat2
*Subcat3
*ParentCat2
Even if you try the 'single' or 'multiple' display argument, it doesn't give me what I want, which is this:
*
*ParentCat1
*
*Subcat1
*Subcat2
*ParentCat2
*
*Subcat 3
Is it possible to get the categories to be displayed like this? Even using another method (like get_terms())?
A: Update 1:
Thanks to @birgire for suggesting a better way:
wp_list_categories( [ 'include' => wp_list_pluck( get_the_category(), 'term_id' ) ] );
Try this in your single.php template:
$current_cats = get_the_category();
$current_cats_ids = [];
foreach ($current_cats as $cat) {
$current_cats_ids[] = $cat->term_id;
}
wp_list_categories([
'include' => $current_cats_ids,
]);
| Q: Listing a post's categories and subcategories Is there a way to display the parent categories and subcategories for a particular post (ie. for use on single.php).
I've tried using get_the_category_list(), but it displays a list like this:
*
*Subcat1
*ParentCat1
*Subcat2
*Subcat3
*ParentCat2
Even if you try the 'single' or 'multiple' display argument, it doesn't give me what I want, which is this:
*
*ParentCat1
*
*Subcat1
*Subcat2
*ParentCat2
*
*Subcat 3
Is it possible to get the categories to be displayed like this? Even using another method (like get_terms())?
A: Update 1:
Thanks to @birgire for suggesting a better way:
wp_list_categories( [ 'include' => wp_list_pluck( get_the_category(), 'term_id' ) ] );
Try this in your single.php template:
$current_cats = get_the_category();
$current_cats_ids = [];
foreach ($current_cats as $cat) {
$current_cats_ids[] = $cat->term_id;
}
wp_list_categories([
'include' => $current_cats_ids,
]);
| wordpress | {
"language": "en",
"length": 138,
"provenance": "stackexchange_00019.jsonl.gz:464965",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/224767"
} | [
0.05816650390625,
-0.0149383544921875,
-0.01221466064453125,
-0.037933349609375,
0.007965087890625,
-0.01971435546875,
0.04071044921875,
-0.008514404296875,
0.0006189346313476562,
0.006011962890625,
-0.034881591796875,
-0.0223236083984375,
-0.029998779296875,
-0.0218963623046875,
-0.0294342041015625,
-0.04644775390625,
0.049835205078125,
-0.044464111328125,
0.03753662109375,
0.006465911865234375,
-0.0186614990234375,
0.040313720703125,
0.05963134765625,
0.03936767578125,
0.0031585693359375,
-0.059326171875,
0.01959228515625,
-0.01374053955078125,
-0.01450347900390625,
-0.055450439453125,
-0.00017118453979492188,
0.08013916015625,
0.0260009765625,
-0.0260009765625,
0.050048828125,
0.0199737548828125,
0.0134429931640625,
-0.0147857666015625,
0.033538818359375,
0.0162811279296875,
0.0295257568359375,
-0.0207672119140625,
0.01334381103515625,
-0.00792694091796875,
0.0009918212890625,
-0.0384521484375,
0.039703369140625,
-0.03875732421875,
0.013275146484375,
-0.0345458984375,
0.026763916015625,
-0.004058837890625,
0.037384033203125,
-0.039581298828125,
-0.01824951171875,
-0.01415252685546875,
0.00290679931640625,
-0.004100799560546875,
0.056549072265625,
-0.0015401840209960938,
-0.048187255859375,
-0.02081298828125,
0.03021240234375,
-0.049072265625,
-0.00870513916015625,
0.007106781005859375,
0.03460693359375,
0.00588226318359375,
-0.04327392578125,
-0.0267486572265625,
0.0285797119140625,
-0.01029205322265625,
0.0295257568359375,
-0.02313232421875,
-0.0285186767578125,
-0.031158447265625,
-0.0003829002380371094,
-0.00983428955078125,
0.01383209228515625,
-0.0216827392578125,
0.0016126632690429688,
0.01467132568359375,
-0.06500244140625,
0.0252532958984375,
-0.01372528076171875,
0.0301055908203125,
-0.01097869873046875,
-0.0302581787109375,
-0.051513671875,
-0.0299835205078125,
-0.03094482421875,
-0.056976318359375,
-0.048614501953125,
0.0217132568359375,
0.0115966796875,
-0.02459716796875,
0.0286102294921875,
0.068115234375,
-0.03265380859375,
-0.043487548828125,
-0.004734039306640625,
-0.0236053466796875,
-0.0419921875,
-0.01776123046875,
0.0092620849609375,
0.0295562744140625,
-0.0195159912109375,
0.0288543701171875,
0.07476806640625,
0.050384521484375,
0.0260772705078125,
0.041839599609375,
0.016937255859375,
-0.0173187255859375,
-0.05572509765625,
0.0237274169921875,
0.0020618438720703125,
-0.0128326416015625,
-0.0008106231689453125,
-0.0018901824951171875,
0.0219573974609375,
0.05938720703125,
-0.00714874267578125,
-0.01280975341796875,
-0.002399444580078125,
0.0168304443359375,
0.0107421875,
-0.06378173828125,
0.002674102783203125,
-0.048858642578125,
-0.043426513671875,
0.031341552734375,
0.0875244140625,
0.050994873046875,
0.026458740234375,
0.0019989013671875,
-0.004947662353515625,
0.0013265609741210938,
0.01751708984375,
-0.01331329345703125,
-0.0103302001953125,
-0.0015802383422851562,
0.0516357421875,
-0.02203369140625,
-0.0018072128295898438,
-0.0006017684936523438,
0.005893707275390625,
0.0104522705078125,
0.006378173828125,
-0.007755279541015625,
0.024261474609375,
-0.03643798828125,
0.040740966796875,
-0.006671905517578125,
-0.0190887451171875,
-0.0275115966796875,
0.0036907196044921875,
-0.0245819091796875,
-0.0140838623046875,
-0.04345703125,
0.037445068359375,
0.00664520263671875,
0.02801513671875,
-0.0216217041015625,
-0.04803466796875,
0.006122589111328125,
-0.08209228515625,
-0.0164947509765625,
0.028350830078125,
-0.0010366439819335938,
0.04388427734375,
-0.028961181640625,
0.0193939208984375,
0.0178680419921875,
0.001369476318359375,
0.0105133056640625,
-0.041290283203125,
-0.0101165771484375,
0.0443115234375,
0.0313720703125,
-0.0160675048828125,
-0.031707763671875,
-0.01568603515625,
0.02239990234375,
-0.041259765625,
0.01226043701171875,
0.002567291259765625,
0.03179931640625,
0.0182647705078125,
0.0115966796875,
0.0175018310546875,
0.0147552490234375,
-0.04583740234375,
-0.001079559326171875,
-0.0023937225341796875,
0.016357421875,
-0.0163116455078125,
0.024444580078125,
-0.0014410018920898438,
-0.028289794921875,
-0.0118560791015625,
-0.007442474365234375,
0.00908660888671875,
0.01523590087890625,
-0.036468505859375,
0.0269012451171875,
-0.0171356201171875,
0.034698486328125,
-0.0200653076171875,
0.01058197021484375,
0.0060882568359375,
-0.01523590087890625,
0.0034542083740234375,
-0.054290771484375,
-0.002262115478515625,
0.03717041015625,
-0.00244903564453125,
0.0196075439453125,
0.0035762786865234375,
-0.00817108154296875,
-0.0018215179443359375,
0.01059722900390625,
-0.006755828857421875,
0.028350830078125,
0.061065673828125,
0.025787353515625,
-0.0224609375,
-0.0152435302734375,
0.0072784423828125,
0.054779052734375,
-0.11651611328125,
-0.01049041748046875,
0.023651123046875,
0.015716552734375,
-0.052337646484375,
0.0025787353515625,
0.022430419921875,
0.032501220703125,
-0.0158538818359375,
0.03240966796875,
0.03375244140625,
-0.0025482177734375,
-0.003936767578125,
-0.014068603515625,
0.047149658203125,
-0.03948974609375,
-0.0091552734375,
-0.0244293212890625,
-0.018951416015625,
0.0095062255859375,
0.0107879638671875,
0.0216827392578125,
0.0175933837890625,
0.0003571510314941406,
0.022735595703125,
0.04193115234375,
-0.0036220550537109375,
-0.0266876220703125,
0.0167236328125,
-0.0195159912109375,
0.0224761962890625,
-0.031890869140625,
-0.054779052734375,
0.0038967132568359375,
0.044769287109375,
-0.0037384033203125,
0.045745849609375,
0.029541015625,
0.0220489501953125,
-0.0213165283203125,
-0.0118408203125,
-0.018585205078125,
0.005733489990234375,
0.019866943359375,
-0.03656005859375,
0.01422119140625,
-0.038421630859375,
0.0147552490234375,
0.0023670196533203125,
-0.01264190673828125,
0.0140380859375,
0.06341552734375,
0.0178070068359375,
-0.00986480712890625,
-0.050811767578125,
-0.0718994140625,
0.00910186767578125,
0.0298309326171875,
-0.014801025390625,
0.01544952392578125,
0.0199127197265625,
0.0653076171875,
0.00006699562072753906,
0.0115203857421875,
-0.015960693359375,
0.038543701171875,
0.056182861328125,
-0.023712158203125,
0.040435791015625,
-0.021484375,
0.030548095703125,
0.0372314453125,
-0.015777587890625,
-0.00034880638122558594,
0.00412750244140625,
-0.0011396408081054688,
0.03564453125,
-0.0023212432861328125,
-0.013916015625,
-0.009429931640625,
-0.0213623046875,
-0.0004363059997558594,
0.016937255859375,
0.08154296875,
-0.0135955810546875,
-0.05010986328125,
0.0120849609375,
0.024566650390625,
-0.0242156982421875,
-0.0292205810546875,
-0.003124237060546875,
-0.051788330078125,
-0.01520538330078125,
-0.0026988983154296875,
-0.0212249755859375,
-0.00795745849609375,
0.01268768310546875,
0.000028192996978759766,
-0.0216522216796875,
-0.0394287109375,
-0.054840087890625,
-0.0726318359375,
-0.0726318359375,
0.01091766357421875,
0.005954742431640625,
0.021453857421875,
-0.005512237548828125,
0.0750732421875,
0.017181396484375,
-0.0638427734375,
-0.015594482421875,
0.0648193359375,
-0.030120849609375,
-0.01332855224609375,
0.01068878173828125,
-0.0244903564453125,
0.03094482421875,
0.002460479736328125,
-0.036956787109375,
0.01904296875,
-0.007236480712890625,
-0.0204620361328125,
-0.01427459716796875,
0.041595458984375,
0.039581298828125,
-0.05059814453125,
-0.001209259033203125,
0.08740234375,
0.0281982421875,
0.015960693359375,
-0.031890869140625,
-0.0401611328125,
-0.04949951171875,
-0.050079345703125,
0.0143890380859375,
0.031829833984375,
-0.056732177734375,
0.02032470703125,
-0.0265045166015625,
-0.009735107421875,
-0.00507354736328125,
-0.04229736328125,
0.0265960693359375,
0.0125732421875,
0.00621795654296875,
0.032958984375,
-0.000965118408203125,
-0.031158447265625,
0.0067291259765625,
-0.01471710205078125,
-0.01299285888671875,
-0.0340576171875,
0.020233154296875,
-0.0205841064453125,
-0.064453125,
0.0452880859375,
-0.048004150390625,
-0.0030536651611328125,
-0.057037353515625,
-0.0171661376953125,
-0.0181121826171875,
0.1004638671875,
-0.04595947265625,
-0.0193328857421875,
-0.00677490234375,
0.030364990234375,
-0.032196044921875,
-0.07818603515625,
-0.0289154052734375,
-0.01922607421875,
-0.0263671875,
-0.001003265380859375,
-0.0193939208984375,
-0.01360321044921875,
-0.0016307830810546875,
0.00006210803985595703,
-0.0196075439453125,
-0.0184478759765625,
0.042388916015625,
-0.03668212890625,
-0.01551055908203125,
-0.0098114013671875,
0.00818634033203125,
-0.0667724609375,
-0.021728515625,
0.005260467529296875,
-0.03265380859375,
-0.01268768310546875,
0.002277374267578125,
0.0295867919921875,
0.00679779052734375,
-0.037811279296875,
0.007251739501953125,
0.050140380859375,
0.0177459716796875,
-0.0211029052734375,
0.0172576904296875,
0.0193634033203125,
-0.0181121826171875,
-0.01485443115234375,
-0.01079559326171875,
-0.0269622802734375,
-0.041534423828125,
-0.050933837890625,
0.01177978515625,
0.004695892333984375,
-0.00922393798828125,
0.003509521484375,
-0.0228271484375,
0.0203094482421875,
-0.044586181640625,
-0.054168701171875,
-0.039398193359375,
0.0089569091796875,
-0.0225677490234375,
0.0214691162109375,
-0.0404052734375,
-0.07244873046875,
0.018463134765625,
0.032379150390625,
-0.006687164306640625,
0.01073455810546875,
0.04473876953125,
0.018341064453125,
-0.031768798828125,
-0.05511474609375,
-0.0015974044799804688,
0.028350830078125,
-0.038909912109375,
0.047149658203125,
0.0269775390625,
-0.01451873779296875,
0.0570068359375,
0.002964019775390625,
0.03851318359375,
-0.00042891502380371094,
0.0183868408203125,
0.00261688232421875,
0.0005207061767578125,
0.0175628662109375,
0.017578125,
-0.0098724365234375,
0.0021457672119140625,
-0.0161285400390625,
-0.029266357421875,
-0.005664825439453125,
0.046051025390625,
-0.0010700225830078125,
0.01544189453125,
-0.03277587890625,
-0.0189971923828125,
-0.0032901763916015625,
0.048614501953125,
0.031707763671875,
0.060699462890625,
-0.004787445068359375,
0.042388916015625,
0.0236663818359375,
0.0092926025390625,
-0.032379150390625,
-0.0194854736328125,
-0.00823974609375,
0.0236968994140625,
-0.036163330078125,
-0.0004086494445800781,
-0.01209259033203125,
-0.0008940696716308594,
0.0167999267578125,
0.0008711814880371094,
-0.02978515625,
0.00550079345703125,
-0.00957489013671875,
0.00439453125,
0.01499176025390625,
0.0016698837280273438,
0.0062103271484375,
0.03643798828125,
0.01410675048828125,
0.0205841064453125,
0.0008287429809570312,
0.0018873214721679688,
-0.0071868896484375,
-0.01495361328125,
-0.0109100341796875,
0.0010814666748046875,
0.025177001953125,
0.05413818359375,
0.0023784637451171875,
0.05975341796875,
-0.02435302734375,
-0.007221221923828125,
-0.018707275390625,
0.03662109375,
0.0219573974609375,
-0.0289306640625,
0.005840301513671875,
0.0089569091796875,
0.03692626953125,
-0.057342529296875,
-0.01215362548828125,
0.00336456298828125,
0.0479736328125,
0.005031585693359375,
-0.0259246826171875,
0.034820556640625,
0.004764556884765625,
-0.033477783203125,
0.03240966796875,
0.00836944580078125,
-0.0273895263671875,
-0.03607177734375,
-0.006717681884765625,
0.021820068359375,
0.025360107421875,
-0.041778564453125,
0.005825042724609375,
-0.0733642578125,
0.005832672119140625,
0.01134490966796875,
-0.015411376953125,
0.00878143310546875,
0.0011157989501953125,
-0.07757568359375,
-0.0179443359375,
0.03997802734375,
-0.0263824462890625,
-0.03387451171875,
-0.0218658447265625,
-0.044769287109375,
0.0301513671875,
0.0297393798828125,
0.07391357421875,
-0.0178680419921875,
-0.0728759765625,
0.013641357421875,
-0.018402099609375,
0.0828857421875,
0.03436279296875,
-0.03973388671875,
-0.0007452964782714844,
-0.061492919921875,
-0.01224517822265625,
0.02215576171875,
-0.0201416015625,
-0.03778076171875,
-0.01342010498046875,
-0.0130615234375,
0.00606536865234375,
-0.0095977783203125,
-0.0096282958984375,
-0.037109375,
0.007808685302734375,
0.01006317138671875,
0.0054168701171875,
0.0029430389404296875,
0.046875,
-0.01058197021484375,
0.045654296875,
0.00972747802734375,
0.0018930435180664062,
-0.0364990234375,
-0.0079803466796875,
0.00372314453125,
-0.06787109375,
0.0009250640869140625,
0.009918212890625,
-0.00612640380859375,
0.0019369125366210938,
0.01226043701171875,
0.0121307373046875,
-0.007419586181640625,
-0.007312774658203125,
0.00548553466796875,
-0.0100860595703125,
-0.0174102783203125,
0.00719451904296875,
-0.0273590087890625,
0.0164642333984375,
-0.01214599609375,
-0.00689697265625,
0.002758026123046875,
-0.039581298828125,
0.03375244140625,
0.0075836181640625,
0.01407623291015625,
0.013885498046875,
-0.01116943359375,
0.03265380859375,
0.05487060546875,
0.015289306640625,
0.0308990478515625,
0.025482177734375,
0.0172119140625,
-0.0205078125,
0.001377105712890625,
0.02935791015625,
-0.01459503173828125,
0.050048828125,
0.0018024444580078125,
-0.0016660690307617188,
0.02972412109375,
-0.03857421875,
-0.040008544921875,
-0.04547119140625,
-0.019775390625,
0.0227813720703125,
0.00720977783203125,
0.0037631988525390625,
-0.0020046234130859375,
-0.0096893310546875,
0.039093017578125,
-0.0390625,
-0.0221099853515625,
0.006870269775390625,
-0.0350341796875,
-0.01036834716796875,
0.01001739501953125,
0.01158905029296875,
0.00518798828125,
-0.0106048583984375,
0.05902099609375,
0.01354217529296875,
-0.00879669189453125,
-0.024749755859375,
0.00041794776916503906,
0.009765625,
-0.04547119140625,
0.0182037353515625,
-0.0234375,
0.007549285888671875,
-0.043701171875,
0.0287017822265625,
-0.01531982421875,
0.02435302734375,
0.0025920867919921875,
-0.0163421630859375,
-0.00567626953125,
0.038818359375,
-0.0257415771484375,
0.0169830322265625,
0.0231781005859375,
-0.07916259765625,
0.022003173828125,
0.0104827880859375,
0.0028972625732421875,
0.03375244140625,
-0.063232421875,
-0.00859832763671875,
-0.038787841796875,
0.0386962890625,
-0.00807952880859375,
-0.0235137939453125,
0.044891357421875,
-0.03936767578125,
-0.00965118408203125,
0.0087738037109375,
0.037628173828125,
0.026580810546875,
-0.01062774658203125,
0.00870513916015625,
-0.0312347412109375,
-0.02593994140625,
-0.00727081298828125,
-0.02435302734375,
0.01076507568359375,
-0.025482177734375,
-0.04638671875,
0.052886962890625,
-0.057037353515625,
0.049102783203125,
0.0266571044921875,
0.0084075927734375,
0.0166473388671875,
-0.003849029541015625,
-0.03143310546875,
0.051788330078125,
0.031219482421875,
0.038360595703125,
-0.037872314453125,
-0.0194091796875,
0.02874755859375,
0.0662841796875,
0.041046142578125,
0.00830841064453125,
-0.0231170654296875,
-0.00023758411407470703,
0.032012939453125,
0.005077362060546875,
-0.0180511474609375,
0.044342041015625,
-0.007350921630859375,
-0.01763916015625,
0.01580810546875,
0.0078582763671875,
0.0369873046875,
0.0012693405151367188,
-0.02935791015625,
0.0191497802734375,
0.03155517578125,
0.0445556640625,
-0.0120697021484375,
0.0188446044921875,
-0.0018873214721679688,
-0.0186920166015625,
0.0124053955078125,
-0.039306640625,
0.03704833984375,
0.025726318359375,
0.044342041015625,
-0.04656982421875,
0.01313018798828125,
-0.031402587890625,
0.059722900390625,
-0.0008764266967773438,
0.034912109375,
0.02178955078125,
0.020050048828125,
0.0489501953125,
0.00992584228515625,
0.034515380859375,
0.0282745361328125,
-0.02587890625,
0.0293731689453125,
0.0223846435546875,
0.03314208984375,
-0.01715087890625,
0.0423583984375,
0.0309906005859375,
0.0235137939453125,
-0.043731689453125,
-0.09429931640625,
0.017181396484375,
0.0174713134765625,
0.0173797607421875,
0.0594482421875,
0.037017822265625,
0.009979248046875,
0.07952880859375,
-0.033721923828125,
-0.0294036865234375,
0.029815673828125,
0.033203125,
0.01459503173828125,
-0.003513336181640625,
-0.0110321044921875,
-0.044952392578125,
-0.03460693359375,
-0.01275634765625,
0.0308380126953125,
0.0731201171875,
0.0335693359375,
0.04400634765625,
-0.03936767578125,
-0.037445068359375,
0.00897979736328125,
-0.00489044189453125,
-0.00110626220703125,
-0.0244293212890625,
0.0221710205078125,
-0.0012102127075195312,
0.006923675537109375,
0.00984954833984375,
0.01020050048828125,
0.015777587890625,
0.03692626953125,
0.045196533203125,
-0.03033447265625,
-0.02569580078125,
0.06207275390625,
-0.005130767822265625,
-0.01531982421875,
-0.0260772705078125,
0.00641632080078125,
0.035064697265625,
0.01126861572265625,
-0.0006303787231445312,
-0.00739288330078125,
0.0687255859375,
-0.01186370849609375,
0.041412353515625,
-0.00432586669921875,
-0.002460479736328125,
0.052886962890625,
-0.018951416015625,
0.04376220703125,
0.0007600784301757812,
-0.1168212890625,
-0.0282440185546875,
-0.034698486328125,
-0.0233001708984375,
0.06817626953125,
0.04681396484375,
-0.025543212890625,
0.0220947265625,
0.0019483566284179688,
-0.027008056640625,
0.001773834228515625,
0.02056884765625,
0.00531768798828125,
0.002002716064453125,
-0.00027823448181152344,
-0.0031223297119140625,
-0.0300750732421875,
-0.00969696044921875,
0.0168914794921875,
0.01166534423828125,
0.044830322265625,
0.0222930908203125,
0.005023956298828125,
0.00844573974609375,
-0.0117034912109375,
0.0760498046875,
-0.11279296875,
-0.061767578125,
0.0968017578125,
-0.07537841796875,
-0.024658203125,
0.020233154296875,
-0.024261474609375,
0.024505615234375,
0.03167724609375,
-0.0294647216796875,
0.01751708984375,
-0.00937652587890625,
0.006618499755859375,
-0.031494140625,
0.06585693359375,
0.01299285888671875,
-0.015899658203125,
-0.03863525390625,
-0.0302734375,
0.062469482421875,
0.08160400390625,
-0.005695343017578125,
-0.01540374755859375,
0.0264129638671875,
-0.0279541015625,
0.0228729248046875,
0.035797119140625,
0.038482666015625,
0.023712158203125,
-0.01934814453125,
0.005786895751953125,
0.0229949951171875,
-0.00971221923828125,
0.0209808349609375,
0.0197906494140625,
0.01102447509765625,
0.033447265625,
-0.04132080078125,
0.026397705078125,
0.043548583984375,
0.026885986328125,
-0.041778564453125,
-0.002349853515625,
0.06793212890625,
-0.021942138671875,
-0.0028629302978515625,
-0.043853759765625,
-0.04718017578125,
-0.04925537109375,
0.00888824462890625,
0.00669097900390625,
-0.001445770263671875,
-0.034881591796875,
-0.0262451171875,
-0.0005311965942382812,
0.034881591796875,
0.0024280548095703125,
-0.0302581787109375,
0.0212249755859375,
-0.0171356201171875,
0.029998779296875,
-0.006633758544921875,
-0.0201263427734375,
0.00910186767578125,
0.005306243896484375,
-0.034332275390625,
0.02508544921875,
-0.02276611328125,
-0.016754150390625,
0.0118408203125,
0.0266876220703125,
0.00042700767517089844,
-0.0313720703125,
-0.012176513671875,
0.03961181640625,
0.030548095703125,
0.07281494140625,
0.0672607421875,
-0.026519775390625,
-0.02093505859375,
0.039581298828125,
-0.032379150390625,
0.008392333984375,
0.04315185546875,
-0.004772186279296875,
-0.04119873046875,
-0.01215362548828125,
0.0310516357421875,
0.044281005859375,
-0.02569580078125,
-0.02740478515625,
0.06689453125,
-0.01477813720703125,
-0.0222930908203125,
0.006214141845703125,
0.0094146728515625,
-0.0223541259765625,
-0.002532958984375,
0.006969451904296875,
-0.02899169921875,
0.01544189453125,
0.040496826171875,
0.027923583984375,
0.0450439453125,
0.003925323486328125,
0.01039886474609375,
-0.0277557373046875,
0.02362060546875,
0.016204833984375,
0.0286102294921875,
-0.0193328857421875,
0.007793426513671875,
-0.0018062591552734375,
0.036651611328125,
-0.045166015625,
-0.0221099853515625,
0.00449371337890625,
0.031646728515625,
0.0187530517578125,
-0.03857421875,
-0.04205322265625,
-0.03857421875,
0.02294921875,
0.009796142578125,
-0.0010128021240234375,
-0.002681732177734375,
-0.01519012451171875,
-0.0799560546875,
-0.040771484375,
-0.01245880126953125,
0.0139923095703125,
-0.05633544921875,
0.01389312744140625,
0.047119140625,
-0.00589752197265625,
-0.01221466064453125,
0.0051116943359375,
-0.029998779296875,
-0.0024394989013671875,
0.018798828125,
-0.0120086669921875,
-0.0151519775390625,
0.037567138671875,
-0.0198822021484375,
-0.0184326171875,
-0.08038330078125,
0.0010194778442382812,
-0.022369384765625,
-0.07269287109375,
-0.004711151123046875,
0.006481170654296875,
0.0094757080078125,
-0.0179443359375,
0.007354736328125,
0.0211639404296875,
0.0369873046875,
0.002452850341796875,
-0.004886627197265625,
-0.037322998046875,
0.0036716461181640625,
0.0210418701171875,
0.00504302978515625,
-0.0240020751953125,
0.04931640625,
0.03436279296875,
0.042144775390625,
0.00542449951171875,
0.010894775390625,
-0.012847900390625,
0.061187744140625,
0.00873565673828125,
-0.035125732421875,
0.01837158203125,
-0.02508544921875,
-0.004322052001953125,
-0.026123046875,
-0.0269622802734375,
-0.01399993896484375,
-0.003810882568359375,
-0.0019073486328125,
-0.031982421875,
0.016632080078125
]
|
3923dd61658d16e6a36576de54d1f75a556f2a80 | Wordpress Stackexchange
Q: Wordpress Hook that will run when media file deleted I am very new in wordpress and I am currently developing a wordpress plugin, I just want to know if there is a wordpress plugin hook that will run when one or more file of wordpress media is deleted.
Thanks,
Dan
A: The delete_attachment action is fired when wp_delete_attachment() function is called to delete an item in the media library.
| Q: Wordpress Hook that will run when media file deleted I am very new in wordpress and I am currently developing a wordpress plugin, I just want to know if there is a wordpress plugin hook that will run when one or more file of wordpress media is deleted.
Thanks,
Dan
A: The delete_attachment action is fired when wp_delete_attachment() function is called to delete an item in the media library.
| wordpress | {
"language": "en",
"length": 70,
"provenance": "stackexchange_00019.jsonl.gz:464985",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/224832"
} | [
0.0014352798461914062,
0.0049896240234375,
-0.037506103515625,
0.01496124267578125,
-0.0059661865234375,
-0.024810791015625,
0.0275726318359375,
-0.0231170654296875,
0.0016870498657226562,
0.028594970703125,
0.01380157470703125,
0.0020503997802734375,
0.033294677734375,
-0.030517578125,
0.00574493408203125,
-0.0002956390380859375,
0.0275421142578125,
-0.016937255859375,
0.03192138671875,
-0.00669097900390625,
0.003139495849609375,
0.019256591796875,
0.0426025390625,
0.012481689453125,
-0.01404571533203125,
0.026519775390625,
0.05609130859375,
-0.0283355712890625,
-0.0177154541015625,
-0.031158447265625,
0.0025787353515625,
0.0250396728515625,
0.00414276123046875,
0.052764892578125,
-0.034515380859375,
0.0313720703125,
0.01751708984375,
0.030242919921875,
0.0186004638671875,
0.03717041015625,
0.053009033203125,
-0.02288818359375,
0.0186614990234375,
0.017608642578125,
0.01340484619140625,
-0.044219970703125,
0.048492431640625,
-0.05255126953125,
0.043914794921875,
0.02203369140625,
0.004993438720703125,
-0.007205963134765625,
0.006465911865234375,
-0.005889892578125,
-0.0226287841796875,
-0.0165252685546875,
-0.0477294921875,
0.04998779296875,
0.0036334991455078125,
0.02783203125,
-0.0037384033203125,
0.034149169921875,
-0.003498077392578125,
-0.0200347900390625,
0.00592803955078125,
0.006816864013671875,
-0.04388427734375,
0.0140228271484375,
-0.07440185546875,
-0.0016012191772460938,
0.04986572265625,
-0.07135009765625,
-0.028717041015625,
0.00864410400390625,
0.009063720703125,
-0.02239990234375,
0.031707763671875,
-0.019317626953125,
-0.01204681396484375,
0.042999267578125,
0.030914306640625,
-0.017974853515625,
-0.0089111328125,
-0.01258087158203125,
0.024383544921875,
0.022796630859375,
0.01087188720703125,
-0.0275115966796875,
-0.041473388671875,
-0.004180908203125,
-0.0303192138671875,
-0.0007152557373046875,
0.0131072998046875,
-0.048431396484375,
-0.04144287109375,
-0.01258087158203125,
-0.00970458984375,
0.020355224609375,
-0.0108489990234375,
0.00719451904296875,
0.0005640983581542969,
-0.02581787109375,
-0.01043701171875,
-0.02227783203125,
0.0001609325408935547,
0.0018243789672851562,
0.006175994873046875,
-0.05755615234375,
-0.0171661376953125,
0.020050048828125,
-0.04510498046875,
-0.0007262229919433594,
0.0096282958984375,
0.00228118896484375,
0.00322723388671875,
-0.01531219482421875,
-0.046051025390625,
0.054351806640625,
-0.0101318359375,
0.0154571533203125,
-0.0226898193359375,
-0.01457977294921875,
-0.0008044242858886719,
-0.007350921630859375,
0.0110931396484375,
-0.0231475830078125,
-0.028076171875,
0.0267181396484375,
0.02410888671875,
0.01548004150390625,
-0.0053558349609375,
0.02093505859375,
-0.00296783447265625,
-0.0205535888671875,
-0.026275634765625,
-0.005748748779296875,
0.0063934326171875,
0.01508331298828125,
0.0093994140625,
-0.0155181884765625,
0.045989990234375,
-0.025665283203125,
-0.0287017822265625,
0.042999267578125,
0.041534423828125,
0.003574371337890625,
0.01519012451171875,
0.0186614990234375,
0.0179595947265625,
0.016021728515625,
-0.0014390945434570312,
0.013641357421875,
0.03936767578125,
-0.003650665283203125,
0.042724609375,
-0.04315185546875,
0.0849609375,
-0.054901123046875,
0.0020046234130859375,
-0.06182861328125,
0.01119232177734375,
-0.0256500244140625,
-0.0057220458984375,
-0.06610107421875,
-0.075439453125,
0.0193023681640625,
-0.05340576171875,
-0.005611419677734375,
0.0245513916015625,
0.0221710205078125,
0.00894927978515625,
-0.0406494140625,
0.0137939453125,
0.02703857421875,
-0.006961822509765625,
0.03521728515625,
-0.0087127685546875,
0.0005035400390625,
0.045867919921875,
0.0214385986328125,
-0.0211334228515625,
-0.02069091796875,
0.08111572265625,
-0.031585693359375,
-0.035369873046875,
0.0267333984375,
0.0223236083984375,
0.061553955078125,
-0.0009474754333496094,
0.023284912109375,
0.031768798828125,
0.029144287109375,
-0.006542205810546875,
0.01218414306640625,
0.00933837890625,
-0.04449462890625,
-0.0028839111328125,
-0.016143798828125,
-0.0111083984375,
-0.013031005859375,
0.0157012939453125,
0.0184173583984375,
-0.002742767333984375,
-0.01317596435546875,
-0.11358642578125,
0.0333251953125,
-0.052154541015625,
0.05633544921875,
-0.0168304443359375,
0.0187225341796875,
0.0191192626953125,
0.018646240234375,
-0.0394287109375,
0.0016689300537109375,
-0.00836181640625,
0.0098724365234375,
-0.037628173828125,
0.0239410400390625,
-0.000972747802734375,
0.03924560546875,
-0.0281829833984375,
-0.009429931640625,
-0.01546478271484375,
-0.0282135009765625,
0.0238189697265625,
-0.00769805908203125,
-0.0209808349609375,
-0.037322998046875,
0.0047454833984375,
-0.014404296875,
-0.01068878173828125,
0.05078125,
0.007747650146484375,
0.00821685791015625,
-0.0275421142578125,
-0.0153961181640625,
-0.0251922607421875,
-0.0955810546875,
0.0274200439453125,
0.06951904296875,
0.0244293212890625,
0.04632568359375,
-0.031005859375,
-0.0183868408203125,
0.07574462890625,
0.01253509521484375,
0.0231781005859375,
-0.01995849609375,
0.0263671875,
0.061767578125,
-0.046783447265625,
0.00628662109375,
0.0121307373046875,
-0.0277557373046875,
-0.019989013671875,
0.03448486328125,
0.0276641845703125,
-0.0233306884765625,
-0.0200347900390625,
0.03533935546875,
0.0188446044921875,
-0.00794219970703125,
-0.050445556640625,
0.0257720947265625,
0.018035888671875,
0.0016994476318359375,
0.012664794921875,
0.0036067962646484375,
-0.01122283935546875,
0.0173797607421875,
0.01678466796875,
-0.04852294921875,
0.0006742477416992188,
0.06854248046875,
0.032012939453125,
0.0229949951171875,
-0.0219268798828125,
-0.03717041015625,
-0.02239990234375,
0.03704833984375,
-0.0284271240234375,
-0.0182647705078125,
-0.03900146484375,
-0.01751708984375,
-0.002552032470703125,
-0.02691650390625,
0.007537841796875,
-0.013580322265625,
-0.004199981689453125,
-0.02081298828125,
0.004985809326171875,
0.058197021484375,
-0.0035037994384765625,
0.044342041015625,
-0.003192901611328125,
-0.006717681884765625,
-0.0164031982421875,
-0.035186767578125,
0.0382080078125,
-0.045013427734375,
0.0230255126953125,
0.0665283203125,
-0.0221099853515625,
0.0011014938354492188,
0.0013494491577148438,
0.0142364501953125,
0.033721923828125,
0.004756927490234375,
-0.0016937255859375,
-0.0097808837890625,
-0.03338623046875,
-0.005126953125,
0.017120361328125,
0.0306549072265625,
-0.0247344970703125,
-0.04632568359375,
-0.0246124267578125,
-0.00653076171875,
-0.1031494140625,
-0.08123779296875,
0.003345489501953125,
-0.059417724609375,
0.044158935546875,
-0.016693115234375,
-0.01287841796875,
-0.03900146484375,
0.0305023193359375,
0.02520751953125,
-0.048553466796875,
0.0154571533203125,
0.02508544921875,
0.002185821533203125,
-0.01137542724609375,
0.004161834716796875,
0.0009098052978515625,
0.020263671875,
0.005870819091796875,
0.083251953125,
0.00635528564453125,
-0.056396484375,
0.00899505615234375,
-0.0335693359375,
-0.022247314453125,
0.0318603515625,
0.03717041015625,
0.0128173828125,
-0.038421630859375,
0.0157012939453125,
0.0302276611328125,
0.040771484375,
-0.0653076171875,
-0.0110626220703125,
-0.01384735107421875,
-0.0645751953125,
-0.005340576171875,
0.0295562744140625,
0.00848388671875,
-0.04852294921875,
0.0261688232421875,
-0.0628662109375,
0.0233154296875,
-0.03350830078125,
-0.0162811279296875,
0.0399169921875,
0.00833892822265625,
-0.00963592529296875,
-0.0010042190551757812,
0.00853729248046875,
0.0037784576416015625,
0.004703521728515625,
-0.022125244140625,
-0.01074981689453125,
0.03717041015625,
-0.01511383056640625,
-0.0006694793701171875,
0.00859832763671875,
0.0255889892578125,
-0.006130218505859375,
-0.0286712646484375,
-0.023590087890625,
0.01812744140625,
-0.0256500244140625,
0.022735595703125,
-0.06805419921875,
0.03704833984375,
0.039215087890625,
0.047882080078125,
0.0207672119140625,
0.0109710693359375,
-0.0380859375,
-0.008331298828125,
0.0377197265625,
-0.046112060546875,
-0.03826904296875,
-0.006256103515625,
0.0216522216796875,
0.003887176513671875,
-0.016510009765625,
0.00902557373046875,
-0.03851318359375,
-0.056976318359375,
0.0230560302734375,
0.0166473388671875,
-0.0183868408203125,
-0.032135009765625,
0.046661376953125,
-0.06658935546875,
-0.0230865478515625,
0.023162841796875,
-0.059112548828125,
0.036895751953125,
0.005096435546875,
0.003345489501953125,
-0.00908660888671875,
-0.0105438232421875,
-0.06561279296875,
-0.0311126708984375,
-0.00011801719665527344,
-0.039581298828125,
0.052886962890625,
0.0406494140625,
-0.020965576171875,
-0.02130126953125,
0.0200042724609375,
0.012725830078125,
0.024261474609375,
0.021240234375,
-0.00820159912109375,
0.01122283935546875,
-0.0092620849609375,
0.0226287841796875,
-0.0093231201171875,
-0.0015430450439453125,
-0.04541015625,
-0.043060302734375,
-0.014129638671875,
-0.0248565673828125,
0.0235595703125,
-0.0118560791015625,
-0.01418304443359375,
-0.022064208984375,
0.00824737548828125,
-0.0213623046875,
-0.0084075927734375,
0.00696563720703125,
-0.007282257080078125,
0.00965118408203125,
-0.02362060546875,
-0.0116424560546875,
-0.019287109375,
-0.0029754638671875,
0.0222625732421875,
0.056121826171875,
0.0213470458984375,
0.017181396484375,
-0.06207275390625,
0.0011777877807617188,
0.01715087890625,
-0.00421142578125,
0.041839599609375,
0.014068603515625,
-0.01318359375,
0.032440185546875,
0.01129913330078125,
0.00473785400390625,
-0.03759765625,
0.0562744140625,
0.0014324188232421875,
0.004550933837890625,
0.01187896728515625,
-0.0192718505859375,
0.02667236328125,
0.03326416015625,
-0.005741119384765625,
-0.00634765625,
0.0310821533203125,
0.00421905517578125,
-0.0570068359375,
0.039154052734375,
0.018585205078125,
-0.0173797607421875,
-0.01384735107421875,
-0.0174407958984375,
0.05023193359375,
0.028045654296875,
-0.00588226318359375,
0.0088958740234375,
0.053314208984375,
-0.01113128662109375,
-0.0042266845703125,
0.0099639892578125,
-0.01458740234375,
0.0206146240234375,
0.0211944580078125,
-0.002582550048828125,
-0.0240020751953125,
0.0009508132934570312,
-0.00901031494140625,
-0.0112762451171875,
-0.043548583984375,
-0.03790283203125,
-0.00540924072265625,
-0.007617950439453125,
0.0277557373046875,
-0.054168701171875,
0.0179901123046875,
0.048370361328125,
-0.023193359375,
0.00353240966796875,
-0.03289794921875,
0.008819580078125,
-0.04339599609375,
0.01104736328125,
-0.00839996337890625,
-0.01021575927734375,
0.057159423828125,
0.01690673828125,
-0.00553131103515625,
0.0169830322265625,
-0.007480621337890625,
0.041046142578125,
0.01030731201171875,
0.0222625732421875,
0.032012939453125,
-0.0142974853515625,
-0.0103302001953125,
-0.007701873779296875,
-0.0226898193359375,
-0.0679931640625,
-0.00016129016876220703,
0.0214385986328125,
0.059295654296875,
-0.0242156982421875,
-0.042724609375,
0.0270843505859375,
-0.0235137939453125,
-0.0235137939453125,
0.06585693359375,
-0.0018606185913085938,
-0.07122802734375,
-0.007053375244140625,
0.02691650390625,
0.029815673828125,
-0.027130126953125,
-0.0009775161743164062,
-0.001068115234375,
0.0216827392578125,
0.0196533203125,
-0.0043487548828125,
-0.046966552734375,
0.0222015380859375,
0.030242919921875,
0.0264129638671875,
0.0167999267578125,
-0.00012922286987304688,
-0.02996826171875,
-0.0305633544921875,
-0.022979736328125,
0.00836944580078125,
0.06439208984375,
-0.0136871337890625,
0.018951416015625,
-0.0241546630859375,
0.00981903076171875,
-0.024932861328125,
-0.0023517608642578125,
0.070556640625,
0.049346923828125,
-0.05877685546875,
0.0033588409423828125,
-0.01861572265625,
-0.0019741058349609375,
0.004703521728515625,
-0.0142822265625,
-0.034912109375,
-0.017974853515625,
-0.00809478759765625,
0.01294708251953125,
-0.0023746490478515625,
0.006053924560546875,
0.0034084320068359375,
0.0237579345703125,
0.0015954971313476562,
0.041534423828125,
0.017852783203125,
0.0172119140625,
0.030731201171875,
0.004802703857421875,
0.037750244140625,
-0.00537109375,
-0.047515869140625,
-0.0113372802734375,
-0.01265716552734375,
-0.01517486572265625,
0.006359100341796875,
0.0265960693359375,
0.0012273788452148438,
-0.01239013671875,
0.016204833984375,
0.006992340087890625,
-0.010406494140625,
-0.0159912109375,
-0.0197296142578125,
-0.0227813720703125,
0.0640869140625,
0.0199432373046875,
0.019287109375,
-0.0183258056640625,
-0.05682373046875,
-0.01305389404296875,
0.005939483642578125,
-0.01001739501953125,
0.04290771484375,
-0.036865234375,
0.0092010498046875,
0.052825927734375,
-0.005496978759765625,
0.036865234375,
0.026947021484375,
-0.048065185546875,
-0.0068359375,
0.01543426513671875,
-0.033660888671875,
-0.0032901763916015625,
0.0081329345703125,
0.033233642578125,
-0.0237884521484375,
0.031646728515625,
-0.0175933837890625,
-0.005756378173828125,
-0.00067901611328125,
-0.0229644775390625,
0.0018520355224609375,
-0.01273345947265625,
0.00982666015625,
-0.0233001708984375,
0.00458526611328125,
-0.0180816650390625,
-0.0013751983642578125,
0.01250457763671875,
-0.0207061767578125,
0.018585205078125,
-0.007678985595703125,
0.039825439453125,
0.028961181640625,
-0.032958984375,
0.009918212890625,
0.0043182373046875,
0.0010204315185546875,
-0.020843505859375,
0.0005221366882324219,
0.00862884521484375,
-0.0599365234375,
0.017822265625,
0.052490234375,
-0.008270263671875,
-0.01318359375,
0.0034732818603515625,
0.0121307373046875,
-0.01509857177734375,
-0.0302734375,
0.03204345703125,
-0.01399993896484375,
-0.0017328262329101562,
-0.01611328125,
0.0214080810546875,
0.0232696533203125,
0.032257080078125,
-0.0025501251220703125,
-0.007419586181640625,
0.0148773193359375,
-0.03607177734375,
-0.128662109375,
-0.047698974609375,
0.04791259765625,
0.05438232421875,
-0.0616455078125,
0.06988525390625,
-0.0247955322265625,
-0.043487548828125,
-0.01404571533203125,
-0.017974853515625,
0.049346923828125,
-0.047576904296875,
0.005859375,
0.044403076171875,
0.043487548828125,
-0.0271453857421875,
-0.006717681884765625,
0.03314208984375,
-0.044708251953125,
-0.0201568603515625,
0.007442474365234375,
-0.0249176025390625,
-0.0260009765625,
-0.01378631591796875,
-0.05743408203125,
0.06939697265625,
-0.023956298828125,
0.0242919921875,
-0.0028285980224609375,
0.018829345703125,
0.0193023681640625,
0.014129638671875,
-0.035919189453125,
0.06903076171875,
0.0043487548828125,
0.01503753662109375,
-0.03472900390625,
0.004241943359375,
0.0020961761474609375,
0.00498199462890625,
0.044891357421875,
0.005298614501953125,
0.0146484375,
-0.01116180419921875,
0.037811279296875,
0.0178375244140625,
-0.005680084228515625,
0.008056640625,
-0.01371002197265625,
-0.0027618408203125,
0.00353240966796875,
-0.00029969215393066406,
0.047882080078125,
-0.0655517578125,
-0.03759765625,
0.0036792755126953125,
-0.0023784637451171875,
-0.0008368492126464844,
0.00855255126953125,
0.07293701171875,
0.01186370849609375,
-0.01287841796875,
0.00594329833984375,
-0.0343017578125,
0.019622802734375,
0.033355712890625,
0.044036865234375,
-0.035308837890625,
0.0096893310546875,
-0.0234375,
0.046295166015625,
-0.017578125,
0.0020771026611328125,
0.0297698974609375,
0.0177154541015625,
-0.0007524490356445312,
-0.03515625,
-0.0095672607421875,
0.005340576171875,
-0.031097412109375,
0.03814697265625,
0.01447296142578125,
0.0101776123046875,
-0.0192108154296875,
0.00786590576171875,
0.035003662109375,
0.039794921875,
-0.03192138671875,
-0.059173583984375,
0.01389312744140625,
0.0055084228515625,
-0.0023288726806640625,
0.014495849609375,
-0.01480865478515625,
-0.034454345703125,
0.0257720947265625,
-0.005702972412109375,
-0.023834228515625,
-0.007671356201171875,
0.05029296875,
0.002902984619140625,
0.0211334228515625,
-0.018798828125,
-0.049407958984375,
-0.0247802734375,
0.04327392578125,
0.0185699462890625,
0.0024471282958984375,
-0.045562744140625,
0.04248046875,
0.00897979736328125,
0.016204833984375,
0.0015077590942382812,
0.048004150390625,
-0.02667236328125,
0.023162841796875,
-0.049652099609375,
-0.08209228515625,
0.0082855224609375,
0.04998779296875,
0.053375244140625,
0.0509033203125,
0.050811767578125,
0.02642822265625,
-0.00106048583984375,
0.01910400390625,
0.032440185546875,
-0.015777587890625,
-0.01078033447265625,
-0.0014562606811523438,
-0.0020656585693359375,
0.01342010498046875,
-0.01538848876953125,
-0.00829315185546875,
0.02630615234375,
0.016937255859375,
-0.0335693359375,
0.007457733154296875,
-0.0133209228515625,
-0.048858642578125,
0.03753662109375,
-0.0162353515625,
0.0633544921875,
-0.0072479248046875,
-0.09051513671875,
0.003200531005859375,
-0.026885986328125,
-0.059478759765625,
-0.0028629302978515625,
0.032623291015625,
-0.034332275390625,
0.031341552734375,
-0.00989532470703125,
-0.0236968994140625,
0.010986328125,
0.006317138671875,
0.011962890625,
-0.033935546875,
-0.0008955001831054688,
-0.0212860107421875,
-0.01548004150390625,
0.007171630859375,
-0.0135040283203125,
0.0229644775390625,
0.004108428955078125,
0.09246826171875,
-0.0268402099609375,
0.033233642578125,
0.040374755859375,
0.00962066650390625,
0.02471923828125,
0.0292205810546875,
-0.0281829833984375,
0.0162506103515625,
0.02569580078125,
-0.0279388427734375,
-0.0204620361328125,
0.020477294921875,
0.0185394287109375,
-0.0011138916015625,
-0.0031299591064453125,
-0.01451873779296875,
0.0172119140625,
0.0283660888671875,
0.03472900390625,
-0.01235198974609375,
-0.007442474365234375,
0.006038665771484375,
-0.00922393798828125,
0.0219879150390625,
0.018951416015625,
0.018890380859375,
-0.005504608154296875,
-0.015716552734375,
-0.0250244140625,
-0.00672149658203125,
0.0122833251953125,
-0.023712158203125,
0.024658203125,
-0.0304718017578125,
-0.0478515625,
-0.0027370452880859375,
-0.0167388916015625,
-0.00994873046875,
0.0093536376953125,
0.0521240234375,
-0.00799560546875,
-0.01849365234375,
0.003101348876953125,
-0.0278472900390625,
0.020843505859375,
-0.02435302734375,
0.0035572052001953125,
-0.03094482421875,
0.0193939208984375,
0.03228759765625,
-0.0217132568359375,
-0.0283050537109375,
-0.041717529296875,
-0.0276641845703125,
0.0066070556640625,
-0.049835205078125,
-0.0712890625,
-0.06915283203125,
-0.0024547576904296875,
0.011383056640625,
0.03125,
-0.0858154296875,
0.049285888671875,
-0.0006361007690429688,
0.006847381591796875,
-0.00824737548828125,
-0.0111236572265625,
-0.023651123046875,
-0.00995635986328125,
-0.0411376953125,
-0.09893798828125,
-0.0550537109375,
0.08935546875,
-0.06585693359375,
0.0343017578125,
0.0306396484375,
-0.0382080078125,
-0.02374267578125,
0.052215576171875,
0.032257080078125,
0.10711669921875,
0.03472900390625,
-0.0239410400390625,
-0.0205078125,
0.0283660888671875,
0.017974853515625,
-0.0115509033203125,
-0.0172271728515625,
0.0212860107421875,
-0.0032978057861328125,
0.0250701904296875,
0.00156402587890625,
0.030303955078125,
-0.03765869140625,
-0.09979248046875,
0.04022216796875,
-0.01412200927734375,
-0.04461669921875,
-0.04583740234375,
0.03204345703125,
0.0036945343017578125,
-0.0192413330078125,
-0.01415252685546875,
0.006622314453125,
-0.01499176025390625,
0.021820068359375,
0.0009965896606445312,
-0.01380157470703125,
0.00998687744140625,
0.006969451904296875,
-0.0239410400390625,
0.025390625,
0.0202789306640625,
-0.0176849365234375,
0.0195159912109375,
-0.03179931640625,
0.0689697265625,
0.040283203125,
-0.032562255859375,
0.041046142578125,
0.0229949951171875,
-0.012481689453125,
-0.020172119140625,
-0.0322265625,
-0.027069091796875,
0.0213165283203125,
0.07867431640625,
0.07257080078125,
0.0169219970703125,
-0.057403564453125,
-0.033782958984375,
-0.0718994140625,
-0.023651123046875,
-0.027191162109375,
0.034698486328125,
-0.0804443359375,
0.01467132568359375,
0.0208587646484375,
-0.0028362274169921875,
-0.0335693359375,
-0.0286865234375,
-0.043060302734375,
-0.0238494873046875,
-0.0252838134765625,
0.027862548828125,
-0.001346588134765625,
-0.0219879150390625,
0.07513427734375,
-0.0203094482421875,
0.05413818359375,
0.0194549560546875,
0.00946807861328125,
0.0819091796875,
0.07330322265625,
0.0276947021484375,
0.0268096923828125,
-0.042755126953125,
0.005985260009765625,
0.0206451416015625,
0.009185791015625,
-0.01438140869140625,
-0.028656005859375,
-0.0025959014892578125,
0.029571533203125,
0.0022106170654296875,
0.04473876953125,
0.01288604736328125,
0.027587890625,
0.004299163818359375,
0.0146484375,
0.0025272369384765625,
0.004302978515625,
0.0110015869140625,
0.020751953125,
-0.0081634521484375,
-0.01140594482421875,
0.03271484375,
-0.055206298828125,
0.003459930419921875,
0.0309600830078125,
0.0154876708984375,
-0.06817626953125,
0.0643310546875,
0.0255584716796875,
0.0268096923828125,
0.035797119140625
]
|
066411f8e5942df6a2921a987a29ee6ca4edcf86 | Wordpress Stackexchange
Q: Comment count wrong with orphaned comments I have a news site set up with nested comments enabled. When a comment is marked as spam it is correctly removed from the article page however so to are any replies to that comment.
This makes sense as the replies are now orphaned and don't have a parent so potentially wouldn't make any sense.
The issue I'm having though is the total count of comments still includes those orphaned comments. So an article may say it has 10 comments but actually only 5 show as the other 5 are replies to a removed comment.
Is this a bug/known issue in Wordpress as the theme i use just uses the standard wo comments system?
What would be the best solution to this, creating my own comments methods?
| Q: Comment count wrong with orphaned comments I have a news site set up with nested comments enabled. When a comment is marked as spam it is correctly removed from the article page however so to are any replies to that comment.
This makes sense as the replies are now orphaned and don't have a parent so potentially wouldn't make any sense.
The issue I'm having though is the total count of comments still includes those orphaned comments. So an article may say it has 10 comments but actually only 5 show as the other 5 are replies to a removed comment.
Is this a bug/known issue in Wordpress as the theme i use just uses the standard wo comments system?
What would be the best solution to this, creating my own comments methods?
| wordpress | {
"language": "en",
"length": 134,
"provenance": "stackexchange_00019.jsonl.gz:464992",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/224873"
} | [
0.06402587890625,
-0.01055145263671875,
0.0228424072265625,
-0.049957275390625,
-0.00019848346710205078,
-0.00782012939453125,
0.007198333740234375,
-0.033660888671875,
-0.0088043212890625,
0.01276397705078125,
-0.09173583984375,
-0.007770538330078125,
-0.039337158203125,
0.004302978515625,
-0.0284271240234375,
-0.08837890625,
0.0050811767578125,
0.034912109375,
0.035186767578125,
-0.00827789306640625,
-0.0200653076171875,
-0.0041351318359375,
0.00328826904296875,
-0.0099639892578125,
0.03704833984375,
-0.05596923828125,
0.12066650390625,
-0.045166015625,
0.0256500244140625,
-0.039276123046875,
0.029571533203125,
0.014129638671875,
0.03851318359375,
-0.036590576171875,
0.001819610595703125,
-0.043853759765625,
-0.01236724853515625,
-0.011749267578125,
-0.031402587890625,
0.019317626953125,
0.0124359130859375,
-0.0128936767578125,
0.082275390625,
-0.061614990234375,
0.035400390625,
0.0251312255859375,
0.009796142578125,
-0.0435791015625,
0.06573486328125,
-0.032073974609375,
0.01551055908203125,
0.044281005859375,
0.038330078125,
-0.031036376953125,
-0.0382080078125,
-0.000080108642578125,
-0.0012645721435546875,
-0.030914306640625,
0.017242431640625,
0.00788116455078125,
0.0033473968505859375,
0.0088958740234375,
0.01326751708984375,
0.001983642578125,
0.01812744140625,
-0.01025390625,
0.0382080078125,
0.0311431884765625,
-0.004459381103515625,
0.01538848876953125,
0.015411376953125,
-0.0042877197265625,
0.0004968643188476562,
-0.02471923828125,
0.0277557373046875,
-0.0428466796875,
-0.024261474609375,
-0.054595947265625,
0.0192718505859375,
0.0374755859375,
0.008148193359375,
0.0166168212890625,
-0.0276031494140625,
0.0128936767578125,
0.0151824951171875,
0.05157470703125,
-0.002887725830078125,
-0.043365478515625,
-0.0709228515625,
-0.0095062255859375,
-0.038330078125,
-0.1138916015625,
-0.04217529296875,
0.0138092041015625,
0.0148162841796875,
-0.01043701171875,
0.006000518798828125,
0.03131103515625,
-0.05682373046875,
-0.06640625,
0.00337982177734375,
0.0079803466796875,
-0.083984375,
0.0205841064453125,
0.02508544921875,
0.007598876953125,
-0.027923583984375,
-0.06207275390625,
0.05120849609375,
0.020904541015625,
-0.013946533203125,
0.0204620361328125,
-0.0321044921875,
-0.0154876708984375,
-0.00257110595703125,
0.0168914794921875,
-0.061187744140625,
0.0171356201171875,
-0.0131072998046875,
0.00685882568359375,
-0.0222320556640625,
0.01134490966796875,
-0.0711669921875,
-0.002887725830078125,
0.006565093994140625,
-0.0245819091796875,
0.0094146728515625,
0.041748046875,
0.05206298828125,
0.0294647216796875,
-0.03826904296875,
0.004634857177734375,
0.0185089111328125,
-0.0272674560546875,
-0.0013799667358398438,
-0.020782470703125,
0.00872802734375,
0.01038360595703125,
-0.0241241455078125,
-0.00965118408203125,
0.043548583984375,
-0.00859832763671875,
-0.00518798828125,
0.0080718994140625,
0.002986907958984375,
0.030548095703125,
0.020477294921875,
-0.007236480712890625,
-0.00909423828125,
-0.056732177734375,
0.006832122802734375,
-0.032135009765625,
0.059417724609375,
-0.032867431640625,
-0.03802490234375,
-0.05560302734375,
-0.0250396728515625,
-0.0285797119140625,
0.009979248046875,
-0.050140380859375,
-0.000545501708984375,
0.00484466552734375,
0.006282806396484375,
-0.032135009765625,
-0.050018310546875,
-0.005359649658203125,
-0.01308441162109375,
-0.0030002593994140625,
0.01340484619140625,
0.0142669677734375,
-0.01473236083984375,
-0.04962158203125,
-0.02850341796875,
-0.0166015625,
-0.0105438232421875,
0.01508331298828125,
-0.006275177001953125,
-0.0013027191162109375,
0.0113677978515625,
-0.0142059326171875,
0.00807952880859375,
-0.0274810791015625,
0.01372528076171875,
0.019805908203125,
-0.0239410400390625,
0.0025615692138671875,
0.025848388671875,
0.0131988525390625,
0.0189056396484375,
0.00522613525390625,
0.0165863037109375,
0.01263427734375,
-0.0017766952514648438,
0.0113677978515625,
-0.0026721954345703125,
-0.03173828125,
0.0148162841796875,
0.00856781005859375,
-0.005062103271484375,
0.00658416748046875,
-0.00342559814453125,
-0.0199127197265625,
0.0015935897827148438,
0.00995635986328125,
-0.00658416748046875,
-0.0213775634765625,
-0.0008296966552734375,
0.0201568603515625,
-0.048736572265625,
0.0230255126953125,
0.026702880859375,
-0.030853271484375,
-0.0300445556640625,
0.01409912109375,
0.030364990234375,
-0.045501708984375,
0.004119873046875,
0.0070648193359375,
-0.0294647216796875,
-0.0009202957153320312,
-0.030059814453125,
-0.00724029541015625,
-0.038421630859375,
0.026641845703125,
0.07891845703125,
-0.05047607421875,
0.009246826171875,
-0.047943115234375,
0.046112060546875,
-0.0024585723876953125,
-0.05859375,
0.051727294921875,
0.00437164306640625,
-0.02337646484375,
-0.043670654296875,
-0.0124359130859375,
-0.0221710205078125,
-0.059600830078125,
-0.0098114013671875,
0.0654296875,
0.0238037109375,
-0.0146636962890625,
0.01279449462890625,
0.031982421875,
0.0295257568359375,
0.0089111328125,
0.0272064208984375,
-0.004299163818359375,
-0.004589080810546875,
0.005748748779296875,
0.0455322265625,
-0.018310546875,
0.0121612548828125,
-0.005512237548828125,
0.0025730133056640625,
0.014404296875,
-0.0012521743774414062,
-0.030548095703125,
-0.0372314453125,
0.044769287109375,
0.001682281494140625,
-0.0287017822265625,
-0.04083251953125,
-0.007724761962890625,
0.01593017578125,
-0.060699462890625,
0.00696563720703125,
-0.00843048095703125,
0.0222015380859375,
-0.031646728515625,
0.01520538330078125,
-0.031341552734375,
-0.0045013427734375,
0.028289794921875,
-0.00302886962890625,
-0.01139068603515625,
-0.0288543701171875,
0.0123291015625,
-0.025726318359375,
-0.003864288330078125,
-0.032073974609375,
0.0345458984375,
-0.0203094482421875,
-0.02862548828125,
-0.0506591796875,
-0.00765228271484375,
0.005031585693359375,
-0.0274810791015625,
-0.041748046875,
-0.01448822021484375,
-0.004482269287109375,
0.07489013671875,
0.00914764404296875,
0.016357421875,
0.01226043701171875,
0.025146484375,
0.0027713775634765625,
-0.07305908203125,
0.07232666015625,
-0.041656494140625,
0.00931549072265625,
0.06915283203125,
0.006145477294921875,
-0.0015897750854492188,
-0.01161956787109375,
0.0362548828125,
0.0007047653198242188,
-0.031097412109375,
-0.017303466796875,
0.01308441162109375,
-0.033843994140625,
0.0411376953125,
0.0178375244140625,
0.097412109375,
-0.04620361328125,
-0.0584716796875,
-0.0089569091796875,
0.035308837890625,
0.0130157470703125,
0.00946044921875,
0.034210205078125,
-0.005878448486328125,
-0.0155029296875,
0.004993438720703125,
0.008056640625,
-0.028411865234375,
0.00408935546875,
-0.0192413330078125,
0.039459228515625,
-0.035064697265625,
-0.0673828125,
-0.049713134765625,
-0.08026123046875,
0.0030364990234375,
0.009033203125,
0.0125732421875,
0.01389312744140625,
0.0180511474609375,
-0.00609588623046875,
-0.06854248046875,
-0.0028514862060546875,
-0.0262603759765625,
-0.019317626953125,
0.025390625,
0.045074462890625,
-0.03668212890625,
-0.00904083251953125,
-0.00913238525390625,
-0.046600341796875,
0.013885498046875,
0.0018463134765625,
-0.0149993896484375,
0.0163726806640625,
0.01275634765625,
0.0170440673828125,
-0.00762939453125,
-0.0153045654296875,
0.027435302734375,
0.0017728805541992188,
-0.0308837890625,
-0.0479736328125,
0.0005407333374023438,
-0.052703857421875,
-0.002330780029296875,
0.037200927734375,
-0.012237548828125,
-0.016021728515625,
0.003143310546875,
0.020233154296875,
0.013031005859375,
0.055511474609375,
-0.035247802734375,
0.03411865234375,
-0.01184844970703125,
0.005199432373046875,
-0.06329345703125,
0.0175933837890625,
-0.00942230224609375,
0.0024356842041015625,
-0.0019741058349609375,
0.024566650390625,
-0.009857177734375,
0.028106689453125,
-0.0245208740234375,
-0.040313720703125,
0.047393798828125,
-0.01338958740234375,
-0.00250244140625,
-0.036651611328125,
-0.029510498046875,
-0.0175018310546875,
0.054443359375,
-0.0209197998046875,
-0.01953125,
-0.0020465850830078125,
0.004856109619140625,
-0.0037746429443359375,
0.00972747802734375,
-0.0123138427734375,
-0.02606201171875,
-0.007053375244140625,
0.0236968994140625,
0.0017366409301757812,
-0.01241302490234375,
-0.03363037109375,
0.035400390625,
-0.0217437744140625,
-0.00991058349609375,
0.0216217041015625,
-0.01202392578125,
-0.0281829833984375,
-0.0040435791015625,
-0.043701171875,
-0.006816864013671875,
-0.00771331787109375,
-0.0117034912109375,
-0.00662994384765625,
-0.0037517547607421875,
-0.03863525390625,
0.0159149169921875,
0.01125335693359375,
0.01558685302734375,
0.0265960693359375,
0.042144775390625,
-0.0321044921875,
0.033935546875,
-0.0243988037109375,
0.02569580078125,
-0.04046630859375,
0.0218505859375,
-0.0021839141845703125,
-0.00975799560546875,
-0.02001953125,
0.007282257080078125,
-0.0099639892578125,
0.0158538818359375,
-0.0171356201171875,
-0.01407623291015625,
0.00582122802734375,
-0.0169677734375,
-0.0036773681640625,
-0.0310211181640625,
0.01293182373046875,
0.011138916015625,
-0.00750732421875,
0.0059967041015625,
-0.01221466064453125,
0.003658294677734375,
-0.01074981689453125,
-0.0167388916015625,
-0.019866943359375,
0.019683837890625,
0.0015535354614257812,
0.02703857421875,
0.0007853507995605469,
0.01291656494140625,
-0.0174407958984375,
0.0153350830078125,
0.01290130615234375,
0.0224761962890625,
0.007076263427734375,
0.005107879638671875,
0.005947113037109375,
-0.0172576904296875,
0.0275421142578125,
0.0011453628540039062,
-0.0021610260009765625,
-0.00499725341796875,
-0.005199432373046875,
0.022857666015625,
-0.007663726806640625,
0.01666259765625,
0.026336669921875,
-0.018768310546875,
0.00334930419921875,
-0.0311737060546875,
0.02685546875,
-0.0262603759765625,
0.0216522216796875,
-0.032928466796875,
-0.031524658203125,
0.00817108154296875,
-0.08575439453125,
0.07232666015625,
0.01361846923828125,
0.0002770423889160156,
0.051666259765625,
0.032470703125,
0.0191650390625,
-0.031707763671875,
0.010345458984375,
-0.06842041015625,
0.0251617431640625,
-0.007717132568359375,
-0.019775390625,
-0.0009279251098632812,
-0.00852203369140625,
0.07464599609375,
0.02587890625,
-0.049285888671875,
0.0418701171875,
0.010650634765625,
-0.0562744140625,
0.0160369873046875,
0.0433349609375,
0.016357421875,
-0.03155517578125,
-0.00569915771484375,
-0.01171112060546875,
0.00522613525390625,
-0.00914764404296875,
-0.037109375,
-0.01236724853515625,
0.01204681396484375,
-0.0267486572265625,
0.051239013671875,
-0.00925445556640625,
0.0087432861328125,
0.0210723876953125,
-0.0125732421875,
-0.039031982421875,
-0.0030517578125,
0.0311431884765625,
0.0307159423828125,
-0.01142120361328125,
-0.0159454345703125,
0.02978515625,
0.045074462890625,
-0.0006175041198730469,
-0.0227813720703125,
0.04937744140625,
-0.009063720703125,
0.03265380859375,
0.037811279296875,
-0.0400390625,
0.008514404296875,
-0.0193328857421875,
0.0289764404296875,
0.04364013671875,
0.00617218017578125,
0.004261016845703125,
0.00942230224609375,
-0.0031909942626953125,
0.0210113525390625,
-0.0244598388671875,
-0.039947509765625,
-0.0860595703125,
-0.048309326171875,
0.05352783203125,
-0.0540771484375,
0.001567840576171875,
-0.01125335693359375,
0.031646728515625,
-0.01654052734375,
-0.0095367431640625,
-0.05950927734375,
-0.0217742919921875,
-0.0128173828125,
0.0236358642578125,
0.06512451171875,
0.0191650390625,
0.0140380859375,
-0.029205322265625,
-0.0117645263671875,
-0.005706787109375,
0.005062103271484375,
0.0299072265625,
-0.0193023681640625,
0.01412200927734375,
-0.00833892822265625,
-0.0281829833984375,
-0.0628662109375,
-0.022674560546875,
-0.022979736328125,
-0.05865478515625,
0.0092010498046875,
-0.00028204917907714844,
0.035736083984375,
-0.0430908203125,
-0.03509521484375,
-0.0028934478759765625,
0.01177978515625,
0.0152587890625,
0.0361328125,
-0.0249786376953125,
0.039215087890625,
0.03228759765625,
-0.006488800048828125,
0.0140533447265625,
0.04119873046875,
0.0129852294921875,
-0.01020050048828125,
0.03656005859375,
-0.01317596435546875,
-0.0244293212890625,
0.01200103759765625,
-0.00028586387634277344,
-0.058013916015625,
-0.043914794921875,
-0.0259857177734375,
0.0229949951171875,
0.0036334991455078125,
0.00299072265625,
-0.0168609619140625,
-0.0433349609375,
0.00777435302734375,
0.0194854736328125,
0.006320953369140625,
-0.035888671875,
-0.019317626953125,
0.0033435821533203125,
0.0069732666015625,
-0.0023059844970703125,
-0.009490966796875,
-0.0170440673828125,
0.01375579833984375,
0.002872467041015625,
0.0289154052734375,
0.031768798828125,
-0.01324462890625,
0.0197296142578125,
0.046600341796875,
0.00814056396484375,
-0.0244293212890625,
0.0628662109375,
0.006404876708984375,
-0.056427001953125,
0.03167724609375,
0.01690673828125,
-0.0297698974609375,
-0.012115478515625,
-0.04058837890625,
0.0052490234375,
-0.0190887451171875,
0.0018596649169921875,
0.00687408447265625,
0.009613037109375,
-0.0203857421875,
-0.031585693359375,
0.0240325927734375,
-0.020294189453125,
0.03118896484375,
-0.03466796875,
0.039703369140625,
0.053619384765625,
0.0022983551025390625,
0.0110626220703125,
-0.0194244384765625,
-0.0218963623046875,
0.0222015380859375,
-0.0080413818359375,
0.0019664764404296875,
0.026123046875,
-0.011810302734375,
-0.013702392578125,
0.0239105224609375,
0.0005822181701660156,
-0.0086669921875,
0.0186004638671875,
-0.0219879150390625,
-0.033935546875,
0.0168609619140625,
-0.07659912109375,
-0.0035114288330078125,
0.01457977294921875,
0.015838623046875,
-0.02630615234375,
0.01904296875,
-0.007965087890625,
-0.00183868408203125,
-0.01207733154296875,
-0.026580810546875,
-0.01727294921875,
-0.048828125,
0.038238525390625,
0.0167999267578125,
-0.022186279296875,
0.03875732421875,
0.006175994873046875,
-0.07958984375,
0.0221405029296875,
0.0555419921875,
0.0401611328125,
-0.04852294921875,
-0.002536773681640625,
0.055084228515625,
-0.0031681060791015625,
-0.01995849609375,
0.0160675048828125,
-0.0162200927734375,
-0.018341064453125,
0.0238037109375,
0.0018672943115234375,
0.0170440673828125,
0.0193328857421875,
0.047210693359375,
-0.08270263671875,
0.1258544921875,
-0.041290283203125,
0.0599365234375,
0.016326904296875,
0.03155517578125,
-0.0179443359375,
-0.006778717041015625,
-0.030242919921875,
0.04071044921875,
-0.047119140625,
0.07745361328125,
-0.058868408203125,
-0.00888824462890625,
0.0283050537109375,
0.050628662109375,
0.035369873046875,
0.0135955810546875,
-0.006488800048828125,
-0.004047393798828125,
0.0229339599609375,
0.0005669593811035156,
-0.02203369140625,
0.0399169921875,
-0.01036834716796875,
0.0002193450927734375,
0.031829833984375,
-0.0233306884765625,
0.034759521484375,
-0.0200958251953125,
-0.008392333984375,
0.016326904296875,
-0.018157958984375,
-0.0256195068359375,
-0.0018863677978515625,
0.08209228515625,
-0.03228759765625,
-0.003414154052734375,
0.0256805419921875,
-0.03961181640625,
-0.0238037109375,
0.052764892578125,
0.04046630859375,
-0.06890869140625,
-0.033294677734375,
-0.039154052734375,
0.054656982421875,
0.005565643310546875,
0.0419921875,
0.047637939453125,
0.04034423828125,
0.060455322265625,
-0.045379638671875,
0.017486572265625,
-0.009002685546875,
-0.032318115234375,
0.0280914306640625,
0.00293731689453125,
0.04168701171875,
-0.03692626953125,
-0.040496826171875,
0.011322021484375,
0.055419921875,
-0.02252197265625,
-0.022796630859375,
0.0058746337890625,
0.0379638671875,
0.036865234375,
-0.0006842613220214844,
0.055877685546875,
0.04315185546875,
0.047088623046875,
-0.02789306640625,
-0.0416259765625,
0.007785797119140625,
0.0218048095703125,
-0.0006399154663085938,
0.01143646240234375,
0.0372314453125,
-0.05035400390625,
0.004955291748046875,
-0.0231781005859375,
-0.000027358531951904297,
0.024993896484375,
0.005893707275390625,
0.039154052734375,
-0.01715087890625,
0.00119781494140625,
0.05126953125,
-0.0308074951171875,
0.004116058349609375,
-0.06536865234375,
0.035400390625,
-0.0190582275390625,
0.046539306640625,
-0.0043182373046875,
0.009368896484375,
-0.0010385513305664062,
0.01300811767578125,
0.007549285888671875,
-0.01385498046875,
-0.0192718505859375,
-0.022674560546875,
-0.032196044921875,
-0.052337646484375,
-0.015472412109375,
0.00499725341796875,
0.05584716796875,
0.0202484130859375,
0.0059967041015625,
0.043701171875,
0.043609619140625,
0.042510986328125,
0.0167388916015625,
0.020904541015625,
0.0211639404296875,
0.008453369140625,
0.0362548828125,
-0.002117156982421875,
0.0762939453125,
-0.032073974609375,
-0.048370361328125,
0.05889892578125,
-0.0020503997802734375,
0.01068115234375,
0.03564453125,
-0.0139617919921875,
0.006900787353515625,
0.0007357597351074219,
-0.0121917724609375,
0.0234832763671875,
-0.0242919921875,
0.0311279296875,
0.04840087890625,
-0.00919342041015625,
0.034454345703125,
0.002101898193359375,
-0.024658203125,
0.016510009765625,
0.052398681640625,
0.048370361328125,
0.06396484375,
-0.020294189453125,
0.032501220703125,
0.0011358261108398438,
0.0489501953125,
-0.033172607421875,
0.00370025634765625,
0.0249786376953125,
0.017730712890625,
0.01253509521484375,
-0.01300048828125,
-0.051177978515625,
0.026885986328125,
0.023956298828125,
-0.00113677978515625,
0.07318115234375,
-0.059417724609375,
0.0022411346435546875,
-0.033203125,
-0.0088043212890625,
-0.0279541015625,
0.0242462158203125,
0.00940704345703125,
-0.04974365234375,
0.031097412109375,
-0.0285186767578125,
0.00902557373046875,
0.0682373046875,
0.0192108154296875,
0.01486968994140625,
-0.0230255126953125,
-0.048065185546875,
-0.019866943359375,
0.0250701904296875,
-0.0089263916015625,
0.0300750732421875,
0.036224365234375,
-0.01250457763671875,
0.04986572265625,
0.012969970703125,
0.00148773193359375,
0.061126708984375,
-0.019866943359375,
-0.0180206298828125,
-0.00984954833984375,
0.0217132568359375,
-0.031280517578125,
0.004467010498046875,
-0.006622314453125,
0.006317138671875,
0.055267333984375,
0.00365447998046875,
0.002681732177734375,
-0.01313018798828125,
-0.0189208984375,
-0.0089874267578125,
0.0099639892578125,
-0.01047515869140625,
0.038970947265625,
-0.049957275390625,
0.031158447265625,
0.023590087890625,
-0.026214599609375,
-0.0144500732421875,
0.0180511474609375,
-0.0122222900390625,
0.0142822265625,
0.00670623779296875,
-0.0090789794921875,
0.002010345458984375,
-0.0509033203125,
-0.0245208740234375,
-0.056304931640625,
0.02008056640625,
-0.059326171875,
0.0430908203125,
0.04815673828125,
-0.03228759765625,
0.0171051025390625,
0.020660400390625,
0.0111236572265625,
0.0726318359375,
-0.027374267578125,
0.0180206298828125,
0.0120849609375,
0.0178680419921875,
-0.0555419921875,
-0.02252197265625,
0.041229248046875,
-0.01593017578125,
-0.040802001953125,
-0.049652099609375,
0.0382080078125,
0.04034423828125,
-0.0301361083984375,
-0.0819091796875,
0.036590576171875,
-0.039703369140625,
-0.030975341796875,
-0.04339599609375,
0.00849151611328125,
-0.00684356689453125,
0.04241943359375,
-0.005580902099609375,
0.003101348876953125,
-0.0107421875,
0.0256500244140625,
-0.0162353515625,
-0.007625579833984375,
0.02874755859375,
-0.03216552734375,
0.014862060546875,
0.01010894775390625,
0.047119140625,
-0.03863525390625,
-0.02044677734375,
0.0261383056640625,
0.01776123046875,
0.04534912109375,
-0.0161895751953125,
0.049591064453125,
-0.002346038818359375,
0.01544189453125,
-0.00482940673828125,
-0.0286712646484375,
0.01800537109375,
0.007328033447265625,
-0.00014793872833251953,
0.0621337890625,
-0.01299285888671875,
-0.0445556640625,
-0.015106201171875,
-0.0281524658203125,
-0.01087188720703125,
-0.016937255859375,
-0.003025054931640625,
-0.0224151611328125,
-0.002834320068359375,
-0.025390625,
0.00850677490234375,
-0.0491943359375,
-0.052215576171875,
-0.037933349609375,
-0.03533935546875,
-0.036773681640625,
0.0208282470703125,
0.04473876953125,
-0.0372314453125,
-0.00891876220703125,
-0.0003962516784667969,
0.0108489990234375,
0.00033164024353027344,
0.0227508544921875,
-0.0166168212890625,
0.048614501953125,
-0.0015363693237304688,
-0.027862548828125,
-0.025726318359375,
0.045318603515625,
-0.02178955078125,
0.0355224609375,
-0.03564453125,
-0.027374267578125,
0.0104217529296875,
-0.0013074874877929688,
0.0014934539794921875,
0.00643157958984375,
0.0202789306640625,
-0.006072998046875,
-0.0205230712890625,
-0.03436279296875,
-0.01238250732421875,
0.08428955078125,
-0.0237579345703125,
0.0494384765625,
-0.0125274658203125,
-0.0184173583984375,
0.0134124755859375,
0.01983642578125,
-0.01082611083984375,
0.0007867813110351562,
-0.0295257568359375,
-0.09454345703125,
0.0533447265625,
0.05267333984375,
0.029754638671875,
0.03466796875
]
|
9ce306fbb7ce4e2ca289442f2bcfd107bfd9c3f9 | Wordpress Stackexchange
Q: How to configure Wordpress Multisite by bash script? I apologize if it's not the right place but I don't know where to ask my question.
I've searching the whole web to find a bash script that convert a single site install to a multisite install.
Using this : http://wp-cli.org/commands/core/multisite-convert/, it seems it possible but as I'd like to use a script that can easily change if i need to.
Do you know if one exists?
A: There is not a lot of ways to my knowledge to 'convert' the website. The best solution I could suggest is by installing WordPress Multi-site freshly in a somewhere else then pull over the plugin files, theme files and uploads over to the newly installed multi-site. Then use any simple export/import plugins to pull over anything else needed like comments, posts, pages and other custom post types. This would be a much more time consuming solution but would work without risk to crashing things.
Note: Make sure on whatever solution you do pick to backup the database and files for the website in case a solution goes wrong you will have a copy to revert to on failure.
| Q: How to configure Wordpress Multisite by bash script? I apologize if it's not the right place but I don't know where to ask my question.
I've searching the whole web to find a bash script that convert a single site install to a multisite install.
Using this : http://wp-cli.org/commands/core/multisite-convert/, it seems it possible but as I'd like to use a script that can easily change if i need to.
Do you know if one exists?
A: There is not a lot of ways to my knowledge to 'convert' the website. The best solution I could suggest is by installing WordPress Multi-site freshly in a somewhere else then pull over the plugin files, theme files and uploads over to the newly installed multi-site. Then use any simple export/import plugins to pull over anything else needed like comments, posts, pages and other custom post types. This would be a much more time consuming solution but would work without risk to crashing things.
Note: Make sure on whatever solution you do pick to backup the database and files for the website in case a solution goes wrong you will have a copy to revert to on failure.
| wordpress | {
"language": "en",
"length": 195,
"provenance": "stackexchange_00019.jsonl.gz:465023",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/224988"
} | [
0.0178070068359375,
-0.0294952392578125,
0.016632080078125,
0.00844573974609375,
-0.0178070068359375,
-0.0243988037109375,
0.02447509765625,
-0.0297698974609375,
0.0015621185302734375,
-0.003894805908203125,
0.0032749176025390625,
0.004489898681640625,
-0.035614013671875,
-0.042083740234375,
0.0005249977111816406,
-0.032196044921875,
0.0291748046875,
-0.016387939453125,
-0.009002685546875,
-0.01259613037109375,
0.0011806488037109375,
0.03033447265625,
-0.01342010498046875,
0.072021484375,
0.0125885009765625,
-0.0036411285400390625,
0.0567626953125,
-0.01433563232421875,
0.024627685546875,
-0.002918243408203125,
0.025115966796875,
-0.0142669677734375,
0.039459228515625,
-0.01094818115234375,
-0.010162353515625,
0.00998687744140625,
0.02496337890625,
-0.019073486328125,
-0.0157470703125,
0.058319091796875,
0.0150909423828125,
0.00848388671875,
0.0266571044921875,
0.0171051025390625,
0.01024627685546875,
-0.040374755859375,
0.006130218505859375,
-0.0572509765625,
0.00838470458984375,
-0.09881591796875,
-0.01149749755859375,
0.00763702392578125,
0.036346435546875,
-0.08843994140625,
-0.0283355712890625,
-0.01036834716796875,
0.01323699951171875,
0.0261688232421875,
0.0153656005859375,
-0.007732391357421875,
-0.03509521484375,
0.0311279296875,
0.00843048095703125,
-0.00626373291015625,
-0.01425933837890625,
0.0005817413330078125,
-0.0604248046875,
0.009063720703125,
-0.042999267578125,
-0.007129669189453125,
0.03094482421875,
-0.057403564453125,
0.00689697265625,
-0.022705078125,
-0.00150299072265625,
-0.0082855224609375,
-0.025787353515625,
-0.03558349609375,
0.03936767578125,
-0.019744873046875,
0.044647216796875,
0.018768310546875,
0.042633056640625,
-0.06689453125,
0.040985107421875,
-0.035980224609375,
0.01125335693359375,
-0.0038051605224609375,
-0.046356201171875,
0.005329132080078125,
-0.0306396484375,
0.031890869140625,
-0.07281494140625,
0.0137786865234375,
-0.004390716552734375,
0.01474761962890625,
0.0088958740234375,
-0.0011701583862304688,
0.004093170166015625,
0.0252227783203125,
0.0013761520385742188,
-0.032562255859375,
0.0384521484375,
-0.005645751953125,
0.021087646484375,
0.0289764404296875,
0.0098114013671875,
0.007129669189453125,
0.04083251953125,
0.009796142578125,
-0.0198516845703125,
0.040985107421875,
0.01091766357421875,
-0.007549285888671875,
-0.035003662109375,
0.0078125,
-0.0027408599853515625,
0.0088653564453125,
-0.01076507568359375,
0.01273345947265625,
-0.0076904296875,
0.01763916015625,
-0.01412200927734375,
0.010162353515625,
-0.0067291259765625,
0.0011548995971679688,
0.0185546875,
-0.037261962890625,
-0.067138671875,
0.0008111000061035156,
-0.014923095703125,
0.0203399658203125,
0.0716552734375,
0.062408447265625,
0.006801605224609375,
-0.00021910667419433594,
0.0247802734375,
0.033660888671875,
-0.01499176025390625,
0.03179931640625,
-0.0203399658203125,
-0.052764892578125,
-0.0299072265625,
-0.0399169921875,
-0.0129852294921875,
0.00801849365234375,
0.02789306640625,
0.0238189697265625,
-0.016632080078125,
-0.0210418701171875,
0.0049896240234375,
-0.0113525390625,
0.0029315948486328125,
-0.003360748291015625,
0.0266265869140625,
-0.0511474609375,
0.01580810546875,
-0.033935546875,
0.037933349609375,
-0.0114593505859375,
-0.01387786865234375,
0.0032825469970703125,
0.050811767578125,
0.012542724609375,
0.0121612548828125,
-0.003673553466796875,
-0.0190582275390625,
0.0014677047729492188,
0.0153350830078125,
-0.0287322998046875,
-0.036529541015625,
-0.008575439453125,
0.045257568359375,
-0.0162200927734375,
-0.010711669921875,
0.03857421875,
-0.0165252685546875,
0.01363372802734375,
0.0238037109375,
0.037841796875,
0.008087158203125,
-0.034637451171875,
0.020904541015625,
-0.0009264945983886719,
-0.0447998046875,
0.0335693359375,
-0.00408935546875,
0.0587158203125,
0.03387451171875,
0.02398681640625,
0.0024776458740234375,
-0.0169677734375,
-0.00473785400390625,
-0.00762176513671875,
0.0014171600341796875,
-0.00879669189453125,
-0.0161285400390625,
0.01049041748046875,
-0.0001951456069946289,
-0.02264404296875,
-0.01064300537109375,
-0.0157012939453125,
0.0262908935546875,
0.004138946533203125,
-0.01003265380859375,
0.0038928985595703125,
-0.0178375244140625,
0.014007568359375,
0.017303466796875,
-0.018341064453125,
0.000705718994140625,
-0.0009527206420898438,
0.01192474365234375,
-0.0640869140625,
-0.052154541015625,
0.03155517578125,
-0.0243072509765625,
0.03497314453125,
-0.0218505859375,
0.0157470703125,
-0.04791259765625,
-0.0257568359375,
-0.0212249755859375,
0.00048351287841796875,
0.03729248046875,
-0.01389312744140625,
-0.01448822021484375,
-0.0231170654296875,
0.0308685302734375,
0.0163726806640625,
-0.006656646728515625,
0.0246734619140625,
-0.00215911865234375,
0.00555419921875,
-0.0200958251953125,
0.016326904296875,
0.01039886474609375,
-0.01451873779296875,
-0.00751495361328125,
0.01438140869140625,
0.03131103515625,
-0.01410675048828125,
-0.01497650146484375,
0.0024967193603515625,
0.033721923828125,
-0.015472412109375,
0.0167999267578125,
-0.00850677490234375,
0.0005774497985839844,
0.03863525390625,
0.008514404296875,
0.0033321380615234375,
0.004802703857421875,
-0.061187744140625,
0.00737762451171875,
0.033782958984375,
0.01160430908203125,
-0.049346923828125,
0.0290679931640625,
0.004688262939453125,
0.01151275634765625,
-0.028778076171875,
-0.0660400390625,
0.009063720703125,
-0.025970458984375,
0.037353515625,
0.0121917724609375,
0.012359619140625,
-0.00833892822265625,
0.01910400390625,
0.0155181884765625,
-0.048980712890625,
0.001312255859375,
-0.0189666748046875,
0.0233306884765625,
0.03546142578125,
-0.0277862548828125,
-0.0089569091796875,
0.01428985595703125,
0.005657196044921875,
-0.0178680419921875,
0.0443115234375,
-0.035919189453125,
-0.021453857421875,
-0.0186767578125,
-0.0206298828125,
-0.00348663330078125,
0.00879669189453125,
-0.0655517578125,
-0.035919189453125,
-0.01085662841796875,
0.02996826171875,
-0.0313720703125,
0.0117034912109375,
0.0030059814453125,
-0.0112762451171875,
0.0953369140625,
-0.0557861328125,
0.040679931640625,
-0.0298004150390625,
0.056610107421875,
0.05340576171875,
0.004116058349609375,
-0.0038852691650390625,
-0.02569580078125,
0.051727294921875,
0.031158447265625,
-0.03387451171875,
-0.0234222412109375,
-0.0047454833984375,
-0.0638427734375,
-0.057952880859375,
-0.005039215087890625,
0.01284027099609375,
-0.0313720703125,
-0.043426513671875,
-0.026824951171875,
-0.02203369140625,
-0.06146240234375,
-0.031707763671875,
-0.0209808349609375,
-0.031494140625,
0.022796630859375,
-0.00946044921875,
-0.0034503936767578125,
-0.021728515625,
-0.0010747909545898438,
0.023895263671875,
0.042724609375,
-0.026702880859375,
-0.0390625,
-0.03704833984375,
-0.08831787109375,
-0.0374755859375,
0.005138397216796875,
0.0034503936767578125,
0.0164947509765625,
-0.0074310302734375,
0.009918212890625,
-0.0227508544921875,
0.007335662841796875,
0.0100555419921875,
-0.0213165283203125,
-0.049407958984375,
0.02374267578125,
-0.0238800048828125,
0.003398895263671875,
0.0035400390625,
0.0248260498046875,
0.038848876953125,
-0.03045654296875,
-0.015533447265625,
-0.0018606185913085938,
0.033782958984375,
-0.012420654296875,
-0.020599365234375,
0.025146484375,
0.0025463104248046875,
-0.05126953125,
-0.0535888671875,
0.0162506103515625,
-0.04132080078125,
-0.02886962890625,
0.0187530517578125,
0.008941650390625,
-0.007175445556640625,
-0.009857177734375,
-0.00257110595703125,
0.036834716796875,
-0.01068878173828125,
0.0258331298828125,
0.0027866363525390625,
0.0183258056640625,
-0.00646209716796875,
0.0037746429443359375,
-0.044677734375,
0.00885772705078125,
-0.02471923828125,
0.007434844970703125,
-0.0128326416015625,
-0.008087158203125,
-0.04046630859375,
0.01261138916015625,
-0.045989990234375,
-0.041900634765625,
0.088134765625,
-0.001911163330078125,
0.020294189453125,
-0.056243896484375,
-0.06427001953125,
-0.029510498046875,
0.11083984375,
-0.033721923828125,
-0.017578125,
0.032318115234375,
0.0191497802734375,
-0.00820159912109375,
-0.0279083251953125,
-0.051361083984375,
-0.0260772705078125,
-0.096923828125,
-0.00458526611328125,
-0.0295562744140625,
-0.036529541015625,
0.01174163818359375,
-0.04058837890625,
-0.0268707275390625,
-0.075439453125,
0.01459503173828125,
0.0161895751953125,
0.01297760009765625,
-0.00833892822265625,
0.0132598876953125,
-0.0226593017578125,
-0.0006866455078125,
-0.0173492431640625,
-0.044342041015625,
-0.016357421875,
-0.037078857421875,
0.045379638671875,
0.00611114501953125,
0.03546142578125,
-0.0009174346923828125,
0.02996826171875,
-0.0148468017578125,
0.0189666748046875,
-0.0195159912109375,
0.004283905029296875,
0.022735595703125,
-0.0167083740234375,
-0.0171356201171875,
-0.022125244140625,
-0.0309600830078125,
-0.042266845703125,
-0.000667572021484375,
-0.0047760009765625,
-0.0036487579345703125,
-0.0011377334594726562,
0.00827789306640625,
-0.0009908676147460938,
-0.033782958984375,
-0.0282745361328125,
-0.00905609130859375,
-0.019622802734375,
-0.0239410400390625,
-0.005329132080078125,
-0.01161956787109375,
-0.00957489013671875,
0.025634765625,
0.0092315673828125,
-0.006435394287109375,
0.0012426376342773438,
0.032562255859375,
0.0114593505859375,
-0.0296173095703125,
-0.0279388427734375,
0.0006551742553710938,
0.00807952880859375,
-0.004108428955078125,
0.07623291015625,
0.045989990234375,
0.0173492431640625,
0.022064208984375,
-0.0019350051879882812,
-0.006603240966796875,
0.0132904052734375,
0.01433563232421875,
0.0294952392578125,
0.0122528076171875,
-0.0181121826171875,
0.00867462158203125,
-0.006084442138671875,
0.00345611572265625,
0.0038242340087890625,
0.002300262451171875,
0.00629425048828125,
0.0335693359375,
0.0350341796875,
-0.0703125,
-0.06890869140625,
-0.0296630859375,
-0.00885009765625,
-0.038421630859375,
0.0531005859375,
0.00969696044921875,
0.0033397674560546875,
0.037200927734375,
0.0543212890625,
0.001861572265625,
0.00341796875,
-0.01026153564453125,
-0.0032958984375,
0.017578125,
0.00347900390625,
-0.01145172119140625,
0.02813720703125,
-0.00811767578125,
0.0224456787109375,
0.019134521484375,
-0.01514434814453125,
-0.0027294158935546875,
-0.014312744140625,
0.01406097412109375,
-0.005615234375,
0.01374053955078125,
0.0450439453125,
0.010101318359375,
-0.046295166015625,
-0.0207977294921875,
-0.01546478271484375,
-0.0226287841796875,
-0.0633544921875,
-0.057525634765625,
-0.02960205078125,
-0.0163421630859375,
0.027069091796875,
-0.0136566162109375,
-0.0205535888671875,
0.011688232421875,
-0.0062255859375,
0.029205322265625,
0.07525634765625,
-0.052459716796875,
0.00537109375,
0.03955078125,
-0.02362060546875,
-0.0469970703125,
0.02655029296875,
-0.01177978515625,
0.0147552490234375,
0.040191650390625,
0.053985595703125,
0.0306396484375,
-0.00926971435546875,
-0.02899169921875,
-0.05596923828125,
-0.026885986328125,
0.0255584716796875,
0.01953125,
-0.033843994140625,
-0.0096282958984375,
0.013580322265625,
0.0149383544921875,
-0.00424957275390625,
0.01053619384765625,
-0.01291656494140625,
-0.03509521484375,
-0.0261993408203125,
-0.0018739700317382812,
-0.038421630859375,
-0.00742340087890625,
0.01103973388671875,
-0.004619598388671875,
-0.00203704833984375,
-0.01044464111328125,
-0.045318603515625,
-0.033050537109375,
-0.005863189697265625,
-0.008819580078125,
0.02056884765625,
0.0210418701171875,
-0.0139312744140625,
-0.03619384765625,
-0.005451202392578125,
0.004581451416015625,
-0.0189056396484375,
0.054107666015625,
-0.0146942138671875,
-0.03076171875,
0.005092620849609375,
-0.053558349609375,
-0.021697998046875,
-0.016693115234375,
-0.02764892578125,
-0.055389404296875,
-0.01143646240234375,
0.01305389404296875,
-0.007228851318359375,
-0.01128387451171875,
-0.05181884765625,
-0.0127716064453125,
0.0229644775390625,
0.0382080078125,
-0.02532958984375,
-0.03948974609375,
0.0413818359375,
0.039520263671875,
0.005725860595703125,
0.022918701171875,
0.059112548828125,
0.0562744140625,
-0.04559326171875,
0.0010595321655273438,
-0.051177978515625,
-0.0247802734375,
-0.0179443359375,
0.023834228515625,
0.03271484375,
0.00482177734375,
-0.0016841888427734375,
0.0028476715087890625,
0.003139495849609375,
-0.00646209716796875,
-0.042083740234375,
-0.01250457763671875,
0.0129547119140625,
0.045928955078125,
-0.0286865234375,
-0.0017919540405273438,
0.03668212890625,
-0.00652313232421875,
0.00963592529296875,
-0.017852783203125,
-0.01142120361328125,
-0.00665283203125,
0.01280975341796875,
-0.07415771484375,
0.078857421875,
0.055755615234375,
-0.0191650390625,
0.0120086669921875,
0.0030155181884765625,
-0.0258636474609375,
-0.002017974853515625,
-0.00858306884765625,
-0.0018596649169921875,
-0.0222015380859375,
-0.0215911865234375,
-0.031494140625,
0.007663726806640625,
-0.0272674560546875,
-0.007049560546875,
0.02288818359375,
0.03350830078125,
0.06732177734375,
-0.065185546875,
0.02130126953125,
0.031982421875,
-0.00362396240234375,
0.0038013458251953125,
0.00858306884765625,
-0.007190704345703125,
0.01149749755859375,
0.0021076202392578125,
0.004772186279296875,
-0.015411376953125,
0.017669677734375,
0.033111572265625,
-0.01071929931640625,
-0.001132965087890625,
0.04376220703125,
0.0249786376953125,
-0.014373779296875,
0.028472900390625,
-0.00926971435546875,
0.045501708984375,
0.01483154296875,
-0.01239013671875,
-0.0031147003173828125,
-0.0287017822265625,
-0.043792724609375,
-0.026763916015625,
-0.043975830078125,
-0.0272369384765625,
-0.0311431884765625,
0.0004169940948486328,
0.03045654296875,
0.056549072265625,
-0.0195770263671875,
-0.01044464111328125,
0.0312347412109375,
0.01186370849609375,
-0.00716400146484375,
0.010406494140625,
0.02520751953125,
0.0003523826599121094,
-0.0124053955078125,
0.01378631591796875,
-0.03570556640625,
-0.0205230712890625,
-0.0017023086547851562,
0.00543975830078125,
0.00823974609375,
0.0018301010131835938,
-0.00978851318359375,
0.0657958984375,
0.04949951171875,
-0.03106689453125,
-0.0184326171875,
0.041412353515625,
-0.1033935546875,
-0.0916748046875,
0.019927978515625,
-0.05914306640625,
-0.0207977294921875,
-0.016326904296875,
-0.01702880859375,
0.09759521484375,
-0.0007600784301757812,
-0.00963592529296875,
0.03515625,
0.047119140625,
-0.059661865234375,
0.0243072509765625,
-0.017852783203125,
0.023223876953125,
0.03204345703125,
0.03424072265625,
-0.031494140625,
-0.0204925537109375,
0.014617919921875,
0.07391357421875,
-0.0284881591796875,
-0.000888824462890625,
-0.0535888671875,
-0.0056304931640625,
0.0201263427734375,
0.0628662109375,
0.07012939453125,
0.043792724609375,
-0.008575439453125,
0.04364013671875,
0.01068115234375,
-0.040191650390625,
0.0209808349609375,
0.0079193115234375,
-0.042510986328125,
0.0201568603515625,
-0.0011835098266601562,
-0.01522064208984375,
0.002132415771484375,
-0.0029582977294921875,
-0.0306243896484375,
0.0111846923828125,
0.0095367431640625,
0.03485107421875,
0.01351165771484375,
0.0154266357421875,
-0.031951904296875,
0.04180908203125,
0.089599609375,
-0.0309600830078125,
0.034942626953125,
-0.05206298828125,
-0.0247650146484375,
0.009368896484375,
0.0002053976058959961,
-0.0079345703125,
0.033843994140625,
-0.02459716796875,
0.0294342041015625,
0.026641845703125,
0.03900146484375,
0.02484130859375,
0.0382080078125,
-0.02239990234375,
0.0233306884765625,
0.0394287109375,
0.040771484375,
-0.0274505615234375,
-0.027435302734375,
0.01262664794921875,
0.01407623291015625,
0.01552581787109375,
0.0034770965576171875,
0.01219940185546875,
0.01922607421875,
0.041290283203125,
-0.006542205810546875,
-0.007274627685546875,
0.025543212890625,
0.005779266357421875,
0.019287109375,
0.036224365234375,
0.0046844482421875,
0.00337982177734375,
-0.04278564453125,
0.0185394287109375,
0.011383056640625,
0.06689453125,
0.0124359130859375,
0.12103271484375,
-0.045440673828125,
-0.048675537109375,
-0.01450347900390625,
0.07049560546875,
0.0268707275390625,
-0.01190185546875,
-0.024200439453125,
-0.055694580078125,
0.0157928466796875,
0.0222320556640625,
-0.006175994873046875,
0.0276031494140625,
0.04193115234375,
0.056610107421875,
-0.03570556640625,
-0.0107574462890625,
0.07769775390625,
-0.0184783935546875,
0.032928466796875,
-0.0228271484375,
0.016143798828125,
-0.01348114013671875,
-0.02435302734375,
-0.047332763671875,
0.06134033203125,
0.007114410400390625,
-0.00330352783203125,
0.0435791015625,
-0.0006189346313476562,
-0.0078582763671875,
0.039947509765625,
-0.00832366943359375,
0.07257080078125,
0.01453399658203125,
-0.0288848876953125,
-0.00405120849609375,
-0.020233154296875,
-0.01378631591796875,
-0.0112152099609375,
0.0287628173828125,
0.0033206939697265625,
-0.00908660888671875,
-0.01145172119140625,
-0.0284271240234375,
0.040069580078125,
0.01271820068359375,
-0.0244598388671875,
-0.003376007080078125,
0.03363037109375,
-0.029693603515625,
-0.07012939453125,
-0.046356201171875,
-0.037567138671875,
0.0557861328125,
-0.00972747802734375,
0.06475830078125,
-0.01213836669921875,
0.032135009765625,
-0.010589599609375,
-0.01026153564453125,
0.011871337890625,
-0.03192138671875,
0.00977325439453125,
0.01751708984375,
0.014556884765625,
-0.018402099609375,
0.0087127685546875,
0.0184326171875,
0.016571044921875,
-0.031646728515625,
-0.0296173095703125,
0.005634307861328125,
0.01494598388671875,
0.032867431640625,
0.04498291015625,
-0.01482391357421875,
-0.0638427734375,
-0.0667724609375,
0.00024819374084472656,
0.030364990234375,
0.050079345703125,
-0.0194244384765625,
0.046142578125,
0.038482666015625,
0.0023288726806640625,
-0.0138092041015625,
0.006580352783203125,
-0.0108642578125,
0.025726318359375,
0.022308349609375,
-0.043243408203125,
0.0171051025390625,
-0.00536346435546875,
-0.033172607421875,
0.0254058837890625,
0.026947021484375,
0.02142333984375,
-0.01971435546875,
-0.0185089111328125,
0.040802001953125,
0.028778076171875,
-0.0102691650390625,
0.01312255859375,
0.0302886962890625,
-0.032257080078125,
-0.014556884765625,
-0.021270751953125,
-0.048431396484375,
-0.067626953125,
0.0229034423828125,
0.0129852294921875,
-0.02313232421875,
-0.0280303955078125,
-0.0308837890625,
-0.035858154296875,
0.051910400390625,
-0.00670623779296875,
0.0076751708984375,
0.0060882568359375,
-0.05615234375,
-0.031951904296875,
-0.003887176513671875,
-0.0418701171875,
-0.022796630859375,
-0.02099609375,
-0.016845703125,
-0.036651611328125,
-0.06988525390625,
0.0211944580078125,
-0.03985595703125,
0.0230865478515625,
0.0501708984375,
-0.0293731689453125,
0.0065765380859375,
0.017425537109375,
0.006732940673828125,
0.06011962890625,
0.00809478759765625,
-0.00992584228515625,
-0.007518768310546875,
-0.0080413818359375,
-0.032257080078125,
-0.034149169921875,
0.0243072509765625,
-0.054595947265625,
-0.0267486572265625,
-0.02557373046875,
-0.002780914306640625,
-0.001354217529296875,
-0.049285888671875,
-0.078369140625,
0.044342041015625,
-0.026458740234375,
-0.0309600830078125,
-0.08587646484375,
-0.034149169921875,
0.016571044921875,
0.005523681640625,
-0.044952392578125,
-0.010406494140625,
-0.059051513671875,
0.06573486328125,
0.005275726318359375,
0.0294342041015625,
-0.0278167724609375,
0.0229034423828125,
-0.0281829833984375,
0.037567138671875,
0.028656005859375,
0.001407623291015625,
0.0035152435302734375,
-0.005809783935546875,
0.0193939208984375,
0.0543212890625,
-0.0169677734375,
-0.0224609375,
0.00028586387634277344,
-0.0193634033203125,
-0.0252838134765625,
0.0372314453125,
-0.04046630859375,
0.00904083251953125,
0.0830078125,
0.13232421875,
0.0255889892578125,
-0.048675537109375,
-0.039093017578125,
-0.0170135498046875,
-0.0157470703125,
-0.033935546875,
0.027862548828125,
-0.07867431640625,
-0.0187530517578125,
-0.0022373199462890625,
-0.024505615234375,
0.0601806640625,
-0.028076171875,
-0.016571044921875,
0.023162841796875,
0.003856658935546875,
-0.01113128662109375,
-0.03460693359375,
0.0391845703125,
0.050811767578125,
-0.04388427734375,
-0.01435089111328125,
0.00525665283203125,
-0.0162506103515625,
0.00726318359375,
-0.0189666748046875,
-0.03662109375,
0.0195770263671875,
-0.028228759765625,
0.0051727294921875,
-0.01201629638671875,
0.0364990234375,
-0.0205078125,
0.01354217529296875,
-0.0007996559143066406,
0.035369873046875,
-0.0012369155883789062,
0.055328369140625,
0.0109405517578125,
0.0181121826171875,
-0.0005707740783691406,
0.0374755859375,
-0.0216217041015625,
-0.019317626953125,
-0.047607421875,
0.064208984375,
-0.044036865234375,
0.01305389404296875,
-0.00457763671875,
-0.034423828125,
0.0011501312255859375,
0.0198822021484375,
-0.0032329559326171875,
-0.057586669921875,
0.0438232421875,
0.01149749755859375,
0.028778076171875,
0.019287109375
]
|
32e1a69736adaed90219bbcc7e86483c70e98f0e | Wordpress Stackexchange
Q: Get rid of Another update is currently in progress I was trying to update my wordpress core to 4.5.1 but my system was missing some permissions, and now after giving correct permission, I cannot get rid of that message and I cannot upgrade.
Tried to look for a .maintainance file but there is not.
How do I update now?
Thanks for help
A: Add this code to any plugin or your theme's functions.php file. Remember to remove it when you're done to prevent flicking your database for no reason.
delete_option( "core_updater.lock" );
| Q: Get rid of Another update is currently in progress I was trying to update my wordpress core to 4.5.1 but my system was missing some permissions, and now after giving correct permission, I cannot get rid of that message and I cannot upgrade.
Tried to look for a .maintainance file but there is not.
How do I update now?
Thanks for help
A: Add this code to any plugin or your theme's functions.php file. Remember to remove it when you're done to prevent flicking your database for no reason.
delete_option( "core_updater.lock" );
A: If you use wp-cli run the following command:
wp option delete core_updater.lock
This command will delete the option named: core_updater.lock
A: It is an automatic lock to prevent simultaneous core updates. It will be gone after 15 minutes. If you don't want to wait, delete the record from options table – usually wp_options.
Since Wordpress 4.5:
option_name = 'core_updater.lock'
If you have an older installation (before Wordpress 4.5):
option_name = 'core_updater'
A: Per @jeremyclarke, running this at the terminal resolved this issue for me:
wp option delete core_updater.lock
A: Confirming this 'core_updater.lock'. It may not be obvious at first but look at the line 771.
File: wp-admin/includes/class-wp-upgrader.php
754: /**
755: * Creates a lock using WordPress options.
756: *
757: * @since 4.5.0
758: * @access public
759: * @static
760: *
761: * @param string $lock_name The name of this unique lock.
762: * @param int $release_timeout Optional. The duration in seconds to respect an existing lock.
763: * Default: 1 hour.
764: * @return bool False if a lock couldn't be created or if the lock is no longer valid. True otherwise.
765: */
766: public static function create_lock( $lock_name, $release_timeout = null ) {
767: global $wpdb;
768: if ( ! $release_timeout ) {
769: $release_timeout = HOUR_IN_SECONDS;
770: }
771: $lock_option = $lock_name . '.lock';
772:
773: // Try to lock.
774: $lock_result = $wpdb->query( $wpdb->prepare( "INSERT IGNORE INTO `$wpdb->options` ( `option_name`, `option_value`, `autoload` ) VALUES (%s, %s, 'no') /* LOCK */", $lock_option, time() ) );
775:
Now, if you like you may delete this option:
$>wp option delete core_updater.lock
A: For anyone looking for the full MySQL query:
DELETE FROM wp_options WHERE option_name LIKE '%core_update%' LIMIT 1
A: In WordPress there are two update locks:
*
*core_updater
*auto_updater
So, you can fix this by deleting the update locks.
Use below code to delete the lock's:
delete_option( 'core_updater.lock' );
delete_option( 'auto_updater.lock' );
You can delete the update locks with CLI command too. Checkout how to delete them with CLI command.
Use the WordPress pluginenter link description here
fix-update-in-process which show the existing locks and fix the issue with one click.
| wordpress | {
"language": "en",
"length": 448,
"provenance": "stackexchange_00019.jsonl.gz:465024",
"question_score": "98",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/224989"
} | [
0.028472900390625,
-0.006305694580078125,
-0.003482818603515625,
0.00113677978515625,
0.008758544921875,
-0.0325927734375,
0.07122802734375,
-0.0129547119140625,
0.0267333984375,
0.0247344970703125,
0.01068878173828125,
-0.042449951171875,
0.0325927734375,
-0.0235595703125,
-0.034027099609375,
-0.01508331298828125,
0.048065185546875,
-0.0357666015625,
0.028839111328125,
0.0031795501708984375,
0.004268646240234375,
0.03131103515625,
0.0280914306640625,
0.060150146484375,
-0.056793212890625,
0.0240936279296875,
0.0258941650390625,
-0.01285552978515625,
-0.045684814453125,
-0.039459228515625,
-0.0207672119140625,
0.04034423828125,
-0.01345062255859375,
0.043670654296875,
-0.046722412109375,
-0.0831298828125,
0.00287628173828125,
0.0260467529296875,
0.006809234619140625,
-0.007320404052734375,
-0.013153076171875,
0.0170135498046875,
0.03851318359375,
0.00914764404296875,
-0.0031795501708984375,
-0.0295562744140625,
-0.00316619873046875,
-0.04119873046875,
0.04998779296875,
0.0017118453979492188,
0.0005869865417480469,
0.0017271041870117188,
0.0156097412109375,
-0.01031494140625,
-0.02093505859375,
-0.0175628662109375,
0.0212860107421875,
0.02008056640625,
0.02471923828125,
0.00624847412109375,
-0.030487060546875,
0.02630615234375,
0.0045623779296875,
-0.0325927734375,
0.0189056396484375,
-0.00848388671875,
0.06121826171875,
0.00760650634765625,
-0.054351806640625,
-0.0015048980712890625,
0.035858154296875,
-0.0011529922485351562,
-0.0150299072265625,
-0.0204620361328125,
0.039947509765625,
0.0252838134765625,
-0.00926971435546875,
-0.0236358642578125,
0.007656097412109375,
0.034088134765625,
0.01629638671875,
-0.0389404296875,
-0.027496337890625,
0.013275146484375,
-0.0234832763671875,
0.026275634765625,
0.01479339599609375,
-0.011932373046875,
-0.01030731201171875,
0.034912109375,
-0.0170745849609375,
-0.05615234375,
0.0576171875,
0.032470703125,
-0.0219879150390625,
0.003173828125,
0.0294342041015625,
0.063232421875,
-0.0254669189453125,
-0.0090484619140625,
-0.0053558349609375,
-0.037261962890625,
-0.004116058349609375,
-0.02130126953125,
-0.03448486328125,
-0.00545501708984375,
0.0282745361328125,
0.0190277099609375,
-0.01300811767578125,
0.0260162353515625,
-0.0216064453125,
-0.00809478759765625,
0.023101806640625,
-0.0308074951171875,
-0.002094268798828125,
0.02496337890625,
0.01849365234375,
0.023895263671875,
0.0008702278137207031,
-0.004077911376953125,
-0.0309295654296875,
0.006694793701171875,
-0.060028076171875,
0.00113677978515625,
0.0161590576171875,
-0.01861572265625,
0.013885498046875,
0.0328369140625,
-0.031402587890625,
0.0048980712890625,
-0.041900634765625,
0.03997802734375,
0.06732177734375,
0.0139007568359375,
-0.0156402587890625,
-0.0168304443359375,
-0.0133056640625,
-0.0130157470703125,
0.006389617919921875,
-0.01459503173828125,
0.0231475830078125,
-0.01349639892578125,
0.017181396484375,
0.006084442138671875,
0.0258941650390625,
0.0037708282470703125,
0.00896453857421875,
0.042022705078125,
0.03515625,
-0.047271728515625,
0.0198211669921875,
0.006244659423828125,
0.02911376953125,
-0.00598907470703125,
0.0010576248168945312,
-0.029754638671875,
0.068603515625,
-0.06396484375,
-0.028594970703125,
-0.04888916015625,
-0.00444793701171875,
-0.0005788803100585938,
0.031097412109375,
0.00919342041015625,
-0.00414276123046875,
0.014923095703125,
-0.037933349609375,
-0.0088958740234375,
0.020538330078125,
0.017059326171875,
-0.00997161865234375,
-0.003070831298828125,
0.0257568359375,
0.0027294158935546875,
-0.0196990966796875,
0.0137939453125,
0.00975799560546875,
-0.028778076171875,
0.021942138671875,
0.02239990234375,
-0.0261688232421875,
-0.0213165283203125,
0.038330078125,
-0.0232696533203125,
-0.027618408203125,
-0.0364990234375,
0.032623291015625,
0.03778076171875,
0.004337310791015625,
0.0294342041015625,
0.048492431640625,
-0.010711669921875,
0.044281005859375,
0.023834228515625,
-0.0210418701171875,
-0.03857421875,
-0.037322998046875,
0.0301971435546875,
-0.04229736328125,
-0.0278778076171875,
0.0293731689453125,
0.027923583984375,
0.0032939910888671875,
-0.0322265625,
-0.10845947265625,
0.02734375,
-0.04119873046875,
0.061309814453125,
0.001743316650390625,
0.00881195068359375,
0.049224853515625,
0.03961181640625,
-0.045257568359375,
-0.005397796630859375,
-0.059173583984375,
-0.0132904052734375,
-0.0257415771484375,
0.00879669189453125,
0.009918212890625,
0.032928466796875,
-0.0024471282958984375,
-0.01009368896484375,
0.0030345916748046875,
-0.026123046875,
0.029754638671875,
-0.0264434814453125,
0.004352569580078125,
-0.0292510986328125,
0.0204010009765625,
-0.0113677978515625,
-0.01210784912109375,
0.032012939453125,
0.045318603515625,
0.0031337738037109375,
-0.032623291015625,
-0.006534576416015625,
-0.023590087890625,
-0.09027099609375,
-0.004329681396484375,
0.063232421875,
0.042449951171875,
0.0159759521484375,
-0.01505279541015625,
-0.0380859375,
0.061553955078125,
-0.0531005859375,
0.00238037109375,
-0.00583648681640625,
0.00788116455078125,
0.03912353515625,
0.02581787109375,
-0.0009489059448242188,
0.00928497314453125,
-0.036224365234375,
0.01291656494140625,
0.038482666015625,
0.017547607421875,
0.01468658447265625,
-0.051361083984375,
0.01261138916015625,
0.00616455078125,
-0.0897216796875,
-0.07476806640625,
-0.016326904296875,
0.031524658203125,
-0.005126953125,
0.041839599609375,
0.045166015625,
-0.00341796875,
-0.00992584228515625,
0.007717132568359375,
-0.0271453857421875,
0.002849578857421875,
0.0274505615234375,
-0.037689208984375,
0.0306549072265625,
-0.0258636474609375,
0.01137542724609375,
-0.007274627685546875,
0.00858306884765625,
-0.038848876953125,
-0.038360595703125,
-0.01110076904296875,
-0.0031719207763671875,
0.0183258056640625,
0.04754638671875,
0.03765869140625,
-0.03692626953125,
-0.03564453125,
-0.039886474609375,
0.004913330078125,
0.0024967193603515625,
-0.01617431640625,
0.01262664794921875,
0.01715087890625,
-0.024688720703125,
0.03094482421875,
-0.01000213623046875,
-0.0004532337188720703,
0.0001748800277709961,
0.01309967041015625,
0.06146240234375,
0.035491943359375,
-0.04119873046875,
0.037841796875,
-0.027374267578125,
0.056671142578125,
-0.0017995834350585938,
0.0206451416015625,
0.049774169921875,
-0.04425048828125,
0.0362548828125,
0.0256500244140625,
0.048126220703125,
-0.0033416748046875,
-0.038055419921875,
-0.0138702392578125,
0.035125732421875,
-0.08184814453125,
-0.053985595703125,
-0.037933349609375,
0.0134124755859375,
0.0021495819091796875,
0.045928955078125,
0.00919342041015625,
-0.016632080078125,
0.07122802734375,
0.005359649658203125,
-0.036712646484375,
-0.0032482147216796875,
-0.0188140869140625,
-0.03240966796875,
-0.045989990234375,
-0.0125579833984375,
-0.0024127960205078125,
0.033660888671875,
0.004932403564453125,
0.08648681640625,
-0.0005588531494140625,
-0.06268310546875,
-0.02301025390625,
0.005954742431640625,
-0.034515380859375,
-0.00894927978515625,
-0.016143798828125,
0.01319122314453125,
0.0263214111328125,
0.01348114013671875,
0.037750244140625,
0.007007598876953125,
0.00461578369140625,
-0.0268402099609375,
-0.0021038055419921875,
-0.01444244384765625,
-0.0084991455078125,
0.028167724609375,
-0.0004181861877441406,
-0.00986480712890625,
-0.0055084228515625,
-0.055694580078125,
-0.0275115966796875,
0.033294677734375,
-0.01593017578125,
-0.0037860870361328125,
-0.009185791015625,
-0.039215087890625,
-0.00714111328125,
0.0231475830078125,
0.00206756591796875,
0.00945281982421875,
0.0303802490234375,
-0.036590576171875,
0.03912353515625,
-0.00787353515625,
-0.0186614990234375,
-0.0550537109375,
0.0274200439453125,
-0.025787353515625,
0.01519012451171875,
0.0069580078125,
0.0110626220703125,
-0.005146026611328125,
-0.010589599609375,
-0.049896240234375,
-0.026947021484375,
0.04400634765625,
-0.045379638671875,
-0.0033111572265625,
-0.0264434814453125,
-0.02459716796875,
-0.0010042190551757812,
0.0738525390625,
-0.0160675048828125,
-0.0227508544921875,
0.01006317138671875,
-0.0022449493408203125,
0.006244659423828125,
0.0208282470703125,
-0.0293121337890625,
-0.01959228515625,
-0.036834716796875,
-0.0286407470703125,
-0.004734039306640625,
-0.02203369140625,
-0.0416259765625,
0.007080078125,
-0.034149169921875,
-0.0258331298828125,
0.045654296875,
-0.055633544921875,
0.0148773193359375,
0.00815582275390625,
-0.0225830078125,
-0.016357421875,
-0.054168701171875,
-0.015869140625,
-0.10797119140625,
-0.020751953125,
0.0063934326171875,
0.06365966796875,
-0.0122833251953125,
0.0258026123046875,
-0.03863525390625,
0.048614501953125,
-0.0230712890625,
0.0007371902465820312,
-0.0200042724609375,
0.0125885009765625,
-0.032806396484375,
0.021514892578125,
-0.004955291748046875,
-0.005901336669921875,
-0.0239715576171875,
-0.0180206298828125,
-0.007610321044921875,
0.01062774658203125,
0.0086822509765625,
0.0021076202392578125,
0.0294342041015625,
-0.01079559326171875,
0.007602691650390625,
-0.0174560546875,
-0.0287628173828125,
0.01438140869140625,
-0.0183868408203125,
0.0103607177734375,
-0.028839111328125,
-0.023162841796875,
0.01354217529296875,
-0.020538330078125,
-0.00960540771484375,
0.0188446044921875,
0.0579833984375,
0.0138092041015625,
0.0003972053527832031,
-0.022674560546875,
-0.032470703125,
0.036346435546875,
0.0060577392578125,
0.0657958984375,
0.06732177734375,
0.0010423660278320312,
0.004573822021484375,
0.03826904296875,
-0.0300140380859375,
0.006092071533203125,
0.00891876220703125,
0.01328277587890625,
-0.0220794677734375,
-0.0038356781005859375,
-0.0175323486328125,
0.0294342041015625,
-0.00841522216796875,
-0.01360321044921875,
0.01540374755859375,
-0.00849151611328125,
0.007053375244140625,
0.052886962890625,
-0.03265380859375,
-0.03729248046875,
-0.06707763671875,
0.037078857421875,
-0.021820068359375,
0.0035552978515625,
-0.03546142578125,
0.0195770263671875,
0.00580596923828125,
-0.00812530517578125,
-0.026580810546875,
-0.072509765625,
-0.025360107421875,
-0.009033203125,
0.0267486572265625,
-0.054443359375,
-0.025482177734375,
-0.05963134765625,
-0.005725860595703125,
0.0623779296875,
0.0121307373046875,
-0.061767578125,
0.002262115478515625,
0.0304412841796875,
0.040618896484375,
0.02130126953125,
-0.02337646484375,
0.0107421875,
0.021087646484375,
0.0059661865234375,
-0.007778167724609375,
-0.0286407470703125,
-0.0177459716796875,
-0.018310546875,
0.003009796142578125,
0.00402069091796875,
-0.0171356201171875,
0.00897216796875,
-0.01096343994140625,
0.0159149169921875,
-0.02252197265625,
-0.00975799560546875,
0.051666259765625,
0.0267791748046875,
-0.01229095458984375,
-0.011199951171875,
0.038116455078125,
0.05902099609375,
-0.08935546875,
0.035186767578125,
-0.030975341796875,
-0.0477294921875,
-0.004596710205078125,
0.04852294921875,
0.00290679931640625,
0.0206298828125,
0.0006146430969238281,
-0.017120361328125,
0.00047779083251953125,
0.0221710205078125,
0.036102294921875,
-0.038360595703125,
0.006969451904296875,
0.050384521484375,
0.0189208984375,
-0.0171661376953125,
0.0278778076171875,
-0.0029888153076171875,
0.004703521728515625,
-0.00014209747314453125,
-0.0111236572265625,
-0.0262451171875,
-0.02606201171875,
0.0037174224853515625,
0.0244903564453125,
-0.01435089111328125,
-0.038818359375,
-0.0015554428100585938,
-0.015045166015625,
-0.00791168212890625,
0.0035877227783203125,
0.051239013671875,
0.025909423828125,
0.010650634765625,
-0.0247802734375,
-0.030364990234375,
0.01065826416015625,
-0.01025390625,
0.0572509765625,
-0.00516510009765625,
0.01154327392578125,
-0.01503753662109375,
-0.03948974609375,
-0.054840087890625,
-0.08746337890625,
-0.0298004150390625,
-0.058685302734375,
0.042266845703125,
-0.00762939453125,
0.019989013671875,
-0.01329803466796875,
0.0180816650390625,
-0.01788330078125,
0.03106689453125,
-0.01812744140625,
0.03662109375,
-0.00788116455078125,
0.03350830078125,
0.015869140625,
0.031707763671875,
0.03582763671875,
0.057769775390625,
0.02154541015625,
-0.04888916015625,
0.045318603515625,
-0.028839111328125,
-0.061248779296875,
-0.067626953125,
0.00930023193359375,
-0.016693115234375,
-0.0225982666015625,
-0.0259246826171875,
0.007122039794921875,
-0.038177490234375,
-0.0030078887939453125,
-0.0255126953125,
0.1041259765625,
-0.041717529296875,
-0.0262451171875,
0.051544189453125,
-0.0811767578125,
-0.03656005859375,
0.0100250244140625,
0.03643798828125,
0.0259246826171875,
-0.049163818359375,
-0.006717681884765625,
0.042236328125,
-0.017181396484375,
0.031768798828125,
0.061676025390625,
-0.034576416015625,
0.034210205078125,
0.015838623046875,
-0.004055023193359375,
0.034637451171875,
-0.0109405517578125,
-0.0212860107421875,
0.03143310546875,
0.032196044921875,
-0.0032100677490234375,
-0.005130767822265625,
-0.0009918212890625,
-0.01409149169921875,
0.004817962646484375,
0.0361328125,
0.07025146484375,
-0.05419921875,
0.01244354248046875,
0.018585205078125,
-0.014984130859375,
0.0498046875,
0.00849151611328125,
-0.01953125,
-0.044647216796875,
0.0482177734375,
-0.0096893310546875,
0.0039215087890625,
0.024627685546875,
0.024932861328125,
-0.006725311279296875,
-0.01113128662109375,
0.0239410400390625,
0.0196990966796875,
0.004688262939453125,
0.01446533203125,
0.0031108856201171875,
0.0261993408203125,
0.00405120849609375,
0.007709503173828125,
-0.019866943359375,
-0.0379638671875,
-0.06146240234375,
-0.0450439453125,
-0.018646240234375,
-0.03070068359375,
0.0029888153076171875,
0.00885772705078125,
-0.00585174560546875,
0.012664794921875,
-0.00693511962890625,
-0.021697998046875,
-0.0199737548828125,
-0.0015926361083984375,
-0.05224609375,
-0.0328369140625,
0.041900634765625,
0.0210723876953125,
-0.033966064453125,
0.042205810546875,
-0.0293121337890625,
-0.031646728515625,
-0.0091094970703125,
-0.023345947265625,
0.056671142578125,
-0.0219268798828125,
-0.0084381103515625,
0.0360107421875,
-0.0045623779296875,
-0.0255279541015625,
0.0301666259765625,
0.036407470703125,
-0.033294677734375,
-0.02764892578125,
0.037139892578125,
0.0128326416015625,
-0.0156707763671875,
0.05767822265625,
-0.05316162109375,
0.10894775390625,
-0.0194854736328125,
0.019500732421875,
0.006710052490234375,
0.054107666015625,
-0.025177001953125,
0.013671875,
-0.006526947021484375,
0.052337646484375,
-0.004852294921875,
0.034698486328125,
-0.00844573974609375,
0.0085296630859375,
0.0106201171875,
0.01218414306640625,
0.03631591796875,
0.01556396484375,
-0.012420654296875,
-0.01026153564453125,
0.016937255859375,
0.0167388916015625,
-0.0108489990234375,
0.02667236328125,
-0.0040283203125,
-0.022674560546875,
0.0033588409423828125,
-0.0013580322265625,
0.03070068359375,
-0.0219879150390625,
-0.03131103515625,
0.0265350341796875,
-0.004856109619140625,
-0.0245361328125,
0.0303192138671875,
0.047119140625,
-0.0070953369140625,
-0.0039825439453125,
0.0015850067138671875,
-0.00115966796875,
0.0211334228515625,
0.0185546875,
0.00409698486328125,
0.0164794921875,
0.0816650390625,
-0.032806396484375,
0.04888916015625,
-0.01058197021484375,
0.0198822021484375,
-0.00140380859375,
0.007648468017578125,
0.005748748779296875,
-0.014984130859375,
0.005260467529296875,
0.04241943359375,
-0.034454345703125,
0.0245208740234375,
0.0556640625,
0.0202484130859375,
0.0103302001953125,
0.044677734375,
0.0452880859375,
0.037261962890625,
-0.03973388671875,
-0.0197296142578125,
0.002033233642578125,
-0.0309600830078125,
-0.006397247314453125,
-0.0287933349609375,
-0.038909912109375,
0.007480621337890625,
-0.0082855224609375,
-0.03057861328125,
-0.01076507568359375,
0.0316162109375,
0.023773193359375,
0.0101318359375,
0.00978851318359375,
-0.0238189697265625,
-0.03717041015625,
-0.03466796875,
0.0205230712890625,
0.036224365234375,
0.00203704833984375,
-0.031402587890625,
0.0836181640625,
0.064697265625,
0.01375579833984375,
-0.006969451904296875,
0.054351806640625,
0.0120086669921875,
-0.0015497207641601562,
-0.037078857421875,
-0.06646728515625,
-0.0159759521484375,
0.045013427734375,
0.01055145263671875,
-0.023895263671875,
-0.0104522705078125,
0.06146240234375,
0.01678466796875,
-0.0118255615234375,
0.057647705078125,
0.011871337890625,
-0.00971221923828125,
-0.03741455078125,
0.01194000244140625,
0.0012693405151367188,
0.0157623291015625,
-0.006740570068359375,
0.040679931640625,
0.006755828857421875,
0.0258636474609375,
-0.0269775390625,
0.0235137939453125,
-0.00208282470703125,
0.017059326171875,
0.003398895263671875,
-0.032257080078125,
0.04705810546875,
0.0269927978515625,
0.00818634033203125,
0.0292205810546875,
-0.00959014892578125,
-0.0218353271484375,
0.003387451171875,
-0.050384521484375,
0.061492919921875,
-0.0494384765625,
0.016326904296875,
-0.018157958984375,
-0.0192413330078125,
0.0216217041015625,
0.011016845703125,
0.0016012191772460938,
0.0010528564453125,
-0.03607177734375,
-0.0124969482421875,
-0.0258636474609375,
0.027191162109375,
0.0174407958984375,
0.060028076171875,
-0.0005621910095214844,
0.024688720703125,
-0.0390625,
0.033935546875,
-0.0246124267578125,
-0.0287628173828125,
0.0029201507568359375,
0.0498046875,
0.0258331298828125,
-0.0235137939453125,
-0.061004638671875,
0.0537109375,
0.0169525146484375,
-0.01495361328125,
0.0677490234375,
0.01200103759765625,
-0.01146697998046875,
-0.044708251953125,
-0.0163726806640625,
-0.02166748046875,
-0.00859832763671875,
0.035552978515625,
-0.0027103424072265625,
0.005329132080078125,
-0.01029205322265625,
-0.0013360977172851562,
0.0262451171875,
0.06549072265625,
0.037841796875,
0.0282440185546875,
0.0223846435546875,
0.0537109375,
0.03851318359375,
-0.001922607421875,
0.0082550048828125,
-0.0078887939453125,
-0.0305328369140625,
0.0156097412109375,
0.0025730133056640625,
0.01024627685546875,
-0.0229644775390625,
0.051788330078125,
-0.021484375,
-0.004955291748046875,
0.0225067138671875,
-0.0126495361328125,
0.00339508056640625,
-0.023284912109375,
0.00920867919921875,
-0.0094757080078125,
-0.0115966796875,
0.00470733642578125,
-0.047088623046875,
-0.03082275390625,
-0.0006299018859863281,
-0.032623291015625,
0.0022945404052734375,
0.0247039794921875,
-0.0020198822021484375,
0.04888916015625,
0.034149169921875,
-0.09661865234375,
0.053802490234375,
0.0012989044189453125,
0.0169830322265625,
0.0034198760986328125,
0.006778717041015625,
-0.0179595947265625,
0.030792236328125,
-0.024688720703125,
-0.05438232421875,
-0.034393310546875,
0.061798095703125,
-0.036346435546875,
-0.022308349609375,
-0.032012939453125,
0.00966644287109375,
0.0255279541015625,
-0.0003294944763183594,
0.024993896484375,
0.02423095703125,
0.0244293212890625,
-0.026458740234375,
0.0294036865234375,
-0.037689208984375,
-0.01165771484375,
-0.031463623046875,
0.0224151611328125,
-0.10296630859375,
-0.0419921875,
-0.043853759765625,
0.016021728515625,
0.001392364501953125,
-0.03936767578125,
-0.075927734375,
-0.0027618408203125,
-0.01806640625,
-0.033966064453125,
-0.0261077880859375,
-0.019775390625,
-0.0091705322265625,
0.028533935546875,
-0.0103607177734375,
-0.0164794921875,
-0.038787841796875,
0.040618896484375,
0.011474609375,
-0.005306243896484375,
0.005237579345703125,
0.04168701171875,
-0.01285552978515625,
0.04180908203125,
0.0310821533203125,
-0.033447265625,
0.007904052734375,
-0.024139404296875,
0.036712646484375,
0.0240936279296875,
-0.0230865478515625,
0.0021991729736328125,
0.0018014907836914062,
-0.03399658203125,
-0.0174407958984375,
-0.00151824951171875,
-0.050567626953125,
-0.035552978515625,
0.052032470703125,
0.06982421875,
0.0269317626953125,
-0.0186309814453125,
0.0032825469970703125,
-0.06414794921875,
-0.07025146484375,
-0.01849365234375,
0.0302734375,
-0.0621337890625,
0.021575927734375,
0.025115966796875,
-0.006267547607421875,
-0.0091552734375,
0.0210723876953125,
-0.01324462890625,
-0.033416748046875,
-0.00687408447265625,
-0.007442474365234375,
-0.057342529296875,
0.006561279296875,
0.0177459716796875,
0.0160064697265625,
0.05517578125,
-0.0213470458984375,
-0.002044677734375,
0.051483154296875,
0.0635986328125,
0.0195770263671875,
-0.004718780517578125,
-0.006984710693359375,
0.0341796875,
0.009521484375,
0.004390716552734375,
-0.023590087890625,
-0.046173095703125,
0.0211181640625,
0.02606201171875,
-0.00957489013671875,
0.039459228515625,
-0.0184326171875,
0.0251312255859375,
-0.0207366943359375,
0.0401611328125,
-0.0256195068359375,
0.0161895751953125,
-0.02679443359375,
0.001796722412109375,
0.01293182373046875,
-0.0004820823669433594,
0.06304931640625,
-0.0191802978515625,
-0.0026226043701171875,
0.037994384765625,
0.043243408203125,
-0.046630859375,
0.038482666015625,
-0.00603485107421875,
0.039398193359375,
0.0178070068359375
]
|
b8db9e1f9683dbe3d1ff0fe4a3932e98cc899e7f | Wordpress Stackexchange
Q: (un)wptexturize() -- is it possible? I have some text stored in a string $text that's filtered through the_content and therefore, wptexturize().
wptexturize() is a function that replaces various characters into more prettier ones.
Is there any way that I can unwptexturize() the string? Revert it back to what it was.
What I've danced with so far
I can replace smart quotes with regular ones like this:
$text = iconv('UTF-8', 'ASCII//TRANSLIT', $text);
But that will only cover the smart quotes, there are a lot more characters.
Another alternative is to write a custom regex to replace all these characters back to their original ones.
A: Don't think so after skimming through the wptexturize() code, but what about using the run_wptexturize filter (untested):
// Turn off wptexturize
add_filter( 'run_wptexturize', '__return_false' );
// Your text handling here ...
$text = apply_filters( 'the_content', $text );
// Remove filter
remove_filter( 'run_wptexturize', '__return_false' );
i.e. just turn off the wptexturize only for your text handling?
| Q: (un)wptexturize() -- is it possible? I have some text stored in a string $text that's filtered through the_content and therefore, wptexturize().
wptexturize() is a function that replaces various characters into more prettier ones.
Is there any way that I can unwptexturize() the string? Revert it back to what it was.
What I've danced with so far
I can replace smart quotes with regular ones like this:
$text = iconv('UTF-8', 'ASCII//TRANSLIT', $text);
But that will only cover the smart quotes, there are a lot more characters.
Another alternative is to write a custom regex to replace all these characters back to their original ones.
A: Don't think so after skimming through the wptexturize() code, but what about using the run_wptexturize filter (untested):
// Turn off wptexturize
add_filter( 'run_wptexturize', '__return_false' );
// Your text handling here ...
$text = apply_filters( 'the_content', $text );
// Remove filter
remove_filter( 'run_wptexturize', '__return_false' );
i.e. just turn off the wptexturize only for your text handling?
| wordpress | {
"language": "en",
"length": 160,
"provenance": "stackexchange_00019.jsonl.gz:465070",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/225170"
} | [
0.023468017578125,
-0.0006694793701171875,
0.0034236907958984375,
-0.0110931396484375,
0.0227203369140625,
-0.0206146240234375,
0.05731201171875,
-0.01678466796875,
-0.01131439208984375,
0.046356201171875,
-0.004642486572265625,
-0.023468017578125,
0.0209808349609375,
-0.0222320556640625,
-0.0506591796875,
-0.039031982421875,
-0.00653839111328125,
0.033294677734375,
0.0196533203125,
-0.01523590087890625,
-0.0189208984375,
-0.0153656005859375,
0.00705718994140625,
-0.03106689453125,
-0.0084075927734375,
-0.037750244140625,
0.12384033203125,
-0.007080078125,
-0.0086669921875,
-0.034423828125,
0.01294708251953125,
0.0053253173828125,
0.0163421630859375,
0.042999267578125,
-0.047119140625,
0.02099609375,
-0.0213623046875,
0.04107666015625,
-0.0001550912857055664,
0.00923919677734375,
0.023468017578125,
-0.007411956787109375,
-0.0421142578125,
0.0281524658203125,
-0.053955078125,
-0.0122528076171875,
0.014190673828125,
-0.0036373138427734375,
0.04180908203125,
0.05712890625,
0.004756927490234375,
0.017547607421875,
0.00247955322265625,
-0.041229248046875,
0.01378631591796875,
0.006992340087890625,
-0.07049560546875,
0.0421142578125,
0.0170440673828125,
0.06341552734375,
0.0153656005859375,
0.0147552490234375,
-0.0200042724609375,
-0.037841796875,
-0.006687164306640625,
-0.007549285888671875,
-0.01506805419921875,
0.0201873779296875,
-0.042022705078125,
-0.01430511474609375,
0.02642822265625,
-0.04595947265625,
-0.004436492919921875,
-0.03143310546875,
-0.028961181640625,
0.0367431640625,
-0.0279388427734375,
-0.0106048583984375,
0.033050537109375,
-0.0035800933837890625,
0.0264739990234375,
-0.044677734375,
0.037841796875,
0.0230865478515625,
-0.003993988037109375,
0.01435089111328125,
-0.00125885009765625,
-0.0159149169921875,
-0.0221710205078125,
0.0012111663818359375,
-0.0021648406982421875,
0.023834228515625,
-0.027618408203125,
0.0201873779296875,
0.01084136962890625,
-0.02728271484375,
-0.027313232421875,
-0.018798828125,
0.01212310791015625,
0.055267333984375,
0.03497314453125,
-0.049713134765625,
0.0782470703125,
-0.05010986328125,
0.048065185546875,
0.06280517578125,
-0.0117950439453125,
0.003086090087890625,
0.047943115234375,
-0.0029392242431640625,
0.0185699462890625,
0.015533447265625,
-0.036712646484375,
-0.06549072265625,
-0.01055908203125,
0.0645751953125,
-0.031219482421875,
-0.0087738037109375,
0.018341064453125,
-0.00046253204345703125,
-0.0210723876953125,
-0.0032196044921875,
0.009918212890625,
-0.051727294921875,
0.01087188720703125,
-0.031646728515625,
-0.0228118896484375,
0.009246826171875,
-0.0223236083984375,
0.0133819580078125,
-0.031829833984375,
-0.0028972625732421875,
0.0653076171875,
0.0758056640625,
0.040802001953125,
-0.00829315185546875,
0.022857666015625,
-0.002349853515625,
0.012725830078125,
0.062103271484375,
-0.038482666015625,
-0.07611083984375,
-0.01102447509765625,
0.0079193115234375,
0.002044677734375,
0.027435302734375,
0.01351165771484375,
0.0004391670227050781,
-0.000965118408203125,
-0.04278564453125,
-0.00835418701171875,
-0.011077880859375,
0.05889892578125,
0.01209259033203125,
-0.030029296875,
-0.0654296875,
0.00926971435546875,
-0.0501708984375,
0.0018453598022460938,
-0.08441162109375,
0.0211029052734375,
-0.040496826171875,
-0.0380859375,
0.025665283203125,
0.00524139404296875,
0.0304107666015625,
-0.002391815185546875,
0.01007080078125,
0.0194244384765625,
0.0193328857421875,
0.0012445449829101562,
0.00504302978515625,
0.037261962890625,
-0.002590179443359375,
-0.022216796875,
-0.0002295970916748047,
-0.031402587890625,
0.047088623046875,
0.0177001953125,
0.02362060546875,
0.037841796875,
-0.01232147216796875,
0.057769775390625,
0.0156707763671875,
-0.0250701904296875,
0.023956298828125,
-0.01151275634765625,
0.055694580078125,
0.0230560302734375,
0.002567291259765625,
-0.0406494140625,
-0.0265045166015625,
-0.05450439453125,
0.0254974365234375,
-0.035247802734375,
-0.02679443359375,
0.006771087646484375,
0.005390167236328125,
-0.015838623046875,
0.01189422607421875,
0.07171630859375,
0.013824462890625,
0.01139068603515625,
-0.04290771484375,
-0.1195068359375,
0.0235137939453125,
-0.04705810546875,
0.043182373046875,
-0.0272369384765625,
0.0164031982421875,
0.0285186767578125,
-0.02984619140625,
-0.056365966796875,
0.0693359375,
0.0005526542663574219,
-0.0204315185546875,
-0.005725860595703125,
0.035614013671875,
0.003963470458984375,
0.0209197998046875,
0.01317596435546875,
-0.0263824462890625,
0.01457977294921875,
0.005565643310546875,
0.0294647216796875,
-0.0115203857421875,
-0.0212860107421875,
-0.01381683349609375,
0.036651611328125,
-0.0304107666015625,
0.0206298828125,
0.0638427734375,
0.0543212890625,
0.0643310546875,
0.0009851455688476562,
-0.01983642578125,
-0.00041937828063964844,
-0.09344482421875,
0.006622314453125,
0.055450439453125,
0.03955078125,
0.055511474609375,
-0.0345458984375,
-0.09716796875,
0.0293731689453125,
-0.022735595703125,
0.0216064453125,
-0.07672119140625,
0.02691650390625,
0.0098114013671875,
-0.0214080810546875,
-0.046661376953125,
0.028594970703125,
-0.0521240234375,
0.042999267578125,
0.01393890380859375,
-0.0732421875,
-0.0183258056640625,
-0.0001722574234008789,
0.02099609375,
0.00107574462890625,
0.046600341796875,
0.06683349609375,
-0.024749755859375,
0.0259857177734375,
-0.0080718994140625,
0.0250396728515625,
0.01995849609375,
-0.01259613037109375,
-0.01010894775390625,
0.00838470458984375,
0.003284454345703125,
-0.017486572265625,
0.033905029296875,
0.024078369140625,
-0.0214996337890625,
-0.03314208984375,
0.012542724609375,
-0.03509521484375,
0.0204315185546875,
0.0232696533203125,
0.0831298828125,
-0.00021910667419433594,
-0.023406982421875,
-0.0046539306640625,
-0.013824462890625,
-0.040740966796875,
-0.011932373046875,
-0.006862640380859375,
-0.01495361328125,
0.0166473388671875,
0.041839599609375,
0.005764007568359375,
0.014617919921875,
0.001705169677734375,
0.00567626953125,
0.0218963623046875,
-0.054840087890625,
0.038421630859375,
-0.018280029296875,
0.035736083984375,
0.07659912109375,
0.045318603515625,
-0.026092529296875,
0.01318359375,
0.015716552734375,
0.03692626953125,
-0.00849151611328125,
-0.004505157470703125,
0.0132598876953125,
-0.048492431640625,
-0.01715087890625,
0.00946044921875,
0.06561279296875,
-0.048492431640625,
-0.043975830078125,
-0.01259613037109375,
0.0091400146484375,
-0.0657958984375,
-0.0828857421875,
0.036285400390625,
-0.03424072265625,
-0.03759765625,
0.007598876953125,
-0.04534912109375,
0.01342010498046875,
0.0176849365234375,
-0.015777587890625,
0.0250091552734375,
-0.051910400390625,
-0.024871826171875,
-0.056915283203125,
-0.039703369140625,
-0.0258026123046875,
-0.0026264190673828125,
-0.0389404296875,
0.00020742416381835938,
0.0163116455078125,
0.00402069091796875,
-0.0018835067749023438,
0.01617431640625,
0.036163330078125,
0.0133209228515625,
-0.004756927490234375,
0.01320648193359375,
-0.0029010772705078125,
0.00164031982421875,
-0.01023101806640625,
0.028900146484375,
0.04510498046875,
-0.02459716796875,
0.01214599609375,
0.020660400390625,
0.0298309326171875,
0.034698486328125,
0.0180816650390625,
-0.006389617919921875,
0.0462646484375,
0.0262451171875,
-0.0231475830078125,
-0.0242156982421875,
-0.0151519775390625,
-0.040008544921875,
0.03558349609375,
0.0190277099609375,
-0.004650115966796875,
0.0010423660278320312,
0.0204620361328125,
0.031890869140625,
-0.01177215576171875,
0.08197021484375,
-0.01242828369140625,
-0.0262603759765625,
0.00008702278137207031,
-0.008392333984375,
-0.0484619140625,
-0.004863739013671875,
-0.041229248046875,
0.03497314453125,
0.0056915283203125,
-0.0064697265625,
-0.00591278076171875,
-0.0085296630859375,
-0.0063629150390625,
-0.0128936767578125,
0.0168914794921875,
-0.040130615234375,
-0.005126953125,
-0.00911712646484375,
0.005794525146484375,
0.0045166015625,
0.057525634765625,
-0.0290679931640625,
-0.0201416015625,
0.004871368408203125,
0.0158538818359375,
-0.0167388916015625,
-0.0010356903076171875,
-0.031280517578125,
-0.0191497802734375,
-0.0567626953125,
0.01064300537109375,
-0.03619384765625,
-0.0212249755859375,
0.004459381103515625,
-0.050445556640625,
0.01079559326171875,
-0.05023193359375,
0.01181793212890625,
-0.023895263671875,
0.00684356689453125,
-0.0142974853515625,
0.02099609375,
-0.061004638671875,
0.013763427734375,
-0.043304443359375,
-0.03607177734375,
-0.004894256591796875,
-0.0091552734375,
-0.00606536865234375,
-0.0096282958984375,
0.0042266845703125,
-0.01056671142578125,
0.03375244140625,
-0.011016845703125,
0.0032367706298828125,
0.0218048095703125,
0.02508544921875,
0.0104522705078125,
0.021697998046875,
0.026519775390625,
-0.0238494873046875,
0.00771331787109375,
0.0257720947265625,
-0.03790283203125,
0.038665771484375,
0.002925872802734375,
0.01418304443359375,
0.054351806640625,
-0.040252685546875,
-0.0286865234375,
-0.006649017333984375,
-0.024505615234375,
-0.0022449493408203125,
-0.023712158203125,
0.0009484291076660156,
-0.01512908935546875,
-0.0469970703125,
0.03411865234375,
0.0318603515625,
0.0037517547607421875,
-0.0088653564453125,
0.049835205078125,
0.0282440185546875,
-0.037322998046875,
0.0245513916015625,
-0.0275421142578125,
-0.005115509033203125,
0.0211334228515625,
0.0220184326171875,
-0.00539398193359375,
-0.0025501251220703125,
0.0296173095703125,
-0.002994537353515625,
0.01303863525390625,
-0.0242156982421875,
0.0697021484375,
0.0006885528564453125,
-0.005046844482421875,
0.01849365234375,
-0.0095672607421875,
-0.019378662109375,
0.039031982421875,
0.01549530029296875,
-0.01351165771484375,
-0.0034198760986328125,
0.007633209228515625,
0.005100250244140625,
-0.01904296875,
0.006664276123046875,
-0.034271240234375,
0.02447509765625,
0.0285797119140625,
-0.0157318115234375,
-0.0172576904296875,
0.0238800048828125,
-0.0209197998046875,
-0.02313232421875,
0.0194091796875,
-0.00957489013671875,
-0.0041351318359375,
-0.04449462890625,
0.03582763671875,
-0.0103607177734375,
-0.0200653076171875,
0.0182342529296875,
0.004192352294921875,
-0.0012874603271484375,
-0.049163818359375,
-0.029327392578125,
-0.0433349609375,
-0.01549530029296875,
-0.056976318359375,
0.039154052734375,
0.025421142578125,
-0.0406494140625,
-0.041595458984375,
-0.0055389404296875,
0.0222930908203125,
0.034698486328125,
-0.00846099853515625,
0.00934600830078125,
0.043182373046875,
0.00884246826171875,
0.00605010986328125,
0.0079345703125,
0.00797271728515625,
0.01335906982421875,
-0.009368896484375,
-0.0048065185546875,
0.007778167724609375,
0.01203155517578125,
0.0318603515625,
0.01001739501953125,
-0.019744873046875,
0.015899658203125,
0.006198883056640625,
0.0161590576171875,
-0.0098724365234375,
-0.01116180419921875,
0.060394287109375,
0.01422882080078125,
-0.037017822265625,
-0.0063629150390625,
-0.00782012939453125,
-0.0129852294921875,
-0.01032257080078125,
0.0031280517578125,
0.0244903564453125,
0.006191253662109375,
-0.027923583984375,
-0.0242462158203125,
0.024200439453125,
0.032135009765625,
0.0193328857421875,
-0.0194854736328125,
-0.034881591796875,
-0.0250396728515625,
0.0230712890625,
-0.006969451904296875,
-0.05133056640625,
-0.046051025390625,
0.027984619140625,
-0.040496826171875,
-0.0241851806640625,
-0.03656005859375,
0.006298065185546875,
-0.011138916015625,
0.0011205673217773438,
0.06024169921875,
-0.00608062744140625,
0.041595458984375,
-0.009246826171875,
-0.0157470703125,
-0.0011425018310546875,
0.008758544921875,
0.01424407958984375,
-0.0149383544921875,
-0.03656005859375,
-0.0104827880859375,
-0.0628662109375,
0.00023102760314941406,
-0.03900146484375,
-0.037689208984375,
-0.0394287109375,
0.0009307861328125,
0.01512908935546875,
0.020294189453125,
0.0277557373046875,
-0.0014829635620117188,
-0.0113677978515625,
0.022216796875,
0.01544952392578125,
0.067138671875,
-0.055267333984375,
0.0234375,
0.052276611328125,
-0.018646240234375,
-0.0045623779296875,
0.046844482421875,
0.082275390625,
-0.036102294921875,
-0.0103912353515625,
0.0252685546875,
0.0257110595703125,
-0.043975830078125,
0.07586669921875,
-0.00921630859375,
0.061859130859375,
0.005645751953125,
0.061676025390625,
-0.04583740234375,
0.0006017684936523438,
-0.01250457763671875,
0.0430908203125,
-0.08990478515625,
0.003498077392578125,
0.035919189453125,
-0.004596710205078125,
-0.026336669921875,
-0.020843505859375,
-0.00482177734375,
-0.0102081298828125,
0.019866943359375,
-0.0286102294921875,
0.0188751220703125,
0.007076263427734375,
-0.0079345703125,
0.014892578125,
0.0115203857421875,
0.0164794921875,
-0.01519775390625,
0.00525665283203125,
-0.016387939453125,
-0.02630615234375,
-0.019287109375,
0.04974365234375,
0.0247955322265625,
-0.00920867919921875,
-0.01343536376953125,
-0.002105712890625,
-0.0140533447265625,
0.01129150390625,
0.06121826171875,
0.074462890625,
-0.09002685546875,
0.0166778564453125,
0.0279998779296875,
0.01203155517578125,
-0.00254058837890625,
0.0289459228515625,
-0.019012451171875,
-0.055084228515625,
-0.00022172927856445312,
-0.006603240966796875,
-0.007495880126953125,
0.00461578369140625,
0.0201873779296875,
-0.023590087890625,
-0.022857666015625,
0.0216064453125,
0.01149749755859375,
-0.01476287841796875,
0.039031982421875,
-0.005702972412109375,
0.01094818115234375,
-0.018310546875,
-0.01137542724609375,
0.0069427490234375,
-0.043670654296875,
-0.050689697265625,
-0.0051422119140625,
-0.0182647705078125,
0.00803375244140625,
-0.00997161865234375,
0.0025081634521484375,
0.020263671875,
0.0513916015625,
-0.027679443359375,
0.0082244873046875,
0.0257568359375,
-0.00811004638671875,
-0.033203125,
-0.037322998046875,
0.00792694091796875,
0.070556640625,
-0.0325927734375,
0.0430908203125,
0.0168304443359375,
-0.004230499267578125,
-0.0051116943359375,
0.022979736328125,
0.036773681640625,
-0.003002166748046875,
-0.0192718505859375,
0.03643798828125,
-0.01026153564453125,
-0.007110595703125,
-0.01485443115234375,
-0.0002315044403076172,
-0.0499267578125,
-0.035552978515625,
-0.032318115234375,
-0.07183837890625,
0.01025390625,
-0.049072265625,
-0.07958984375,
0.09649658203125,
0.043121337890625,
0.0413818359375,
0.029266357421875,
0.0220947265625,
-0.062164306640625,
-0.01416015625,
-0.0079345703125,
0.043304443359375,
-0.018585205078125,
0.0081329345703125,
-0.0170135498046875,
0.0168304443359375,
0.0095062255859375,
0.033843994140625,
-0.003208160400390625,
-0.00948333740234375,
0.01470947265625,
0.01378631591796875,
0.032562255859375,
0.0133056640625,
-0.02093505859375,
0.01507568359375,
-0.0218658447265625,
0.002979278564453125,
-0.01296234130859375,
-0.0672607421875,
-0.00431060791015625,
-0.01139068603515625,
-0.004901885986328125,
0.01297760009765625,
0.017913818359375,
0.0247955322265625,
-0.0002739429473876953,
0.005413055419921875,
-0.0306549072265625,
-0.01049041748046875,
0.02166748046875,
-0.002166748046875,
-0.010833740234375,
0.004833221435546875,
-0.0096435546875,
-0.03338623046875,
-0.0269622802734375,
-0.0190582275390625,
0.0300140380859375,
0.02337646484375,
0.040740966796875,
0.056976318359375,
0.033355712890625,
0.05535888671875,
-0.0231170654296875,
0.0095672607421875,
-0.007389068603515625,
-0.03173828125,
0.0008273124694824219,
0.0233917236328125,
0.0169219970703125,
0.022125244140625,
0.04345703125,
0.03253173828125,
-0.00856781005859375,
-0.0255279541015625,
-0.01270294189453125,
0.0301361083984375,
0.03289794921875,
-0.0286102294921875,
-0.0217742919921875,
-0.0169525146484375,
-0.08428955078125,
-0.003917694091796875,
-0.00513458251953125,
-0.027984619140625,
0.0208740234375,
0.03076171875,
0.0008130073547363281,
0.007244110107421875,
-0.01087188720703125,
-0.034393310546875,
-0.05706787109375,
0.041351318359375,
0.030059814453125,
0.038330078125,
-0.017822265625,
0.06976318359375,
-0.00299835205078125,
-0.01343536376953125,
0.010498046875,
0.00098419189453125,
0.02557373046875,
-0.0183563232421875,
0.00394439697265625,
-0.0157470703125,
0.031951904296875,
0.00492095947265625,
0.015380859375,
-0.009521484375,
0.034942626953125,
0.0230255126953125,
-0.0178985595703125,
-0.0000553131103515625,
0.043853759765625,
-0.00725555419921875,
-0.0023365020751953125,
-0.009857177734375,
-0.0293731689453125,
-0.006298065185546875,
-0.0196533203125,
0.01229095458984375,
0.050689697265625,
-0.0226593017578125,
0.040283203125,
0.033935546875,
0.00212860107421875,
0.0266265869140625,
0.0008435249328613281,
0.0005698204040527344,
-0.01523590087890625,
0.05908203125,
-0.040191650390625,
0.00508880615234375,
-0.0121002197265625,
-0.048858642578125,
0.007785797119140625,
0.0360107421875,
-0.0101318359375,
0.0277557373046875,
0.0011806488037109375,
-0.014984130859375,
0.01239776611328125,
-0.003337860107421875,
-0.00894927978515625,
-0.04705810546875,
0.0154876708984375,
-0.0240936279296875,
-0.0143890380859375,
-0.0201263427734375,
0.005855560302734375,
0.04071044921875,
-0.004047393798828125,
0.0263671875,
-0.006191253662109375,
0.019256591796875,
0.007568359375,
-0.01464080810546875,
-0.0017766952514648438,
-0.0027523040771484375,
-0.0211181640625,
-0.0055389404296875,
0.0172119140625,
-0.005237579345703125,
-0.03692626953125,
0.0096893310546875,
0.0169525146484375,
-0.01552581787109375,
0.03515625,
-0.0479736328125,
0.019775390625,
-0.0224151611328125,
0.033843994140625,
-0.00748443603515625,
-0.01332855224609375,
-0.048553466796875,
-0.02764892578125,
0.049835205078125,
0.05816650390625,
0.0328369140625,
0.00917816162109375,
0.033843994140625,
-0.00783538818359375,
0.020538330078125,
0.0140838623046875,
0.06256103515625,
0.032318115234375,
-0.04608154296875,
-0.0062255859375,
0.0101318359375,
-0.0296783447265625,
0.00024378299713134766,
0.008880615234375,
0.01561737060546875,
0.0036525726318359375,
-0.06427001953125,
-0.05853271484375,
-0.0024871826171875,
0.039794921875,
0.0182342529296875,
0.0173797607421875,
-0.0311126708984375,
-0.005657196044921875,
-0.0311279296875,
0.006725311279296875,
-0.0024547576904296875,
-0.0511474609375,
-0.01873779296875,
-0.0203704833984375,
-0.0321044921875,
-0.026458740234375,
0.042724609375,
-0.01548004150390625,
0.0352783203125,
0.0199737548828125,
-0.0697021484375,
0.03277587890625,
-0.00689697265625,
-0.00786590576171875,
0.01245880126953125,
0.01416015625,
-0.00852203369140625,
-0.00757598876953125,
-0.044403076171875,
-0.0750732421875,
-0.069580078125,
0.0771484375,
-0.06646728515625,
-0.01461029052734375,
0.020843505859375,
0.0094757080078125,
-0.0758056640625,
0.0041961669921875,
-0.01180267333984375,
0.034423828125,
-0.0220184326171875,
-0.0074462890625,
0.035797119140625,
0.0233001708984375,
-0.01442718505859375,
-0.07257080078125,
-0.019500732421875,
-0.037322998046875,
0.0609130859375,
-0.005096435546875,
-0.00949859619140625,
-0.0167388916015625,
-0.039703369140625,
-0.053955078125,
0.031402587890625,
-0.004901885986328125,
-0.034393310546875,
-0.0304107666015625,
0.0010223388671875,
0.003963470458984375,
0.0207672119140625,
-0.003299713134765625,
-0.019073486328125,
-0.046600341796875,
-0.0120391845703125,
-0.01019287109375,
0.0877685546875,
-0.0247955322265625,
0.0097808837890625,
-0.0132598876953125,
0.0200958251953125,
-0.004337310791015625,
0.00791168212890625,
-0.0182342529296875,
-0.008758544921875,
0.025726318359375,
0.061309814453125,
-0.0019502639770507812,
-0.01239776611328125,
0.007175445556640625,
-0.06390380859375,
-0.01221466064453125,
0.008880615234375,
-0.0285491943359375,
0.0084228515625,
0.06591796875,
0.046844482421875,
0.0071563720703125,
-0.054473876953125,
-0.0145416259765625,
0.017333984375,
0.0282745361328125,
0.002712249755859375,
0.0178985595703125,
-0.06378173828125,
-0.037384033203125,
0.033843994140625,
-0.007720947265625,
0.01019287109375,
-0.020538330078125,
-0.0180206298828125,
-0.01776123046875,
-0.037506103515625,
-0.03558349609375,
-0.007732391357421875,
-0.041351318359375,
0.0828857421875,
-0.049591064453125,
-0.0282135009765625,
0.0019063949584960938,
0.03515625,
0.01104736328125,
-0.05224609375,
-0.055908203125,
-0.0230712890625,
0.04779052734375,
0.00702667236328125,
0.01380157470703125,
-0.0139007568359375,
0.038543701171875,
0.03369140625,
-0.01140594482421875,
-0.0232086181640625,
0.0135498046875,
-0.0072021484375,
0.00894927978515625,
-0.026153564453125,
-0.0029354095458984375,
-0.039794921875,
-0.0302581787109375,
-0.026123046875,
-0.031890869140625,
0.0242462158203125,
-0.01611328125,
0.00853729248046875,
0.04998779296875,
-0.0240936279296875,
0.01232147216796875,
-0.0180511474609375,
-0.043426513671875,
0.002300262451171875,
-0.0309600830078125,
-0.036285400390625,
-0.02667236328125,
-0.01169586181640625
]
|
59050e43fa666163e6a77fee2b95fdca2f838fec | Wordpress Stackexchange
Q: Does blocking xmlrpc.php affect pinging update services like pingomatic Because there are a lot of attacks lately on xmlrpc.php, I want to block access to this file or disable it.
I am aware some remote updating functions won't work (like the mobile app) but that doesn't matter in my case.
However, I want to be sure the updating services (like pinging Pingomatic) are not affected by this. Can anyone confirm me the pinging will be successful without xmlrpc.php being reachable? I don't want the automatic pinging after new posts to be affected with this change.
A: As far as I remember pings are outgoing, they don't need your site to accept incoming XML–RPC requests.
The call might not be even coming from your site at all. For example http://pingomatic.com/ site allows you to perform pings for arbitrary URLs.
| Q: Does blocking xmlrpc.php affect pinging update services like pingomatic Because there are a lot of attacks lately on xmlrpc.php, I want to block access to this file or disable it.
I am aware some remote updating functions won't work (like the mobile app) but that doesn't matter in my case.
However, I want to be sure the updating services (like pinging Pingomatic) are not affected by this. Can anyone confirm me the pinging will be successful without xmlrpc.php being reachable? I don't want the automatic pinging after new posts to be affected with this change.
A: As far as I remember pings are outgoing, they don't need your site to accept incoming XML–RPC requests.
The call might not be even coming from your site at all. For example http://pingomatic.com/ site allows you to perform pings for arbitrary URLs.
A: The XML-RPC is a common way for hackers to exploit your website. It does more damage than good unless you implement strict security. To disable the XML-RPC, add the following into your functions.php:
add_filter( 'xmlrpc_enabled', '__return_false' );
add_filter( 'xmlrpc_methods', 'wpse_236551_xmlrpc_methods' );
function wpse_236551_xmlrpc_methods( $methods ) { // Disable XML-RPC methods
unset( $methods['pingback.ping'] );
return $methods;
}
| wordpress | {
"language": "en",
"length": 196,
"provenance": "stackexchange_00019.jsonl.gz:465095",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/225258"
} | [
0.07379150390625,
-0.009124755859375,
0.047637939453125,
-0.0265960693359375,
0.0118560791015625,
-0.0047760009765625,
0.04864501953125,
-0.01593017578125,
-0.02069091796875,
0.0191497802734375,
-0.0096435546875,
-0.0059661865234375,
0.00505828857421875,
-0.015472412109375,
0.0002617835998535156,
-0.031494140625,
0.0233917236328125,
0.0174102783203125,
0.0217437744140625,
-0.0257568359375,
0.01479339599609375,
-0.009490966796875,
0.0171966552734375,
0.0623779296875,
-0.0208892822265625,
-0.0212554931640625,
0.08282470703125,
-0.032501220703125,
-0.00197601318359375,
-0.03179931640625,
-0.0008559226989746094,
0.005603790283203125,
0.020416259765625,
0.045806884765625,
-0.0772705078125,
-0.047943115234375,
-0.0247802734375,
0.0263214111328125,
-0.0413818359375,
0.0474853515625,
0.00066375732421875,
-0.0073394775390625,
0.006626129150390625,
-0.004283905029296875,
-0.0140533447265625,
0.004360198974609375,
-0.023406982421875,
-0.034515380859375,
0.033782958984375,
0.04498291015625,
-0.018768310546875,
0.014739990234375,
-0.037078857421875,
0.058563232421875,
0.0178680419921875,
0.0106658935546875,
-0.066650390625,
0.01666259765625,
0.0126190185546875,
0.0171356201171875,
0.0302581787109375,
-0.0047760009765625,
0.0038852691650390625,
-0.002529144287109375,
0.025115966796875,
0.000957489013671875,
0.057647705078125,
0.04150390625,
-0.0635986328125,
-0.01145172119140625,
0.0161895751953125,
-0.030487060546875,
-0.00859832763671875,
-0.0019931793212890625,
-0.007694244384765625,
0.00868988037109375,
0.0264739990234375,
-0.006771087646484375,
0.00830841064453125,
0.016693115234375,
0.02130126953125,
-0.01393890380859375,
0.015777587890625,
-0.0200958251953125,
-0.0035228729248046875,
-0.01134490966796875,
-0.005382537841796875,
-0.003429412841796875,
0.0016889572143554688,
-0.032073974609375,
-0.007724761962890625,
-0.01279449462890625,
-0.06787109375,
0.054595947265625,
0.0178680419921875,
-0.022796630859375,
-0.027587890625,
0.0013475418090820312,
-0.0305633544921875,
-0.01551055908203125,
0.044647216796875,
-0.024658203125,
-0.01493072509765625,
-0.002918243408203125,
-0.01580810546875,
0.03179931640625,
0.0302734375,
0.0232086181640625,
0.0020160675048828125,
-0.0106658935546875,
-0.01398468017578125,
0.025238037109375,
-0.0021381378173828125,
0.01267242431640625,
-0.0379638671875,
-0.019775390625,
-0.0584716796875,
0.0107269287109375,
-0.00775909423828125,
0.021453857421875,
-0.024444580078125,
-0.002040863037109375,
0.02337646484375,
-0.029998779296875,
0.04339599609375,
0.0034427642822265625,
-0.039764404296875,
0.0153045654296875,
-0.033905029296875,
0.06634521484375,
-0.01514434814453125,
-0.040130615234375,
0.016143798828125,
0.048919677734375,
0.006053924560546875,
-0.04132080078125,
-0.009490966796875,
-0.0205230712890625,
-0.004230499267578125,
0.004924774169921875,
0.07696533203125,
-0.050537109375,
-0.05303955078125,
0.0760498046875,
0.00396728515625,
-0.033660888671875,
0.0235443115234375,
0.048095703125,
0.005084991455078125,
0.02264404296875,
-0.004238128662109375,
0.02825927734375,
0.0333251953125,
-0.011322021484375,
0.037322998046875,
-0.03289794921875,
0.049530029296875,
-0.032318115234375,
-0.03216552734375,
-0.021331787109375,
0.0302734375,
-0.00351715087890625,
-0.015472412109375,
0.0028133392333984375,
-0.02044677734375,
-0.00794219970703125,
-0.0255889892578125,
0.00092315673828125,
0.0260009765625,
0.041900634765625,
-0.03472900390625,
0.040191650390625,
0.038665771484375,
0.034423828125,
0.005496978759765625,
-0.00772857666015625,
-0.031890869140625,
-0.0093536376953125,
0.0643310546875,
-0.06695556640625,
-0.057098388671875,
-0.033538818359375,
0.0894775390625,
-0.01451873779296875,
-0.07183837890625,
0.0408935546875,
0.015777587890625,
0.056121826171875,
0.01108551025390625,
0.00015223026275634766,
0.057708740234375,
0.0291900634765625,
-0.0097503662109375,
0.033203125,
0.005405426025390625,
-0.033721923828125,
-0.01187896728515625,
0.0002734661102294922,
-0.0030956268310546875,
-0.026947021484375,
-0.0282135009765625,
0.0235595703125,
-0.0439453125,
0.0372314453125,
-0.052337646484375,
-0.0341796875,
-0.00934600830078125,
0.021514892578125,
0.006404876708984375,
0.0207366943359375,
-0.00823211669921875,
-0.018951416015625,
0.0096435546875,
-0.035369873046875,
0.0024890899658203125,
0.026336669921875,
-0.0582275390625,
0.044189453125,
-0.01477813720703125,
0.044158935546875,
0.00830841064453125,
-0.039886474609375,
0.00897979736328125,
-0.03961181640625,
-0.03692626953125,
0.022308349609375,
-0.0200958251953125,
0.00870513916015625,
0.0036144256591796875,
-0.001617431640625,
0.08428955078125,
0.0139923095703125,
0.027679443359375,
0.039337158203125,
0.0034923553466796875,
-0.008880615234375,
0.0030517578125,
-0.11297607421875,
0.01140594482421875,
0.06243896484375,
0.0157318115234375,
-0.01438140869140625,
-0.0251007080078125,
0.0030689239501953125,
-0.00408172607421875,
-0.0684814453125,
-0.01552581787109375,
0.0113677978515625,
0.00156402587890625,
0.006122589111328125,
0.038604736328125,
-0.02374267578125,
0.045654296875,
-0.0164794921875,
0.006572723388671875,
0.026458740234375,
0.0084991455078125,
-0.01030731201171875,
0.001354217529296875,
0.0169830322265625,
-0.0136260986328125,
0.0323486328125,
-0.0007696151733398438,
0.0208740234375,
0.017242431640625,
-0.022705078125,
0.01959228515625,
0.02655029296875,
-0.004848480224609375,
-0.034912109375,
0.0138397216796875,
0.007221221923828125,
0.01409912109375,
-0.00665283203125,
-0.0269622802734375,
0.0285186767578125,
-0.023590087890625,
0.01096343994140625,
0.0352783203125,
-0.01058197021484375,
-0.02734375,
-0.01312255859375,
-0.0013322830200195312,
-0.00727081298828125,
-0.010162353515625,
-0.033172607421875,
0.023468017578125,
-0.024505615234375,
-0.040771484375,
-0.0228118896484375,
0.0026760101318359375,
0.044525146484375,
-0.004669189453125,
0.016693115234375,
0.00856781005859375,
0.0003948211669921875,
-0.01129913330078125,
-0.044769287109375,
0.034027099609375,
-0.02618408203125,
0.01079559326171875,
0.06707763671875,
0.0224609375,
-0.01398468017578125,
0.006999969482421875,
-0.0007143020629882812,
0.034576416015625,
-0.021392822265625,
-0.033355712890625,
0.01479339599609375,
-0.0826416015625,
-0.00722503662109375,
0.0200042724609375,
-0.04852294921875,
0.0288543701171875,
-0.023681640625,
0.0016984939575195312,
-0.002338409423828125,
-0.0770263671875,
-0.0189666748046875,
0.0147247314453125,
-0.0021724700927734375,
0.003673553466796875,
0.0107574462890625,
-0.005558013916015625,
-0.031951904296875,
0.0159149169921875,
-0.0007548332214355469,
-0.05126953125,
-0.01495361328125,
-0.0633544921875,
-0.08111572265625,
-0.050079345703125,
0.01837158203125,
-0.0099945068359375,
0.0185089111328125,
0.002582550048828125,
0.09979248046875,
-0.005889892578125,
-0.1280517578125,
-0.06451416015625,
0.0411376953125,
-0.0251007080078125,
0.0161590576171875,
-0.0219268798828125,
-0.0038280487060546875,
0.032806396484375,
-0.0014085769653320312,
0.011566162109375,
0.0160369873046875,
0.01055145263671875,
-0.0198211669921875,
0.0213165283203125,
0.01971435546875,
0.0259857177734375,
-0.008148193359375,
-0.014739990234375,
0.00799560546875,
-0.0238037109375,
-0.049346923828125,
-0.00945281982421875,
-0.0101776123046875,
-0.030517578125,
0.0257415771484375,
0.007404327392578125,
0.001041412353515625,
-0.0012159347534179688,
0.0241546630859375,
0.0185394287109375,
-0.00783538818359375,
0.007373809814453125,
-0.01776123046875,
0.020294189453125,
-0.00730133056640625,
0.016510009765625,
-0.0160980224609375,
-0.0229034423828125,
-0.03533935546875,
0.056304931640625,
-0.01995849609375,
-0.0214385986328125,
-0.053131103515625,
0.041229248046875,
-0.06817626953125,
0.02752685546875,
0.01250457763671875,
-0.028045654296875,
-0.0102386474609375,
0.00039768218994140625,
-0.0011539459228515625,
-0.0269317626953125,
0.0075531005859375,
0.0214385986328125,
-0.02783203125,
-0.0011148452758789062,
0.01161956787109375,
-0.057830810546875,
-0.02801513671875,
-0.0007848739624023438,
0.007598876953125,
0.0499267578125,
-0.0236358642578125,
-0.0238494873046875,
0.0150604248046875,
-0.004913330078125,
-0.057891845703125,
0.030242919921875,
-0.0119476318359375,
0.0208892822265625,
-0.0022907257080078125,
0.032989501953125,
-0.043609619140625,
0.029510498046875,
-0.040863037109375,
0.01004791259765625,
-0.032470703125,
-0.04541015625,
-0.01165771484375,
0.0211029052734375,
0.0187530517578125,
0.0024623870849609375,
-0.0679931640625,
-0.04876708984375,
0.002288818359375,
-0.0213623046875,
-0.06451416015625,
-0.01053619384765625,
-0.004383087158203125,
-0.0360107421875,
0.09185791015625,
-0.010467529296875,
0.035400390625,
0.007495880126953125,
0.041595458984375,
-0.019683837890625,
0.04217529296875,
-0.0164947509765625,
-0.048614501953125,
0.0235595703125,
-0.048126220703125,
0.00061798095703125,
-0.02764892578125,
-0.037750244140625,
0.047393798828125,
-0.01776123046875,
0.01099395751953125,
-0.061370849609375,
-0.04168701171875,
-0.0091552734375,
-0.01076507568359375,
-0.03607177734375,
0.00885009765625,
0.024139404296875,
0.017822265625,
-0.0096435546875,
-0.0129547119140625,
0.012939453125,
0.00986480712890625,
0.013397216796875,
0.057830810546875,
0.004817962646484375,
0.0171966552734375,
0.03192138671875,
-0.003391265869140625,
0.0148773193359375,
0.026031494140625,
-0.00420379638671875,
0.02435302734375,
-0.00725555419921875,
-0.007434844970703125,
0.03076171875,
-0.030029296875,
0.01186370849609375,
-0.0241851806640625,
-0.00978851318359375,
-0.002864837646484375,
0.034027099609375,
-0.040618896484375,
0.06884765625,
-0.01654052734375,
-0.04541015625,
0.0269622802734375,
-0.032684326171875,
-0.0279083251953125,
0.007579803466796875,
-0.006229400634765625,
-0.01216888427734375,
-0.042724609375,
0.037322998046875,
-0.02716064453125,
0.0015926361083984375,
-0.0196075439453125,
0.064453125,
-0.032562255859375,
0.0222320556640625,
-0.017242431640625,
-0.00136566162109375,
0.0184478759765625,
-0.019134521484375,
-0.0626220703125,
0.0181884765625,
-0.01500701904296875,
-0.05169677734375,
0.051177978515625,
0.022125244140625,
0.005245208740234375,
0.0217132568359375,
-0.00824737548828125,
0.004192352294921875,
0.0266265869140625,
0.0240631103515625,
-0.0124664306640625,
0.0169830322265625,
0.045806884765625,
-0.040374755859375,
0.0014543533325195312,
-0.01364898681640625,
0.015625,
-0.03118896484375,
-0.01160430908203125,
0.0152130126953125,
0.0352783203125,
0.0105743408203125,
0.010009765625,
0.02081298828125,
-0.026214599609375,
0.01238250732421875,
0.01013946533203125,
-0.021026611328125,
0.0012865066528320312,
0.02154541015625,
0.005352020263671875,
-0.0100860595703125,
-0.02972412109375,
0.0233306884765625,
0.00754547119140625,
-0.014190673828125,
0.06890869140625,
0.039794921875,
-0.0111236572265625,
-0.069091796875,
-0.0306549072265625,
0.08563232421875,
0.007526397705078125,
0.002140045166015625,
-0.0033130645751953125,
-0.0188140869140625,
-0.00994873046875,
0.0166168212890625,
-0.0285491943359375,
-0.0235443115234375,
-0.003528594970703125,
-0.00731658935546875,
-0.052825927734375,
-0.045318603515625,
0.0276641845703125,
0.028961181640625,
-0.0182342529296875,
-0.0008397102355957031,
0.01549530029296875,
-0.024871826171875,
0.01032257080078125,
-0.0408935546875,
0.03106689453125,
-0.06573486328125,
0.01544189453125,
0.023956298828125,
0.0115203857421875,
-0.054595947265625,
-0.0014410018920898438,
-0.033782958984375,
-0.017669677734375,
-0.0085906982421875,
-0.018829345703125,
-0.0362548828125,
-0.012664794921875,
0.004283905029296875,
0.0249481201171875,
-0.0282135009765625,
-0.01837158203125,
-0.0184173583984375,
0.01953125,
0.01003265380859375,
0.032562255859375,
-0.0294036865234375,
0.06561279296875,
-0.033660888671875,
0.0195770263671875,
-0.018463134765625,
0.044891357421875,
0.0099029541015625,
-0.010040283203125,
0.024993896484375,
-0.0845947265625,
-0.034637451171875,
0.01116180419921875,
-0.025390625,
-0.0099334716796875,
-0.06292724609375,
-0.0147857666015625,
0.01480865478515625,
-0.042938232421875,
0.0147857666015625,
-0.0164031982421875,
0.007801055908203125,
-0.0645751953125,
-0.0269012451171875,
0.004856109619140625,
-0.0081634521484375,
-0.004638671875,
0.0204010009765625,
-0.0177459716796875,
0.02459716796875,
0.0156402587890625,
0.0181884765625,
-0.0020923614501953125,
0.055999755859375,
0.01041412353515625,
0.0297393798828125,
-0.0416259765625,
0.022186279296875,
0.043701171875,
0.00148773193359375,
-0.0037288665771484375,
-0.01081085205078125,
-0.0082244873046875,
0.033294677734375,
-0.0106048583984375,
-0.024749755859375,
0.005252838134765625,
-0.01971435546875,
-0.0217437744140625,
-0.0005335807800292969,
0.0318603515625,
0.0357666015625,
-0.01131439208984375,
-0.0240936279296875,
0.00943756103515625,
-0.022064208984375,
0.0035381317138671875,
0.053375244140625,
-0.051849365234375,
-0.09759521484375,
0.02215576171875,
-0.0650634765625,
0.027984619140625,
0.0144500732421875,
-0.0162353515625,
-0.0046234130859375,
-0.0007309913635253906,
0.041259765625,
0.033111572265625,
-0.0034427642822265625,
0.04718017578125,
-0.0294647216796875,
0.07135009765625,
-0.021331787109375,
0.007396697998046875,
-0.012969970703125,
-0.0225830078125,
-0.06683349609375,
-0.0085906982421875,
0.0146026611328125,
-0.0153961181640625,
0.038360595703125,
0.0008268356323242188,
0.008056640625,
0.0462646484375,
-0.0123138427734375,
0.021697998046875,
0.0191192626953125,
-0.00213623046875,
0.017059326171875,
-0.0396728515625,
-0.01617431640625,
0.06298828125,
-0.0021839141845703125,
0.01285552978515625,
0.0350341796875,
-0.0094146728515625,
0.016754150390625,
0.00850677490234375,
0.033599853515625,
-0.0004241466522216797,
-0.0291748046875,
0.0307464599609375,
-0.0016736984252929688,
-0.006320953369140625,
-0.0153656005859375,
0.0272979736328125,
-0.036102294921875,
-0.0138397216796875,
-0.020721435546875,
-0.0299224853515625,
0.004962921142578125,
-0.036346435546875,
-0.0216217041015625,
0.0927734375,
-0.0169219970703125,
0.004009246826171875,
0.0017871856689453125,
0.03509521484375,
0.002735137939453125,
0.038604736328125,
-0.04052734375,
0.0187835693359375,
0.0131988525390625,
-0.0005426406860351562,
-0.04425048828125,
-0.00783538818359375,
-0.038665771484375,
0.0157012939453125,
0.0211181640625,
0.005859375,
-0.02783203125,
0.025299072265625,
0.064208984375,
-0.012664794921875,
-0.0161895751953125,
0.056732177734375,
-0.020050048828125,
-0.0175933837890625,
-0.04876708984375,
-0.05517578125,
-0.0196533203125,
-0.0423583984375,
-0.023040771484375,
0.00015342235565185547,
0.0234527587890625,
0.030853271484375,
-0.0270233154296875,
0.029052734375,
-0.005924224853515625,
-0.0148468017578125,
0.02166748046875,
-0.0025424957275390625,
-0.0009608268737792969,
-0.0118255615234375,
-0.06982421875,
0.04913330078125,
0.01751708984375,
-0.0010938644409179688,
-0.007720947265625,
-0.024658203125,
0.008148193359375,
0.01739501953125,
0.0056610107421875,
-0.0219268798828125,
-0.029144287109375,
-0.0127410888671875,
-0.01123046875,
-0.014984130859375,
0.012451171875,
0.0030078887939453125,
0.03729248046875,
-0.01102447509765625,
-0.021636962890625,
0.0164337158203125,
0.01666259765625,
-0.0019073486328125,
0.000820159912109375,
0.0220947265625,
0.0251007080078125,
0.0175323486328125,
-0.0289306640625,
0.055145263671875,
-0.051055908203125,
-0.052947998046875,
-0.0304718017578125,
0.0170745849609375,
0.037017822265625,
0.01045989990234375,
0.00608062744140625,
0.0040130615234375,
-0.05584716796875,
0.00516510009765625,
0.0228271484375,
-0.0391845703125,
-0.0204315185546875,
0.0166015625,
0.0125885009765625,
0.017730712890625,
-0.042510986328125,
0.0006222724914550781,
0.03314208984375,
0.01145172119140625,
-0.000020205974578857422,
-0.035186767578125,
-0.02423095703125,
-0.04583740234375,
-0.001026153564453125,
0.033050537109375,
0.005107879638671875,
0.02154541015625,
0.042633056640625,
0.01318359375,
-0.030548095703125,
-0.00432586669921875,
0.0406494140625,
-0.0157623291015625,
-0.022552490234375,
-0.035064697265625,
-0.0237274169921875,
0.0276031494140625,
-0.0052337646484375,
0.03302001953125,
-0.0231475830078125,
0.047515869140625,
-0.0206146240234375,
0.043243408203125,
-0.006580352783203125,
-0.0003714561462402344,
0.01436614990234375,
-0.016632080078125,
0.0020275115966796875,
-0.0137176513671875,
-0.035552978515625,
0.015838623046875,
-0.0445556640625,
0.00901031494140625,
-0.0258331298828125,
-0.002735137939453125,
-0.01641845703125,
0.052764892578125,
0.00018131732940673828,
0.023590087890625,
-0.039459228515625,
-0.0243377685546875,
0.031280517578125,
0.0140380859375,
0.0143890380859375,
0.04345703125,
0.02093505859375,
0.006603240966796875,
0.0208587646484375,
0.0232391357421875,
-0.03619384765625,
0.1287841796875,
-0.050262451171875,
-0.01126861572265625,
0.00710296630859375,
-0.03668212890625,
0.029754638671875,
0.00711822509765625,
-0.00856781005859375,
0.0036144256591796875,
-0.0043487548828125,
-0.01210784912109375,
-0.041748046875,
0.040313720703125,
0.020416259765625,
-0.0145721435546875,
0.036773681640625,
-0.0084075927734375,
-0.00962066650390625,
-0.00897979736328125,
0.0546875,
-0.017578125,
-0.034210205078125,
-0.044464111328125,
-0.03509521484375,
0.0399169921875,
0.035491943359375,
-0.0087890625,
0.07904052734375,
-0.044952392578125,
0.052337646484375,
-0.0116424560546875,
-0.021392822265625,
-0.0609130859375,
-0.00003933906555175781,
-0.03387451171875,
0.020660400390625,
0.0011491775512695312,
-0.0221405029296875,
0.0187835693359375,
-0.00484466552734375,
0.0177154541015625,
-0.0155181884765625,
0.008209228515625,
0.0168609619140625,
-0.0341796875,
-0.0163421630859375,
-0.04705810546875,
-0.048858642578125,
0.0028514862060546875,
0.011871337890625,
0.007190704345703125,
0.01401519775390625,
-0.0035266876220703125,
-0.01538848876953125,
-0.0301361083984375,
-0.007221221923828125,
-0.0038928985595703125,
-0.05059814453125,
0.01505279541015625,
0.0074005126953125,
0.03692626953125,
0.0035572052001953125,
-0.019439697265625,
0.029937744140625,
-0.038665771484375,
0.015869140625,
0.0196380615234375,
0.034271240234375,
-0.04937744140625,
-0.0102996826171875,
-0.007476806640625,
-0.0672607421875,
-0.058746337890625,
0.08294677734375,
-0.04052734375,
-0.0177001953125,
0.02166748046875,
-0.011962890625,
-0.017181396484375,
-0.08013916015625,
-0.01094818115234375,
-0.0222320556640625,
-0.025421142578125,
-0.0450439453125,
0.00630950927734375,
-0.0214996337890625,
0.0291290283203125,
0.00878143310546875,
-0.0144195556640625,
-0.0268707275390625,
-0.007472991943359375,
-0.0760498046875,
0.037628173828125,
0.0275726318359375,
-0.035186767578125,
-0.062225341796875,
0.005519866943359375,
-0.0229339599609375,
-0.01346588134765625,
-0.06390380859375,
-0.00797271728515625,
0.017120361328125,
-0.0082244873046875,
-0.040740966796875,
-0.01611328125,
-0.052337646484375,
0.039886474609375,
0.0231475830078125,
-0.0081787109375,
0.01503753662109375,
-0.0082855224609375,
0.0118408203125,
0.05731201171875,
0.0743408203125,
0.006137847900390625,
-0.06671142578125,
0.005161285400390625,
0.0282440185546875,
0.01239776611328125,
-0.0012559890747070312,
0.043853759765625,
0.0703125,
0.033538818359375,
-0.0330810546875,
-0.01287841796875,
-0.043121337890625,
0.0002911090850830078,
0.07781982421875,
0.1083984375,
0.035675048828125,
-0.058258056640625,
0.01247406005859375,
-0.016632080078125,
-0.0017070770263671875,
-0.01227569580078125,
0.01007843017578125,
-0.05108642578125,
-0.01544952392578125,
0.013092041015625,
0.004589080810546875,
-0.0131683349609375,
-0.0037250518798828125,
-0.015655517578125,
-0.024322509765625,
-0.0019197463989257812,
-0.0239105224609375,
-0.0112762451171875,
-0.051055908203125,
0.004734039306640625,
0.007476806640625,
0.035614013671875,
-0.050537109375,
0.057037353515625,
0.02001953125,
-0.008697509765625,
-0.022369384765625,
0.037017822265625,
-0.00516510009765625,
0.0125732421875,
0.01446533203125,
0.01253509521484375,
-0.0005908012390136719,
0.017364501953125,
-0.0345458984375,
-0.015625,
0.0240325927734375,
-0.02398681640625,
-0.0634765625,
-0.01531219482421875,
0.007099151611328125,
0.0193939208984375,
-0.0172576904296875,
-0.01149749755859375,
-0.021392822265625,
0.01070404052734375,
-0.00272369384765625,
0.005519866943359375,
0.054229736328125,
-0.0139007568359375,
0.01418304443359375,
-0.0015230178833007812,
0.01224517822265625,
-0.031707763671875,
0.0268096923828125,
-0.057037353515625,
-0.027252197265625,
0.0244293212890625
]
|
a5ea4838493fb7947598188244c45479c691700e | Wordpress Stackexchange
Q: Users are redirected to homepage instead of wp-admin After migrating my wordpress site users who are not Admins are redirected to the site's homepage after login. On the old site they were redirected on wp-admin. The Administrator is redirected to wp_admin as it should.
I want the users to be redirected to wp-admin after login.
I changed siteurl from the database (wp_options), also added this filter in my functions.php:
function my_login_redirect( $redirect_to, $request, $user ) {
return admin_url();
}
add_filter( 'login_redirect', 'my_login_redirect', 10, 3 );
Any help please?
Thank you and Happy Easter!
A: Yeeey, I figured it out! Actually my theme had a redirect like this one in functions.php:
// Block Access to /wp-admin for non admins.
function custom_blockusers_init() {
if ( is_user_logged_in() && is_admin() && !current_user_can( 'administrator' ) ) {
wp_redirect( home_url() );
exit;
}
}
add_action( 'init', 'custom_blockusers_init' ); // Hook into 'init'
All you have to do is add your own role capability, for example: !current_user_can( 'manage-reports' )
This helped me a lot.
| Q: Users are redirected to homepage instead of wp-admin After migrating my wordpress site users who are not Admins are redirected to the site's homepage after login. On the old site they were redirected on wp-admin. The Administrator is redirected to wp_admin as it should.
I want the users to be redirected to wp-admin after login.
I changed siteurl from the database (wp_options), also added this filter in my functions.php:
function my_login_redirect( $redirect_to, $request, $user ) {
return admin_url();
}
add_filter( 'login_redirect', 'my_login_redirect', 10, 3 );
Any help please?
Thank you and Happy Easter!
A: Yeeey, I figured it out! Actually my theme had a redirect like this one in functions.php:
// Block Access to /wp-admin for non admins.
function custom_blockusers_init() {
if ( is_user_logged_in() && is_admin() && !current_user_can( 'administrator' ) ) {
wp_redirect( home_url() );
exit;
}
}
add_action( 'init', 'custom_blockusers_init' ); // Hook into 'init'
All you have to do is add your own role capability, for example: !current_user_can( 'manage-reports' )
This helped me a lot.
A: @Hello Lili is right. But, we should check DOING_AJAX also!
// Block Access to /wp-admin for non admins.
function custom_blockusers_init() {
if ( is_user_logged_in() && is_admin() && !current_user_can( 'administrator' ) && (defined( 'DOING_AJAX' ) && !DOING_AJAX) ) ) {
wp_redirect( home_url() );
exit;
}
}
add_action( 'init', 'custom_blockusers_init' ); // Hook into 'init'
A: The below code is working like expected. This code restricts non admin users to access wp-admin or profile page.
add_action( 'admin_init', 'redirect_non_admin_users' );
/**
* Redirect non-admin users to home page
*
* This function is attached to the 'admin_init' action hook.
*/
function redirect_non_admin_users() {
if ( ! current_user_can( 'manage_options' ) && '/wp-admin/admin-ajax.php' != $_SERVER['PHP_SELF'] ) {
wp_redirect( home_url() );
exit;
}
}
A: LAST RESORT THAT WORKS
You can temporarily disable redirection from the wp-login.php file and then delete all newly installed or updated plugins.
*
*Disable redirection by opening the file wp-login.php
2.Scroll down to the line where you have the code "do_action( "login_form_{$action}" );"
Mine was around line 461
*Comment out that line of code to disable redirection
*Save the file. You will now be able to login using http://www.example.com/wp-login.php
*Disable or delete all recently installed plugins especially plugins that manage access control functionalities
*Clear your cookies and cache
| wordpress | {
"language": "en",
"length": 376,
"provenance": "stackexchange_00019.jsonl.gz:465106",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/225281"
} | [
0.0662841796875,
-0.00023365020751953125,
0.0103607177734375,
-0.0199127197265625,
0.0240325927734375,
-0.054351806640625,
0.059539794921875,
-0.036041259765625,
0.0030956268310546875,
0.032073974609375,
0.042022705078125,
-0.004024505615234375,
-0.0147705078125,
-0.045623779296875,
-0.00835418701171875,
0.004573822021484375,
0.0280914306640625,
-0.01436614990234375,
0.015869140625,
-0.01137542724609375,
0.00750732421875,
0.00868988037109375,
0.01052093505859375,
0.0188751220703125,
0.014404296875,
-0.03997802734375,
0.04937744140625,
-0.03826904296875,
0.01849365234375,
-0.0081024169921875,
0.012542724609375,
-0.0081634521484375,
0.0269622802734375,
0.00975799560546875,
-0.017303466796875,
-0.005817413330078125,
-0.01230621337890625,
0.005504608154296875,
-0.011749267578125,
0.01206207275390625,
0.0416259765625,
-0.020294189453125,
-0.0214996337890625,
0.029266357421875,
-0.0188751220703125,
-0.035491943359375,
0.048828125,
-0.004650115966796875,
0.01187896728515625,
-0.032379150390625,
-0.0034503936767578125,
0.0030345916748046875,
0.02044677734375,
-0.038177490234375,
-0.005023956298828125,
0.01299285888671875,
-0.0220947265625,
-0.002559661865234375,
0.041839599609375,
0.0186614990234375,
-0.0307464599609375,
-0.037567138671875,
0.0240631103515625,
-0.057525634765625,
-0.0018863677978515625,
0.0029430389404296875,
0.00933837890625,
0.02520751953125,
-0.060516357421875,
-0.027801513671875,
-0.0016994476318359375,
-0.0250701904296875,
-0.037139892578125,
0.01360321044921875,
-0.037506103515625,
0.006725311279296875,
0.018951416015625,
-0.006313323974609375,
0.003971099853515625,
0.0316162109375,
0.0009713172912597656,
-0.010284423828125,
0.0031280517578125,
-0.01983642578125,
0.01074981689453125,
0.0095977783203125,
-0.028900146484375,
-0.022064208984375,
-0.003932952880859375,
-0.01190948486328125,
-0.0088043212890625,
0.01212310791015625,
-0.01354217529296875,
-0.006816864013671875,
-0.0131378173828125,
-0.0268402099609375,
0.01971435546875,
0.03631591796875,
0.0086517333984375,
0.003765106201171875,
-0.036407470703125,
-0.0186767578125,
-0.026611328125,
-0.0166473388671875,
0.006465911865234375,
0.03863525390625,
-0.004489898681640625,
0.01114654541015625,
0.00449371337890625,
0.01702880859375,
0.0018033981323242188,
-0.0142669677734375,
-0.011138916015625,
-0.01540374755859375,
-0.033416748046875,
0.03289794921875,
-0.01427459716796875,
-0.036834716796875,
-0.0250701904296875,
0.005908966064453125,
-0.0181732177734375,
0.012664794921875,
0.01605224609375,
-0.0279541015625,
0.005718231201171875,
-0.0195159912109375,
0.0003218650817871094,
-0.036376953125,
-0.02081298828125,
0.0026798248291015625,
-0.0182037353515625,
0.03582763671875,
0.04412841796875,
0.008697509765625,
-0.00836181640625,
-0.0115814208984375,
0.061920166015625,
-0.0333251953125,
-0.01216888427734375,
0.017608642578125,
0.035491943359375,
-0.044036865234375,
-0.06451416015625,
-0.00168609619140625,
0.039276123046875,
0.044586181640625,
0.005016326904296875,
-0.0120697021484375,
-0.004573822021484375,
-0.05999755859375,
0.03375244140625,
-0.050506591796875,
0.0009984970092773438,
0.017242431640625,
0.03961181640625,
0.0259246826171875,
0.0284271240234375,
0.009918212890625,
-0.01438140869140625,
0.0136566162109375,
0.06707763671875,
0.01544189453125,
-0.01354217529296875,
-0.0050048828125,
-0.05072021484375,
-0.03179931640625,
-0.0430908203125,
-0.0241241455078125,
0.025604248046875,
0.025115966796875,
0.027587890625,
0.005298614501953125,
0.0095977783203125,
0.01494598388671875,
-0.0004425048828125,
-0.0085296630859375,
-0.0198516845703125,
0.03875732421875,
0.01153564453125,
0.03369140625,
0.0294189453125,
-0.00487518310546875,
0.036590576171875,
0.03057861328125,
-0.037506103515625,
0.0271148681640625,
-0.01163482666015625,
0.0263519287109375,
0.0081787109375,
0.003330230712890625,
-0.00855255126953125,
0.0295257568359375,
-0.047027587890625,
0.03631591796875,
-0.01287841796875,
-0.046905517578125,
0.0340576171875,
-0.01267242431640625,
0.01363372802734375,
0.01323699951171875,
0.041412353515625,
-0.006603240966796875,
0.004974365234375,
-0.021575927734375,
-0.033416748046875,
0.005100250244140625,
-0.01023101806640625,
0.0193328857421875,
0.04925537109375,
0.0222320556640625,
-0.023223876953125,
-0.007099151611328125,
0.0082244873046875,
-0.0287322998046875,
-0.04156494140625,
0.030792236328125,
-0.00467681884765625,
0.046844482421875,
0.0084991455078125,
0.02471923828125,
0.029052734375,
-0.0308837890625,
0.01318359375,
-0.0202178955078125,
0.0187530517578125,
-0.0273284912109375,
-0.0012607574462890625,
-0.016632080078125,
0.001190185546875,
0.0149993896484375,
-0.024688720703125,
0.0158233642578125,
0.03753662109375,
0.0007195472717285156,
-0.0718994140625,
0.004512786865234375,
-0.0313720703125,
-0.038970947265625,
-0.0153350830078125,
0.0609130859375,
0.0161895751953125,
0.021453857421875,
-0.025726318359375,
0.02239990234375,
0.0216064453125,
-0.057525634765625,
-0.0117950439453125,
0.0305938720703125,
0.006366729736328125,
0.0390625,
-0.02099609375,
0.0035953521728515625,
0.01519012451171875,
-0.04388427734375,
0.00695037841796875,
0.043426513671875,
-0.0236663818359375,
-0.0362548828125,
0.0023937225341796875,
-0.0153961181640625,
0.0110931396484375,
-0.07159423828125,
-0.0389404296875,
-0.0184478759765625,
-0.02801513671875,
-0.013214111328125,
-0.0285186767578125,
-0.034393310546875,
-0.042816162109375,
-0.025115966796875,
0.056243896484375,
0.0177764892578125,
-0.004993438720703125,
0.009368896484375,
0.06756591796875,
-0.0443115234375,
-0.04327392578125,
0.0100250244140625,
0.0347900390625,
-0.0020809173583984375,
-0.014556884765625,
0.00977325439453125,
-0.0341796875,
-0.00728607177734375,
0.003536224365234375,
-0.005558013916015625,
0.0092926025390625,
0.0285797119140625,
0.055084228515625,
-0.0182952880859375,
0.0293121337890625,
-0.0308380126953125,
-0.048797607421875,
0.07049560546875,
-0.037261962890625,
-0.0728759765625,
-0.0204010009765625,
-0.0548095703125,
0.033966064453125,
-0.031494140625,
0.07525634765625,
0.07525634765625,
0.0014858245849609375,
0.0153350830078125,
0.00738525390625,
-0.0025959014892578125,
0.0244140625,
0.005428314208984375,
0.00098419189453125,
-0.036346435546875,
-0.0011272430419921875,
-0.003185272216796875,
0.0216827392578125,
0.0306243896484375,
-0.00328826904296875,
-0.032196044921875,
-0.0157012939453125,
0.0240936279296875,
-0.0299072265625,
0.004901885986328125,
-0.07403564453125,
-0.07977294921875,
0.02508544921875,
-0.002750396728515625,
-0.023406982421875,
0.01422882080078125,
0.0242767333984375,
0.035400390625,
0.0226593017578125,
-0.0111541748046875,
-0.03436279296875,
-0.0208587646484375,
-0.041412353515625,
0.006168365478515625,
-0.0048828125,
-0.00804901123046875,
0.01230621337890625,
0.01548004150390625,
-0.000591278076171875,
-0.058441162109375,
-0.00995635986328125,
0.036376953125,
-0.007633209228515625,
-0.00745391845703125,
-0.031890869140625,
-0.0117645263671875,
0.0230865478515625,
0.00749969482421875,
0.0408935546875,
-0.021881103515625,
0.020416259765625,
-0.0216217041015625,
0.008056640625,
-0.01471710205078125,
-0.007221221923828125,
-0.0134124755859375,
-0.0038166046142578125,
-0.0091552734375,
-0.0277099609375,
-0.055328369140625,
0.00798797607421875,
0.006591796875,
-0.023529052734375,
0.01146697998046875,
0.01348114013671875,
-0.032501220703125,
0.037994384765625,
-0.04058837890625,
0.00566864013671875,
0.01123046875,
-0.00794219970703125,
0.000957489013671875,
-0.0137939453125,
-0.0028324127197265625,
0.00960540771484375,
0.0006103515625,
0.01142120361328125,
-0.0216522216796875,
-0.019439697265625,
-0.0046234130859375,
-0.01275634765625,
-0.0168914794921875,
0.006778717041015625,
-0.040435791015625,
-0.089111328125,
0.048675537109375,
-0.03302001953125,
-0.0006327629089355469,
-0.03509521484375,
-0.01329803466796875,
0.0241851806640625,
0.11663818359375,
-0.058074951171875,
0.0165557861328125,
0.0204925537109375,
0.014923095703125,
-0.018585205078125,
-0.0224761962890625,
-0.08428955078125,
-0.0153045654296875,
-0.08624267578125,
-0.004657745361328125,
0.0020961761474609375,
-0.0150146484375,
-0.0147247314453125,
0.01500701904296875,
-0.040283203125,
-0.04205322265625,
0.022674560546875,
0.0162811279296875,
0.02972412109375,
0.006412506103515625,
0.00556182861328125,
0.005199432373046875,
0.0166168212890625,
-0.020050048828125,
-0.08587646484375,
-0.00860595703125,
-0.0237884521484375,
0.054534912109375,
0.03424072265625,
-0.01448822021484375,
-0.01068115234375,
0.037841796875,
0.016082763671875,
-0.007068634033203125,
-0.008331298828125,
0.0010290145874023438,
0.0164794921875,
-0.02960205078125,
-0.04168701171875,
-0.0106658935546875,
0.0016222000122070312,
-0.03173828125,
-0.033660888671875,
-0.0290679931640625,
-0.05511474609375,
-0.00402069091796875,
-0.0123138427734375,
-0.016998291015625,
-0.07305908203125,
-0.034088134765625,
-0.034210205078125,
0.014617919921875,
-0.01202392578125,
0.005023956298828125,
-0.044342041015625,
-0.0810546875,
0.02154541015625,
-0.03192138671875,
-0.01503753662109375,
0.0088958740234375,
0.047698974609375,
0.0294647216796875,
-0.009002685546875,
0.038818359375,
0.0186767578125,
0.0183258056640625,
-0.0024585723876953125,
0.08209228515625,
0.031982421875,
0.0017786026000976562,
0.0533447265625,
-0.00997161865234375,
0.010772705078125,
-0.02618408203125,
0.0546875,
-0.0003986358642578125,
-0.0242156982421875,
0.0239715576171875,
-0.0170440673828125,
0.02117919921875,
0.050994873046875,
-0.002227783203125,
-0.0053253173828125,
0.0184326171875,
-0.0033721923828125,
-0.0228424072265625,
-0.005657196044921875,
0.0020751953125,
-0.04376220703125,
0.01137542724609375,
-0.005397796630859375,
-0.005809783935546875,
0.0157012939453125,
-0.0218963623046875,
0.0109710693359375,
0.00551605224609375,
-0.01666259765625,
-0.01177215576171875,
-0.03497314453125,
-0.0210418701171875,
0.024078369140625,
-0.036102294921875,
-0.033843994140625,
0.01323699951171875,
-0.01161956787109375,
0.0887451171875,
0.025543212890625,
-0.0171356201171875,
0.00009196996688842773,
-0.048675537109375,
0.001155853271484375,
-0.005413055419921875,
-0.01285552978515625,
0.0489501953125,
0.0013742446899414062,
-0.034423828125,
-0.003795623779296875,
-0.04132080078125,
-0.022918701171875,
-0.0555419921875,
0.0328369140625,
-0.034423828125,
0.0290374755859375,
0.01520538330078125,
0.08160400390625,
0.043548583984375,
0.049224853515625,
-0.041961669921875,
0.03802490234375,
0.0303955078125,
0.0256805419921875,
0.005702972412109375,
0.01401519775390625,
0.0002884864807128906,
-0.00476837158203125,
0.0218353271484375,
-0.0258331298828125,
-0.0030975341796875,
0.0257720947265625,
0.05621337890625,
0.0231781005859375,
0.001125335693359375,
-0.027679443359375,
-0.051971435546875,
-0.01474761962890625,
0.0679931640625,
-0.01806640625,
-0.10711669921875,
-0.03094482421875,
0.0047149658203125,
0.0207672119140625,
-0.06256103515625,
-0.03363037109375,
0.00583648681640625,
-0.05059814453125,
0.0177459716796875,
-0.01242828369140625,
-0.01384735107421875,
-0.005474090576171875,
-0.013946533203125,
-0.027374267578125,
-0.0293426513671875,
-0.00896453857421875,
-0.0198211669921875,
-0.0008521080017089844,
-0.013763427734375,
-0.026702880859375,
0.029632568359375,
-0.024383544921875,
-0.001987457275390625,
-0.0313720703125,
0.022064208984375,
-0.05078125,
-0.0021495819091796875,
0.084228515625,
0.03271484375,
-0.07244873046875,
-0.005962371826171875,
-0.04217529296875,
0.0059661865234375,
-0.0245819091796875,
-0.014892578125,
-0.0216064453125,
0.008392333984375,
0.007137298583984375,
0.017974853515625,
0.004482269287109375,
-0.0120697021484375,
-0.038787841796875,
0.0105743408203125,
0.03204345703125,
0.0149993896484375,
-0.0050506591796875,
0.068603515625,
-0.00843048095703125,
0.04669189453125,
0.0266265869140625,
0.051849365234375,
-0.0059967041015625,
-0.020751953125,
0.0279998779296875,
-0.010040283203125,
-0.023834228515625,
-0.032073974609375,
0.005832672119140625,
0.0009183883666992188,
0.040313720703125,
-0.021331787109375,
-0.0108642578125,
0.017120361328125,
0.0026264190673828125,
-0.0367431640625,
-0.00820159912109375,
0.0209808349609375,
0.025726318359375,
-0.0419921875,
0.0350341796875,
0.033203125,
-0.028778076171875,
-0.02447509765625,
0.0018568038940429688,
0.0283203125,
0.0028591156005859375,
-0.0157318115234375,
-0.070556640625,
0.060791015625,
0.0850830078125,
0.00930023193359375,
0.03753662109375,
0.0273590087890625,
0.006923675537109375,
0.035369873046875,
-0.0014171600341796875,
0.006877899169921875,
0.042510986328125,
0.054473876953125,
-0.01380157470703125,
-0.016632080078125,
0.024169921875,
-0.028472900390625,
0.003932952880859375,
0.09820556640625,
0.072998046875,
-0.133544921875,
0.01094818115234375,
0.0203857421875,
0.0310821533203125,
0.040313720703125,
-0.0019550323486328125,
-0.01270294189453125,
-0.0213165283203125,
0.02252197265625,
0.0031909942626953125,
-0.01617431640625,
0.0030364990234375,
0.00930023193359375,
-0.0243377685546875,
-0.00612640380859375,
0.0010728836059570312,
0.007160186767578125,
0.00861358642578125,
-0.007244110107421875,
-0.01617431640625,
-0.007099151611328125,
0.01404571533203125,
0.00887298583984375,
0.007610321044921875,
-0.023773193359375,
-0.032440185546875,
0.0133819580078125,
-0.0166778564453125,
-0.017791748046875,
0.043182373046875,
-0.01332855224609375,
0.0772705078125,
0.04840087890625,
0.00650787353515625,
0.0038509368896484375,
0.0125274658203125,
-0.0102996826171875,
-0.00722503662109375,
-0.038787841796875,
0.000331878662109375,
-0.0023479461669921875,
-0.033905029296875,
0.01111602783203125,
-0.01337432861328125,
-0.044403076171875,
-0.018829345703125,
-0.0174560546875,
0.051300048828125,
0.006404876708984375,
-0.040435791015625,
0.0030307769775390625,
0.005077362060546875,
0.004611968994140625,
0.013214111328125,
0.0382080078125,
-0.049774169921875,
-0.034820556640625,
0.0086669921875,
-0.058624267578125,
-0.004375457763671875,
0.00788116455078125,
-0.054168701171875,
0.062286376953125,
-0.01235198974609375,
0.040802001953125,
0.0161590576171875,
0.009765625,
-0.0194091796875,
0.0041351318359375,
-0.024993896484375,
0.055694580078125,
0.035675048828125,
-0.001373291015625,
-0.0257720947265625,
-0.0035114288330078125,
0.00630950927734375,
0.01169586181640625,
0.0692138671875,
0.0367431640625,
-0.07147216796875,
0.01300811767578125,
0.01534271240234375,
-0.01126861572265625,
-0.024993896484375,
0.09002685546875,
-0.0115203857421875,
0.034454345703125,
0.01045989990234375,
-0.04608154296875,
0.032135009765625,
-0.026580810546875,
-0.036956787109375,
0.0017461776733398438,
-0.006992340087890625,
-0.03131103515625,
-0.025238037109375,
0.004703521728515625,
-0.11474609375,
0.0033893585205078125,
0.062469482421875,
-0.006107330322265625,
-0.01142120361328125,
-0.0010852813720703125,
-0.025177001953125,
-0.01450347900390625,
0.0307159423828125,
-0.034820556640625,
0.0243377685546875,
-0.0148162841796875,
-0.036590576171875,
0.0122222900390625,
0.02001953125,
-0.041168212890625,
-0.022918701171875,
-0.016082763671875,
0.043731689453125,
-0.046112060546875,
0.0723876953125,
0.048187255859375,
0.028656005859375,
-0.00254058837890625,
0.01461029052734375,
0.009521484375,
0.07470703125,
-0.044219970703125,
-0.038970947265625,
0.00960540771484375,
0.0233154296875,
0.032196044921875,
0.0352783203125,
0.048675537109375,
-0.0164947509765625,
0.01549530029296875,
-0.020904541015625,
-0.0139923095703125,
0.00969696044921875,
-0.00753021240234375,
-0.0081329345703125,
-0.01119232177734375,
0.037811279296875,
0.0060577392578125,
-0.01294708251953125,
-0.00208282470703125,
-0.0043487548828125,
0.0016756057739257812,
0.0143280029296875,
-0.003017425537109375,
0.059112548828125,
0.0061492919921875,
-0.0169525146484375,
0.00977325439453125,
-0.0011463165283203125,
0.0016775131225585938,
-0.03533935546875,
-0.038330078125,
-0.0007963180541992188,
0.050689697265625,
0.0135650634765625,
-0.0253143310546875,
-0.027435302734375,
0.00920867919921875,
0.04583740234375,
-0.00670623779296875,
0.021575927734375,
-0.0036067962646484375,
0.037261962890625,
-0.0100250244140625,
0.00795745849609375,
-0.0079803466796875,
-0.02044677734375,
-0.00913238525390625,
0.0267181396484375,
0.025360107421875,
-0.005634307861328125,
0.045745849609375,
0.000006496906280517578,
-0.0259246826171875,
0.012969970703125,
-0.005764007568359375,
0.07977294921875,
0.018310546875,
-0.046600341796875,
-0.0179290771484375,
-0.0294647216796875,
-0.0374755859375,
0.033782958984375,
0.0390625,
-0.01068878173828125,
0.007076263427734375,
0.030548095703125,
-0.0067291259765625,
0.01483154296875,
0.0010700225830078125,
0.005390167236328125,
-0.030792236328125,
0.0221710205078125,
-0.00005561113357543945,
-0.0129852294921875,
0.00040721893310546875,
0.006587982177734375,
0.00775909423828125,
0.0158843994140625,
0.07183837890625,
-0.0267333984375,
0.0159759521484375,
-0.06396484375,
0.0096282958984375,
-0.05419921875,
-0.039215087890625,
0.0020656585693359375,
0.0210113525390625,
-0.0126800537109375,
-0.0010786056518554688,
-0.048583984375,
0.0296478271484375,
0.0141448974609375,
0.002605438232421875,
0.015380859375,
0.01145172119140625,
0.00955963134765625,
-0.004364013671875,
0.01264190673828125,
-0.035369873046875,
-0.056549072265625,
-0.0880126953125,
-0.0006422996520996094,
0.026763916015625,
0.02392578125,
-0.027069091796875,
0.078857421875,
-0.01708984375,
0.01079559326171875,
-0.016998291015625,
-0.055999755859375,
-0.040863037109375,
0.01788330078125,
-0.017120361328125,
-0.006076812744140625,
0.046356201171875,
-0.003765106201171875,
0.0289459228515625,
0.02032470703125,
0.024993896484375,
0.037506103515625,
-0.0101318359375,
-0.0122222900390625,
-0.0209808349609375,
0.0120849609375,
0.0003859996795654297,
-0.006031036376953125,
-0.01032257080078125,
-0.0255889892578125,
-0.027862548828125,
-0.035186767578125,
-0.03668212890625,
-0.05230712890625,
-0.0176849365234375,
0.0213775634765625,
-0.0389404296875,
-0.060821533203125,
-0.10272216796875,
0.03271484375,
0.032562255859375,
0.00534820556640625,
-0.07244873046875,
0.05377197265625,
-0.048431396484375,
0.05609130859375,
-0.021759033203125,
-0.0049285888671875,
0.00701904296875,
0.032684326171875,
-0.042510986328125,
0.0013179779052734375,
-0.055633544921875,
-0.0257415771484375,
-0.057098388671875,
-0.0186614990234375,
0.03448486328125,
0.00513458251953125,
-0.0190277099609375,
-0.05352783203125,
-0.0540771484375,
0.007740020751953125,
-0.054931640625,
-0.02374267578125,
-0.00441741943359375,
-0.0020236968994140625,
-0.0021953582763671875,
0.0029850006103515625,
0.0041046142578125,
0.007450103759765625,
-0.0284576416015625,
0.003574371337890625,
-0.03485107421875,
-0.02490234375,
-0.05242919921875,
-0.06817626953125,
0.0343017578125,
-0.0008502006530761719,
-0.034088134765625,
-0.060089111328125,
0.052703857421875,
0.013275146484375,
-0.03509521484375,
-0.0186767578125,
-0.0299224853515625,
-0.006610870361328125,
0.00937652587890625,
0.016754150390625,
-0.01275634765625,
0.0181732177734375,
0.00539398193359375,
-0.00774383544921875,
0.052734375,
0.055145263671875,
0.010406494140625,
-0.01837158203125,
-0.00396728515625,
0.031829833984375,
0.0667724609375,
0.0157318115234375,
-0.016357421875,
0.015380859375,
-0.0555419921875,
-0.0111846923828125,
-0.039886474609375,
0.021087646484375,
-0.0308380126953125,
-0.006824493408203125,
0.0021381378173828125,
-0.028106689453125,
0.0201873779296875,
-0.060211181640625,
-0.042205810546875,
-0.0081939697265625,
-0.033843994140625,
0.0156707763671875,
-0.09051513671875,
-0.024017333984375,
0.01263427734375,
-0.007656097412109375,
-0.0306396484375,
0.0269317626953125,
-0.039642333984375,
-0.0013742446899414062,
0.0200347900390625,
0.01302337646484375,
-0.0626220703125,
-0.01190185546875,
0.060516357421875,
-0.05645751953125,
-0.044769287109375,
0.006336212158203125,
0.026824951171875,
-0.023529052734375,
-0.0357666015625,
0.01531982421875,
0.0219268798828125,
-0.016571044921875,
-0.00007337331771850586,
0.02374267578125,
0.007198333740234375,
-0.00958251953125,
-0.0146942138671875,
0.0264129638671875,
0.032745361328125,
-0.02606201171875,
0.048065185546875,
0.0133209228515625,
0.0220947265625,
-0.0271453857421875,
0.045867919921875,
0.01171875,
0.0167083740234375,
-0.015167236328125,
0.02960205078125,
-0.0045013427734375,
-0.03009033203125,
0.021240234375,
-0.030303955078125,
0.005992889404296875,
0.0218353271484375,
0.023773193359375,
-0.0211029052734375,
0.01016998291015625,
-0.01160430908203125,
0.0284881591796875,
0.00492095947265625
]
|
60f5f9b7cab6ffd8d5d74ec78aa0a2ae86aa0179 | Wordpress Stackexchange
Q: Author archive only for custom post type I want to create an author archive for only custom post type. This page will includes only custom posts by the author.
And url structure should be example.com/portfolio/author/author-name/
I don't want to include custom type to default author.php because my custom post type is in different language.
A: According to this blogpost you just need to add the following code to your themes functions.php or in a plugin:
/* Add CPTs to author archives */
function custom_post_author_archive($query) {
if ($query->is_author)
$query->set( 'post_type', array('custom_type', 'post') );
remove_action( 'pre_get_posts', 'custom_post_author_archive' );
}
add_action('pre_get_posts', 'custom_post_author_archive');
| Q: Author archive only for custom post type I want to create an author archive for only custom post type. This page will includes only custom posts by the author.
And url structure should be example.com/portfolio/author/author-name/
I don't want to include custom type to default author.php because my custom post type is in different language.
A: According to this blogpost you just need to add the following code to your themes functions.php or in a plugin:
/* Add CPTs to author archives */
function custom_post_author_archive($query) {
if ($query->is_author)
$query->set( 'post_type', array('custom_type', 'post') );
remove_action( 'pre_get_posts', 'custom_post_author_archive' );
}
add_action('pre_get_posts', 'custom_post_author_archive');
| wordpress | {
"language": "en",
"length": 100,
"provenance": "stackexchange_00019.jsonl.gz:465117",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/225361"
} | [
0.068603515625,
-0.0014133453369140625,
0.0225067138671875,
-0.049560546875,
0.004749298095703125,
-0.0122222900390625,
0.0230560302734375,
-0.0191497802734375,
-0.05548095703125,
0.026641845703125,
0.04736328125,
0.002655029296875,
-0.01690673828125,
-0.04876708984375,
0.011810302734375,
-0.0128173828125,
0.042999267578125,
-0.02685546875,
0.031585693359375,
-0.012481689453125,
0.028106689453125,
-0.0036449432373046875,
0.0306396484375,
0.0287933349609375,
0.03057861328125,
0.009613037109375,
0.07373046875,
-0.01593017578125,
0.0252227783203125,
-0.00873565673828125,
0.03411865234375,
-0.039642333984375,
-0.0019245147705078125,
0.0176849365234375,
0.01134490966796875,
0.0833740234375,
-0.032958984375,
0.046630859375,
0.029266357421875,
0.004734039306640625,
-0.0003459453582763672,
0.00518035888671875,
-0.031768798828125,
0.01471710205078125,
-0.040802001953125,
-0.0584716796875,
0.0175628662109375,
-0.01097869873046875,
0.03717041015625,
0.00191497802734375,
-0.017059326171875,
0.0316162109375,
-0.0036907196044921875,
-0.021575927734375,
-0.0215606689453125,
-0.020294189453125,
0.035736083984375,
-0.030242919921875,
0.03594970703125,
-0.06591796875,
-0.043060302734375,
-0.004772186279296875,
0.05029296875,
0.0426025390625,
0.0242919921875,
0.016693115234375,
0.046417236328125,
0.0308380126953125,
-0.049591064453125,
0.00856781005859375,
0.0270538330078125,
-0.039459228515625,
0.0233306884765625,
-0.00476837158203125,
-0.056671142578125,
-0.0384521484375,
0.0007772445678710938,
-0.058380126953125,
0.0269775390625,
-0.0260467529296875,
-0.0200347900390625,
-0.011505126953125,
-0.00655364990234375,
-0.05963134765625,
0.0006442070007324219,
-0.039520263671875,
-0.01611328125,
0.0021800994873046875,
-0.031219482421875,
0.00839996337890625,
-0.0240478515625,
-0.056854248046875,
-0.01971435546875,
0.035186767578125,
0.018310546875,
-0.02581787109375,
0.03582763671875,
0.03912353515625,
-0.0010404586791992188,
0.025238037109375,
-0.0006146430969238281,
-0.040679931640625,
0.068603515625,
-0.061309814453125,
0.0173492431640625,
0.045684814453125,
-0.0048065185546875,
-0.003948211669921875,
0.0309600830078125,
0.01154327392578125,
0.00911712646484375,
-0.002933502197265625,
-0.01287841796875,
-0.006580352783203125,
-0.00893402099609375,
0.006954193115234375,
-0.0521240234375,
0.018798828125,
-0.001247406005859375,
0.0159454345703125,
0.0163421630859375,
0.037628173828125,
0.042327880859375,
-0.06243896484375,
-0.0082550048828125,
-0.019683837890625,
-0.03515625,
-0.057403564453125,
0.03497314453125,
0.0116119384765625,
-0.036163330078125,
-0.0017490386962890625,
0.05230712890625,
0.0120391845703125,
0.0221099853515625,
-0.024383544921875,
0.01306915283203125,
-0.0121307373046875,
0.00838470458984375,
0.00904083251953125,
0.019775390625,
-0.0128631591796875,
0.002750396728515625,
0.01186370849609375,
-0.011993408203125,
0.03790283203125,
0.01531982421875,
0.00628662109375,
-0.03436279296875,
-0.04437255859375,
0.0112152099609375,
-0.01467132568359375,
0.0307769775390625,
-0.003849029541015625,
0.0000010132789611816406,
-0.044403076171875,
0.033172607421875,
-0.034149169921875,
0.0021839141845703125,
-0.03192138671875,
0.01084136962890625,
-0.019622802734375,
-0.035186767578125,
-0.00449371337890625,
-0.0283355712890625,
0.0244598388671875,
0.02362060546875,
0.00649261474609375,
0.0168304443359375,
-0.000044226646423339844,
0.0006999969482421875,
-0.0232391357421875,
0.02490234375,
0.028656005859375,
-0.00490570068359375,
0.03399658203125,
-0.009124755859375,
-0.018218994140625,
0.009796142578125,
0.06622314453125,
0.0135040283203125,
-0.00894927978515625,
-0.004383087158203125,
0.005252838134765625,
-0.05303955078125,
0.03143310546875,
0.033599853515625,
0.0906982421875,
0.004302978515625,
0.0200042724609375,
0.025909423828125,
0.0198822021484375,
-0.034759521484375,
-0.01505279541015625,
-0.00839996337890625,
0.003204345703125,
0.001575469970703125,
-0.0129241943359375,
-0.01323699951171875,
0.047271728515625,
-0.028900146484375,
-0.01123809814453125,
0.0147552490234375,
-0.0015897750854492188,
-0.03656005859375,
0.015625,
-0.0202178955078125,
0.0242462158203125,
0.007648468017578125,
0.03302001953125,
0.013824462890625,
0.01358795166015625,
-0.030731201171875,
-0.00958251953125,
0.0010499954223632812,
0.0176239013671875,
0.01910400390625,
0.0015497207641601562,
-0.02056884765625,
-0.0035419464111328125,
-0.0015058517456054688,
-0.0145111083984375,
-0.0026950836181640625,
0.056243896484375,
0.07183837890625,
-0.008819580078125,
-0.01393890380859375,
-0.02813720703125,
0.04132080078125,
0.0189056396484375,
-0.08685302734375,
0.029327392578125,
0.034332275390625,
-0.017425537109375,
-0.05792236328125,
-0.00760650634765625,
-0.0103912353515625,
-0.03509521484375,
-0.0054473876953125,
0.06231689453125,
0.01259613037109375,
-0.0112457275390625,
-0.01552581787109375,
0.034759521484375,
0.049163818359375,
0.0386962890625,
0.0294952392578125,
0.00533294677734375,
0.0242156982421875,
0.0440673828125,
-0.0217742919921875,
-0.02423095703125,
0.0195465087890625,
-0.056915283203125,
0.0219879150390625,
0.034088134765625,
0.012054443359375,
0.003170013427734375,
0.0108795166015625,
-0.003917694091796875,
0.0014781951904296875,
0.0162200927734375,
-0.0210113525390625,
0.0008234977722167969,
0.025665283203125,
0.0292205810546875,
0.0380859375,
0.040496826171875,
-0.0618896484375,
0.0206756591796875,
0.01250457763671875,
0.0413818359375,
0.010528564453125,
0.0252532958984375,
0.00937652587890625,
0.0308380126953125,
-0.0233154296875,
-0.0084991455078125,
0.034210205078125,
0.017822265625,
-0.022216796875,
0.004970550537109375,
0.0036468505859375,
-0.0004119873046875,
0.000980377197265625,
-0.06964111328125,
0.031219482421875,
0.01136016845703125,
-0.042022705078125,
-0.03717041015625,
0.0022869110107421875,
0.00878143310546875,
-0.01406097412109375,
-0.00742340087890625,
0.0300750732421875,
-0.0181732177734375,
-0.0300445556640625,
-0.09014892578125,
0.08746337890625,
-0.057952880859375,
0.058013916015625,
0.0911865234375,
-0.011871337890625,
0.0419921875,
0.0022144317626953125,
-0.0290679931640625,
-0.0219573974609375,
0.056976318359375,
-0.0008654594421386719,
-0.04644775390625,
-0.0270843505859375,
0.0033092498779296875,
0.027374267578125,
0.03436279296875,
0.0206756591796875,
0.00647735595703125,
0.0012426376342773438,
0.054412841796875,
-0.0018100738525390625,
-0.0162353515625,
0.073974609375,
-0.076904296875,
-0.0001424551010131836,
-0.039581298828125,
-0.04827880859375,
-0.032073974609375,
0.01611328125,
-0.016387939453125,
0.01399993896484375,
-0.031280517578125,
-0.049407958984375,
-0.046356201171875,
-0.0672607421875,
-0.037078857421875,
0.0012731552124023438,
0.000019788742065429688,
0.016082763671875,
0.0616455078125,
0.0009441375732421875,
-0.0787353515625,
0.0140228271484375,
0.00946044921875,
-0.026123046875,
0.042083740234375,
0.0023746490478515625,
-0.003917694091796875,
0.0261993408203125,
0.0102691650390625,
0.037689208984375,
0.0257110595703125,
-0.0216827392578125,
-0.038726806640625,
0.005657196044921875,
0.01110076904296875,
0.028961181640625,
0.0706787109375,
0.0005726814270019531,
0.0051116943359375,
0.0556640625,
-0.045867919921875,
-0.04266357421875,
0.0167694091796875,
-0.01015472412109375,
0.049224853515625,
-0.01079559326171875,
-0.0253753662109375,
-0.029998779296875,
0.082275390625,
0.0118560791015625,
0.0225677490234375,
0.0009694099426269531,
-0.00958251953125,
0.024017333984375,
0.017547607421875,
0.0211181640625,
-0.00240325927734375,
0.025115966796875,
-0.042724609375,
0.0238037109375,
0.025146484375,
-0.0166168212890625,
-0.0008459091186523438,
-0.038665771484375,
-0.01064300537109375,
-0.0789794921875,
0.0308837890625,
-0.072265625,
0.0084381103515625,
-0.029022216796875,
-0.00968170166015625,
0.010711669921875,
0.0780029296875,
-0.0458984375,
0.00527191162109375,
0.01161956787109375,
-0.000217437744140625,
0.019561767578125,
-0.03179931640625,
-0.06475830078125,
-0.022491455078125,
-0.01493072509765625,
0.00911712646484375,
-0.005641937255859375,
-0.0081787109375,
-0.016021728515625,
0.01137542724609375,
0.00341796875,
-0.01313018798828125,
0.01422119140625,
-0.025604248046875,
0.0145721435546875,
-0.01151275634765625,
-0.0095672607421875,
-0.02166748046875,
-0.005207061767578125,
-0.049835205078125,
-0.112060546875,
-0.01195526123046875,
-0.017120361328125,
0.06280517578125,
-0.04022216796875,
0.04022216796875,
-0.054840087890625,
0.040374755859375,
0.0157928466796875,
0.0242462158203125,
0.0014238357543945312,
-0.00882720947265625,
-0.0147857666015625,
-0.00731658935546875,
0.006805419921875,
-0.030364990234375,
0.008453369140625,
0.01023101806640625,
-0.01100921630859375,
-0.00714874267578125,
-0.047637939453125,
-0.045013427734375,
-0.01203155517578125,
-0.04071044921875,
-0.05047607421875,
-0.05950927734375,
-0.004558563232421875,
0.02130126953125,
0.0268402099609375,
-0.0140228271484375,
-0.0677490234375,
-0.0640869140625,
0.02911376953125,
0.005802154541015625,
-0.0287628173828125,
0.00649261474609375,
0.0736083984375,
0.0190582275390625,
-0.025390625,
-0.06304931640625,
0.002201080322265625,
0.0168609619140625,
-0.042633056640625,
0.0256500244140625,
0.0031280517578125,
-0.01418304443359375,
0.030364990234375,
-0.036712646484375,
-0.016326904296875,
-0.01543426513671875,
0.03948974609375,
-0.007251739501953125,
-0.0259857177734375,
0.0114593505859375,
-0.032928466796875,
0.0556640625,
-0.002166748046875,
0.00995635986328125,
-0.005100250244140625,
0.04730224609375,
0.0247039794921875,
-0.0144195556640625,
-0.01212310791015625,
-0.01456451416015625,
-0.020843505859375,
0.00799560546875,
0.0136260986328125,
0.02935791015625,
0.0152740478515625,
0.0005278587341308594,
-0.0027217864990234375,
-0.03369140625,
0.01200103759765625,
-0.01534271240234375,
-0.015045166015625,
0.013641357421875,
0.03656005859375,
-0.0184173583984375,
0.022796630859375,
-0.01236724853515625,
0.0089874267578125,
0.0158843994140625,
0.0018472671508789062,
-0.0419921875,
-0.0026092529296875,
-0.0136871337890625,
0.022857666015625,
0.0189361572265625,
-0.0482177734375,
0.052886962890625,
0.05670166015625,
-0.01306915283203125,
0.01424407958984375,
-0.039276123046875,
0.005146026611328125,
-0.06146240234375,
0.036865234375,
0.0118865966796875,
0.00458526611328125,
-0.0184326171875,
0.08746337890625,
0.004741668701171875,
0.0306396484375,
-0.02166748046875,
0.0340576171875,
0.0308074951171875,
0.06134033203125,
0.023284912109375,
-0.0399169921875,
-0.016265869140625,
0.041290283203125,
-0.021759033203125,
-0.0239410400390625,
0.0252227783203125,
0.0027294158935546875,
0.03955078125,
0.005817413330078125,
-0.043426513671875,
0.019683837890625,
-0.0706787109375,
0.002468109130859375,
-0.00212860107421875,
0.0042877197265625,
-0.00943756103515625,
-0.0076446533203125,
-0.02191162109375,
0.004985809326171875,
-0.004497528076171875,
-0.042938232421875,
0.0189361572265625,
-0.04217529296875,
0.00997161865234375,
0.01442718505859375,
-0.03387451171875,
0.0272674560546875,
0.030242919921875,
-0.01513671875,
-0.03387451171875,
0.003009796142578125,
0.01120758056640625,
0.01397705078125,
-0.041046142578125,
-0.0168914794921875,
0.05963134765625,
-0.038543701171875,
0.0005259513854980469,
-0.0262298583984375,
0.0218963623046875,
0.01076507568359375,
0.0088043212890625,
0.06524658203125,
0.03125,
-0.041778564453125,
0.004924774169921875,
-0.03729248046875,
0.002490997314453125,
0.0015926361083984375,
-0.0253753662109375,
-0.0279388427734375,
-0.00910186767578125,
0.013824462890625,
-0.0064849853515625,
0.00917816162109375,
-0.019683837890625,
-0.01207733154296875,
0.0439453125,
0.0254364013671875,
0.01332855224609375,
-0.04193115234375,
0.09423828125,
0.00952911376953125,
0.05633544921875,
-0.007568359375,
0.052734375,
-0.00426483154296875,
-0.0152435302734375,
0.004093170166015625,
-0.0552978515625,
-0.03173828125,
-0.0155029296875,
-0.0150909423828125,
0.0394287109375,
0.036834716796875,
0.005603790283203125,
-0.03338623046875,
-0.004817962646484375,
0.001922607421875,
-0.01270294189453125,
0.038421630859375,
0.04083251953125,
0.00262451171875,
-0.0240020751953125,
0.0017824172973632812,
0.0703125,
0.0004267692565917969,
-0.0179595947265625,
0.005435943603515625,
-0.0072174072265625,
0.034423828125,
0.017120361328125,
-0.021759033203125,
0.030670166015625,
0.044830322265625,
0.011199951171875,
0.046600341796875,
0.0205078125,
0.0287017822265625,
0.022003173828125,
0.0013399124145507812,
-0.0330810546875,
-0.01375579833984375,
0.038299560546875,
0.01275634765625,
-0.00774383544921875,
0.039306640625,
-0.0170745849609375,
-0.00336456298828125,
0.03741455078125,
0.03790283203125,
-0.0628662109375,
-0.01053619384765625,
0.0140380859375,
0.011810302734375,
0.0171966552734375,
-0.005542755126953125,
0.00351715087890625,
-0.0169830322265625,
0.056732177734375,
-0.0176849365234375,
-0.0082855224609375,
0.020294189453125,
0.01103973388671875,
0.0093994140625,
-0.011810302734375,
0.03515625,
0.00899505615234375,
-0.03741455078125,
0.0074462890625,
0.0050506591796875,
-0.0153045654296875,
-0.01409149169921875,
0.0202484130859375,
-0.00443267822265625,
0.00650787353515625,
-0.025390625,
0.04632568359375,
-0.0338134765625,
0.0116729736328125,
-0.01837158203125,
0.03326416015625,
0.02313232421875,
0.017486572265625,
0.0014181137084960938,
-0.0188446044921875,
0.0095977783203125,
-0.0213165283203125,
-0.03765869140625,
-0.06402587890625,
-0.00759124755859375,
0.06634521484375,
-0.0198211669921875,
0.04803466796875,
0.034271240234375,
-0.058563232421875,
-0.0103759765625,
0.0084686279296875,
0.06634521484375,
-0.01329803466796875,
-0.03131103515625,
0.026763916015625,
0.011932373046875,
-0.0135345458984375,
0.0172119140625,
0.02392578125,
-0.04351806640625,
-0.01340484619140625,
0.0301361083984375,
-0.039947509765625,
-0.005893707275390625,
0.0227508544921875,
-0.01305389404296875,
0.07501220703125,
-0.0179901123046875,
-0.01009368896484375,
0.0123443603515625,
0.04852294921875,
0.01230621337890625,
0.051513671875,
-0.0142364501953125,
0.0230255126953125,
0.026641845703125,
0.0099334716796875,
-0.041748046875,
-0.019622802734375,
-0.00818634033203125,
0.04669189453125,
0.0718994140625,
0.012420654296875,
-0.02301025390625,
0.0103302001953125,
0.042724609375,
0.007274627685546875,
-0.047332763671875,
0.054351806640625,
-0.007785797119140625,
0.0018253326416015625,
0.03607177734375,
0.0164947509765625,
0.041473388671875,
0.0305633544921875,
-0.049560546875,
0.023590087890625,
0.0215911865234375,
0.0322265625,
-0.031494140625,
-0.0411376953125,
-0.0150909423828125,
-0.0263214111328125,
0.0080108642578125,
-0.01079559326171875,
-0.007038116455078125,
0.057159423828125,
0.08172607421875,
-0.0309600830078125,
-0.0175018310546875,
-0.026336669921875,
0.06988525390625,
0.03851318359375,
0.0012941360473632812,
0.032989501953125,
0.01364898681640625,
-0.006671905517578125,
0.00016057491302490234,
0.00942230224609375,
0.01329803466796875,
-0.009490966796875,
0.0239105224609375,
0.0027332305908203125,
-0.0006499290466308594,
-0.05133056640625,
0.029022216796875,
0.033905029296875,
0.0257720947265625,
-0.04522705078125,
-0.041168212890625,
0.0006814002990722656,
-0.0019121170043945312,
0.00042557716369628906,
0.00296783447265625,
0.0041351318359375,
0.0170135498046875,
0.032135009765625,
-0.059051513671875,
0.0103759765625,
-0.0172271728515625,
0.04705810546875,
-0.0248260498046875,
-0.042999267578125,
-0.0244598388671875,
-0.006969451904296875,
-0.019256591796875,
-0.060394287109375,
-0.004638671875,
0.042388916015625,
0.07305908203125,
-0.01690673828125,
0.0252838134765625,
-0.0196990966796875,
-0.0157623291015625,
0.01393890380859375,
-0.02813720703125,
0.0213165283203125,
-0.0308074951171875,
-0.0278778076171875,
-0.0017843246459960938,
0.037872314453125,
0.00499725341796875,
0.0002300739288330078,
0.0262908935546875,
0.002655029296875,
-0.0248260498046875,
-0.008209228515625,
0.050323486328125,
-0.0196685791015625,
-0.020599365234375,
-0.033203125,
0.0035037994384765625,
0.033294677734375,
-0.000007748603820800781,
0.0150299072265625,
-0.0222625732421875,
0.0606689453125,
-0.00830841064453125,
-0.00006711483001708984,
0.01415252685546875,
-0.031341552734375,
0.0209808349609375,
0.00823974609375,
0.036865234375,
0.0147247314453125,
-0.0172271728515625,
0.00994110107421875,
-0.0460205078125,
-0.052398681640625,
0.0174560546875,
0.04010009765625,
-0.00139617919921875,
0.0006885528564453125,
0.033294677734375,
-0.0002925395965576172,
-0.024627685546875,
-0.00772857666015625,
0.0218963623046875,
0.040252685546875,
0.03326416015625,
0.043975830078125,
-0.046966552734375,
-0.040191650390625,
-0.01702880859375,
0.03057861328125,
0.030120849609375,
0.01515960693359375,
0.015869140625,
0.024444580078125,
0.03045654296875,
0.05450439453125,
-0.05615234375,
-0.008209228515625,
0.043914794921875,
-0.05169677734375,
0.012542724609375,
0.00833892822265625,
-0.04833984375,
-0.007778167724609375,
0.042572021484375,
-0.028961181640625,
0.013824462890625,
-0.004016876220703125,
0.02783203125,
-0.046234130859375,
-0.0245513916015625,
-0.049041748046875,
-0.04962158203125,
-0.0472412109375,
-0.007049560546875,
0.0076141357421875,
-0.0279693603515625,
-0.0186767578125,
0.031951904296875,
0.005191802978515625,
-0.039093017578125,
0.026947021484375,
-0.0435791015625,
0.0174560546875,
0.02093505859375,
0.040557861328125,
-0.08099365234375,
0.0222625732421875,
-0.006259918212890625,
0.01377105712890625,
0.004486083984375,
0.10723876953125,
0.0093841552734375,
-0.017791748046875,
-0.00652313232421875,
-0.0256500244140625,
0.0296173095703125,
0.0027294158935546875,
0.0030574798583984375,
-0.034942626953125,
-0.0010499954223632812,
-0.037628173828125,
0.0274658203125,
-0.0206756591796875,
-0.0016717910766601562,
0.0236663818359375,
0.0301361083984375,
0.0307464599609375,
-0.0113372802734375,
-0.07867431640625,
-0.002040863037109375,
0.018035888671875,
-0.01702880859375,
-0.0341796875,
0.0404052734375,
-0.05731201171875,
0.007091522216796875,
-0.0235748291015625,
-0.031707763671875,
0.017425537109375,
0.0535888671875,
-0.0313720703125,
-0.003993988037109375,
-0.0390625,
-0.0286102294921875,
-0.03143310546875,
0.0162200927734375,
0.046539306640625,
-0.006511688232421875,
-0.031768798828125,
0.0267791748046875,
0.00000959634780883789,
0.08544921875,
-0.047332763671875,
-0.012603759765625,
0.006290435791015625,
-0.012725830078125,
-0.03167724609375,
-0.0638427734375,
0.0305328369140625,
-0.0953369140625,
-0.0216522216796875,
-0.036834716796875,
0.0211334228515625,
0.02337646484375,
-0.020477294921875,
-0.053253173828125,
0.07525634765625,
-0.0265045166015625,
-0.032440185546875,
-0.049346923828125,
0.0283050537109375,
0.0004553794860839844,
0.01525115966796875,
-0.00971221923828125,
-0.02239990234375,
-0.003604888916015625,
0.0236358642578125,
-0.0120697021484375,
0.03253173828125,
0.0193328857421875,
-0.0098876953125,
-0.0179443359375,
-0.021148681640625,
-0.0087738037109375,
-0.01629638671875,
0.0124053955078125,
-0.01605224609375,
0.035430908203125,
0.042999267578125,
-0.01520538330078125,
0.014984130859375,
0.00445556640625,
-0.005168914794921875,
-0.005741119384765625,
-0.02069091796875,
-0.0155181884765625,
0.00385284423828125,
0.031646728515625,
0.050140380859375,
0.011444091796875,
-0.050994873046875,
0.00936126708984375,
0.01100921630859375,
-0.00507354736328125,
-0.0113067626953125,
0.001956939697265625,
-0.03759765625,
-0.0222930908203125,
0.0003161430358886719,
-0.027984619140625,
0.028533935546875,
-0.018341064453125,
-0.0276336669921875,
0.017547607421875,
-0.0038280487060546875,
-0.019256591796875,
-0.005130767822265625,
0.04083251953125,
-0.01239776611328125,
0.00429534912109375,
0.0279388427734375,
-0.0180816650390625,
-0.021514892578125,
0.01319122314453125,
0.0225372314453125,
-0.04229736328125,
-0.01035308837890625,
-0.0179290771484375,
0.0190277099609375,
-0.022247314453125,
0.0355224609375,
-0.0253448486328125,
0.0172576904296875,
-0.0036373138427734375,
0.01108551025390625,
-0.00007987022399902344,
-0.0149383544921875,
-0.00836944580078125,
0.016754150390625,
-0.002685546875,
0.03564453125,
-0.0207061767578125,
-0.04754638671875,
-0.025390625,
0.0297088623046875,
-0.03802490234375,
0.00833892822265625,
-0.0288543701171875,
-0.0204620361328125,
0.00835418701171875,
-0.017364501953125,
-0.0174560546875,
-0.0251922607421875,
-0.0017118453979492188,
0.00580596923828125,
-0.0189056396484375,
0.0225372314453125
]
|
550a980a4f462f38b1007b8b92691c45728a2118 | Wordpress Stackexchange
Q: Link to Download Latest WordPress PLUGIN Version I use the following code in my PHP script to automatically download the latest version of WordPress...
$wordpress_zip_file_url = 'https://wordpress.org/latest.zip';
file_put_contents("wordpress.zip", file_get_contents($wordpress_zip_file_url));
Does this work for plugins the same way? For example, I'd like to automatically download the latest backupwordpress plugin version --> https://wordpress.org/plugins/backupwordpress/
Is there a generic link to download the latest version of a plugin?
A: Sounds like what you are really after is wp-cli which will let you write shell script that automate such tasks.
| Q: Link to Download Latest WordPress PLUGIN Version I use the following code in my PHP script to automatically download the latest version of WordPress...
$wordpress_zip_file_url = 'https://wordpress.org/latest.zip';
file_put_contents("wordpress.zip", file_get_contents($wordpress_zip_file_url));
Does this work for plugins the same way? For example, I'd like to automatically download the latest backupwordpress plugin version --> https://wordpress.org/plugins/backupwordpress/
Is there a generic link to download the latest version of a plugin?
A: Sounds like what you are really after is wp-cli which will let you write shell script that automate such tasks.
A: https://downloads.wordpress.org/plugin/{plugin-name}.latest-stable.zip
The structure should be the same for all WordPress.org plugins and the link you're looking for is:
https://downloads.wordpress.org/plugin/backupwordpress.latest-stable.zip.
You can see an example here on how this might be used.
To update plugins through WP-CLI:
wp plugin update backupwordpress
A: When you're doing a plugin update, in the process where it shows you all the steps, you can also see the plugin download url. Usually the last version can be always found there.
| wordpress | {
"language": "en",
"length": 161,
"provenance": "stackexchange_00019.jsonl.gz:465140",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/225439"
} | [
0.041748046875,
-0.02490234375,
0.022064208984375,
-0.051513671875,
-0.01148223876953125,
-0.0033664703369140625,
-0.0002899169921875,
-0.007572174072265625,
-0.0111846923828125,
0.0036792755126953125,
-0.00521087646484375,
0.005565643310546875,
-0.035888671875,
-0.02362060546875,
0.0200958251953125,
-0.033416748046875,
0.0616455078125,
-0.027099609375,
0.045257568359375,
0.0107879638671875,
-0.021087646484375,
0.061767578125,
0.043304443359375,
0.079345703125,
-0.01247406005859375,
0.04119873046875,
0.0965576171875,
-0.045928955078125,
-0.01013946533203125,
-0.04205322265625,
0.007480621337890625,
0.00760650634765625,
0.0243072509765625,
0.0287628173828125,
-0.045501708984375,
-0.0301666259765625,
-0.005184173583984375,
0.01430511474609375,
-0.023712158203125,
0.04449462890625,
0.0228271484375,
0.0009226799011230469,
-0.00919342041015625,
0.03924560546875,
-0.044921875,
-0.039154052734375,
0.03509521484375,
0.0228271484375,
-0.013336181640625,
0.01042938232421875,
0.0224151611328125,
0.003925323486328125,
0.0278778076171875,
0.0149688720703125,
0.0007104873657226562,
0.020477294921875,
-0.002849578857421875,
0.057525634765625,
0.0306549072265625,
-0.054046630859375,
-0.059356689453125,
0.01316070556640625,
0.017547607421875,
0.015899658203125,
0.00772857666015625,
0.0037364959716796875,
0.021453857421875,
0.015899658203125,
-0.03533935546875,
-0.005878448486328125,
0.0290069580078125,
-0.0175933837890625,
0.0108795166015625,
-0.00844573974609375,
0.01507568359375,
-0.0180816650390625,
-0.0012340545654296875,
-0.021697998046875,
0.01641845703125,
0.01428985595703125,
0.061431884765625,
-0.00926971435546875,
0.01505279541015625,
-0.0185089111328125,
0.02239990234375,
0.017578125,
0.02520751953125,
-0.0187530517578125,
-0.008758544921875,
-0.00968170166015625,
-0.0247955322265625,
0.01428985595703125,
-0.00437164306640625,
-0.00823974609375,
-0.0312042236328125,
-0.0236663818359375,
-0.0012521743774414062,
0.01071929931640625,
0.00334930419921875,
0.0426025390625,
-0.0162506103515625,
-0.04248046875,
0.048980712890625,
-0.03692626953125,
-0.0124664306640625,
0.0400390625,
0.01541900634765625,
-0.042388916015625,
-0.012115478515625,
0.011505126953125,
0.00708770751953125,
-0.005474090576171875,
-0.0193023681640625,
-0.041473388671875,
0.054443359375,
0.0114898681640625,
-0.05328369140625,
0.0849609375,
0.01471710205078125,
0.0227203369140625,
-0.01105499267578125,
0.0184478759765625,
-0.018768310546875,
0.0298309326171875,
-0.040191650390625,
-0.007709503173828125,
0.01103973388671875,
-0.0263671875,
-0.01316070556640625,
-0.002483367919921875,
-0.00994873046875,
0.020355224609375,
0.04266357421875,
-0.0048675537109375,
-0.033355712890625,
-0.0046844482421875,
-0.00351715087890625,
-0.00241851806640625,
-0.007091522216796875,
0.0212860107421875,
-0.04058837890625,
-0.0140533447265625,
0.027862548828125,
-0.06341552734375,
0.020843505859375,
0.000141143798828125,
0.01103973388671875,
0.026397705078125,
0.0166473388671875,
0.0251922607421875,
-0.00001817941665649414,
0.00818634033203125,
0.05120849609375,
-0.021942138671875,
-0.006927490234375,
-0.04119873046875,
0.0262298583984375,
-0.05157470703125,
0.000888824462890625,
-0.05120849609375,
0.02899169921875,
-0.00597381591796875,
0.0021114349365234375,
0.0224761962890625,
-0.0205230712890625,
0.009246826171875,
-0.00946807861328125,
-0.003673553466796875,
0.0239105224609375,
0.00739288330078125,
0.0021533966064453125,
-0.044830322265625,
0.07666015625,
0.0167236328125,
-0.0257720947265625,
0.041717529296875,
0.0030765533447265625,
0.005702972412109375,
0.04815673828125,
-0.00919342041015625,
-0.049346923828125,
-0.0236663818359375,
0.08538818359375,
-0.04327392578125,
-0.01038360595703125,
-0.0184326171875,
0.00545501708984375,
0.03399658203125,
0.04248046875,
0.03997802734375,
-0.034576416015625,
-0.033294677734375,
-0.04278564453125,
0.024169921875,
-0.046722412109375,
0.0097198486328125,
0.0283966064453125,
0.050201416015625,
-0.0219268798828125,
-0.007755279541015625,
-0.050201416015625,
0.0116119384765625,
-0.019775390625,
0.0187835693359375,
-0.06072998046875,
-0.0004680156707763672,
-0.018402099609375,
0.049346923828125,
0.0128173828125,
0.0052490234375,
-0.007808685302734375,
-0.004436492919921875,
0.013397216796875,
-0.04400634765625,
-0.0253143310546875,
0.026092529296875,
-0.03570556640625,
0.0291595458984375,
-0.00894927978515625,
0.07177734375,
-0.0282135009765625,
-0.004459381103515625,
-0.0268096923828125,
-0.038116455078125,
0.015228271484375,
-0.005878448486328125,
-0.01605224609375,
-0.01328277587890625,
0.0165863037109375,
0.0099334716796875,
0.022247314453125,
0.01114654541015625,
0.00806427001953125,
0.01087188720703125,
-0.025604248046875,
-0.0164031982421875,
-0.0223846435546875,
-0.07916259765625,
0.02105712890625,
0.07232666015625,
0.0179901123046875,
0.04345703125,
-0.002773284912109375,
0.007053375244140625,
0.057586669921875,
-0.0160675048828125,
0.0105438232421875,
-0.0207672119140625,
0.01267242431640625,
0.0270843505859375,
0.0207672119140625,
-0.002834320068359375,
0.007312774658203125,
0.00437164306640625,
0.01267242431640625,
0.013885498046875,
-0.001987457275390625,
-0.016143798828125,
-0.0072784423828125,
0.0201568603515625,
-0.01548004150390625,
-0.05731201171875,
-0.0201263427734375,
-0.0275115966796875,
0.006992340087890625,
0.0143280029296875,
0.053314208984375,
0.062255859375,
0.006092071533203125,
-0.042633056640625,
-0.01629638671875,
0.06280517578125,
0.0019178390502929688,
0.056549072265625,
0.0225677490234375,
0.0015935897827148438,
-0.0164947509765625,
-0.0227508544921875,
0.0049896240234375,
0.0231781005859375,
-0.013763427734375,
-0.00778961181640625,
0.038726806640625,
0.0014629364013671875,
0.0034885406494140625,
-0.0028476715087890625,
0.04449462890625,
0.020355224609375,
-0.023895263671875,
0.01291656494140625,
0.042510986328125,
-0.0037631988525390625,
-0.034912109375,
0.021942138671875,
-0.04010009765625,
-0.006420135498046875,
0.06982421875,
-0.01971435546875,
0.0296478271484375,
0.003993988037109375,
0.049560546875,
0.046844482421875,
-0.0071563720703125,
0.0083465576171875,
-0.004039764404296875,
-0.013824462890625,
0.0193939208984375,
-0.0275115966796875,
-0.044677734375,
0.0117340087890625,
-0.1009521484375,
-0.0418701171875,
0.00994873046875,
-0.004016876220703125,
-0.031158447265625,
-0.061798095703125,
-0.048919677734375,
-0.0188140869140625,
-0.1778564453125,
-0.10791015625,
-0.006404876708984375,
-0.04827880859375,
0.031585693359375,
0.0018358230590820312,
-0.0101165771484375,
-0.03668212890625,
0.039794921875,
0.016387939453125,
0.0225677490234375,
-0.045166015625,
-0.07147216796875,
-0.055694580078125,
-0.06805419921875,
0.0088348388671875,
0.0021228790283203125,
-0.006816864013671875,
-0.0037136077880859375,
0.06756591796875,
-0.0096435546875,
-0.07635498046875,
-0.04364013671875,
0.029144287109375,
-0.0140838623046875,
-0.00954437255859375,
0.029205322265625,
-0.0230865478515625,
-0.008880615234375,
-0.001705169677734375,
0.06549072265625,
0.0294036865234375,
-0.043548583984375,
-0.0075836181640625,
-0.039581298828125,
-0.004062652587890625,
-0.01360321044921875,
-0.00020503997802734375,
0.04119873046875,
0.01293182373046875,
-0.018157958984375,
-0.04449462890625,
0.0167083740234375,
0.01404571533203125,
0.01165771484375,
0.049102783203125,
-0.04229736328125,
-0.037139892578125,
0.027984619140625,
0.040557861328125,
-0.0182342529296875,
0.0029296875,
0.0250701904296875,
0.0142669677734375,
-0.00933837890625,
-0.03192138671875,
-0.05255126953125,
-0.0253753662109375,
0.0645751953125,
-0.0113677978515625,
-0.004180908203125,
0.0292816162109375,
0.01238250732421875,
0.0192413330078125,
-0.05682373046875,
-0.0330810546875,
-0.0223541259765625,
0.041748046875,
-0.0258331298828125,
0.0460205078125,
-0.05462646484375,
-0.0284881591796875,
-0.037261962890625,
0.075927734375,
-0.034820556640625,
-0.02496337890625,
0.026123046875,
0.0171051025390625,
-0.0364990234375,
-0.01837158203125,
-0.061553955078125,
-0.013580322265625,
-0.0361328125,
-0.0244598388671875,
-0.0162200927734375,
-0.01340484619140625,
0.0217132568359375,
0.0022258758544921875,
-0.01328277587890625,
-0.025299072265625,
0.01442718505859375,
-0.00708770751953125,
-0.0285797119140625,
0.041748046875,
-0.03558349609375,
0.006195068359375,
-0.01415252685546875,
-0.008880615234375,
-0.036041259765625,
0.0004458427429199219,
-0.0228118896484375,
0.02587890625,
0.032470703125,
-0.0280303955078125,
-0.030242919921875,
0.006195068359375,
-0.0049285888671875,
0.00406646728515625,
-0.0143280029296875,
0.0004489421844482422,
-0.0217742919921875,
0.0267333984375,
0.004241943359375,
0.0020198822021484375,
-0.0015773773193359375,
-0.0465087890625,
-0.06536865234375,
-0.065185546875,
-0.03643798828125,
0.0101776123046875,
0.0225830078125,
-0.0259857177734375,
-0.026123046875,
-0.0241546630859375,
-0.0123138427734375,
-0.0102386474609375,
-0.0196685791015625,
0.01273345947265625,
-0.00885772705078125,
-0.022247314453125,
0.07354736328125,
0.02520751953125,
-0.0296630859375,
-0.01220703125,
0.0689697265625,
0.01392364501953125,
-0.036041259765625,
-0.053131103515625,
0.0305023193359375,
0.032806396484375,
0.03192138671875,
0.040924072265625,
0.0225830078125,
-0.01276397705078125,
0.0167694091796875,
0.0307159423828125,
0.0033416748046875,
0.01305389404296875,
-0.002593994140625,
0.02740478515625,
0.0021343231201171875,
0.0031223297119140625,
0.04364013671875,
-0.00992584228515625,
0.0307769775390625,
0.00891876220703125,
-0.030670166015625,
-0.0264434814453125,
0.03765869140625,
0.0138397216796875,
-0.00164031982421875,
-0.029693603515625,
-0.07421875,
0.0280303955078125,
-0.0230560302734375,
0.0168609619140625,
0.034393310546875,
-0.014678955078125,
0.06146240234375,
0.01548004150390625,
-0.02581787109375,
-0.0237274169921875,
0.01059722900390625,
0.01153564453125,
0.0245208740234375,
-0.00902557373046875,
-0.00823974609375,
-0.034423828125,
-0.01015472412109375,
0.0325927734375,
0.0162506103515625,
-0.0237579345703125,
-0.01457977294921875,
-0.0003311634063720703,
0.01001739501953125,
0.005863189697265625,
-0.01019287109375,
0.050445556640625,
0.04193115234375,
-0.06707763671875,
-0.021148681640625,
-0.0302734375,
-0.0166778564453125,
-0.07855224609375,
-0.042633056640625,
0.0014390945434570312,
-0.0253753662109375,
-0.00861358642578125,
0.03765869140625,
-0.01216888427734375,
0.0169830322265625,
0.00415802001953125,
0.020782470703125,
0.0289306640625,
-0.0234375,
0.0224456787109375,
0.01099395751953125,
0.037261962890625,
-0.0809326171875,
0.0211944580078125,
-0.01398468017578125,
-0.0208892822265625,
-0.0149383544921875,
0.0267486572265625,
-0.0211181640625,
-0.0055999755859375,
0.04449462890625,
-0.0188751220703125,
0.00005555152893066406,
0.0213775634765625,
0.04327392578125,
-0.005397796630859375,
-0.005496978759765625,
0.039337158203125,
0.05328369140625,
0.00795745849609375,
-0.01361846923828125,
-0.0025959014892578125,
-0.025390625,
-0.01428985595703125,
0.0277557373046875,
-0.050323486328125,
0.00814056396484375,
0.008331298828125,
0.062103271484375,
-0.044952392578125,
-0.029693603515625,
0.0039215087890625,
0.033843994140625,
-0.053375244140625,
-0.0072174072265625,
0.06524658203125,
-0.005794525146484375,
0.0380859375,
-0.034881591796875,
-0.0249786376953125,
-0.002002716064453125,
-0.0102996826171875,
0.048675537109375,
0.020599365234375,
-0.034759521484375,
-0.025604248046875,
-0.012420654296875,
-0.0257415771484375,
0.02008056640625,
-0.01934814453125,
-0.042633056640625,
-0.01203155517578125,
0.01276397705078125,
0.0122833251953125,
-0.0185394287109375,
-0.0244598388671875,
-0.01168060302734375,
0.024322509765625,
0.0209503173828125,
0.041015625,
0.0030269622802734375,
0.04180908203125,
-0.006023406982421875,
0.039703369140625,
0.0203399658203125,
0.013427734375,
-0.040130615234375,
-0.0172576904296875,
0.023193359375,
0.016021728515625,
-0.01384735107421875,
-0.0328369140625,
0.00547027587890625,
-0.027130126953125,
0.040771484375,
-0.00832366943359375,
-0.0202178955078125,
0.0036716461181640625,
0.003208160400390625,
-0.0043487548828125,
0.01555633544921875,
0.06243896484375,
-0.02728271484375,
0.03326416015625,
-0.05694580078125,
-0.030517578125,
0.01174163818359375,
0.0231475830078125,
-0.004283905029296875,
-0.017669677734375,
-0.0294342041015625,
0.0313720703125,
-0.05267333984375,
0.0693359375,
0.054595947265625,
-0.000881195068359375,
0.050567626953125,
0.01190948486328125,
0.0223236083984375,
0.0215606689453125,
-0.0011777877807617188,
0.044586181640625,
-0.0154876708984375,
0.08123779296875,
-0.003040313720703125,
-0.016357421875,
0.046478271484375,
-0.040679931640625,
0.02008056640625,
0.005504608154296875,
0.00905609130859375,
-0.0167236328125,
0.01739501953125,
-0.00547027587890625,
-0.00787353515625,
0.032745361328125,
-0.0016393661499023438,
-0.028350830078125,
-0.0638427734375,
0.05877685546875,
-0.031982421875,
0.002986907958984375,
0.00952911376953125,
-0.00537872314453125,
-0.01087188720703125,
0.00728607177734375,
-0.0014905929565429688,
0.00894927978515625,
-0.06536865234375,
0.01387786865234375,
0.017120361328125,
-0.01343536376953125,
0.0286712646484375,
0.0169525146484375,
0.0026073455810546875,
-0.034515380859375,
-0.0195465087890625,
0.02374267578125,
-0.0030307769775390625,
-0.0269927978515625,
-0.0224761962890625,
0.00531768798828125,
0.027618408203125,
0.033172607421875,
-0.0071258544921875,
-0.015472412109375,
0.026824951171875,
0.00933074951171875,
-0.016204833984375,
-0.0230865478515625,
0.0010471343994140625,
0.0509033203125,
0.005985260009765625,
0.017425537109375,
-0.0019741058349609375,
-0.0330810546875,
-0.017730712890625,
0.00461578369140625,
0.1275634765625,
-0.0258636474609375,
-0.03143310546875,
0.035186767578125,
-0.005809783935546875,
-0.0406494140625,
0.0007348060607910156,
0.058135986328125,
-0.0546875,
0.01033782958984375,
0.0189361572265625,
0.024566650390625,
-0.0298614501953125,
0.002872467041015625,
-0.035400390625,
0.0828857421875,
0.01372528076171875,
-0.01177215576171875,
-0.00791168212890625,
0.041259765625,
-0.0261688232421875,
0.019012451171875,
-0.002315521240234375,
0.04296875,
0.0026702880859375,
-0.005718231201171875,
-0.0161590576171875,
0.005275726318359375,
-0.00872802734375,
0.02813720703125,
0.0174407958984375,
0.01104736328125,
-0.05865478515625,
-0.0113983154296875,
0.04315185546875,
0.038726806640625,
0.0260162353515625,
0.051727294921875,
0.036529541015625,
0.0189056396484375,
0.036651611328125,
-0.01427459716796875,
0.0445556640625,
-0.0350341796875,
0.0240478515625,
0.05340576171875,
0.021087646484375,
0.0070037841796875,
-0.02789306640625,
0.058441162109375,
-0.0357666015625,
-0.0097808837890625,
0.0277862548828125,
0.0220184326171875,
0.04107666015625,
0.005641937255859375,
0.055084228515625,
-0.01303863525390625,
0.036895751953125,
-0.0316162109375,
0.05157470703125,
0.0026683807373046875,
-0.037384033203125,
0.015716552734375,
0.00983428955078125,
0.00862884521484375,
-0.0382080078125,
-0.0283203125,
-0.001689910888671875,
0.007251739501953125,
0.03057861328125,
0.00881195068359375,
0.037109375,
-0.00991058349609375,
0.0081024169921875,
0.00991058349609375,
0.039794921875,
-0.0202484130859375,
-0.0634765625,
0.006824493408203125,
0.00728607177734375,
0.005802154541015625,
0.0129852294921875,
0.00968170166015625,
-0.0552978515625,
0.01177978515625,
-0.049652099609375,
0.0035343170166015625,
0.02789306640625,
-0.0004069805145263672,
0.005634307861328125,
0.021240234375,
-0.015899658203125,
-0.01224517822265625,
0.0187835693359375,
0.0082550048828125,
0.00626373291015625,
-0.0007939338684082031,
-0.02691650390625,
0.0291748046875,
-0.0445556640625,
0.01555633544921875,
-0.0035533905029296875,
0.058013916015625,
-0.00969696044921875,
0.0193328857421875,
-0.0276641845703125,
-0.044769287109375,
0.0082855224609375,
0.0263214111328125,
-0.0287322998046875,
0.0005564689636230469,
0.0240631103515625,
0.0496826171875,
-0.016815185546875,
-0.0193328857421875,
0.05633544921875,
-0.0016431808471679688,
0.0196533203125,
-0.057098388671875,
0.0069122314453125,
-0.0115814208984375,
-0.0260009765625,
-0.00830841064453125,
-0.027191162109375,
0.0295562744140625,
-0.061065673828125,
0.06988525390625,
-0.0210723876953125,
0.028411865234375,
0.0121002197265625,
-0.038177490234375,
0.0074920654296875,
-0.0249176025390625,
-0.0272674560546875,
0.006961822509765625,
-0.037017822265625,
0.0108642578125,
-0.00894927978515625,
0.005176544189453125,
-0.0195159912109375,
0.055511474609375,
0.003864288330078125,
-0.0140533447265625,
0.03839111328125,
-0.013946533203125,
0.0015516281127929688,
0.01454925537109375,
0.0240631103515625,
-0.0060882568359375,
-0.045623779296875,
-0.01531219482421875,
-0.06488037109375,
0.037933349609375,
0.07391357421875,
0.04547119140625,
0.004070281982421875,
0.0523681640625,
-0.00493621826171875,
-0.0026264190673828125,
-0.0328369140625,
-0.0099639892578125,
-0.006866455078125,
-0.0209197998046875,
-0.01366424560546875,
-0.0021839141845703125,
-0.043701171875,
-0.0010833740234375,
0.0279541015625,
-0.0137939453125,
-0.026458740234375,
-0.017669677734375,
0.032989501953125,
0.03131103515625,
0.01427459716796875,
-0.03497314453125,
-0.051116943359375,
-0.0273895263671875,
0.0149993896484375,
-0.004062652587890625,
-0.0013284683227539062,
-0.0176849365234375,
-0.01110076904296875,
0.059234619140625,
-0.0003936290740966797,
0.00738525390625,
0.050384521484375,
0.0313720703125,
0.0222930908203125,
0.00128936767578125,
0.016754150390625,
0.0186614990234375,
-0.0180816650390625,
0.0213623046875,
0.007427215576171875,
0.0107879638671875,
0.0074615478515625,
-0.01554107666015625,
0.02008056640625,
-0.011627197265625,
0.0310211181640625,
-0.0281982421875,
0.003681182861328125,
-0.0013532638549804688,
0.0217132568359375,
0.0024738311767578125,
-0.01387786865234375,
-0.0126953125,
-0.058837890625,
-0.004032135009765625,
-0.0087738037109375,
-0.039398193359375,
-0.04571533203125,
-0.00799560546875,
0.0103607177734375,
0.0177459716796875,
0.00531005859375,
-0.029327392578125,
0.008087158203125,
-0.0146026611328125,
0.030853271484375,
-0.0015802383422851562,
-0.0207672119140625,
-0.0209808349609375,
0.0038280487060546875,
0.00737762451171875,
-0.0693359375,
-0.045135498046875,
0.08819580078125,
-0.0293731689453125,
0.0051422119140625,
-0.00554656982421875,
-0.016937255859375,
0.0189361572265625,
-0.005535125732421875,
0.01047515869140625,
0.042877197265625,
0.006069183349609375,
-0.0178680419921875,
0.02783203125,
-0.031829833984375,
-0.0273590087890625,
-0.031005859375,
0.008880615234375,
-0.060455322265625,
-0.0175628662109375,
-0.03057861328125,
0.00847625732421875,
0.01092529296875,
-0.047821044921875,
-0.07611083984375,
0.04193115234375,
-0.0186614990234375,
-0.0360107421875,
-0.042083740234375,
0.0230865478515625,
0.0259552001953125,
-0.037933349609375,
-0.03155517578125,
0.00966644287109375,
-0.035430908203125,
0.013580322265625,
0.00988006591796875,
0.06915283203125,
-0.02691650390625,
-0.00490570068359375,
0.0106048583984375,
0.06268310546875,
0.045074462890625,
0.00626373291015625,
-0.00652313232421875,
-0.011566162109375,
0.0292205810546875,
0.0316162109375,
-0.0203857421875,
0.0081024169921875,
0.01806640625,
0.0109405517578125,
-0.0034847259521484375,
0.003261566162109375,
-0.0200042724609375,
0.011627197265625,
0.0283355712890625,
0.07928466796875,
0.011749267578125,
-0.05419921875,
-0.0103759765625,
0.0011243820190429688,
-0.0015468597412109375,
-0.01502227783203125,
0.01428985595703125,
-0.05279541015625,
-0.0162506103515625,
-0.00946044921875,
-0.0023136138916015625,
-0.01177215576171875,
0.000579833984375,
-0.0251617431640625,
-0.0015239715576171875,
0.017425537109375,
0.0014810562133789062,
-0.017425537109375,
0.0030536651611328125,
0.09222412109375,
-0.040069580078125,
0.0284423828125,
0.01509857177734375,
-0.00006765127182006836,
0.07171630859375,
0.03936767578125,
0.016357421875,
0.05670166015625,
-0.0291900634765625,
-0.006244659423828125,
0.0164642333984375,
-0.0025691986083984375,
0.0031909942626953125,
-0.0237579345703125,
-0.01241302490234375,
0.01033782958984375,
0.015777587890625,
0.00212860107421875,
-0.027984619140625,
0.03582763671875,
0.0106353759765625,
0.057952880859375,
-0.00725555419921875,
-0.037872314453125,
-0.038421630859375,
0.035888671875,
-0.01241302490234375,
-0.02313232421875,
0.023590087890625,
-0.03204345703125,
0.02484130859375,
0.0159759521484375,
0.0253143310546875,
-0.017333984375,
0.0248565673828125,
-0.032440185546875,
-0.00786590576171875,
0.007965087890625
]
|
2feecef20e21934b564b06be298067fb3b287fa3 | Wordpress Stackexchange
Q: How to change the email notification recipient (user) for new comments? How do you change the user that gets the notification email announcement for new comments and comment moderation?
WordPress sends the notices to the admin user. My client is the editor of the site. I want the comment notices to get mailed to the editor user and not the admin user.
How do you do that?
A: There's a great article explaining how to hook into 2 filters for this at https://web.archive.org/web/20200216075253/http://www.sourcexpress.com/customize-wordpress-comment-notification-emails/
To send your notifications to a particular user and not the site admin, try this for a user with ID 123:
function se_comment_moderation_recipients( $emails, $comment_id ) {
$comment = get_comment( $comment_id );
$post = get_post( $comment->comment_post_ID );
$user = get_user_by( 'id', '123' );
// Return only the post author if the author can modify.
if ( user_can( $user->ID, 'edit_published_posts' ) && ! empty( $user->user_email ) ) {
$emails = array( $user->user_email );
}
return $emails;
}
add_filter( 'comment_moderation_recipients', 'se_comment_moderation_recipients', 11, 2 );
add_filter( 'comment_notification_recipients', 'se_comment_moderation_recipients', 11, 2 );
| Q: How to change the email notification recipient (user) for new comments? How do you change the user that gets the notification email announcement for new comments and comment moderation?
WordPress sends the notices to the admin user. My client is the editor of the site. I want the comment notices to get mailed to the editor user and not the admin user.
How do you do that?
A: There's a great article explaining how to hook into 2 filters for this at https://web.archive.org/web/20200216075253/http://www.sourcexpress.com/customize-wordpress-comment-notification-emails/
To send your notifications to a particular user and not the site admin, try this for a user with ID 123:
function se_comment_moderation_recipients( $emails, $comment_id ) {
$comment = get_comment( $comment_id );
$post = get_post( $comment->comment_post_ID );
$user = get_user_by( 'id', '123' );
// Return only the post author if the author can modify.
if ( user_can( $user->ID, 'edit_published_posts' ) && ! empty( $user->user_email ) ) {
$emails = array( $user->user_email );
}
return $emails;
}
add_filter( 'comment_moderation_recipients', 'se_comment_moderation_recipients', 11, 2 );
add_filter( 'comment_notification_recipients', 'se_comment_moderation_recipients', 11, 2 );
A: I'm not aware of any hook that could change only the comment notification recipient... You would probably need to overwrite some kind of core function, but here's a small workaround you could use:
1. Disable the email feature from WordPress comments settings (unless you want to get notified too)
2. Send it manually using the comment_post action hook. Just add this function to functions.php
add_filter( 'comment_post', 'comment_notification' );
function comment_notification( $comment_ID, $comment_approved ) {
// Send email only when it's not approved
if( $comment_approved == 0 ) {
$subject = 'subject here';
$message = 'message here';
wp_mail( '[email protected]' , $subject, $message );
}
}
// Remove if statement if you want to recive email even if it doesn't require moderation
`comment_post` is an action triggered immediately after a comment is inserted into the database.
A: An alternative and more flexible way to the code hacking in the other answers is:
Create an email address for the admin account of the blog. For example, [email protected] that is different from [email protected] and [email protected].
Option A: Forward site@ email to both the editor and the technical admin. I create site@ as an alias. This works if your editor is okay with receiving a copy of all the automatic email generated by the site. They just filter irrelevant email out or learn what actually happens with a site. This is good for small clients.
Option B: Set up a mail filter for site@ to automatically forward emails about comment alerts to the editor and all email to the technical admin. The technical admin can then filter to archive/delete all comment alerts so they never appear in their inbox. This initial forward to editor@ can be done on the mail server using something like procmail. Alternatively you can do it on your email client if it's up 24/7 or you can even use Gmail, Hotmail, etc. and manually build the filter.
A: There is a filter for changing the text of the comment moderation email:
function change_comment_email( $body, $comment_id ) {
$body = preg_replace( "/(A new )comment/s", "$1review", $body );
$body = preg_replace( "/(Currently \d+ )comment/s", "$1review", $body );
$body = preg_replace( "/Comment:/", "Review:", $body );
return $body;
}
add_filter( 'comment_moderation_text', 'change_comment_email', 20, 2 );
add_filter( 'comment_notification_text', 'change_comment_email', 20, 2 );
A: If you want to send this email to multiple people then use below code in functions.php -
function se_comment_moderation_recipients( $emails, $comment_id ) {
$comment = get_comment( $comment_id );
$post = get_post( $comment->comment_post_ID );
$emails = array();
// $users = array(set of user IDs t whome you want to send mails)
$users = array( 1, 16628, 15983 );
foreach($users as $uid){
$user = get_user_by( 'id', $uid );
// Return emails of users .
if ( !empty( $user->user_email ) ) {
$emails[] = $user->user_email;
}
}
$emails_list = array(implode(",",$emails));
return $emails_list;
}
add_filter( 'comment_moderation_recipients', 'se_comment_moderation_recipients', 11, 2 );
add_filter( 'comment_notification_recipients', 'se_comment_moderation_recipients', 11, 2 );
| wordpress | {
"language": "en",
"length": 652,
"provenance": "stackexchange_00019.jsonl.gz:465142",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/225449"
} | [
0.0469970703125,
-0.0245208740234375,
0.0194091796875,
-0.0460205078125,
-0.0178375244140625,
-0.025390625,
-0.0005145072937011719,
-0.026153564453125,
0.0105438232421875,
0.04449462890625,
-0.0217742919921875,
-0.0173797607421875,
0.04412841796875,
-0.0176239013671875,
-0.0306243896484375,
-0.01229095458984375,
-0.0020751953125,
0.039825439453125,
0.002140045166015625,
-0.01873779296875,
0.0084075927734375,
-0.0181732177734375,
-0.04376220703125,
0.042999267578125,
-0.02288818359375,
0.031829833984375,
0.1026611328125,
-0.046112060546875,
-0.0014219284057617188,
-0.024017333984375,
-0.005977630615234375,
-0.0184783935546875,
0.02008056640625,
0.060760498046875,
-0.070556640625,
0.007740020751953125,
0.0157470703125,
0.006549835205078125,
-0.000804901123046875,
0.0311431884765625,
0.0254974365234375,
-0.00649261474609375,
0.0032024383544921875,
-0.007747650146484375,
-0.00218963623046875,
-0.011505126953125,
-0.001621246337890625,
-0.047393798828125,
0.006351470947265625,
0.034027099609375,
0.0253753662109375,
0.0134124755859375,
0.032135009765625,
-0.01467132568359375,
0.005550384521484375,
0.0188140869140625,
-0.0477294921875,
0.032806396484375,
0.01861572265625,
0.01490020751953125,
0.0024280548095703125,
0.0277862548828125,
-0.00431060791015625,
-0.00421142578125,
-0.002735137939453125,
-0.01139068603515625,
0.031280517578125,
0.0285491943359375,
-0.00666046142578125,
-0.0296630859375,
0.01078033447265625,
0.021575927734375,
-0.01360321044921875,
-0.006496429443359375,
-0.00605010986328125,
-0.0055389404296875,
0.0210418701171875,
-0.0121307373046875,
0.01026153564453125,
0.0232086181640625,
0.026458740234375,
-0.01319122314453125,
-0.007007598876953125,
0.03460693359375,
-0.041717529296875,
0.0216064453125,
-0.0037631988525390625,
-0.0143280029296875,
-0.002765655517578125,
-0.0016222000122070312,
-0.0031185150146484375,
-0.05181884765625,
0.01528167724609375,
0.021636962890625,
-0.006916046142578125,
-0.0287322998046875,
0.03173828125,
0.053070068359375,
-0.034912109375,
-0.035888671875,
-0.0288848876953125,
0.0080718994140625,
-0.044403076171875,
-0.016693115234375,
-0.0182037353515625,
0.032623291015625,
-0.007770538330078125,
-0.021881103515625,
0.00156402587890625,
0.033782958984375,
-0.005157470703125,
-0.033905029296875,
-0.017791748046875,
-0.00627899169921875,
0.002452850341796875,
-0.002346038818359375,
-0.059722900390625,
0.041229248046875,
-0.010284423828125,
0.0289154052734375,
-0.004150390625,
0.0180511474609375,
0.0155487060546875,
-0.0352783203125,
0.0188140869140625,
-0.01293182373046875,
-0.024749755859375,
-0.025604248046875,
-0.0005469322204589844,
-0.022064208984375,
-0.028839111328125,
0.040191650390625,
0.09002685546875,
0.0360107421875,
0.0277099609375,
0.0009074211120605469,
0.010986328125,
0.006496429443359375,
-0.0169830322265625,
0.0225677490234375,
0.01552581787109375,
-0.00334930419921875,
0.00470733642578125,
-0.01532745361328125,
-0.01221466064453125,
0.0113525390625,
0.024078369140625,
0.00800323486328125,
-0.00760650634765625,
-0.007579803466796875,
-0.0640869140625,
0.043731689453125,
0.0294952392578125,
-0.007228851318359375,
0.0010623931884765625,
-0.01409149169921875,
0.011627197265625,
-0.016754150390625,
-0.01361083984375,
-0.0293121337890625,
0.0255279541015625,
-0.0021228790283203125,
0.0240325927734375,
-0.034088134765625,
-0.04766845703125,
0.01065826416015625,
-0.071044921875,
-0.02362060546875,
0.0199737548828125,
-0.0283966064453125,
0.035186767578125,
0.023040771484375,
0.02392578125,
-0.0128173828125,
0.0013113021850585938,
-0.0172119140625,
-0.021331787109375,
0.01953125,
0.01378631591796875,
-0.0516357421875,
-0.0360107421875,
-0.0435791015625,
0.0214996337890625,
-0.0018987655639648438,
-0.022125244140625,
-0.006328582763671875,
0.02581787109375,
0.037139892578125,
-0.0027637481689453125,
0.0352783203125,
0.0110931396484375,
0.024383544921875,
0.0204620361328125,
-0.0176239013671875,
-0.026336669921875,
-0.049957275390625,
0.019500732421875,
-0.0167388916015625,
-0.0184783935546875,
0.0732421875,
0.0142669677734375,
-0.04248046875,
0.03173828125,
-0.0265045166015625,
-0.054229736328125,
-0.004810333251953125,
-0.0401611328125,
0.03289794921875,
0.004180908203125,
-0.0159759521484375,
-0.00064849853515625,
-0.0283203125,
-0.017242431640625,
0.0254669189453125,
-0.027252197265625,
0.0243072509765625,
-0.0196075439453125,
0.01151275634765625,
-0.0265350341796875,
0.05450439453125,
-0.037261962890625,
-0.036712646484375,
-0.0198516845703125,
0.01239776611328125,
0.039581298828125,
-0.04656982421875,
0.018951416015625,
-0.0293426513671875,
0.040557861328125,
-0.01232147216796875,
0.007549285888671875,
0.0106048583984375,
-0.004505157470703125,
-0.0028667449951171875,
-0.01157379150390625,
0.016845703125,
0.0204010009765625,
-0.0484619140625,
0.0006518363952636719,
0.0333251953125,
0.03045654296875,
0.003452301025390625,
0.03204345703125,
0.042938232421875,
0.083984375,
0.013214111328125,
0.0236968994140625,
-0.003612518310546875,
0.00022935867309570312,
0.005977630615234375,
-0.0085601806640625,
-0.00701141357421875,
0.028411865234375,
-0.08380126953125,
0.0209197998046875,
0.049560546875,
0.043548583984375,
0.01242828369140625,
-0.003032684326171875,
0.0181121826171875,
-0.0006361007690429688,
-0.01161956787109375,
-0.04180908203125,
0.007236480712890625,
-0.01287841796875,
-0.0279388427734375,
0.0018558502197265625,
-0.0030059814453125,
-0.00653076171875,
-0.03375244140625,
0.0186004638671875,
-0.005859375,
0.006191253662109375,
-0.0005178451538085938,
-0.01061248779296875,
0.034881591796875,
-0.00203704833984375,
-0.00577545166015625,
0.02288818359375,
0.003753662109375,
-0.0243072509765625,
0.00653839111328125,
0.016387939453125,
-0.0140533447265625,
-0.003673553466796875,
0.021575927734375,
0.0254058837890625,
-0.0294036865234375,
-0.03033447265625,
-0.043182373046875,
-0.0207366943359375,
0.058258056640625,
-0.0084686279296875,
0.0283050537109375,
0.020172119140625,
-0.007526397705078125,
-0.0185699462890625,
-0.01776123046875,
0.020294189453125,
-0.03509521484375,
-0.00696563720703125,
0.053375244140625,
0.0241546630859375,
-0.01361846923828125,
0.01175689697265625,
0.0008168220520019531,
0.01276397705078125,
0.021820068359375,
0.01091766357421875,
-0.03106689453125,
0.0227203369140625,
0.0298004150390625,
-0.01568603515625,
0.0030670166015625,
-0.053436279296875,
-0.058258056640625,
-0.034576416015625,
-0.0308837890625,
-0.028289794921875,
0.037322998046875,
0.0011568069458007812,
-0.05413818359375,
-0.017547607421875,
-0.021514892578125,
-0.0272216796875,
0.01113128662109375,
-0.0286407470703125,
0.00362396240234375,
-0.0213775634765625,
-0.006748199462890625,
-0.0340576171875,
0.00629425048828125,
-0.023101806640625,
0.06256103515625,
-0.0088043212890625,
0.0029888153076171875,
-0.0041961669921875,
0.03778076171875,
-0.00771331787109375,
-0.054595947265625,
-0.0289306640625,
0.0013818740844726562,
0.0125274658203125,
-0.010223388671875,
0.0202484130859375,
-0.031219482421875,
0.0247802734375,
0.0006494522094726562,
0.01096343994140625,
0.0294189453125,
-0.0202178955078125,
-0.0276031494140625,
0.01085662841796875,
0.0241546630859375,
0.0462646484375,
-0.0228729248046875,
-0.0113983154296875,
0.057708740234375,
0.0310516357421875,
-0.01446533203125,
0.004726409912109375,
0.01470184326171875,
-0.0248870849609375,
-0.018280029296875,
0.0069122314453125,
-0.0266876220703125,
0.00943756103515625,
-0.0211334228515625,
0.0273284912109375,
0.0038280487060546875,
0.0595703125,
-0.01003265380859375,
-0.0293731689453125,
-0.0021495819091796875,
-0.0026950836181640625,
-0.050384521484375,
-0.01039886474609375,
-0.0213470458984375,
0.0134429931640625,
-0.0139007568359375,
0.0257568359375,
-0.003894805908203125,
0.00421905517578125,
-0.032806396484375,
-0.06005859375,
0.03619384765625,
-0.041229248046875,
-0.0005269050598144531,
-0.0295257568359375,
-0.024322509765625,
0.01483917236328125,
0.09393310546875,
-0.016143798828125,
-0.02435302734375,
0.008209228515625,
0.0018358230590820312,
-0.016265869140625,
0.0222625732421875,
-0.01641845703125,
-0.010650634765625,
-0.033966064453125,
0.0001494884490966797,
-0.0207061767578125,
-0.0127105712890625,
-0.04217529296875,
0.03045654296875,
-0.044708251953125,
-0.01120758056640625,
0.007106781005859375,
-0.026031494140625,
0.01503753662109375,
0.001804351806640625,
-0.030609130859375,
0.022125244140625,
-0.0002942085266113281,
-0.05291748046875,
-0.035675048828125,
-0.014923095703125,
-0.004566192626953125,
0.015350341796875,
-0.005184173583984375,
0.0218658447265625,
-0.041046142578125,
0.00974273681640625,
-0.0006666183471679688,
0.01526641845703125,
-0.030487060546875,
-0.0089111328125,
0.0070953369140625,
0.01580810546875,
-0.0215606689453125,
0.00836944580078125,
0.00921630859375,
0.0273895263671875,
-0.03509521484375,
0.06927490234375,
-0.0208587646484375,
0.04833984375,
0.019073486328125,
-0.039581298828125,
-0.06951904296875,
-0.039093017578125,
-0.0245513916015625,
0.01222991943359375,
-0.0208740234375,
-0.00963592529296875,
-0.04913330078125,
-0.07989501953125,
0.0108489990234375,
-0.03436279296875,
-0.03192138671875,
-0.001033782958984375,
0.03717041015625,
0.037628173828125,
-0.0033512115478515625,
0.035736083984375,
-0.0123748779296875,
0.049285888671875,
0.0286407470703125,
0.027496337890625,
0.058197021484375,
-0.0181121826171875,
0.01114654541015625,
0.05255126953125,
0.0176849365234375,
-0.0265045166015625,
0.072265625,
-0.018768310546875,
-0.0166168212890625,
0.03961181640625,
-0.02362060546875,
-0.0068206787109375,
-0.018951416015625,
-0.01861572265625,
0.007808685302734375,
-0.0219573974609375,
0.0203399658203125,
0.005893707275390625,
0.0297088623046875,
-0.0074615478515625,
-0.06396484375,
0.032806396484375,
-0.069580078125,
0.01451873779296875,
-0.01543426513671875,
0.006336212158203125,
0.016754150390625,
0.01556396484375,
0.011199951171875,
-0.0230865478515625,
-0.01532745361328125,
-0.0238189697265625,
0.0181884765625,
-0.008880615234375,
-0.00521087646484375,
-0.00604248046875,
0.0032596588134765625,
0.02301025390625,
0.0290679931640625,
-0.0054168701171875,
-0.0311279296875,
0.0209808349609375,
0.005828857421875,
-0.0189361572265625,
-0.051727294921875,
0.0679931640625,
0.050872802734375,
-0.0269622802734375,
-0.012237548828125,
-0.07281494140625,
0.020538330078125,
-0.07135009765625,
-0.005218505859375,
0.0114898681640625,
-0.0164642333984375,
0.00927734375,
0.047576904296875,
-0.014923095703125,
0.0215606689453125,
-0.00806427001953125,
0.038543701171875,
0.046875,
-0.0184326171875,
-0.0017957687377929688,
0.06268310546875,
-0.017181396484375,
-0.020538330078125,
0.0333251953125,
0.0226287841796875,
-0.02166748046875,
0.018890380859375,
0.0013017654418945312,
0.05377197265625,
0.065185546875,
-0.057220458984375,
-0.00925445556640625,
-0.01558685302734375,
0.0235748291015625,
0.033172607421875,
-0.01338958740234375,
-0.0231475830078125,
-0.0023632049560546875,
0.021209716796875,
0.0082550048828125,
-0.01715087890625,
0.00555419921875,
-0.0238189697265625,
-0.00963592529296875,
0.01357269287109375,
-0.042755126953125,
-0.001209259033203125,
0.01074981689453125,
0.006351470947265625,
0.004749298095703125,
0.022247314453125,
-0.10479736328125,
-0.034698486328125,
-0.0247039794921875,
0.0137176513671875,
0.060211181640625,
0.0069732666015625,
-0.0184326171875,
-0.03204345703125,
0.01488494873046875,
-0.06884765625,
-0.01861572265625,
0.050323486328125,
0.0003604888916015625,
-0.033721923828125,
-0.0009479522705078125,
-0.061187744140625,
-0.00844573974609375,
-0.0421142578125,
-0.04827880859375,
-0.0167999267578125,
0.00843048095703125,
0.024658203125,
0.0248260498046875,
0.003070831298828125,
-0.0284423828125,
-0.03192138671875,
-0.0089263916015625,
0.026519775390625,
0.041900634765625,
-0.0002701282501220703,
0.05206298828125,
-0.0010738372802734375,
0.053924560546875,
0.019317626953125,
0.00830841064453125,
-0.06842041015625,
-0.00501251220703125,
-0.009521484375,
-0.032867431640625,
0.0071258544921875,
-0.005828857421875,
0.00926971435546875,
0.00823974609375,
0.040863037109375,
0.004573822021484375,
0.032867431640625,
-0.0126800537109375,
0.0021495819091796875,
-0.037841796875,
-0.01873779296875,
-0.037078857421875,
0.04058837890625,
-0.03533935546875,
-0.0278472900390625,
0.005733489990234375,
-0.01073455810546875,
0.01751708984375,
-0.0271148681640625,
-0.0240325927734375,
-0.00904083251953125,
0.02001953125,
-0.03387451171875,
0.032745361328125,
0.059661865234375,
0.00038361549377441406,
0.031829833984375,
0.004688262939453125,
0.0214691162109375,
0.0189666748046875,
-0.005069732666015625,
0.0072021484375,
-0.0038623809814453125,
0.06182861328125,
0.0165863037109375,
0.0008230209350585938,
0.063232421875,
-0.0313720703125,
0.0206298828125,
0.050445556640625,
0.06768798828125,
-0.08111572265625,
0.0205535888671875,
0.0144805908203125,
0.0129852294921875,
0.056884765625,
0.00022077560424804688,
-0.028228759765625,
-0.059600830078125,
0.080078125,
-0.03289794921875,
0.0011053085327148438,
0.024627685546875,
-0.0198211669921875,
-0.0018320083618164062,
-0.00977325439453125,
0.053314208984375,
0.0007305145263671875,
0.0290374755859375,
-0.047607421875,
-0.022064208984375,
-0.021484375,
-0.0235137939453125,
-0.0025730133056640625,
0.0267791748046875,
-0.03790283203125,
-0.0955810546875,
-0.026580810546875,
0.00659942626953125,
-0.036285400390625,
-0.0291748046875,
-0.006717681884765625,
0.041656494140625,
0.032318115234375,
-0.00011414289474487305,
-0.037261962890625,
0.047576904296875,
-0.054443359375,
-0.03515625,
-0.05810546875,
-0.020233154296875,
0.048736572265625,
0.0046234130859375,
0.031646728515625,
0.02825927734375,
-0.0455322265625,
-0.009246826171875,
-0.0019741058349609375,
0.056396484375,
-0.007061004638671875,
-0.034576416015625,
0.021820068359375,
-0.02142333984375,
-0.0219268798828125,
0.020355224609375,
0.0159912109375,
-0.0032253265380859375,
-0.017791748046875,
0.004032135009765625,
-0.06927490234375,
-0.01433563232421875,
0.00093841552734375,
-0.085205078125,
0.06439208984375,
0.06353759765625,
0.01151275634765625,
-0.0184326171875,
0.0186309814453125,
-0.04595947265625,
-0.0203094482421875,
-0.0254974365234375,
0.0293426513671875,
-0.00801849365234375,
0.05438232421875,
-0.054443359375,
-0.01517486572265625,
0.00012433528900146484,
0.054931640625,
0.097412109375,
0.034393310546875,
-0.0229644775390625,
-0.01824951171875,
0.0018863677978515625,
-0.01042938232421875,
-0.0570068359375,
0.0509033203125,
-0.00909423828125,
0.00550079345703125,
0.0125885009765625,
-0.0178985595703125,
0.0250244140625,
-0.0224456787109375,
-0.021209716796875,
-0.0034275054931640625,
-0.01433563232421875,
-0.01385498046875,
-0.005062103271484375,
0.06280517578125,
-0.00579833984375,
-0.01959228515625,
0.008941650390625,
-0.0692138671875,
-0.01849365234375,
0.0269012451171875,
0.0394287109375,
-0.02392578125,
0.044036865234375,
-0.040313720703125,
0.0648193359375,
0.0198822021484375,
0.0133819580078125,
0.047760009765625,
0.031158447265625,
0.029876708984375,
-0.0213165283203125,
0.00897979736328125,
-0.00604248046875,
0.0026836395263671875,
0.035064697265625,
-0.0036067962646484375,
0.0249786376953125,
-0.029052734375,
-0.027374267578125,
0.000667572021484375,
0.038238525390625,
-0.02862548828125,
0.02923583984375,
0.016510009765625,
0.02203369140625,
0.03411865234375,
-0.0147247314453125,
0.0826416015625,
-0.011688232421875,
-0.04083251953125,
-0.07708740234375,
0.0010404586791992188,
0.00839996337890625,
0.04180908203125,
-0.023223876953125,
-0.00363922119140625,
-0.0283355712890625,
-0.028961181640625,
-0.031524658203125,
0.00829315185546875,
0.04119873046875,
-0.0220947265625,
-0.022064208984375,
0.027862548828125,
0.09075927734375,
0.029388427734375,
0.0233154296875,
-0.058258056640625,
0.037872314453125,
-0.0445556640625,
0.0310821533203125,
0.034393310546875,
0.016082763671875,
0.00899505615234375,
0.0014009475708007812,
-0.0301666259765625,
-0.00019621849060058594,
-0.00960540771484375,
-0.034637451171875,
-0.0194549560546875,
-0.00356292724609375,
-0.02996826171875,
0.043426513671875,
-0.03656005859375,
-0.002559661865234375,
-0.005107879638671875,
-0.025634765625,
0.0167999267578125,
-0.0229644775390625,
0.060943603515625,
-0.025634765625,
-0.003570556640625,
0.0010347366333007812,
-0.0287628173828125,
0.0350341796875,
0.01065826416015625,
0.0208282470703125,
-0.002399444580078125,
-0.059722900390625,
-0.0276031494140625,
0.00760650634765625,
0.00151824951171875,
0.0034122467041015625,
0.0205841064453125,
-0.01031494140625,
0.03253173828125,
-0.0158538818359375,
-0.0139007568359375,
0.029632568359375,
-0.01244354248046875,
-0.01390838623046875,
0.01486968994140625,
0.01458740234375,
-0.01971435546875,
-0.04449462890625,
-0.0250244140625,
-0.03857421875,
0.03271484375,
0.0292205810546875,
0.05169677734375,
0.002227783203125,
0.041229248046875,
-0.062042236328125,
0.0158843994140625,
-0.0921630859375,
-0.08441162109375,
0.08685302734375,
-0.042877197265625,
-0.0548095703125,
0.03631591796875,
-0.032745361328125,
0.04583740234375,
0.0300140380859375,
-0.00354766845703125,
0.0654296875,
-0.017578125,
-0.0197601318359375,
-0.04229736328125,
0.003955841064453125,
-0.029327392578125,
-0.044189453125,
-0.0384521484375,
0.00794219970703125,
0.00994873046875,
0.013671875,
-0.0241241455078125,
0.050048828125,
-0.005718231201171875,
0.03912353515625,
-0.01380157470703125,
0.0137176513671875,
-0.034637451171875,
0.020904541015625,
-0.0643310546875,
0.004177093505859375,
0.006732940673828125,
-0.0153350830078125,
0.004093170166015625,
-0.009796142578125,
0.026702880859375,
-0.0096282958984375,
0.0175018310546875,
-0.02093505859375,
-0.01177978515625,
0.049560546875,
0.00545501708984375,
0.01003265380859375,
-0.0506591796875,
0.01519775390625,
-0.0033664703369140625,
0.01203155517578125,
-0.020538330078125,
-0.0202789306640625,
-0.0091552734375,
0.0001239776611328125,
-0.006145477294921875,
-0.0340576171875,
-0.04058837890625,
-0.0017251968383789062,
-0.019317626953125,
0.00228118896484375,
-0.068115234375,
0.0251312255859375,
0.0172271728515625,
0.0280303955078125,
-0.048980712890625,
0.021942138671875,
-0.01163482666015625,
-0.007228851318359375,
-0.0653076171875,
-0.07470703125,
-0.05279541015625,
0.06103515625,
-0.068115234375,
-0.0018186569213867188,
0.042938232421875,
0.007373809814453125,
-0.054840087890625,
0.0056304931640625,
-0.0245208740234375,
0.045013427734375,
-0.074951171875,
0.00691986083984375,
-0.013824462890625,
0.0185699462890625,
-0.028778076171875,
-0.070068359375,
0.0216827392578125,
-0.04095458984375,
-0.0184478759765625,
-0.0008883476257324219,
-0.0015058517456054688,
0.027801513671875,
-0.03265380859375,
-0.056182861328125,
0.045440673828125,
-0.0085601806640625,
-0.0248870849609375,
-0.0302276611328125,
-0.0158538818359375,
-0.0110626220703125,
0.026275634765625,
0.004543304443359375,
-0.052734375,
-0.0322265625,
0.031402587890625,
-0.00272369384765625,
0.00608062744140625,
0.031036376953125,
-0.01451873779296875,
-0.0160675048828125,
0.006923675537109375,
0.0106048583984375,
-0.026123046875,
-0.0272064208984375,
-0.005847930908203125,
0.01490020751953125,
0.026519775390625,
-0.006282806396484375,
-0.024505615234375,
0.0289764404296875,
-0.03192138671875,
-0.051239013671875,
-0.036956787109375,
-0.0258331298828125,
-0.01355743408203125,
0.098388671875,
0.08526611328125,
0.0198822021484375,
-0.0433349609375,
0.0279083251953125,
-0.015716552734375,
-0.0151214599609375,
-0.0217132568359375,
-0.0013628005981445312,
-0.020538330078125,
-0.00909423828125,
-0.0179443359375,
0.005832672119140625,
-0.0352783203125,
-0.0416259765625,
-0.0288543701171875,
-0.0191802978515625,
-0.0031585693359375,
0.0223388671875,
0.031463623046875,
-0.05230712890625,
0.0142059326171875,
-0.0094757080078125,
-0.01314544677734375,
0.006023406982421875,
0.037139892578125,
-0.00798797607421875,
0.057373046875,
-0.0218353271484375,
-0.0496826171875,
-0.0012187957763671875,
0.01529693603515625,
-0.015289306640625,
0.0498046875,
-0.00937652587890625,
-0.02130126953125,
0.01329803466796875,
-0.005565643310546875,
-0.0199127197265625,
-0.026153564453125,
0.0307769775390625,
0.03155517578125,
-0.02734375,
0.0855712890625,
-0.008270263671875,
-0.01459503173828125,
-0.034637451171875,
0.042572021484375,
0.005321502685546875,
-0.018341064453125,
0.01485443115234375,
-0.0002715587615966797,
0.00677490234375,
0.039398193359375,
0.0352783203125,
-0.0328369140625,
0.03924560546875,
0.057525634765625,
0.041168212890625,
0.0218048095703125
]
|
a9cb4c62966570fcb77e5e3d5f8e080f42332be4 | Wordpress Stackexchange
Q: Media upload via backend doen't work after moving site I have copied my site to a subdirectory for test purposes, everything works fine now. The only problem I have seen so far is the Media upload. When I try to upload a file I get a:
Unable to create directory wp-content/uploads/2016/05. Is its parent directory writable by the server?
The wp-content folder has a 755 permission, the uploads folder also.
I tried to add this to my wp-config
define( 'UPLOADS', 'wp-content/'.'uploads');
in the section before the table prefix is set, because I thought maybe I have to tell WP that the path changed
define( 'UPLOADS', 'unterverzeichnis/wp-content/'.'uploads');
but I get the same error.
Any Ideas?
| Q: Media upload via backend doen't work after moving site I have copied my site to a subdirectory for test purposes, everything works fine now. The only problem I have seen so far is the Media upload. When I try to upload a file I get a:
Unable to create directory wp-content/uploads/2016/05. Is its parent directory writable by the server?
The wp-content folder has a 755 permission, the uploads folder also.
I tried to add this to my wp-config
define( 'UPLOADS', 'wp-content/'.'uploads');
in the section before the table prefix is set, because I thought maybe I have to tell WP that the path changed
define( 'UPLOADS', 'unterverzeichnis/wp-content/'.'uploads');
but I get the same error.
Any Ideas?
| wordpress | {
"language": "en",
"length": 115,
"provenance": "stackexchange_00019.jsonl.gz:465145",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/225464"
} | [
-0.002178192138671875,
-0.00922393798828125,
-0.009490966796875,
0.048004150390625,
-0.02606201171875,
-0.04058837890625,
0.043060302734375,
-0.0413818359375,
0.0177001953125,
0.0279541015625,
0.00763702392578125,
0.0028896331787109375,
0.025787353515625,
-0.03887939453125,
-0.00505828857421875,
0.005634307861328125,
0.02252197265625,
0.004901885986328125,
0.0217132568359375,
-0.0171051025390625,
-0.01849365234375,
0.0222930908203125,
0.021209716796875,
0.027862548828125,
-0.004425048828125,
0.021331787109375,
-0.030914306640625,
-0.02374267578125,
-0.0213470458984375,
-0.03253173828125,
-0.0012722015380859375,
0.0472412109375,
0.0297698974609375,
-0.0049591064453125,
-0.00888824462890625,
-0.0048675537109375,
0.0197601318359375,
-0.008392333984375,
0.0005941390991210938,
0.0281219482421875,
0.02020263671875,
-0.0115203857421875,
0.048583984375,
0.02972412109375,
0.025299072265625,
-0.05511474609375,
0.03680419921875,
-0.06585693359375,
0.02142333984375,
0.018280029296875,
-0.01288604736328125,
0.029296875,
-0.01251220703125,
0.00373077392578125,
0.0027923583984375,
-0.021636962890625,
0.00843048095703125,
0.01045989990234375,
0.014404296875,
-0.0291900634765625,
-0.038116455078125,
0.02081298828125,
0.01387786865234375,
0.0245513916015625,
0.01259613037109375,
-0.0030307769775390625,
0.01297760009765625,
0.031158447265625,
-0.05615234375,
-0.0088653564453125,
0.0297698974609375,
-0.036590576171875,
0.021392822265625,
-0.03887939453125,
0.0401611328125,
-0.00787353515625,
0.0038318634033203125,
-0.004390716552734375,
0.01139068603515625,
0.00641632080078125,
-0.004726409912109375,
-0.0197906494140625,
-0.03143310546875,
-0.059722900390625,
0.050323486328125,
-0.00745391845703125,
0.0015764236450195312,
-0.00027751922607421875,
-0.0074462890625,
0.0213470458984375,
-0.017852783203125,
-0.0060577392578125,
0.0215911865234375,
0.018707275390625,
-0.008148193359375,
-0.0117340087890625,
0.0178985595703125,
0.040313720703125,
-0.0092926025390625,
0.00970458984375,
-0.0274658203125,
-0.031463623046875,
0.01849365234375,
-0.03125,
0.043975830078125,
-0.0245513916015625,
-0.04901123046875,
-0.075439453125,
0.070068359375,
0.037017822265625,
-0.03253173828125,
0.093505859375,
-0.007266998291015625,
-0.0225830078125,
-0.02685546875,
0.040008544921875,
-0.0012121200561523438,
-0.0016345977783203125,
0.004703521728515625,
0.005825042724609375,
-0.0028400421142578125,
0.021148681640625,
-0.052764892578125,
0.0003180503845214844,
0.0286712646484375,
-0.0003237724304199219,
-0.00959014892578125,
0.0301055908203125,
-0.0004253387451171875,
0.0239410400390625,
-0.0311126708984375,
0.031646728515625,
0.05889892578125,
-0.0239105224609375,
-0.0322265625,
-0.0161590576171875,
0.01300811767578125,
-0.0138397216796875,
0.0041656494140625,
0.0270538330078125,
0.01366424560546875,
-0.05902099609375,
-0.01372528076171875,
0.01261138916015625,
-0.002044677734375,
0.03155517578125,
0.03289794921875,
0.0138702392578125,
-0.015289306640625,
-0.10052490234375,
0.036712646484375,
0.007373809814453125,
0.0657958984375,
-0.0234527587890625,
-0.0168609619140625,
-0.07598876953125,
0.02740478515625,
-0.06573486328125,
0.00823211669921875,
-0.0657958984375,
0.0511474609375,
0.02239990234375,
0.02923583984375,
0.0008878707885742188,
-0.0033626556396484375,
-0.06182861328125,
-0.06365966796875,
-0.006725311279296875,
0.03082275390625,
0.033966064453125,
0.0132904052734375,
-0.0300445556640625,
-0.0269012451171875,
0.0032787322998046875,
-0.005336761474609375,
0.0095672607421875,
0.0197601318359375,
-0.0007185935974121094,
0.00827789306640625,
0.06927490234375,
0.013671875,
-0.01404571533203125,
0.040313720703125,
-0.00222015380859375,
-0.0239715576171875,
-0.0059814453125,
0.0250396728515625,
0.01221466064453125,
-0.00917816162109375,
0.0177154541015625,
0.051116943359375,
0.0226287841796875,
-0.00981903076171875,
0.0372314453125,
-0.0218658447265625,
-0.0433349609375,
-0.02728271484375,
0.01418304443359375,
-0.024993896484375,
0.0005855560302734375,
0.0177764892578125,
-0.005802154541015625,
0.023681640625,
0.017974853515625,
0.003021240234375,
0.00969696044921875,
-0.00614166259765625,
-0.017425537109375,
0.0100860595703125,
-0.00812530517578125,
0.009674072265625,
0.0227813720703125,
-0.016082763671875,
-0.0704345703125,
-0.03997802734375,
0.045501708984375,
-0.046875,
0.0210113525390625,
-0.015869140625,
0.08221435546875,
-0.04779052734375,
-0.01007843017578125,
-0.05169677734375,
-0.030364990234375,
0.0193023681640625,
0.01117706298828125,
-0.0218505859375,
0.0102386474609375,
0.03399658203125,
0.0090179443359375,
0.04144287109375,
0.00750732421875,
0.01111602783203125,
-0.0022296905517578125,
-0.0249786376953125,
-0.0163421630859375,
-0.0269927978515625,
-0.1005859375,
0.0095367431640625,
0.08209228515625,
0.028533935546875,
0.008514404296875,
0.0032787322998046875,
0.037506103515625,
0.037078857421875,
-0.02020263671875,
0.0140228271484375,
0.00826263427734375,
-0.0129852294921875,
0.031280517578125,
-0.00875091552734375,
-0.0018091201782226562,
0.0095367431640625,
-0.09368896484375,
-0.015625,
0.041717529296875,
-0.007442474365234375,
0.0103759765625,
0.0168304443359375,
-0.0104217529296875,
0.002658843994140625,
-0.01428985595703125,
-0.0228424072265625,
-0.00899505615234375,
0.0166778564453125,
0.0209197998046875,
0.00807952880859375,
-0.00986480712890625,
-0.046478271484375,
0.049835205078125,
0.034088134765625,
-0.046844482421875,
0.0006871223449707031,
0.032806396484375,
0.07879638671875,
0.031463623046875,
-0.05499267578125,
-0.027984619140625,
0.047027587890625,
0.042755126953125,
-0.028564453125,
0.0204620361328125,
-0.04583740234375,
-0.0114593505859375,
-0.036041259765625,
-0.0406494140625,
0.0108184814453125,
0.00533294677734375,
-0.004825592041015625,
-0.007663726806640625,
0.0220947265625,
0.027191162109375,
-0.0135650634765625,
0.0406494140625,
-0.018157958984375,
-0.0142059326171875,
0.054962158203125,
-0.0192413330078125,
0.0273284912109375,
-0.00930023193359375,
0.0290679931640625,
0.05059814453125,
-0.006317138671875,
-0.00940704345703125,
-0.00795745849609375,
0.0191802978515625,
0.001010894775390625,
0.033966064453125,
0.00042510032653808594,
-0.046112060546875,
-0.0396728515625,
-0.055877685546875,
0.0185089111328125,
-0.0360107421875,
0.0163116455078125,
0.0090789794921875,
-0.02783203125,
-0.01471710205078125,
-0.07696533203125,
-0.0469970703125,
-0.0234832763671875,
-0.06396484375,
-0.0006937980651855469,
0.00443267822265625,
-0.027923583984375,
-0.01433563232421875,
0.0374755859375,
0.005207061767578125,
-0.01763916015625,
0.002826690673828125,
-0.0162200927734375,
-0.02447509765625,
-0.037933349609375,
-0.032501220703125,
-0.006488800048828125,
0.01983642578125,
0.003978729248046875,
0.01331329345703125,
-0.01340484619140625,
-0.06103515625,
-0.0255889892578125,
0.05670166015625,
0.01152801513671875,
-0.00844573974609375,
0.0240478515625,
0.005588531494140625,
0.0101776123046875,
-0.00409698486328125,
0.0294342041015625,
0.047027587890625,
-0.0462646484375,
-0.01131439208984375,
-0.016876220703125,
-0.03997802734375,
-0.04278564453125,
0.054412841796875,
0.040374755859375,
-0.038177490234375,
-0.00653839111328125,
-0.07000732421875,
-0.0147552490234375,
-0.0117950439453125,
-0.0250091552734375,
0.025177001953125,
-0.0201568603515625,
0.0048828125,
0.005184173583984375,
0.038970947265625,
0.0018663406372070312,
0.06146240234375,
-0.00432586669921875,
-0.0075531005859375,
0.01337432861328125,
-0.01174163818359375,
-0.0099945068359375,
0.005817413330078125,
0.00079345703125,
-0.0229034423828125,
-0.002590179443359375,
-0.0106201171875,
0.003841400146484375,
-0.02288818359375,
0.0262908935546875,
-0.0211181640625,
-0.07879638671875,
0.0458984375,
-0.0657958984375,
-0.00577545166015625,
-0.060302734375,
-0.0081329345703125,
-0.0231781005859375,
0.08917236328125,
-0.050537109375,
-0.011322021484375,
0.004451751708984375,
0.0213165283203125,
-0.008056640625,
-0.032135009765625,
-0.02777099609375,
-0.01389312744140625,
0.056793212890625,
-0.0260467529296875,
-0.005435943603515625,
0.001346588134765625,
0.006072998046875,
-0.09405517578125,
0.034149169921875,
-0.00592041015625,
0.047515869140625,
-0.05731201171875,
0.025390625,
-0.0125885009765625,
0.019378662109375,
-0.0550537109375,
-0.01369476318359375,
-0.02801513671875,
-0.0986328125,
-0.020050048828125,
-0.00534820556640625,
0.060028076171875,
-0.01201629638671875,
0.0284576416015625,
-0.0477294921875,
0.052001953125,
-0.0099029541015625,
0.0219268798828125,
0.0028781890869140625,
0.01383209228515625,
0.0232391357421875,
-0.00942230224609375,
0.00586700439453125,
-0.0239410400390625,
-0.0200347900390625,
-0.0599365234375,
-0.0017309188842773438,
0.0034542083740234375,
-0.038909912109375,
0.023101806640625,
-0.0338134765625,
0.01305389404296875,
-0.01800537109375,
-0.035491943359375,
-0.06805419921875,
-0.0227203369140625,
-0.0096435546875,
-0.0203857421875,
-0.037017822265625,
-0.04071044921875,
0.04632568359375,
-0.0582275390625,
0.021728515625,
-0.0003066062927246094,
0.09979248046875,
0.004589080810546875,
0.002559661865234375,
-0.02435302734375,
0.0015439987182617188,
0.01132965087890625,
0.0015630722045898438,
0.04620361328125,
0.0024433135986328125,
0.007904052734375,
0.0205230712890625,
-0.013336181640625,
0.01001739501953125,
0.01424407958984375,
-0.008544921875,
0.01284027099609375,
-0.0214691162109375,
0.004306793212890625,
0.0094757080078125,
0.0165863037109375,
-0.0211944580078125,
-0.034393310546875,
0.017364501953125,
-0.033538818359375,
0.0231475830078125,
0.01352691650390625,
0.0117034912109375,
-0.037261962890625,
-0.0926513671875,
0.033538818359375,
-0.08746337890625,
0.01319122314453125,
-0.0060272216796875,
-0.0009565353393554688,
0.0662841796875,
0.03350830078125,
0.0048370361328125,
-0.003223419189453125,
0.00855255126953125,
-0.007167816162109375,
0.03118896484375,
0.021759033203125,
0.00015544891357421875,
-0.0296173095703125,
-0.0008769035339355469,
0.03790283203125,
0.01525115966796875,
-0.027862548828125,
-0.02728271484375,
-0.0030345916748046875,
-0.0221099853515625,
0.007476806640625,
-0.0254364013671875,
-0.0013170242309570312,
0.01250457763671875,
-0.019073486328125,
0.004299163818359375,
-0.021392822265625,
0.006988525390625,
-0.03533935546875,
0.04156494140625,
0.013580322265625,
-0.0305023193359375,
0.0216827392578125,
-0.0222625732421875,
-0.004184722900390625,
-0.01385498046875,
0.0107421875,
-0.0022563934326171875,
-0.001575469970703125,
0.040679931640625,
0.01454925537109375,
-0.0135955810546875,
0.01161956787109375,
0.00856781005859375,
0.040557861328125,
-0.047515869140625,
0.018768310546875,
0.04034423828125,
0.060394287109375,
0.01311492919921875,
-0.0421142578125,
0.01419830322265625,
-0.05072021484375,
-0.00241851806640625,
0.0081024169921875,
-0.046722412109375,
-0.0462646484375,
0.00156402587890625,
-0.0033130645751953125,
0.01102447509765625,
-0.03216552734375,
0.005321502685546875,
0.0040283203125,
-0.043121337890625,
-0.0203094482421875,
0.060028076171875,
-0.01251220703125,
-0.032867431640625,
-0.046051025390625,
-0.006683349609375,
-0.0304718017578125,
0.0077056884765625,
-0.033416748046875,
0.0082244873046875,
-0.03326416015625,
-0.0257568359375,
0.055694580078125,
-0.0046844482421875,
-0.033111572265625,
-0.00475311279296875,
0.0191650390625,
-0.048431396484375,
0.02081298828125,
0.0174713134765625,
-0.01546478271484375,
-0.01357269287109375,
-0.006587982177734375,
-0.0301361083984375,
-0.0161285400390625,
0.00377655029296875,
-0.01349639892578125,
-0.02392578125,
-0.0233917236328125,
-0.0290069580078125,
0.002307891845703125,
-0.01439666748046875,
-0.02105712890625,
-0.033935546875,
0.03485107421875,
0.037994384765625,
-0.007537841796875,
-0.023590087890625,
0.037109375,
0.000553131103515625,
0.0298614501953125,
0.0037631988525390625,
0.002315521240234375,
-0.0113525390625,
-0.0164031982421875,
-0.0229644775390625,
-0.0269927978515625,
-0.005245208740234375,
0.005893707275390625,
0.008209228515625,
0.06304931640625,
0.06622314453125,
0.01415252685546875,
0.042724609375,
-0.041595458984375,
-0.00946044921875,
-0.025238037109375,
0.048248291015625,
-0.07861328125,
0.01064300537109375,
-0.02325439453125,
-0.0294189453125,
0.039825439453125,
0.0017194747924804688,
-0.019805908203125,
0.0362548828125,
-0.032623291015625,
0.021484375,
0.0537109375,
0.0001932382583618164,
0.0173797607421875,
0.08245849609375,
-0.00879669189453125,
0.06103515625,
0.04876708984375,
0.03533935546875,
0.0625,
0.028472900390625,
0.01430511474609375,
-0.0173187255859375,
0.04229736328125,
0.0106964111328125,
0.00162506103515625,
0.0142974853515625,
-0.0224609375,
0.019866943359375,
0.021728515625,
0.03936767578125,
-0.0241546630859375,
-0.0053558349609375,
0.00475311279296875,
-0.033721923828125,
0.00360870361328125,
-0.014404296875,
0.004734039306640625,
-0.00005519390106201172,
0.01331329345703125,
0.005634307861328125,
-0.027496337890625,
0.00421142578125,
-0.00360870361328125,
-0.00041413307189941406,
0.0280914306640625,
0.01055145263671875,
0.00421142578125,
-0.0094757080078125,
-0.057769775390625,
0.01922607421875,
-0.006298065185546875,
0.0185699462890625,
0.039947509765625,
-0.03228759765625,
-0.00797271728515625,
-0.0207977294921875,
-0.003124237060546875,
-0.0153350830078125,
-0.014007568359375,
-0.0153350830078125,
0.0021839141845703125,
0.06683349609375,
0.04144287109375,
0.00685882568359375,
-0.0041656494140625,
0.022369384765625,
0.0246734619140625,
-0.002994537353515625,
-0.0071868896484375,
0.048187255859375,
-0.0189208984375,
-0.06768798828125,
0.007793426513671875,
-0.059356689453125,
-0.0195159912109375,
0.01453399658203125,
0.0139312744140625,
0.00977325439453125,
-0.03448486328125,
-0.01010894775390625,
0.04656982421875,
0.005733489990234375,
-0.00392913818359375,
0.0273895263671875,
0.0240325927734375,
-0.03955078125,
-0.0283203125,
0.0296630859375,
-0.02264404296875,
-0.0017690658569335938,
0.0435791015625,
-0.0234832763671875,
0.09027099609375,
-0.044342041015625,
0.021453857421875,
0.0849609375,
0.029083251953125,
-0.053558349609375,
-0.007099151611328125,
-0.0521240234375,
0.022735595703125,
-0.01076507568359375,
0.0210418701171875,
-0.06256103515625,
-0.0011320114135742188,
-0.0242156982421875,
0.031158447265625,
0.061187744140625,
0.012664794921875,
-0.0276947021484375,
0.0009202957153320312,
0.056884765625,
0.023529052734375,
0.006473541259765625,
0.050201416015625,
-0.0220489501953125,
-0.0089874267578125,
0.001560211181640625,
-0.005413055419921875,
0.0231781005859375,
-0.00555419921875,
-0.0655517578125,
-0.00931549072265625,
0.00618743896484375,
-0.0035915374755859375,
-0.01824951171875,
-0.0009202957153320312,
-0.0352783203125,
-0.0006341934204101562,
0.0347900390625,
-0.026702880859375,
0.0088348388671875,
0.0190887451171875,
0.006565093994140625,
-0.0548095703125,
0.00989532470703125,
-0.034912109375,
0.033660888671875,
-0.0175933837890625,
0.0208740234375,
-0.003936767578125,
0.017974853515625,
0.0018472671508789062,
-0.01525115966796875,
0.0046234130859375,
0.04315185546875,
-0.044036865234375,
0.0274505615234375,
0.031829833984375,
0.02911376953125,
-0.0223541259765625,
-0.01161956787109375,
0.00960540771484375,
0.040924072265625,
-0.028228759765625,
-0.0264129638671875,
0.0279541015625,
0.01511383056640625,
-0.008544921875,
0.0008978843688964844,
-0.0078582763671875,
-0.0189971923828125,
0.0117340087890625,
-0.03302001953125,
-0.0209808349609375,
0.01239013671875,
0.03515625,
0.0014410018920898438,
-0.002132415771484375,
-0.00713348388671875,
-0.0440673828125,
-0.0132598876953125,
-0.0091400146484375,
0.00616455078125,
0.032623291015625,
0.01409912109375,
0.0241546630859375,
-0.0201263427734375,
-0.01593017578125,
0.0088653564453125,
0.037017822265625,
-0.0201416015625,
0.01287841796875,
-0.02813720703125,
-0.059906005859375,
0.03948974609375,
0.0252685546875,
0.0197906494140625,
0.0859375,
0.046844482421875,
0.001922607421875,
-0.01348114013671875,
0.01226043701171875,
0.0299224853515625,
-0.032958984375,
0.01380157470703125,
-0.0413818359375,
0.005008697509765625,
-0.0181121826171875,
-0.0017747879028320312,
-0.046173095703125,
0.0181884765625,
0.033966064453125,
-0.01038360595703125,
0.027374267578125,
-0.0079345703125,
-0.0289306640625,
0.016876220703125,
-0.0445556640625,
0.05987548828125,
-0.02166748046875,
-0.0173797607421875,
0.0066986083984375,
-0.0044403076171875,
-0.021148681640625,
-0.0074920654296875,
0.02032470703125,
-0.0233001708984375,
0.02716064453125,
0.01001739501953125,
-0.020416259765625,
0.0024356842041015625,
0.01239013671875,
0.0216064453125,
0.0304718017578125,
0.01367950439453125,
0.020355224609375,
-0.044952392578125,
-0.016265869140625,
-0.033447265625,
0.0443115234375,
0.033050537109375,
0.1207275390625,
-0.043487548828125,
0.026397705078125,
0.021759033203125,
0.01004791259765625,
-0.021453857421875,
0.007244110107421875,
0.01352691650390625,
-0.008270263671875,
-0.00560760498046875,
-0.0244293212890625,
-0.00026798248291015625,
0.0203094482421875,
-0.00038123130798339844,
-0.044158935546875,
-0.0196990966796875,
-0.019683837890625,
0.0165557861328125,
0.044921875,
0.019134521484375,
-0.0235748291015625,
-0.01438140869140625,
-0.0218963623046875,
-0.0137939453125,
0.028839111328125,
0.0158538818359375,
-0.0250701904296875,
0.050445556640625,
-0.0259246826171875,
-0.054534912109375,
0.0271759033203125,
-0.07379150390625,
0.019317626953125,
0.0309906005859375,
0.01800537109375,
-0.048431396484375,
-0.022674560546875,
-0.006198883056640625,
-0.01739501953125,
0.01068115234375,
0.038543701171875,
-0.0000508427619934082,
-0.00664520263671875,
-0.01290130615234375,
-0.009490966796875,
-0.004955291748046875,
-0.028228759765625,
-0.01568603515625,
0.01149749755859375,
-0.003437042236328125,
0.006053924560546875,
-0.0687255859375,
-0.01328277587890625,
-0.052093505859375,
0.00003606081008911133,
0.043548583984375,
-0.0189666748046875,
0.01031494140625,
-0.007167816162109375,
0.00569915771484375,
0.05242919921875,
0.0260162353515625,
-0.0867919921875,
0.024505615234375,
-0.0200042724609375,
0.057342529296875,
0.01232147216796875,
0.0305938720703125,
-0.03314208984375,
-0.0002028942108154297,
-0.031982421875,
-0.05548095703125,
-0.039276123046875,
0.056884765625,
-0.0244598388671875,
0.0258026123046875,
0.028045654296875,
-0.0250701904296875,
0.015655517578125,
0.043121337890625,
0.0293731689453125,
0.0924072265625,
0.007648468017578125,
-0.0426025390625,
-0.047821044921875,
0.0127105712890625,
0.0162353515625,
0.0211334228515625,
0.0256500244140625,
-0.0204925537109375,
-0.0241241455078125,
-0.059814453125,
0.010406494140625,
-0.00441741943359375,
-0.056427001953125,
-0.0986328125,
-0.0284881591796875,
-0.0065460205078125,
-0.04852294921875,
-0.005504608154296875,
-0.01326751708984375,
-0.020599365234375,
0.040557861328125,
0.01464080810546875,
-0.026947021484375,
0.007274627685546875,
0.043853759765625,
0.0128021240234375,
0.0032196044921875,
0.01139068603515625,
0.006664276123046875,
-0.059844970703125,
0.00949859619140625,
-0.000812530517578125,
0.01171112060546875,
0.0185394287109375,
0.0008087158203125,
0.0038814544677734375,
0.0478515625,
-0.01500701904296875,
-0.002750396728515625,
-0.01107025146484375,
-0.07037353515625,
-0.005031585693359375,
0.017547607421875,
-0.01403045654296875,
0.00322723388671875,
0.01715087890625,
0.050445556640625,
0.0003368854522705078,
-0.0058441162109375,
-0.01508331298828125,
-0.062347412109375,
0.00019037723541259766,
-0.006145477294921875,
0.0002551078796386719,
-0.06494140625,
0.0031070709228515625,
0.034820556640625,
0.0029430389404296875,
-0.026824951171875,
-0.004695892333984375,
-0.00902557373046875,
-0.0133514404296875,
0.016204833984375,
-0.0032501220703125,
0.0157318115234375,
-0.043853759765625,
0.09722900390625,
-0.0455322265625,
0.005115509033203125,
0.0187835693359375,
0.030487060546875,
0.043792724609375,
0.03167724609375,
0.0284423828125,
0.006557464599609375,
-0.0316162109375,
0.0039215087890625,
0.0199737548828125,
0.007236480712890625,
-0.00420379638671875,
-0.037506103515625,
0.025299072265625,
-0.01255035400390625,
-0.032562255859375,
-0.0199432373046875,
0.028289794921875,
0.038970947265625,
-0.04852294921875,
0.08770751953125,
-0.0006575584411621094,
-0.0003376007080078125,
-0.0292510986328125,
0.047271728515625,
-0.01611328125,
-0.00864410400390625,
0.00556182861328125,
0.0023860931396484375,
0.01312255859375,
-0.0027923583984375,
0.01526641845703125,
-0.047607421875,
0.0284271240234375,
-0.021331787109375,
0.004985809326171875,
0.0205535888671875
]
|
0e24eee1236c3b3ec999b859118fe152fa4cfcb7 | Wordpress Stackexchange
Q: How to wrap submit button of comment form with div Is there a way to wrap the submit button with html element while using wordpress function comment_form function.
$comments_args = array(
'id_form' => 'main-contact-form',
'class_form' => 'contact-form',
'class_submit' => 'btn btn-primary btn-lg',
'label_submit' => 'Add Comment',
'fields' => $fields,
'title_reply_before' => '<div class="message_heading"><h4>',
'title_reply_after' => '</h4><p>Make sure you enter the(*)required information where indicate.HTML code is not allowed</p></div>',
'comment_field' => '
<div class="row"><div class="col-sm-7">
<div class="form-group">
<label>Message *</label>
<textarea name="message" id="message" required="required" class="form-control" rows="8"></textarea>
</div>
</div>'
);
comment_form($comments_args);
I want output code for submit button be like:
<div class="form-group">
<input type="submit" class="btn btn-primary btn-lg>
</div>
A: Please place below code in your theme's functions.php file and it will wrap the submit button inside div:
// define the comment_form_submit_button callback
function filter_comment_form_submit_button( $submit_button, $args ) {
// make filter magic happen here...
$submit_before = '<div class="form-group">';
$submit_after = '</div>';
return $submit_before . $submit_button . $submit_after;
};
// add the filter
add_filter( 'comment_form_submit_button', 'filter_comment_form_submit_button', 10, 2 );
| Q: How to wrap submit button of comment form with div Is there a way to wrap the submit button with html element while using wordpress function comment_form function.
$comments_args = array(
'id_form' => 'main-contact-form',
'class_form' => 'contact-form',
'class_submit' => 'btn btn-primary btn-lg',
'label_submit' => 'Add Comment',
'fields' => $fields,
'title_reply_before' => '<div class="message_heading"><h4>',
'title_reply_after' => '</h4><p>Make sure you enter the(*)required information where indicate.HTML code is not allowed</p></div>',
'comment_field' => '
<div class="row"><div class="col-sm-7">
<div class="form-group">
<label>Message *</label>
<textarea name="message" id="message" required="required" class="form-control" rows="8"></textarea>
</div>
</div>'
);
comment_form($comments_args);
I want output code for submit button be like:
<div class="form-group">
<input type="submit" class="btn btn-primary btn-lg>
</div>
A: Please place below code in your theme's functions.php file and it will wrap the submit button inside div:
// define the comment_form_submit_button callback
function filter_comment_form_submit_button( $submit_button, $args ) {
// make filter magic happen here...
$submit_before = '<div class="form-group">';
$submit_after = '</div>';
return $submit_before . $submit_button . $submit_after;
};
// add the filter
add_filter( 'comment_form_submit_button', 'filter_comment_form_submit_button', 10, 2 );
A: We can use comment_form function's submit_button parameter to change submit button HTML.
Default HTML for submit_button is
<input name="%1$s" type="submit" id="%2$s" class="%3$s" value="%4$s" />
You can change your code like this.
$comments_args = array(
....
'submit_button' => '<div class="form-group">
<input name="%1$s" type="submit" id="%2$s" class="%3$s" value="%4$s" />
</div>'
....
);
Update:
Regarding %1$s , %2$s and so on..
If you take a look at comment_form() source, you can see that submit_button is going through sprintf like this.
$submit_button = sprintf(
$args['submit_button'],
esc_attr( $args['name_submit'] ),
esc_attr( $args['id_submit'] ),
esc_attr( $args['class_submit'] ),
esc_attr( $args['label_submit'] )
);
A: Even more updated answer:
'submit_field' => '<p class="form-submit">%1$s %2$s</p>',
| wordpress | {
"language": "en",
"length": 269,
"provenance": "stackexchange_00019.jsonl.gz:465148",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/225477"
} | [
0.04364013671875,
-0.0283203125,
-0.0014324188232421875,
-0.04339599609375,
-0.01045989990234375,
-0.029022216796875,
0.018341064453125,
0.0134429931640625,
-0.0009751319885253906,
0.0258636474609375,
-0.043243408203125,
0.0128173828125,
-0.01517486572265625,
-0.01445770263671875,
-0.00872039794921875,
-0.038177490234375,
0.0171966552734375,
0.004398345947265625,
0.01262664794921875,
-0.01763916015625,
0.0276336669921875,
-0.00800323486328125,
-0.0203399658203125,
0.036834716796875,
0.022003173828125,
-0.0240631103515625,
0.122314453125,
-0.0157012939453125,
0.0236968994140625,
-0.01068878173828125,
0.0141754150390625,
-0.039886474609375,
0.052825927734375,
0.025726318359375,
-0.0831298828125,
0.0036220550537109375,
-0.030609130859375,
0.0016126632690429688,
-0.046173095703125,
0.054931640625,
0.040740966796875,
-0.0146636962890625,
-0.01092529296875,
-0.005401611328125,
-0.02392578125,
-0.0064849853515625,
0.00974273681640625,
-0.01445770263671875,
-0.003131866455078125,
-0.0189361572265625,
-0.007389068603515625,
0.026580810546875,
0.0240936279296875,
-0.03497314453125,
0.0034236907958984375,
0.042755126953125,
-0.059906005859375,
-0.03094482421875,
0.0093841552734375,
0.039093017578125,
0.046905517578125,
-0.031402587890625,
0.00852203369140625,
-0.001972198486328125,
0.003887176513671875,
-0.004543304443359375,
0.025970458984375,
0.00463104248046875,
0.0266571044921875,
0.0015783309936523438,
-0.00977325439453125,
-0.00439453125,
-0.002452850341796875,
-0.041595458984375,
0.0276947021484375,
0.004543304443359375,
0.004947662353515625,
0.004337310791015625,
0.005863189697265625,
0.0035858154296875,
-0.00775146484375,
-0.0166778564453125,
-0.032440185546875,
-0.00980377197265625,
0.00991058349609375,
0.0140533447265625,
-0.006664276123046875,
-0.0171661376953125,
0.00447845458984375,
-0.03314208984375,
0.00841522216796875,
-0.03790283203125,
-0.0179595947265625,
0.0156707763671875,
-0.002880096435546875,
-0.05621337890625,
-0.0105438232421875,
-0.019439697265625,
0.016754150390625,
0.0024242401123046875,
0.03265380859375,
-0.05511474609375,
0.0677490234375,
-0.033233642578125,
0.013885498046875,
0.05010986328125,
-0.0264739990234375,
-0.021728515625,
0.0229034423828125,
0.00794219970703125,
0.0146026611328125,
-0.036468505859375,
-0.0282135009765625,
-0.032135009765625,
-0.0204620361328125,
0.0009126663208007812,
-0.057098388671875,
0.011688232421875,
0.0011510848999023438,
0.0003795623779296875,
-0.005420684814453125,
0.02301025390625,
0.003643035888671875,
-0.04583740234375,
0.01629638671875,
-0.004734039306640625,
0.01502227783203125,
-0.044769287109375,
0.0455322265625,
0.0041656494140625,
-0.04486083984375,
-0.0029621124267578125,
0.07440185546875,
0.0384521484375,
0.038421630859375,
-0.0238189697265625,
0.018951416015625,
-0.0010919570922851562,
0.01013946533203125,
0.01079559326171875,
0.005809783935546875,
-0.02191162109375,
0.0026035308837890625,
0.0170135498046875,
-0.0789794921875,
0.03271484375,
0.01751708984375,
-0.01543426513671875,
-0.04534912109375,
-0.1087646484375,
0.01104736328125,
-0.041839599609375,
0.056884765625,
0.004322052001953125,
-0.0445556640625,
-0.0167388916015625,
0.0123748779296875,
-0.0220794677734375,
-0.03814697265625,
-0.05230712890625,
-0.015960693359375,
0.018768310546875,
0.04852294921875,
-0.024078369140625,
-0.0242462158203125,
-0.0234832763671875,
-0.03582763671875,
-0.00341033935546875,
0.02197265625,
0.06597900390625,
-0.034912109375,
-0.03204345703125,
-0.0001742839813232422,
0.0224456787109375,
-0.020477294921875,
0.0215606689453125,
0.00533294677734375,
-0.014923095703125,
0.0430908203125,
0.00621795654296875,
-0.02783203125,
-0.03216552734375,
0.052642822265625,
-0.031280517578125,
-0.049835205078125,
0.051025390625,
0.0206298828125,
0.049072265625,
-0.0257720947265625,
0.004909515380859375,
0.035400390625,
0.05462646484375,
-0.0192108154296875,
0.0301666259765625,
-0.0052337646484375,
-0.04522705078125,
-0.010406494140625,
-0.0150604248046875,
-0.0262298583984375,
0.0209503173828125,
-0.04351806640625,
0.0018987655639648438,
-0.0030498504638671875,
0.0245361328125,
-0.0203094482421875,
0.01105499267578125,
-0.012237548828125,
0.02783203125,
-0.00914764404296875,
0.013275146484375,
0.0225677490234375,
0.01140594482421875,
-0.025909423828125,
-0.034698486328125,
-0.01800537109375,
0.005634307861328125,
-0.0031604766845703125,
0.05035400390625,
-0.010833740234375,
0.08026123046875,
-0.0411376953125,
-0.027435302734375,
-0.03460693359375,
-0.035797119140625,
0.0303192138671875,
-0.0341796875,
-0.003147125244140625,
-0.028472900390625,
-0.005313873291015625,
-0.008026123046875,
-0.050811767578125,
0.041351318359375,
0.08831787109375,
0.037139892578125,
-0.05804443359375,
0.01268768310546875,
-0.0293426513671875,
-0.02935791015625,
-0.056854248046875,
0.0555419921875,
0.0089263916015625,
0.0162506103515625,
0.0021572113037109375,
0.07781982421875,
0.029296875,
-0.0260009765625,
0.006465911865234375,
0.031219482421875,
0.014678955078125,
0.0237579345703125,
0.005218505859375,
-0.01947021484375,
0.0148468017578125,
-0.04571533203125,
0.0194549560546875,
0.0235748291015625,
-0.037750244140625,
-0.03143310546875,
-0.00971221923828125,
0.0000864267349243164,
0.0017786026000976562,
-0.06884765625,
-0.029571533203125,
-0.039337158203125,
0.02789306640625,
-0.01259613037109375,
0.0318603515625,
0.0202178955078125,
-0.017791748046875,
-0.0109710693359375,
0.02264404296875,
0.005687713623046875,
-0.0207061767578125,
0.0416259765625,
-0.00010353326797485352,
0.0289306640625,
-0.0275115966796875,
0.001163482666015625,
-0.0268402099609375,
0.01654052734375,
-0.0153961181640625,
0.05072021484375,
0.0305328369140625,
-0.0163726806640625,
-0.00864410400390625,
-0.049041748046875,
0.008453369140625,
-0.03448486328125,
0.053863525390625,
-0.00136566162109375,
0.004833221435546875,
0.009185791015625,
-0.03546142578125,
0.0528564453125,
0.07708740234375,
-0.051055908203125,
-0.0134735107421875,
-0.01032257080078125,
0.035675048828125,
-0.042236328125,
0.030426025390625,
0.04443359375,
-0.047119140625,
0.0275421142578125,
0.0114288330078125,
-0.034423828125,
-0.0009493827819824219,
0.01316070556640625,
-0.011871337890625,
-0.024749755859375,
-0.021087646484375,
0.043243408203125,
0.004512786865234375,
0.0718994140625,
-0.04315185546875,
-0.054290771484375,
-0.0222015380859375,
0.017303466796875,
-0.03497314453125,
0.004657745361328125,
0.0162200927734375,
-0.024200439453125,
0.00829315185546875,
-0.00826263427734375,
-0.0081634521484375,
-0.0194549560546875,
0.005611419677734375,
-0.0166015625,
-0.038177490234375,
-0.005687713623046875,
-0.0380859375,
-0.03375244140625,
-0.0445556640625,
0.0214996337890625,
-0.014434814453125,
0.0235443115234375,
0.00543975830078125,
0.050537109375,
0.01213836669921875,
-0.01837158203125,
0.021148681640625,
-0.002475738525390625,
-0.004146575927734375,
0.01331329345703125,
0.0261993408203125,
-0.050262451171875,
-0.0011463165283203125,
0.00588226318359375,
-0.039031982421875,
-0.00655364990234375,
0.0120086669921875,
-0.024566650390625,
-0.0008258819580078125,
-0.04034423828125,
0.0090179443359375,
0.0350341796875,
0.00787353515625,
-0.0200347900390625,
0.0301055908203125,
-0.061309814453125,
-0.0168914794921875,
0.00832366943359375,
-0.052703857421875,
-0.03179931640625,
0.029998779296875,
-0.01015472412109375,
0.01409149169921875,
-0.033966064453125,
0.02587890625,
0.0240020751953125,
0.025634765625,
-0.01113128662109375,
0.0188446044921875,
-0.006526947021484375,
0.0035533905029296875,
-0.033935546875,
0.0083160400390625,
-0.01378631591796875,
0.00540924072265625,
0.004974365234375,
0.0244903564453125,
0.0076141357421875,
0.00518798828125,
-0.0121612548828125,
-0.0841064453125,
0.038726806640625,
-0.06927490234375,
-0.034912109375,
-0.043548583984375,
-0.006023406982421875,
0.0118255615234375,
0.08306884765625,
-0.048004150390625,
-0.0294952392578125,
-0.00862884521484375,
0.022796630859375,
-0.004169464111328125,
-0.0406494140625,
-0.00164794921875,
-0.0256500244140625,
-0.03045654296875,
0.01102447509765625,
-0.020843505859375,
0.00031185150146484375,
-0.0099029541015625,
0.01312255859375,
-0.0163116455078125,
-0.03466796875,
0.01136016845703125,
0.006954193115234375,
-0.004207611083984375,
-0.01038360595703125,
-0.035430908203125,
-0.0005040168762207031,
0.0234832763671875,
-0.0462646484375,
-0.048675537109375,
-0.0031261444091796875,
-0.047607421875,
0.036376953125,
0.0182342529296875,
0.0242767333984375,
-0.0236053466796875,
0.034576416015625,
0.0021915435791015625,
0.001895904541015625,
0.006107330322265625,
-0.006671905517578125,
0.004055023193359375,
0.03533935546875,
0.00012022256851196289,
0.0054168701171875,
-0.00583648681640625,
0.0133514404296875,
0.0010433197021484375,
0.0487060546875,
-0.0225372314453125,
-0.0247039794921875,
0.00626373291015625,
-0.015838623046875,
-0.037506103515625,
-0.040802001953125,
-0.0219879150390625,
0.0291595458984375,
-0.0238800048828125,
0.0221099853515625,
-0.043212890625,
-0.06396484375,
0.018402099609375,
-0.01763916015625,
-0.0031604766845703125,
0.0112457275390625,
0.06549072265625,
0.01363372802734375,
-0.0099945068359375,
-0.0274810791015625,
0.0311737060546875,
0.02423095703125,
-0.016204833984375,
0.0299835205078125,
0.0008711814880371094,
-0.009857177734375,
0.05487060546875,
-0.020599365234375,
0.013031005859375,
-0.018524169921875,
0.0565185546875,
0.00485992431640625,
-0.0146942138671875,
0.033203125,
0.004119873046875,
0.00955963134765625,
-0.00534820556640625,
-0.02130126953125,
0.028411865234375,
-0.036468505859375,
-0.0033473968505859375,
0.0106658935546875,
-0.0027713775634765625,
-0.0131988525390625,
-0.0546875,
0.0079345703125,
-0.0736083984375,
0.05377197265625,
0.032958984375,
-0.001056671142578125,
0.06048583984375,
0.031036376953125,
-0.002166748046875,
0.00954437255859375,
-0.0222625732421875,
0.0245819091796875,
0.03289794921875,
0.016754150390625,
0.02789306640625,
0.00122833251953125,
-0.013092041015625,
0.02532958984375,
0.054656982421875,
0.006732940673828125,
0.01279449462890625,
-0.00982666015625,
0.0127410888671875,
-0.057464599609375,
0.0208892822265625,
0.0004792213439941406,
-0.02691650390625,
0.01459503173828125,
-0.0002503395080566406,
0.003162384033203125,
-0.0224456787109375,
-0.01708984375,
0.019134521484375,
0.0182037353515625,
-0.00891876220703125,
0.025238037109375,
0.0029125213623046875,
0.0298309326171875,
-0.004840850830078125,
-0.0199737548828125,
0.0240478515625,
0.05755615234375,
0.01056671142578125,
0.034149169921875,
-0.010955810546875,
-0.025604248046875,
-0.0065765380859375,
-0.008148193359375,
0.009063720703125,
0.01202392578125,
0.040008544921875,
-0.00890350341796875,
0.01259613037109375,
0.01216888427734375,
-0.029052734375,
-0.00667572021484375,
-0.017669677734375,
-0.01470947265625,
0.0287322998046875,
-0.02154541015625,
0.0184478759765625,
0.04827880859375,
-0.01548004150390625,
0.0280914306640625,
-0.01062774658203125,
-0.000804901123046875,
-0.0252685546875,
-0.0213470458984375,
-0.00011152029037475586,
-0.04327392578125,
0.005611419677734375,
0.01515960693359375,
0.0207977294921875,
0.010223388671875,
-0.040618896484375,
-0.07623291015625,
-0.037200927734375,
0.006191253662109375,
0.0269927978515625,
0.034759521484375,
-0.01953125,
-0.00643157958984375,
-0.029388427734375,
0.020965576171875,
-0.038116455078125,
-0.0183258056640625,
0.06097412109375,
0.0286865234375,
-0.0035400390625,
-0.052276611328125,
-0.04498291015625,
-0.0374755859375,
-0.029937744140625,
-0.002666473388671875,
-0.01538848876953125,
0.061553955078125,
-0.005702972412109375,
0.020538330078125,
-0.00537872314453125,
0.0034198760986328125,
-0.005222320556640625,
0.0195770263671875,
0.0005612373352050781,
0.04119873046875,
-0.0072021484375,
0.055267333984375,
-0.0196990966796875,
-0.002788543701171875,
0.0011415481567382812,
0.038970947265625,
0.0162811279296875,
-0.0057220458984375,
0.00576019287109375,
-0.073486328125,
-0.0188751220703125,
-0.00951385498046875,
-0.0270538330078125,
0.0248260498046875,
0.0162811279296875,
-0.0012159347534179688,
0.0184326171875,
0.00521087646484375,
-0.011566162109375,
-0.0220947265625,
0.01078033447265625,
-0.01139068603515625,
0.013763427734375,
0.00835418701171875,
0.002178192138671875,
-0.03033447265625,
-0.04998779296875,
0.0308685302734375,
-0.0282745361328125,
-0.00016796588897705078,
-0.040313720703125,
-0.023529052734375,
-0.021148681640625,
0.0484619140625,
0.048187255859375,
-0.0118865966796875,
0.033477783203125,
0.015838623046875,
0.0089874267578125,
0.027130126953125,
0.042236328125,
-0.049591064453125,
-0.0181732177734375,
0.09320068359375,
0.037872314453125,
-0.040252685546875,
0.06951904296875,
-0.038177490234375,
0.0333251953125,
0.0264739990234375,
0.060028076171875,
-0.060302734375,
0.0240631103515625,
-0.00817108154296875,
-0.037109375,
0.078857421875,
-0.01172637939453125,
0.00255584716796875,
0.0177001953125,
0.0316162109375,
0.029937744140625,
-0.011138916015625,
0.0228424072265625,
0.0192718505859375,
0.0037174224853515625,
-0.0054931640625,
0.0266265869140625,
-0.0144500732421875,
-0.06396484375,
-0.0404052734375,
0.06488037109375,
-0.04815673828125,
-0.0302886962890625,
0.00860595703125,
-0.01300048828125,
-0.039581298828125,
-0.0819091796875,
-0.030303955078125,
-0.0176239013671875,
-0.0177154541015625,
0.01303863525390625,
0.004459381103515625,
0.003810882568359375,
0.0296630859375,
0.0011005401611328125,
-0.01230621337890625,
0.012298583984375,
-0.01513671875,
-0.0241241455078125,
-0.005283355712890625,
0.036468505859375,
-0.015380859375,
-0.004169464111328125,
0.031982421875,
-0.041229248046875,
-0.04254150390625,
-0.0005083084106445312,
0.0156707763671875,
0.05194091796875,
-0.01678466796875,
-0.0257110595703125,
0.01552581787109375,
-0.0194854736328125,
0.01312255859375,
-0.0287017822265625,
-0.01108551025390625,
-0.018280029296875,
0.0187835693359375,
-0.036346435546875,
-0.028900146484375,
-0.01166534423828125,
-0.0869140625,
-0.1097412109375,
0.0556640625,
0.05242919921875,
0.06451416015625,
-0.034027099609375,
0.006755828857421875,
-0.028594970703125,
-0.036956787109375,
0.0030040740966796875,
-0.01324462890625,
-0.0101776123046875,
-0.010284423828125,
0.0025043487548828125,
-0.007129669189453125,
-0.01983642578125,
0.035491943359375,
0.01271820068359375,
-0.0007886886596679688,
-0.046905517578125,
0.01446533203125,
0.1021728515625,
0.091552734375,
0.0670166015625,
0.0086822509765625,
0.0172882080078125,
0.033966064453125,
0.051116943359375,
-0.029510498046875,
0.015594482421875,
0.007568359375,
0.011444091796875,
0.041778564453125,
0.0101318359375,
0.0031490325927734375,
0.002315521240234375,
0.057861328125,
-0.04290771484375,
0.0076751708984375,
0.0298919677734375,
0.0079345703125,
-0.044952392578125,
0.09027099609375,
0.0170745849609375,
-0.02960205078125,
0.0138092041015625,
-0.058013916015625,
0.051361083984375,
-0.005283355712890625,
0.011810302734375,
0.03741455078125,
0.017364501953125,
0.01407623291015625,
0.036407470703125,
0.01473236083984375,
0.0187225341796875,
0.00450897216796875,
0.0141754150390625,
0.01507568359375,
0.032989501953125,
-0.028839111328125,
-0.01523590087890625,
0.043243408203125,
0.034912109375,
-0.026763916015625,
0.0283050537109375,
-0.0013055801391601562,
0.0012378692626953125,
0.0102386474609375,
-0.050811767578125,
0.060028076171875,
0.0015544891357421875,
-0.0267181396484375,
-0.0017518997192382812,
-0.031524658203125,
-0.01538848876953125,
0.037139892578125,
-0.00399017333984375,
-0.0139312744140625,
0.01525115966796875,
-0.029815673828125,
-0.033111572265625,
0.0055694580078125,
-0.00991058349609375,
0.04144287109375,
0.019622802734375,
0.0116729736328125,
-0.021820068359375,
-0.00757598876953125,
0.0299224853515625,
-0.032318115234375,
0.042205810546875,
-0.051666259765625,
0.0494384765625,
0.040435791015625,
0.011383056640625,
-0.01617431640625,
0.01425933837890625,
0.050567626953125,
0.0295867919921875,
-0.0143280029296875,
-0.0002224445343017578,
0.0223846435546875,
0.007587432861328125,
-0.0421142578125,
0.005031585693359375,
-0.04071044921875,
0.0021381378173828125,
0.005741119384765625,
-0.01250457763671875,
0.010498046875,
-0.0275421142578125,
0.048187255859375,
-0.016571044921875,
0.0008091926574707031,
0.0030059814453125,
-0.029998779296875,
0.0298919677734375,
-0.01739501953125,
0.03778076171875,
0.0110015869140625,
-0.041717529296875,
0.003444671630859375,
0.0034236907958984375,
-0.054107666015625,
0.01206207275390625,
0.037811279296875,
-0.031494140625,
0.018463134765625,
-0.00868988037109375,
-0.0011548995971679688,
-0.00403594970703125,
-0.005352020263671875,
0.00324249267578125,
0.02557373046875,
0.01374053955078125,
0.0040130615234375,
-0.05029296875,
-0.035308837890625,
-0.02825927734375,
0.032928466796875,
-0.007381439208984375,
0.0697021484375,
-0.006626129150390625,
0.0233154296875,
-0.040618896484375,
0.0037384033203125,
-0.0128021240234375,
-0.055694580078125,
0.0823974609375,
0.0233612060546875,
-0.036163330078125,
-0.01363372802734375,
-0.00382232666015625,
0.022308349609375,
0.00859832763671875,
-0.043853759765625,
-0.0211181640625,
0.00304412841796875,
0.0269775390625,
0.0134735107421875,
-0.0400390625,
-0.0191192626953125,
-0.0092010498046875,
0.0215606689453125,
0.01224517822265625,
0.01102447509765625,
0.0281982421875,
0.0214691162109375,
0.06884765625,
-0.01468658447265625,
0.0787353515625,
0.0207061767578125,
-0.0114898681640625,
0.0226898193359375,
0.0116424560546875,
-0.08935546875,
-0.006488800048828125,
-0.05767822265625,
-0.032562255859375,
0.02972412109375,
-0.042877197265625,
0.020416259765625,
-0.01898193359375,
-0.007640838623046875,
0.0116424560546875,
0.05218505859375,
0.06951904296875,
-0.0166473388671875,
0.028717041015625,
0.01953125,
-0.0234375,
0.0201416015625,
-0.01294708251953125,
-0.02972412109375,
-0.039947509765625,
0.00618743896484375,
0.014617919921875,
-0.0194549560546875,
-0.020294189453125,
-0.06207275390625,
-0.0142822265625,
-0.00262451171875,
-0.016510009765625,
-0.01812744140625,
-0.0221099853515625,
-0.011322021484375,
0.040802001953125,
-0.05029296875,
0.048980712890625,
-0.006221771240234375,
-0.01355743408203125,
-0.04510498046875,
-0.014251708984375,
-0.031646728515625,
0.037933349609375,
0.0006470680236816406,
0.021728515625,
0.007244110107421875,
-0.0156707763671875,
0.035003662109375,
0.0267333984375,
0.029815673828125,
0.08251953125,
0.00922393798828125,
-0.020843505859375,
0.026336669921875,
-0.006195068359375,
-0.006626129150390625,
-0.0221405029296875,
0.0057220458984375,
-0.040191650390625,
-0.0085601806640625,
-0.0023517608642578125,
-0.0056610107421875,
0.005695343017578125,
-0.052001953125,
-0.10894775390625,
0.002521514892578125,
0.0001042485237121582,
-0.05230712890625,
-0.0288543701171875,
0.03900146484375,
0.01861572265625,
-0.00516510009765625,
0.00008511543273925781,
-0.015899658203125,
-0.0012292861938476562,
0.0012226104736328125,
-0.01479339599609375,
0.0027637481689453125,
0.0228729248046875,
-0.017608642578125,
-0.055084228515625,
-0.00666046142578125,
0.00708770751953125,
-0.007801055908203125,
-0.0025348663330078125,
-0.0250396728515625,
0.03173828125,
0.034759521484375,
-0.033905029296875,
-0.0192413330078125,
0.01226806640625,
0.005535125732421875,
-0.005279541015625,
-0.0134124755859375,
0.01287841796875,
0.028839111328125,
0.03619384765625,
0.021514892578125,
-0.00033283233642578125,
-0.0343017578125,
0.01325225830078125,
0.0235443115234375,
-0.027008056640625,
0.0025920867919921875,
0.026611328125,
-0.05096435546875,
-0.037841796875,
0.01006317138671875,
0.01007843017578125,
0.00516510009765625,
0.0006961822509765625,
-0.00499725341796875,
-0.03369140625,
0.00687408447265625,
-0.0151214599609375,
-0.019775390625,
-0.0307159423828125,
0.09979248046875,
-0.03631591796875,
0.032440185546875,
-0.023773193359375,
0.04132080078125,
0.068115234375,
-0.01934814453125,
-0.0164642333984375,
-0.004665374755859375,
-0.039825439453125,
-0.00225067138671875,
-0.01284027099609375,
0.034881591796875,
-0.016357421875,
-0.00567626953125,
-0.0311126708984375,
-0.00702667236328125,
-0.00673675537109375,
-0.0321044921875,
-0.010894775390625,
0.0439453125,
0.003204345703125,
0.11090087890625,
-0.01273345947265625,
0.01934814453125,
-0.00836944580078125,
0.02197265625,
0.022125244140625,
-0.006072998046875,
0.0748291015625,
-0.04754638671875,
0.0104522705078125,
-0.01326751708984375,
0.00977325439453125,
-0.03863525390625,
0.0523681640625,
0.035888671875,
-0.01065826416015625,
0.03570556640625
]
|
8b9feeb1089fae02533a366c783dad019d1a9f73 | Wordpress Stackexchange
Q: First hook to use current page post id I'm trying to find the first hook that will pass the current post ID, as I would like to update the current post (by getting its ID) and the variables submitted to that page.
This is the code I'm using:
class my_class {
public function __construct(){
add_action( 'init', array( $this, 'my_method' ) );
}
public function my_method( $atts ){
// do my stuff with current page id here.
// even just: echo post id and die();.
}
}
Any hook, action or filter, and which one to use and why.
A: Answer by @Pieter Goosen :
If you need to update the page before the main query fires and returns
the page object, you will manually need to parse the URL (probably on
init) and get the page ID from get_page_by_title() or
get_page_by_path().
Otherwise, 'wp' would be earliest hook to get the page ID, for example:
function my_early_id() {
$post = get_post();
echo $post->ID;
}
add_action( 'wp', 'my_early_id' );
| Q: First hook to use current page post id I'm trying to find the first hook that will pass the current post ID, as I would like to update the current post (by getting its ID) and the variables submitted to that page.
This is the code I'm using:
class my_class {
public function __construct(){
add_action( 'init', array( $this, 'my_method' ) );
}
public function my_method( $atts ){
// do my stuff with current page id here.
// even just: echo post id and die();.
}
}
Any hook, action or filter, and which one to use and why.
A: Answer by @Pieter Goosen :
If you need to update the page before the main query fires and returns
the page object, you will manually need to parse the URL (probably on
init) and get the page ID from get_page_by_title() or
get_page_by_path().
Otherwise, 'wp' would be earliest hook to get the page ID, for example:
function my_early_id() {
$post = get_post();
echo $post->ID;
}
add_action( 'wp', 'my_early_id' );
A: I think you are looking for the_post (see action reference.). That is the first hook within the loop.
| wordpress | {
"language": "en",
"length": 187,
"provenance": "stackexchange_00019.jsonl.gz:465186",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/225616"
} | [
0.0260162353515625,
-0.018524169921875,
0.00908660888671875,
0.0169677734375,
-0.00797271728515625,
-0.0205841064453125,
0.047271728515625,
-0.014862060546875,
-0.004413604736328125,
0.03082275390625,
-0.02490234375,
0.005565643310546875,
-0.00753021240234375,
-0.01812744140625,
-0.003551483154296875,
-0.01042938232421875,
0.0531005859375,
-0.0574951171875,
0.018951416015625,
-0.014617919921875,
0.00821685791015625,
0.0183563232421875,
0.0614013671875,
0.08203125,
0.06060791015625,
-0.05291748046875,
-0.005702972412109375,
0.006458282470703125,
0.030487060546875,
0.00030612945556640625,
0.0265045166015625,
-0.01258087158203125,
0.0276947021484375,
-0.0157623291015625,
0.015838623046875,
0.03082275390625,
0.01461029052734375,
-0.0040130615234375,
0.0310516357421875,
0.0103302001953125,
0.0184173583984375,
0.0008144378662109375,
0.0011720657348632812,
0.0120697021484375,
-0.040252685546875,
-0.0521240234375,
0.026275634765625,
-0.004673004150390625,
0.0167694091796875,
0.00008928775787353516,
0.0003104209899902344,
0.032623291015625,
0.00748443603515625,
0.0322265625,
-0.011260986328125,
-0.0030994415283203125,
0.0110931396484375,
-0.0240936279296875,
0.0439453125,
0.007129669189453125,
-0.0372314453125,
-0.032196044921875,
0.03057861328125,
-0.048583984375,
-0.0015659332275390625,
0.006717681884765625,
0.02130126953125,
0.003955841064453125,
-0.031494140625,
-0.01496124267578125,
0.0306243896484375,
-0.013092041015625,
-0.0210418701171875,
0.01311492919921875,
0.00299835205078125,
-0.0294647216796875,
0.05291748046875,
0.00926971435546875,
-0.023284912109375,
0.04595947265625,
-0.024749755859375,
-0.0262298583984375,
-0.04815673828125,
0.01751708984375,
-0.036224365234375,
0.021026611328125,
-0.016845703125,
0.0057220458984375,
-0.05535888671875,
-0.0223236083984375,
-0.048614501953125,
0.032257080078125,
-0.0086669921875,
-0.07574462890625,
-0.060638427734375,
-0.014739990234375,
0.0272674560546875,
0.06060791015625,
-0.018829345703125,
0.006122589111328125,
-0.01105499267578125,
-0.0360107421875,
0.0198974609375,
-0.04150390625,
-0.0026454925537109375,
0.032562255859375,
0.043792724609375,
0.03369140625,
0.015625,
-0.004596710205078125,
-0.0159912109375,
0.00778961181640625,
0.00884246826171875,
0.02825927734375,
-0.04510498046875,
-0.0093841552734375,
-0.036285400390625,
-0.0169525146484375,
-0.0294342041015625,
0.004299163818359375,
0.0131683349609375,
0.0200653076171875,
0.01123046875,
-0.021575927734375,
0.02008056640625,
0.01172637939453125,
-0.038818359375,
-0.01983642578125,
0.032623291015625,
-0.0088348388671875,
-0.0421142578125,
0.0165863037109375,
0.106201171875,
0.0177154541015625,
0.01091766357421875,
-0.0157470703125,
0.00325775146484375,
-0.025787353515625,
0.01500701904296875,
-0.009185791015625,
-0.0198974609375,
-0.035675048828125,
0.00682830810546875,
-0.014495849609375,
0.0150146484375,
0.017730712890625,
0.00774383544921875,
0.01493072509765625,
0.01358795166015625,
-0.036956787109375,
0.024017333984375,
-0.04058837890625,
0.00809478759765625,
0.00640869140625,
0.04461669921875,
0.00438690185546875,
0.0391845703125,
-0.025970458984375,
0.0037212371826171875,
-0.003692626953125,
0.042327880859375,
-0.00780487060546875,
0.01207733154296875,
0.01033782958984375,
-0.0279388427734375,
-0.00008398294448852539,
-0.04461669921875,
-0.00033402442932128906,
0.0190887451171875,
0.04827880859375,
0.0247802734375,
0.01035308837890625,
0.0103759765625,
0.00433349609375,
-0.0155487060546875,
-0.017547607421875,
-0.03302001953125,
0.0110931396484375,
0.047454833984375,
0.0008397102355957031,
-0.0167388916015625,
-0.01910400390625,
0.032135009765625,
0.0010633468627929688,
-0.032073974609375,
0.056396484375,
0.0311737060546875,
0.07562255859375,
-0.036529541015625,
0.023284912109375,
0.02313232421875,
0.040374755859375,
-0.05877685546875,
0.046356201171875,
0.0038700103759765625,
-0.0018596649169921875,
-0.0018901824951171875,
0.0188751220703125,
-0.0031795501708984375,
-0.037200927734375,
0.01824951171875,
0.01262664794921875,
-0.013916015625,
0.00888824462890625,
-0.055023193359375,
0.0009608268737792969,
-0.01145172119140625,
0.03997802734375,
0.023895263671875,
-0.0263214111328125,
0.01262664794921875,
-0.0240631103515625,
0.007083892822265625,
-0.040679931640625,
-0.0709228515625,
0.017486572265625,
-0.050201416015625,
-0.005191802978515625,
-0.0184326171875,
0.0263519287109375,
-0.013763427734375,
-0.0087127685546875,
-0.03271484375,
-0.0299835205078125,
0.0498046875,
-0.007213592529296875,
-0.018280029296875,
-0.029541015625,
0.006473541259765625,
0.01506805419921875,
-0.0697021484375,
0.0245208740234375,
-0.007259368896484375,
0.010040283203125,
-0.0285186767578125,
-0.0171966552734375,
-0.0189666748046875,
-0.06195068359375,
0.019439697265625,
0.052734375,
0.038360595703125,
0.0098419189453125,
0.00010138750076293945,
-0.00066375732421875,
0.03271484375,
-0.024871826171875,
0.0143890380859375,
-0.0167236328125,
0.03515625,
0.06878662109375,
-0.01253509521484375,
0.0173187255859375,
0.00971221923828125,
-0.0206146240234375,
0.028839111328125,
0.029296875,
-0.0183868408203125,
-0.0141448974609375,
-0.0280303955078125,
-0.025238037109375,
0.0182037353515625,
-0.09039306640625,
-0.05413818359375,
-0.027252197265625,
0.052215576171875,
-0.005924224853515625,
0.053131103515625,
0.0277557373046875,
-0.0270843505859375,
-0.0008525848388671875,
0.0170745849609375,
0.00720977783203125,
0.007770538330078125,
0.0261688232421875,
-0.0121917724609375,
-0.0095062255859375,
0.000033020973205566406,
-0.005664825439453125,
-0.0018434524536132812,
-0.007091522216796875,
-0.033477783203125,
-0.0005950927734375,
0.011016845703125,
-0.012847900390625,
-0.0042877197265625,
-0.022216796875,
0.0277252197265625,
-0.0228118896484375,
0.039764404296875,
-0.0259246826171875,
0.005962371826171875,
-0.0035953521728515625,
-0.061279296875,
0.0867919921875,
-0.010223388671875,
-0.0491943359375,
0.01070404052734375,
-0.0248260498046875,
0.0308074951171875,
-0.0328369140625,
0.0305938720703125,
0.044769287109375,
-0.0208740234375,
0.0157012939453125,
-0.0007300376892089844,
-0.01279449462890625,
0.00807952880859375,
0.006587982177734375,
0.0096282958984375,
-0.00801849365234375,
-0.01268768310546875,
0.04937744140625,
0.0240325927734375,
0.11285400390625,
-0.051055908203125,
-0.06658935546875,
-0.016448974609375,
0.02490234375,
-0.08929443359375,
-0.09307861328125,
0.003265380859375,
-0.053985595703125,
-0.00371551513671875,
-0.032012939453125,
-0.0291748046875,
-0.0029811859130859375,
0.004589080810546875,
-0.0020236968994140625,
-0.0236358642578125,
-0.0263824462890625,
-0.04144287109375,
-0.051422119140625,
-0.060211181640625,
0.029632568359375,
0.00588226318359375,
0.0172576904296875,
0.0123291015625,
0.006000518798828125,
0.01010894775390625,
-0.030059814453125,
0.0185699462890625,
0.034515380859375,
-0.03826904296875,
-0.0261383056640625,
-0.00266265869140625,
-0.01873779296875,
-0.0092620849609375,
0.0024280548095703125,
0.01038360595703125,
0.007236480712890625,
-0.00333404541015625,
-0.00479888916015625,
-0.040252685546875,
-0.017608642578125,
-0.00815582275390625,
0.07635498046875,
0.0538330078125,
-0.0013065338134765625,
0.055816650390625,
-0.0304107666015625,
0.007015228271484375,
-0.0367431640625,
-0.048370361328125,
-0.0181427001953125,
0.01971435546875,
0.01099395751953125,
-0.013824462890625,
-0.0077362060546875,
-0.0214080810546875,
-0.024932861328125,
0.0266571044921875,
-0.021087646484375,
0.0188751220703125,
-0.0112152099609375,
-0.011962890625,
-0.004486083984375,
0.0279693603515625,
0.004093170166015625,
0.0302886962890625,
0.0079193115234375,
0.016387939453125,
-0.02117919921875,
0.029266357421875,
-0.056427001953125,
-0.03173828125,
0.04010009765625,
-0.007686614990234375,
0.00025463104248046875,
-0.027435302734375,
-0.0225372314453125,
0.0014476776123046875,
0.0665283203125,
-0.05133056640625,
-0.0294647216796875,
0.0010509490966796875,
0.0250244140625,
-0.01096343994140625,
-0.046844482421875,
-0.0071563720703125,
-0.0206298828125,
-0.049407958984375,
-0.0088653564453125,
-0.02947998046875,
0.00974273681640625,
-0.031585693359375,
0.0625,
-0.03802490234375,
-0.035186767578125,
0.054290771484375,
-0.051513671875,
-0.012420654296875,
0.061737060546875,
-0.05511474609375,
0.0506591796875,
-0.06622314453125,
-0.0005240440368652344,
-0.0877685546875,
-0.011871337890625,
-0.015655517578125,
0.043182373046875,
0.0204620361328125,
-0.052398681640625,
-0.0285186767578125,
0.01250457763671875,
0.00004673004150390625,
0.01922607421875,
-0.0012531280517578125,
0.0217437744140625,
-0.01038360595703125,
-0.01451873779296875,
-0.014434814453125,
-0.0219573974609375,
0.007602691650390625,
-0.006519317626953125,
-0.0196533203125,
-0.003398895263671875,
-0.053070068359375,
-0.016265869140625,
-0.01265716552734375,
-0.0216522216796875,
-0.06683349609375,
-0.048126220703125,
-0.02386474609375,
0.033203125,
-0.014404296875,
0.00841522216796875,
-0.056884765625,
-0.08795166015625,
0.08367919921875,
-0.01520538330078125,
-0.00420379638671875,
-0.02294921875,
0.08551025390625,
0.018646240234375,
-0.0333251953125,
0.0207977294921875,
-0.018951416015625,
0.036163330078125,
-0.0094146728515625,
0.041961669921875,
0.0130157470703125,
-0.032135009765625,
0.06707763671875,
0.01393890380859375,
-0.0272674560546875,
-0.013092041015625,
0.0653076171875,
0.00525665283203125,
0.01076507568359375,
-0.0173492431640625,
-0.032989501953125,
0.0419921875,
-0.036956787109375,
-0.065673828125,
0.007843017578125,
-0.01267242431640625,
0.0328369140625,
-0.04815673828125,
0.10968017578125,
-0.0157928466796875,
-0.0098876953125,
0.0020275115966796875,
0.04833984375,
0.00926971435546875,
0.03131103515625,
0.004184722900390625,
0.0006623268127441406,
0.00220489501953125,
-0.0015811920166015625,
0.0261383056640625,
0.00909423828125,
0.01157379150390625,
0.024261474609375,
0.0221099853515625,
-0.004955291748046875,
0.006000518798828125,
-0.01395416259765625,
0.046630859375,
-0.0224609375,
-0.0555419921875,
0.006565093994140625,
-0.0185394287109375,
0.002719879150390625,
0.041534423828125,
-0.007843017578125,
0.0306854248046875,
0.03594970703125,
-0.031402587890625,
-0.0384521484375,
0.011322021484375,
-0.01290130615234375,
-0.047027587890625,
-0.004261016845703125,
0.016265869140625,
-0.01111602783203125,
0.03167724609375,
0.0096435546875,
0.05438232421875,
-0.00821685791015625,
-0.042022705078125,
0.0439453125,
0.02154541015625,
0.0277862548828125,
0.0240936279296875,
-0.0060272216796875,
-0.01549530029296875,
0.0161285400390625,
-0.019073486328125,
-0.0308837890625,
0.0005278587341308594,
0.0173187255859375,
0.03131103515625,
-0.03955078125,
-0.021697998046875,
0.0219268798828125,
-0.009918212890625,
-0.012115478515625,
0.040435791015625,
0.0399169921875,
-0.0439453125,
0.0009059906005859375,
0.036895751953125,
-0.0034503936767578125,
-0.006011962890625,
0.00926971435546875,
0.01461029052734375,
-0.003093719482421875,
0.03155517578125,
-0.046051025390625,
0.0304412841796875,
-0.040771484375,
-0.0300750732421875,
0.03387451171875,
0.00011110305786132812,
-0.0097503662109375,
0.0182342529296875,
-0.01448822021484375,
-0.02862548828125,
-0.007061004638671875,
0.065185546875,
0.00555419921875,
0.043792724609375,
-0.0308685302734375,
-0.048797607421875,
-0.01031494140625,
-0.0167999267578125,
0.07928466796875,
0.037689208984375,
-0.04144287109375,
0.001007080078125,
-0.0372314453125,
0.00693511962890625,
0.0133209228515625,
-0.04180908203125,
-0.0306243896484375,
-0.0318603515625,
0.0018396377563476562,
0.0300445556640625,
0.007537841796875,
0.01551055908203125,
0.0038585662841796875,
-0.0128936767578125,
-0.03204345703125,
0.02935791015625,
-0.0103607177734375,
0.10113525390625,
-0.0157012939453125,
0.04364013671875,
0.016754150390625,
0.0499267578125,
-0.0185546875,
-0.002719879150390625,
-0.0199127197265625,
-0.0076751708984375,
0.027801513671875,
0.017822265625,
0.0062255859375,
-0.00392913818359375,
0.047821044921875,
0.013458251953125,
0.0085601806640625,
0.01461029052734375,
0.0177764892578125,
-0.01080322265625,
-0.033203125,
0.00965118408203125,
-0.058685302734375,
0.08544921875,
-0.0178375244140625,
-0.04168701171875,
0.0164947509765625,
0.034454345703125,
-0.033966064453125,
-0.0008902549743652344,
-0.03759765625,
-0.00916290283203125,
-0.0058746337890625,
0.0248870849609375,
0.0843505859375,
0.0011510848999023438,
0.048797607421875,
0.0185394287109375,
0.01154327392578125,
0.0447998046875,
0.017486572265625,
-0.036590576171875,
-0.0233612060546875,
0.0491943359375,
0.019866943359375,
-0.016021728515625,
0.0386962890625,
-0.0226593017578125,
0.01263427734375,
0.0069732666015625,
0.06658935546875,
-0.01526641845703125,
0.00919342041015625,
0.031707763671875,
-0.044647216796875,
-0.0095672607421875,
-0.003955841064453125,
0.000942230224609375,
0.01904296875,
0.031280517578125,
-0.022735595703125,
-0.018798828125,
0.0269622802734375,
-0.00745391845703125,
-0.01427459716796875,
-0.036376953125,
0.03533935546875,
0.004913330078125,
-0.0238189697265625,
0.032196044921875,
0.00992584228515625,
0.0057220458984375,
-0.02197265625,
0.005405426025390625,
0.01216888427734375,
-0.022308349609375,
-0.05194091796875,
0.01409149169921875,
-0.022003173828125,
-0.007080078125,
0.0191802978515625,
0.00620269775390625,
0.0207672119140625,
0.023529052734375,
0.007678985595703125,
-0.0141754150390625,
0.0134429931640625,
-0.01470184326171875,
-0.058563232421875,
-0.03936767578125,
0.0310821533203125,
0.064697265625,
-0.054107666015625,
0.039398193359375,
-0.01172637939453125,
-0.0144500732421875,
0.0018148422241210938,
-0.038909912109375,
0.062042236328125,
-0.053375244140625,
-0.00653076171875,
-0.0006699562072753906,
0.0038356781005859375,
0.0162506103515625,
0.004940032958984375,
-0.0428466796875,
0.0153656005859375,
0.0211029052734375,
-0.020904541015625,
-0.01309967041015625,
0.0084381103515625,
-0.01151275634765625,
-0.0682373046875,
0.1212158203125,
0.022369384765625,
0.031646728515625,
0.00998687744140625,
0.046478271484375,
-0.034637451171875,
0.0244903564453125,
-0.0478515625,
0.035308837890625,
-0.00736236572265625,
0.026824951171875,
-0.0472412109375,
0.0006680488586425781,
-0.01073455810546875,
0.001323699951171875,
0.048248291015625,
0.0200042724609375,
-0.01302337646484375,
0.0001226663589477539,
0.016510009765625,
0.00833892822265625,
-0.0160980224609375,
0.034698486328125,
-0.0010309219360351562,
0.013153076171875,
0.00945281982421875,
-0.0299835205078125,
0.030029296875,
-0.032623291015625,
-0.0116119384765625,
0.036102294921875,
0.0091552734375,
-0.003391265869140625,
0.007354736328125,
0.0024013519287109375,
-0.0810546875,
0.0300140380859375,
0.051788330078125,
0.026824951171875,
-0.0045318603515625,
0.052886962890625,
0.040740966796875,
-0.0277557373046875,
-0.00571441650390625,
-0.03125,
0.054107666015625,
-0.0007300376892089844,
0.0129852294921875,
0.046722412109375,
0.033721923828125,
0.0350341796875,
0.02728271484375,
0.016571044921875,
0.0263824462890625,
-0.00020182132720947266,
0.08203125,
0.0338134765625,
0.028289794921875,
-0.036041259765625,
0.0024623870849609375,
0.035400390625,
0.09808349609375,
-0.058929443359375,
-0.015838623046875,
0.005672454833984375,
-0.007274627685546875,
-0.007335662841796875,
0.007476806640625,
0.02850341796875,
0.03448486328125,
0.014984130859375,
-0.034088134765625,
-0.0074005126953125,
0.020233154296875,
0.03912353515625,
-0.002956390380859375,
0.00396728515625,
-0.0394287109375,
-0.01346588134765625,
-0.041107177734375,
-0.017547607421875,
0.02655029296875,
0.0445556640625,
0.0089263916015625,
0.04486083984375,
0.0021228790283203125,
-0.01049041748046875,
-0.008087158203125,
0.0150299072265625,
-0.002635955810546875,
0.0159912109375,
-0.0230865478515625,
-0.00809478759765625,
-0.0215606689453125,
0.0274658203125,
0.055877685546875,
0.056976318359375,
0.06317138671875,
0.007049560546875,
-0.0252838134765625,
0.0167999267578125,
0.00754547119140625,
-0.0269927978515625,
0.0241546630859375,
-0.0222930908203125,
-0.00720977783203125,
-0.0345458984375,
-0.0306396484375,
-0.0229034423828125,
0.030609130859375,
0.0006361007690429688,
-0.01433563232421875,
0.0467529296875,
0.0014286041259765625,
-0.01085662841796875,
0.0679931640625,
0.0281982421875,
0.0784912109375,
0.0222320556640625,
-0.079833984375,
-0.0003273487091064453,
-0.060943603515625,
-0.06341552734375,
0.036651611328125,
0.03997802734375,
-0.02923583984375,
0.013092041015625,
-0.015838623046875,
0.036773681640625,
-0.016754150390625,
-0.012725830078125,
-0.005992889404296875,
0.0037441253662109375,
0.04302978515625,
0.022613525390625,
0.0001461505889892578,
0.00501251220703125,
0.0238494873046875,
0.00934600830078125,
-0.004734039306640625,
0.029388427734375,
-0.005615234375,
0.003330230712890625,
-0.0015811920166015625,
0.043365478515625,
-0.06365966796875,
-0.007587432861328125,
0.03509521484375,
-0.035491943359375,
-0.0022296905517578125,
0.01517486572265625,
-0.03460693359375,
0.038543701171875,
0.03466796875,
0.0175628662109375,
0.03485107421875,
-0.00652313232421875,
0.01776123046875,
-0.0004634857177734375,
0.0411376953125,
-0.0031299591064453125,
0.0203399658203125,
0.00455474853515625,
-0.00909423828125,
0.05560302734375,
0.0367431640625,
-0.0038967132568359375,
0.02081298828125,
-0.0087738037109375,
-0.01068115234375,
-0.0003352165222167969,
0.0020599365234375,
-0.01357269287109375,
0.01666259765625,
-0.035400390625,
0.0007128715515136719,
0.021240234375,
-0.0081329345703125,
-0.0022945404052734375,
0.03765869140625,
-0.00850677490234375,
0.0132904052734375,
-0.000035643577575683594,
0.00685882568359375,
-0.0018186569213867188,
0.049713134765625,
0.0008339881896972656,
0.0294189453125,
-0.0164642333984375,
0.01177215576171875,
0.0008997917175292969,
-0.06256103515625,
-0.0246124267578125,
-0.0325927734375,
-0.006122589111328125,
0.0270843505859375,
-0.0178070068359375,
-0.0208282470703125,
-0.03643798828125,
0.006183624267578125,
-0.0021533966064453125,
-0.015899658203125,
-0.041351318359375,
0.0294342041015625,
-0.0239410400390625,
0.039764404296875,
-0.042633056640625,
0.004604339599609375,
-0.00861358642578125,
0.0193939208984375,
-0.043853759765625,
-0.0109405517578125,
-0.035064697265625,
0.005130767822265625,
-0.014404296875,
0.0096893310546875,
0.024200439453125,
-0.0023822784423828125,
-0.04229736328125,
0.0195159912109375,
-0.0181121826171875,
0.0631103515625,
-0.0119171142578125,
-0.03704833984375,
0.039520263671875,
-0.01593017578125,
0.024810791015625,
-0.04376220703125,
-0.0132904052734375,
-0.060455322265625,
0.0266876220703125,
-0.0117034912109375,
0.00762176513671875,
0.020721435546875,
-0.0151214599609375,
-0.0269622802734375,
0.0653076171875,
-0.016265869140625,
-0.0247802734375,
-0.03265380859375,
0.02685546875,
0.002330780029296875,
-0.01534271240234375,
-0.01554107666015625,
-0.036468505859375,
-0.0112152099609375,
0.021820068359375,
0.01161956787109375,
0.0404052734375,
0.0269012451171875,
-0.00033783912658691406,
-0.0193328857421875,
-0.0010471343994140625,
-0.011993408203125,
0.02484130859375,
0.0171966552734375,
-0.012725830078125,
0.037933349609375,
0.034881591796875,
-0.049041748046875,
0.0264739990234375,
0.0106964111328125,
0.0173187255859375,
-0.036285400390625,
-0.03802490234375,
-0.020599365234375,
-0.0014667510986328125,
0.084716796875,
0.054107666015625,
0.01538848876953125,
-0.040679931640625,
0.00710296630859375,
-0.0179443359375,
-0.07806396484375,
0.0057830810546875,
0.04046630859375,
-0.0626220703125,
0.00830841064453125,
0.0255126953125,
-0.01322174072265625,
-0.01371002197265625,
-0.0146942138671875,
-0.02117919921875,
-0.0034313201904296875,
-0.01380157470703125,
-0.0096893310546875,
0.0078887939453125,
0.004913330078125,
0.06768798828125,
-0.049774169921875,
0.0038204193115234375,
0.0199127197265625,
0.0023975372314453125,
0.03826904296875,
0.00713348388671875,
0.0248565673828125,
0.036285400390625,
-0.037841796875,
-0.01326751708984375,
0.03680419921875,
0.0225372314453125,
0.00727081298828125,
-0.0212860107421875,
-0.0248565673828125,
0.026611328125,
0.000179290771484375,
0.0276031494140625,
0.0210113525390625,
0.0070037841796875,
0.0008687973022460938,
0.048431396484375,
-0.00860595703125,
0.04132080078125,
-0.00785064697265625,
0.026824951171875,
-0.01093292236328125,
-0.01580810546875,
0.0211029052734375,
-0.03399658203125,
-0.007808685302734375,
0.015594482421875,
0.01409149169921875,
-0.037261962890625,
0.034423828125,
0.00506591796875,
0.003284454345703125,
0.01751708984375
]
|
f3dd1d5c304e609b9990afda78d95691f26e9b5b | Wordpress Stackexchange
Q: Where to hook into post content? Which hook or filter is used to edit the post content before the_content filter is applied to it.
For instance, if I wanted to add Hello World, as the first text in every post.
A: There is no other global filter applied before the_content - you can use the $priority argument in your add_filter call to ensure your function runs before any others:
function wpse_225625_to_the_top( $content ) {
return "Hello World\n\n\$content";
}
add_filter( 'the_content', 'wpse_225625_to_the_top', -1 /* Super important yo */ );
| Q: Where to hook into post content? Which hook or filter is used to edit the post content before the_content filter is applied to it.
For instance, if I wanted to add Hello World, as the first text in every post.
A: There is no other global filter applied before the_content - you can use the $priority argument in your add_filter call to ensure your function runs before any others:
function wpse_225625_to_the_top( $content ) {
return "Hello World\n\n\$content";
}
add_filter( 'the_content', 'wpse_225625_to_the_top', -1 /* Super important yo */ );
A: You can use the_content with an high prioriety (lower number).
add_filter( 'the_content', function( $content ) {
return 'Hello World '.$content;
}, 0);
You can even use negative priority:
add_filter( 'the_content', function( $content ) {
return 'Hello World '.$content;
}, -10);
Note that this will apply everytime 'the_content' is used, no matter the post type, or if the target post is part of main query or not.
For more control you can use loop_start / loop_end actions to add and remove the filter:
// the function that edits post content
function my_edit_content( $content ) {
global $post;
// only edit specific post types
$types = array( 'post', 'page' );
if ( $post && in_array( $post->post_type, $types, true ) ) {
$content = 'Hello World '. $content;
}
return $content;
}
// add the filter when main loop starts
add_action( 'loop_start', function( WP_Query $query ) {
if ( $query->is_main_query() ) {
add_filter( 'the_content', 'my_edit_content', -10 );
}
} );
// remove the filter when main loop ends
add_action( 'loop_end', function( WP_Query $query ) {
if ( has_filter( 'the_content', 'my_edit_content' ) ) {
remove_filter( 'the_content', 'my_edit_content' );
}
} );
| wordpress | {
"language": "en",
"length": 277,
"provenance": "stackexchange_00019.jsonl.gz:465189",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/225625"
} | [
0.018035888671875,
-0.0234375,
-0.0288238525390625,
-0.02630615234375,
-0.0057220458984375,
-0.047760009765625,
0.0233306884765625,
0.00640106201171875,
0.002262115478515625,
-0.002582550048828125,
-0.0216064453125,
-0.01715087890625,
0.021270751953125,
-0.03509521484375,
0.029388427734375,
-0.0162353515625,
0.016357421875,
-0.0311431884765625,
0.00952911376953125,
-0.0268096923828125,
-0.0085601806640625,
-0.01216888427734375,
0.0172882080078125,
0.026885986328125,
0.01268768310546875,
-0.0277252197265625,
0.072998046875,
0.0023899078369140625,
0.0170745849609375,
-0.00018298625946044922,
0.025421142578125,
-0.03533935546875,
0.04058837890625,
0.0152435302734375,
-0.0499267578125,
0.04254150390625,
-0.026641845703125,
0.01204681396484375,
-0.010650634765625,
0.00942230224609375,
0.01435089111328125,
-0.006282806396484375,
0.002399444580078125,
0.05389404296875,
-0.0083465576171875,
-0.0323486328125,
0.0261993408203125,
-0.05157470703125,
0.020965576171875,
-0.01120758056640625,
0.0175323486328125,
0.00679779052734375,
0.0187530517578125,
-0.0252532958984375,
-0.00072479248046875,
0.0318603515625,
-0.052276611328125,
0.037750244140625,
0.02886962890625,
0.032257080078125,
-0.009765625,
-0.0125732421875,
-0.005153656005859375,
-0.034759521484375,
0.032318115234375,
0.020721435546875,
0.043365478515625,
-0.006450653076171875,
-0.044097900390625,
0.0245208740234375,
0.03863525390625,
-0.0440673828125,
-0.017181396484375,
-0.0211181640625,
0.0006580352783203125,
0.006496429443359375,
0.011199951171875,
-0.01186370849609375,
0.0011205673217773438,
0.034393310546875,
0.004642486572265625,
-0.00485992431640625,
0.00649261474609375,
-0.056396484375,
0.0088653564453125,
-0.049560546875,
-0.0098724365234375,
0.0162200927734375,
-0.033935546875,
-0.022369384765625,
-0.02825927734375,
0.040802001953125,
-0.03253173828125,
-0.029022216796875,
-0.0298919677734375,
-0.006221771240234375,
0.0174560546875,
0.034027099609375,
-0.0078125,
0.0084228515625,
0.018096923828125,
-0.05157470703125,
0.04266357421875,
-0.0287322998046875,
0.022918701171875,
0.022125244140625,
-0.0282745361328125,
-0.00934600830078125,
0.042388916015625,
0.0275421142578125,
-0.0154266357421875,
0.0218658447265625,
0.037994384765625,
0.00823211669921875,
-0.02716064453125,
-0.0245208740234375,
0.00699615478515625,
-0.007511138916015625,
-0.00496673583984375,
-0.003017425537109375,
0.00371551513671875,
-0.035736083984375,
0.0226898193359375,
-0.0313720703125,
0.0538330078125,
-0.00839996337890625,
-0.07373046875,
0.030853271484375,
0.00890350341796875,
0.02001953125,
0.00954437255859375,
0.0015430450439453125,
0.01116943359375,
0.0345458984375,
-0.006221771240234375,
-0.00980377197265625,
0.02532958984375,
-0.03564453125,
-0.0298309326171875,
0.02935791015625,
-0.01861572265625,
-0.0283660888671875,
-0.0355224609375,
-0.0196990966796875,
0.049041748046875,
0.00690460205078125,
0.017333984375,
0.0323486328125,
0.0136566162109375,
-0.01849365234375,
0.036376953125,
-0.013702392578125,
0.033599853515625,
-0.015411376953125,
0.000007927417755126953,
-0.0172271728515625,
0.0188751220703125,
-0.0252685546875,
-0.022308349609375,
-0.02191162109375,
-0.005382537841796875,
-0.01424407958984375,
0.00630950927734375,
-0.03887939453125,
-0.051177978515625,
0.02056884765625,
-0.0217132568359375,
0.00244140625,
0.0115966796875,
-0.01551055908203125,
0.0265960693359375,
0.01462554931640625,
-0.01300811767578125,
-0.0258636474609375,
-0.0161895751953125,
-0.01287078857421875,
-0.021026611328125,
0.0307464599609375,
0.018585205078125,
0.039703369140625,
0.0311431884765625,
-0.0128326416015625,
0.05889892578125,
0.002696990966796875,
-0.051849365234375,
-0.0175628662109375,
0.05316162109375,
0.0704345703125,
0.006496429443359375,
0.02593994140625,
0.04388427734375,
-0.0215606689453125,
-0.036590576171875,
-0.0014438629150390625,
-0.00084686279296875,
-0.041290283203125,
0.0088043212890625,
-0.0284423828125,
0.01358795166015625,
0.027923583984375,
0.035064697265625,
0.0007724761962890625,
0.0233917236328125,
-0.0195770263671875,
-0.0421142578125,
0.0113372802734375,
-0.0274658203125,
0.030029296875,
0.00617218017578125,
-0.0160369873046875,
0.00717926025390625,
-0.0274810791015625,
0.036224365234375,
-0.09490966796875,
-0.07421875,
0.006988525390625,
-0.044342041015625,
0.035125732421875,
0.01166534423828125,
0.07501220703125,
0.0293426513671875,
-0.0364990234375,
-0.005634307861328125,
-0.055999755859375,
0.048858642578125,
0.00876617431640625,
-0.011749267578125,
-0.000774383544921875,
0.0242156982421875,
0.0227813720703125,
-0.037750244140625,
0.0160064697265625,
0.0208587646484375,
0.03741455078125,
-0.0279541015625,
-0.004138946533203125,
-0.0240020751953125,
-0.03826904296875,
-0.00435638427734375,
0.04754638671875,
0.0390625,
0.09527587890625,
-0.0005779266357421875,
-0.0002636909484863281,
0.0865478515625,
-0.0155792236328125,
0.0093536376953125,
-0.0226593017578125,
0.060211181640625,
0.08258056640625,
-0.012603759765625,
-0.0005388259887695312,
0.0009560585021972656,
-0.074951171875,
0.0509033203125,
0.016998291015625,
0.008453369140625,
0.001529693603515625,
-0.0080108642578125,
-0.006526947021484375,
0.0016298294067382812,
-0.036468505859375,
-0.058441162109375,
0.004638671875,
0.030914306640625,
-0.00897216796875,
0.03753662109375,
0.008880615234375,
-0.035247802734375,
-0.01617431640625,
0.046478271484375,
0.036041259765625,
-0.0038967132568359375,
-0.00901031494140625,
0.0211639404296875,
-0.0216064453125,
-0.024322509765625,
0.01490020751953125,
0.0102691650390625,
-0.0267486572265625,
-0.01186370849609375,
-0.003681182861328125,
-0.0205841064453125,
-0.00949859619140625,
0.01678466796875,
-0.0231781005859375,
0.016204833984375,
-0.0208892822265625,
0.0228271484375,
-0.0399169921875,
-0.009552001953125,
0.00237274169921875,
-0.04132080078125,
0.053497314453125,
0.0033397674560546875,
-0.04949951171875,
-0.0653076171875,
-0.0219268798828125,
0.0195465087890625,
-0.042572021484375,
0.002391815185546875,
0.058685302734375,
0.001239776611328125,
-0.0062408447265625,
0.005779266357421875,
0.006374359130859375,
0.0119781494140625,
-0.01068878173828125,
0.0032825469970703125,
0.0289306640625,
-0.0614013671875,
0.030670166015625,
0.0158233642578125,
0.047271728515625,
-0.04339599609375,
-0.04327392578125,
-0.030426025390625,
-0.0013971328735351562,
-0.078857421875,
-0.048309326171875,
-0.021026611328125,
-0.049560546875,
-0.0076751708984375,
-0.017364501953125,
-0.0200042724609375,
-0.003635406494140625,
0.0020885467529296875,
0.00771331787109375,
-0.04962158203125,
-0.01274871826171875,
-0.0178070068359375,
-0.0367431640625,
-0.036102294921875,
0.03179931640625,
-0.01153564453125,
0.0223541259765625,
0.01251220703125,
0.03857421875,
0.002838134765625,
-0.034393310546875,
0.0257720947265625,
0.005878448486328125,
-0.03521728515625,
0.021759033203125,
-0.00386810302734375,
-0.01458740234375,
0.007381439208984375,
-0.0028133392333984375,
-0.01244354248046875,
0.023223876953125,
-0.01543426513671875,
-0.0107269287109375,
-0.032745361328125,
-0.01541900634765625,
-0.006656646728515625,
0.05377197265625,
0.0413818359375,
-0.0302581787109375,
0.03887939453125,
-0.04840087890625,
0.01702880859375,
-0.0072479248046875,
-0.0204925537109375,
-0.032989501953125,
-0.0040130615234375,
-0.012603759765625,
0.002872467041015625,
-0.0003941059112548828,
-0.05072021484375,
-0.0015344619750976562,
0.010833740234375,
-0.018096923828125,
0.01318359375,
-0.033599853515625,
-0.05572509765625,
0.01068115234375,
-0.0161590576171875,
-0.0202484130859375,
0.04058837890625,
0.0011701583862304688,
0.042266845703125,
0.0169525146484375,
0.0224761962890625,
-0.0005822181701660156,
-0.00386810302734375,
0.0268402099609375,
0.0180816650390625,
0.037353515625,
-0.025787353515625,
-0.026580810546875,
-0.0192413330078125,
0.055450439453125,
-0.0721435546875,
-0.00799560546875,
0.019195556640625,
0.01092529296875,
0.0059356689453125,
-0.012908935546875,
-0.037811279296875,
-0.037017822265625,
-0.10699462890625,
0.039794921875,
-0.0011749267578125,
-0.00730133056640625,
-0.04248046875,
0.0216217041015625,
-0.079833984375,
-0.044189453125,
0.0452880859375,
-0.0667724609375,
-0.0011920928955078125,
0.042816162109375,
-0.0653076171875,
0.035614013671875,
-0.07391357421875,
-0.015869140625,
-0.0572509765625,
0.0057373046875,
-0.03546142578125,
0.0184783935546875,
0.0295562744140625,
-0.0276336669921875,
-0.02655029296875,
0.0017080307006835938,
0.00400543212890625,
0.02197265625,
-0.007183074951171875,
0.005504608154296875,
0.00460052490234375,
-0.0229034423828125,
-0.0108184814453125,
-0.024658203125,
-0.005100250244140625,
-0.00870513916015625,
-0.0241241455078125,
0.040069580078125,
-0.0166778564453125,
0.044281005859375,
-0.002044677734375,
-0.0171661376953125,
-0.0458984375,
-0.05059814453125,
-0.042266845703125,
0.020782470703125,
-0.0288238525390625,
0.020965576171875,
-0.0682373046875,
-0.08514404296875,
0.025238037109375,
0.0006427764892578125,
-0.027984619140625,
0.004451751708984375,
0.0625,
0.0250701904296875,
-0.00032806396484375,
-0.02630615234375,
-0.0194549560546875,
0.0218963623046875,
-0.0276336669921875,
0.05767822265625,
0.0239715576171875,
-0.009124755859375,
0.06036376953125,
-0.006195068359375,
-0.00196075439453125,
-0.0313720703125,
0.0689697265625,
0.0011444091796875,
0.00521087646484375,
0.00969696044921875,
-0.01152801513671875,
0.0193328857421875,
-0.01268768310546875,
-0.032135009765625,
0.0006260871887207031,
0.00872802734375,
-0.00005054473876953125,
-0.035980224609375,
0.07598876953125,
0.0214996337890625,
0.008331298828125,
-0.00009238719940185547,
0.05670166015625,
0.004734039306640625,
0.0083770751953125,
0.00879669189453125,
-0.033203125,
-0.005657196044921875,
0.007305145263671875,
0.0169677734375,
0.0011186599731445312,
0.0162353515625,
0.047119140625,
0.02728271484375,
0.02978515625,
-0.0078277587890625,
-0.00955963134765625,
0.032196044921875,
-0.03790283203125,
-0.045440673828125,
-0.0211944580078125,
-0.024322509765625,
0.011322021484375,
0.052703857421875,
-0.0132904052734375,
-0.007404327392578125,
0.01025390625,
-0.06158447265625,
-0.010711669921875,
0.03228759765625,
-0.0084686279296875,
-0.036590576171875,
0.01457977294921875,
-0.0053558349609375,
-0.0009851455688476562,
0.0426025390625,
-0.04254150390625,
-0.0014162063598632812,
-0.0196990966796875,
-0.0034809112548828125,
0.018035888671875,
0.00780487060546875,
-0.01641845703125,
0.0247802734375,
0.044097900390625,
-0.0088653564453125,
-0.0283355712890625,
0.021392822265625,
-0.035186767578125,
-0.0167999267578125,
0.0394287109375,
0.005779266357421875,
-0.03497314453125,
-0.0030364990234375,
0.025421142578125,
0.036834716796875,
-0.00495147705078125,
0.0263214111328125,
0.04119873046875,
-0.0511474609375,
0.01267242431640625,
0.02337646484375,
-0.0172882080078125,
-0.0211944580078125,
0.00792694091796875,
0.007305145263671875,
0.029510498046875,
0.05914306640625,
-0.00969696044921875,
0.005702972412109375,
0.01186370849609375,
-0.0001239776611328125,
0.0250701904296875,
-0.000988006591796875,
-0.00904083251953125,
-0.04052734375,
-0.021942138671875,
-0.0214996337890625,
0.0037708282470703125,
0.101806640625,
-0.0269775390625,
0.06439208984375,
-0.039398193359375,
-0.01457977294921875,
-0.029937744140625,
0.0243988037109375,
0.027557373046875,
0.032012939453125,
-0.061676025390625,
0.0121307373046875,
-0.03167724609375,
-0.0087432861328125,
-0.039794921875,
-0.038604736328125,
-0.0673828125,
-0.0111083984375,
0.002040863037109375,
0.033050537109375,
-0.00547027587890625,
-0.0293121337890625,
-0.00946044921875,
-0.0064544677734375,
0.01129150390625,
0.0472412109375,
-0.03656005859375,
0.11297607421875,
-0.01435089111328125,
0.0360107421875,
0.0042266845703125,
0.057861328125,
0.003993988037109375,
-0.003574371337890625,
-0.0284423828125,
-0.056640625,
0.0069122314453125,
0.040069580078125,
-0.020233154296875,
0.0229949951171875,
0.020416259765625,
0.00021326541900634766,
0.041748046875,
-0.0002484321594238281,
0.0014324188232421875,
0.003978729248046875,
-0.04876708984375,
-0.0013875961303710938,
-0.0255584716796875,
0.08746337890625,
0.019744873046875,
0.0229949951171875,
-0.0282440185546875,
-0.0286712646484375,
0.019744873046875,
0.0004775524139404297,
0.012481689453125,
0.01053619384765625,
0.0093536376953125,
0.01983642578125,
0.0264739990234375,
-0.02984619140625,
0.0164947509765625,
0.0196533203125,
-0.005306243896484375,
0.01132965087890625,
-0.0009331703186035156,
-0.0303497314453125,
-0.0221405029296875,
0.0222625732421875,
-0.0021495819091796875,
-0.0029277801513671875,
0.0261688232421875,
-0.0191497802734375,
-0.0028896331787109375,
0.025604248046875,
0.029693603515625,
-0.0263214111328125,
-0.0063323974609375,
0.00547027587890625,
-0.038848876953125,
-0.01213836669921875,
0.033355712890625,
-0.02899169921875,
0.0172882080078125,
0.0439453125,
-0.046112060546875,
0.0187530517578125,
0.06451416015625,
-0.004291534423828125,
-0.027252197265625,
-0.028472900390625,
-0.00930023193359375,
0.0179901123046875,
0.007659912109375,
0.01490020751953125,
-0.0047760009765625,
0.0161590576171875,
0.0128326416015625,
0.034576416015625,
0.0082550048828125,
-0.036834716796875,
-0.048797607421875,
-0.008758544921875,
0.0186767578125,
-0.064453125,
0.0193939208984375,
-0.028656005859375,
-0.0015840530395507812,
0.02288818359375,
-0.03228759765625,
0.045562744140625,
0.0027256011962890625,
-0.0261383056640625,
-0.0386962890625,
-0.023834228515625,
0.0005016326904296875,
0.0574951171875,
-0.0165557861328125,
0.041839599609375,
0.0035572052001953125,
-0.0162506103515625,
-0.0052642822265625,
-0.053863525390625,
0.057525634765625,
0.003818511962890625,
-0.02313232421875,
0.01212310791015625,
-0.0236053466796875,
-0.0017557144165039062,
-0.00855255126953125,
0.0270233154296875,
-0.0325927734375,
-0.00608062744140625,
-0.0073394775390625,
-0.0111236572265625,
-0.02117919921875,
-0.016571044921875,
-0.07470703125,
0.12188720703125,
-0.01021575927734375,
0.024688720703125,
0.00724029541015625,
0.039154052734375,
-0.049713134765625,
0.007297515869140625,
-0.0504150390625,
0.07855224609375,
0.0036258697509765625,
0.0775146484375,
-0.068359375,
-0.00726318359375,
0.023468017578125,
0.0341796875,
-0.002773284912109375,
0.005435943603515625,
-0.03521728515625,
-0.0311126708984375,
-0.00778961181640625,
0.03082275390625,
0.0211029052734375,
0.0299224853515625,
-0.002880096435546875,
0.0137176513671875,
-0.00997161865234375,
-0.0142974853515625,
0.04962158203125,
-0.08746337890625,
-0.040863037109375,
0.01219940185546875,
0.01052093505859375,
0.006916046142578125,
0.04644775390625,
0.05615234375,
-0.0318603515625,
0.01285552978515625,
0.03350830078125,
0.0087432861328125,
-0.042694091796875,
0.036346435546875,
0.00975799560546875,
-0.017364501953125,
-0.04534912109375,
-0.0234832763671875,
0.032745361328125,
0.0175933837890625,
0.07177734375,
0.07037353515625,
0.04803466796875,
0.047088623046875,
-0.00640869140625,
0.040069580078125,
0.00901031494140625,
-0.0240478515625,
0.05126953125,
0.0121002197265625,
0.0081787109375,
-0.0447998046875,
0.00279998779296875,
0.037994384765625,
0.051300048828125,
-0.033355712890625,
-0.016937255859375,
0.0117340087890625,
0.0177154541015625,
-0.004344940185546875,
0.004390716552734375,
0.00308990478515625,
-0.0043792724609375,
0.02374267578125,
-0.0634765625,
-0.0166015625,
0.043304443359375,
0.0274505615234375,
0.0029811859130859375,
0.0041046142578125,
-0.0172882080078125,
-0.024627685546875,
-0.0251312255859375,
-0.0223388671875,
0.01198577880859375,
0.037200927734375,
0.01311492919921875,
0.05120849609375,
0.0184173583984375,
-0.0179443359375,
-0.026947021484375,
0.0178375244140625,
0.00133514404296875,
0.048675537109375,
-0.0408935546875,
-0.01465606689453125,
-0.001842498779296875,
0.027496337890625,
0.0200042724609375,
0.0269317626953125,
0.029815673828125,
0.018280029296875,
-0.031982421875,
-0.00827789306640625,
0.01476287841796875,
-0.03173828125,
-0.0157470703125,
-0.0094451904296875,
0.0062408447265625,
0.01751708984375,
-0.006618499755859375,
-0.002147674560546875,
0.04180908203125,
0.0162200927734375,
-0.018402099609375,
0.0162506103515625,
0.0031871795654296875,
-0.055023193359375,
0.0537109375,
0.0234527587890625,
0.07977294921875,
0.011444091796875,
-0.057159423828125,
-0.002429962158203125,
-0.03216552734375,
-0.10052490234375,
0.04296875,
0.055999755859375,
-0.021331787109375,
-0.00617218017578125,
0.007083892822265625,
-0.01203155517578125,
0.004718780517578125,
0.008453369140625,
0.0019626617431640625,
-0.0004277229309082031,
0.01216888427734375,
-0.00994873046875,
0.0118408203125,
0.01087188720703125,
-0.00785064697265625,
0.040740966796875,
0.0186309814453125,
0.02911376953125,
-0.0201416015625,
0.0266876220703125,
-0.001277923583984375,
-0.0003464221954345703,
-0.004039764404296875,
0.003635406494140625,
-0.0036869049072265625,
0.0196533203125,
0.0169830322265625,
-0.01355743408203125,
-0.0310211181640625,
-0.037628173828125,
0.069091796875,
-0.0086517333984375,
0.0103759765625,
-0.039306640625,
0.044677734375,
-0.044830322265625,
0.051300048828125,
-0.00589752197265625,
0.0283966064453125,
-0.006435394287109375,
-0.02520751953125,
0.061676025390625,
0.019378662109375,
0.0113677978515625,
0.010040283203125,
-0.0130462646484375,
0.00284576416015625,
-0.0016078948974609375,
0.0299835205078125,
-0.0168609619140625,
0.01313018798828125,
-0.044830322265625,
0.001987457275390625,
0.034698486328125,
-0.0146484375,
-0.0231475830078125,
0.044921875,
-0.0125579833984375,
0.006591796875,
-0.02978515625,
-0.0152740478515625,
-0.015106201171875,
0.0340576171875,
0.00007218122482299805,
0.016845703125,
-0.0208587646484375,
0.0110015869140625,
-0.028350830078125,
-0.00659942626953125,
-0.030853271484375,
0.00609588623046875,
-0.031341552734375,
-0.004535675048828125,
-0.01551055908203125,
-0.11126708984375,
-0.08001708984375,
-0.00461578369140625,
0.0462646484375,
-0.0033721923828125,
-0.026824951171875,
-0.0092926025390625,
-0.01517486572265625,
0.04730224609375,
0.0013265609741210938,
-0.001758575439453125,
-0.0040435791015625,
-0.0250396728515625,
-0.02532958984375,
0.006206512451171875,
-0.026153564453125,
0.02349853515625,
0.030059814453125,
0.002201080322265625,
0.0338134765625,
-0.01180267333984375,
0.0091552734375,
0.00580596923828125,
-0.017333984375,
0.055267333984375,
-0.054931640625,
-0.0426025390625,
0.0254058837890625,
0.01045989990234375,
0.0029354095458984375,
-0.0266265869140625,
-0.0090484619140625,
-0.01678466796875,
0.0177001953125,
-0.0010833740234375,
-0.0033397674560546875,
0.005962371826171875,
-0.036407470703125,
-0.06658935546875,
0.043487548828125,
-0.00994873046875,
-0.0399169921875,
-0.04827880859375,
-0.00091552734375,
-0.0035533905029296875,
0.005023956298828125,
-0.01512908935546875,
-0.03240966796875,
-0.04034423828125,
0.039459228515625,
-0.01068115234375,
0.0165252685546875,
0.031951904296875,
-0.0140533447265625,
-0.0350341796875,
-0.0179290771484375,
-0.0254058837890625,
-0.01271820068359375,
0.0194549560546875,
-0.018829345703125,
0.045257568359375,
0.03424072265625,
-0.03326416015625,
0.039703369140625,
0.0136566162109375,
-0.041107177734375,
-0.0258026123046875,
-0.0185699462890625,
-0.0173492431640625,
0.003437042236328125,
0.1236572265625,
0.03271484375,
0.0234527587890625,
-0.057464599609375,
0.003993988037109375,
-0.00466156005859375,
-0.06103515625,
-0.01111602783203125,
0.03717041015625,
-0.04693603515625,
0.0003733634948730469,
-0.0186767578125,
0.008270263671875,
0.00908660888671875,
-0.07086181640625,
-0.0188446044921875,
-0.0285491943359375,
-0.0261383056640625,
0.051849365234375,
-0.028533935546875,
-0.047088623046875,
0.0625,
-0.0301055908203125,
0.004550933837890625,
0.01358795166015625,
0.0249176025390625,
0.0195159912109375,
0.043182373046875,
-0.00069427490234375,
0.00170135498046875,
-0.004848480224609375,
-0.0030231475830078125,
0.01690673828125,
0.01517486572265625,
0.001110076904296875,
-0.00797271728515625,
-0.037353515625,
0.018707275390625,
0.0168609619140625,
0.033660888671875,
-0.01317596435546875,
0.014739990234375,
-0.007480621337890625,
0.07568359375,
-0.0384521484375,
0.056060791015625,
-0.017852783203125,
0.0135345458984375,
-0.0133819580078125,
0.0127410888671875,
0.03070068359375,
-0.006931304931640625,
0.005054473876953125,
0.00958251953125,
-0.0223846435546875,
-0.00472259521484375,
0.006504058837890625,
-0.03424072265625,
-0.0177764892578125,
-0.0142059326171875
]
|
1b436b5ee7094aef67531520b4bccc40199328ad | Wordpress Stackexchange
Q: Remove/Disable "Automatically add new top-level pages to this menu" Is there any way to disable or remove the "Auto add pages - Automatically add new top-level pages to this menu" functionality via a theme?
I suppose I could hide it with a bit of CSS, but I'd rather do more cleanly if possible.
Many clients click that not realizing what it does and chaos ensues.
A: Since there is no filter to remove this option, your best best to to stick to using CSS by putting the following in your child theme's functions.php:
add_action( 'admin_head', 'wpse_225635_menu_css' );
function wpse_225635_menu_css() {
global $pagenow;
if ( $pagenow == 'nav-menus.php' ) {
?>
<style type="text/css">
.auto-add-pages {
display: none;
}
</style>
<?php
}
}
| Q: Remove/Disable "Automatically add new top-level pages to this menu" Is there any way to disable or remove the "Auto add pages - Automatically add new top-level pages to this menu" functionality via a theme?
I suppose I could hide it with a bit of CSS, but I'd rather do more cleanly if possible.
Many clients click that not realizing what it does and chaos ensues.
A: Since there is no filter to remove this option, your best best to to stick to using CSS by putting the following in your child theme's functions.php:
add_action( 'admin_head', 'wpse_225635_menu_css' );
function wpse_225635_menu_css() {
global $pagenow;
if ( $pagenow == 'nav-menus.php' ) {
?>
<style type="text/css">
.auto-add-pages {
display: none;
}
</style>
<?php
}
}
A: As per comments and verifiable in the source:
<dl class="auto-add-pages">
<dt class="howto"><?php _e( 'Auto add pages' ); ?></dt>
<dd class="checkbox-input"><input type="checkbox"<?php checked( $auto_add ); ?> name="auto-add-pages" id="auto-add-pages" value="1" /> <label for="auto-add-pages"><?php printf( __('Automatically add new top-level pages to this menu' ), esc_url( admin_url( 'edit.php?post_type=page' ) ) ); ?></label></dd>
</dl>
there is no filter to get rid of Auto Add Pages in a clean way. You'll have to use css or javascript.
| wordpress | {
"language": "en",
"length": 194,
"provenance": "stackexchange_00019.jsonl.gz:465192",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/225635"
} | [
0.09674072265625,
-0.0026683807373046875,
0.03271484375,
0.007427215576171875,
0.02703857421875,
-0.0469970703125,
0.11920166015625,
-0.044891357421875,
-0.0117645263671875,
-0.005828857421875,
0.00415802001953125,
-0.0011110305786132812,
-0.0185089111328125,
-0.03668212890625,
0.0309906005859375,
-0.019775390625,
0.02154541015625,
-0.0108489990234375,
0.0236053466796875,
-0.010284423828125,
-0.0231170654296875,
0.0112762451171875,
0.03497314453125,
0.0224151611328125,
-0.005558013916015625,
0.02587890625,
0.02947998046875,
0.0052490234375,
-0.00975799560546875,
-0.0016450881958007812,
0.005298614501953125,
0.0069580078125,
-0.0225372314453125,
0.03594970703125,
0.0108489990234375,
-0.0355224609375,
-0.0120849609375,
0.0242462158203125,
0.0239715576171875,
-0.0212554931640625,
-0.0003619194030761719,
0.003177642822265625,
-0.0002970695495605469,
-0.01751708984375,
-0.0242919921875,
-0.0166015625,
-0.00159454345703125,
-0.0239105224609375,
-0.0032253265380859375,
-0.02386474609375,
0.0272369384765625,
0.0228118896484375,
0.042022705078125,
-0.032562255859375,
-0.010711669921875,
-0.0008711814880371094,
-0.02801513671875,
0.02789306640625,
0.002254486083984375,
0.0130157470703125,
0.017974853515625,
0.0145416259765625,
0.004749298095703125,
-0.01070404052734375,
-0.0341796875,
0.00567626953125,
-0.02923583984375,
0.0009026527404785156,
-0.052093505859375,
-0.0279388427734375,
0.036651611328125,
-0.044464111328125,
0.0035266876220703125,
0.0110931396484375,
-0.01328277587890625,
-0.041839599609375,
0.014068603515625,
-0.01238250732421875,
0.031463623046875,
0.0036373138427734375,
-0.0237274169921875,
0.040618896484375,
-0.0302276611328125,
-0.019256591796875,
0.008453369140625,
0.00920867919921875,
-0.0230712890625,
-0.017425537109375,
-0.01132965087890625,
0.00890350341796875,
-0.00965118408203125,
-0.0015096664428710938,
0.017242431640625,
0.0257415771484375,
-0.02520751953125,
0.00946044921875,
0.01904296875,
0.057373046875,
-0.01519775390625,
0.003612518310546875,
-0.01470947265625,
-0.03643798828125,
0.0182342529296875,
-0.06103515625,
0.0158538818359375,
0.05938720703125,
-0.02630615234375,
-0.02606201171875,
0.048828125,
0.01385498046875,
0.0302276611328125,
0.004955291748046875,
0.0159912109375,
0.002521514892578125,
0.0216827392578125,
-0.0126953125,
-0.041473388671875,
0.059967041015625,
-0.007694244384765625,
0.0290069580078125,
-0.0006947517395019531,
0.033294677734375,
-0.053436279296875,
-0.019927978515625,
0.0245819091796875,
0.0001633167266845703,
-0.0212554931640625,
0.01300811767578125,
-0.0031566619873046875,
-0.03192138671875,
-0.047943115234375,
0.027099609375,
0.103515625,
0.08172607421875,
0.046234130859375,
-0.00838470458984375,
-0.00041103363037109375,
-0.006992340087890625,
0.020599365234375,
0.0020503997802734375,
0.03155517578125,
-0.0604248046875,
-0.0391845703125,
0.031829833984375,
-0.00809478759765625,
-0.007343292236328125,
0.00899505615234375,
0.052734375,
0.03814697265625,
-0.0242919921875,
0.0382080078125,
-0.03857421875,
0.05377197265625,
-0.0018062591552734375,
-0.030120849609375,
-0.0177154541015625,
0.024444580078125,
-0.028106689453125,
-0.030059814453125,
-0.0321044921875,
-0.01947021484375,
0.0033931732177734375,
0.0245208740234375,
-0.04150390625,
-0.0631103515625,
-0.0159454345703125,
-0.007038116455078125,
-0.00745391845703125,
0.0223846435546875,
-0.0236663818359375,
0.039520263671875,
-0.05096435546875,
0.002346038818359375,
-0.007328033447265625,
-0.00547027587890625,
0.03570556640625,
0.05303955078125,
0.0254974365234375,
0.007076263427734375,
0.047760009765625,
-0.0113983154296875,
-0.037445068359375,
0.0819091796875,
-0.05657958984375,
-0.0682373046875,
0.052490234375,
-0.01041412353515625,
0.06298828125,
0.012237548828125,
0.0047760009765625,
0.049713134765625,
-0.004894256591796875,
-0.0121307373046875,
-0.0163726806640625,
0.042572021484375,
-0.0234222412109375,
-0.025054931640625,
-0.037109375,
0.01294708251953125,
-0.0010232925415039062,
-0.00007987022399902344,
0.0184173583984375,
-0.01480865478515625,
-0.006908416748046875,
-0.041473388671875,
0.0031108856201171875,
-0.01436614990234375,
0.036895751953125,
0.03997802734375,
-0.0080413818359375,
-0.01419830322265625,
-0.02032470703125,
0.0115203857421875,
-0.03717041015625,
-0.06256103515625,
0.02032470703125,
0.0015726089477539062,
0.00891876220703125,
-0.00992584228515625,
0.033721923828125,
-0.0163116455078125,
0.0032634735107421875,
-0.0231781005859375,
-0.0005750656127929688,
0.038604736328125,
-0.0038623809814453125,
-0.04583740234375,
-0.0281524658203125,
-0.0087890625,
-0.0288238525390625,
-0.03546142578125,
0.08502197265625,
0.006267547607421875,
-0.00246429443359375,
-0.0235137939453125,
-0.0020294189453125,
-0.015625,
-0.09527587890625,
-0.01549530029296875,
0.05291748046875,
0.0236663818359375,
0.016815185546875,
-0.00884246826171875,
0.0307769775390625,
0.0167083740234375,
-0.05029296875,
-0.004619598388671875,
0.03070068359375,
-0.018829345703125,
-0.0026378631591796875,
0.041351318359375,
-0.0091705322265625,
0.0205230712890625,
0.0254364013671875,
0.005023956298828125,
0.0141448974609375,
-0.03033447265625,
-0.0056610107421875,
0.037384033203125,
-0.0283966064453125,
0.01531219482421875,
-0.03143310546875,
-0.003688812255859375,
-0.0244903564453125,
0.0194854736328125,
-0.01486968994140625,
0.004848480224609375,
-0.00034880638122558594,
-0.0300445556640625,
-0.0147857666015625,
0.038177490234375,
0.0092315673828125,
-0.016571044921875,
0.0030956268310546875,
0.028717041015625,
-0.054107666015625,
-0.0186004638671875,
0.0182037353515625,
-0.0343017578125,
-0.032501220703125,
-0.02850341796875,
0.034332275390625,
0.034637451171875,
-0.0216217041015625,
-0.0198211669921875,
-0.059600830078125,
0.01800537109375,
-0.0347900390625,
-0.03521728515625,
-0.0207366943359375,
0.01496124267578125,
-0.005115509033203125,
-0.0421142578125,
0.0032825469970703125,
0.024261474609375,
-0.02142333984375,
0.025970458984375,
-0.000640869140625,
0.01898193359375,
-0.00954437255859375,
0.06512451171875,
0.05865478515625,
-0.03631591796875,
0.032501220703125,
0.005573272705078125,
0.01108551025390625,
-0.01461029052734375,
-0.00499725341796875,
-0.00366973876953125,
0.03814697265625,
-0.047332763671875,
0.056304931640625,
0.0272216796875,
0.01470947265625,
-0.00804901123046875,
-0.02960205078125,
-0.0142364501953125,
0.0003895759582519531,
-0.046905517578125,
-0.019134521484375,
0.04437255859375,
-0.03875732421875,
-0.0192413330078125,
0.03265380859375,
-0.032196044921875,
-0.019256591796875,
0.07989501953125,
-0.0144195556640625,
-0.006626129150390625,
-0.040191650390625,
-0.006732940673828125,
-0.0460205078125,
-0.01355743408203125,
-0.0202178955078125,
0.005962371826171875,
-0.0228424072265625,
-0.0018749237060546875,
0.0848388671875,
0.0099639892578125,
-0.057342529296875,
0.00447845458984375,
-0.01131439208984375,
-0.016510009765625,
0.035888671875,
0.0303802490234375,
0.004955291748046875,
0.0291595458984375,
0.01038360595703125,
-0.016876220703125,
0.0227508544921875,
-0.01434326171875,
-0.03570556640625,
-0.0245513916015625,
0.02587890625,
0.0010700225830078125,
-0.01471710205078125,
0.045135498046875,
0.0189361572265625,
-0.0215911865234375,
-0.01263427734375,
-0.0244140625,
0.009429931640625,
-0.032867431640625,
-0.0219573974609375,
-0.000048100948333740234,
-0.0027008056640625,
-0.0033359527587890625,
0.0100860595703125,
-0.0054779052734375,
-0.0130157470703125,
0.041290283203125,
-0.0229644775390625,
0.016937255859375,
-0.007694244384765625,
-0.0226593017578125,
-0.02850341796875,
0.08489990234375,
-0.0007643699645996094,
0.0214691162109375,
0.035430908203125,
0.021026611328125,
0.0255584716796875,
-0.04302978515625,
-0.020263671875,
-0.038604736328125,
0.03070068359375,
-0.049285888671875,
0.00658416748046875,
0.0030841827392578125,
0.007171630859375,
0.0242462158203125,
0.06964111328125,
-0.038330078125,
-0.019134521484375,
-0.01168060302734375,
0.01421356201171875,
-0.01174163818359375,
-0.048980712890625,
-0.032318115234375,
-0.02197265625,
-0.0792236328125,
-0.01219940185546875,
-0.032745361328125,
-0.00782012939453125,
-0.0335693359375,
0.01262664794921875,
-0.038360595703125,
-0.038818359375,
0.038543701171875,
-0.03118896484375,
-0.01439666748046875,
0.03375244140625,
-0.0626220703125,
0.00554656982421875,
-0.0501708984375,
-0.0188751220703125,
-0.078369140625,
-0.00601959228515625,
-0.050750732421875,
0.04608154296875,
0.000408172607421875,
-0.0022144317626953125,
-0.00798797607421875,
0.0273590087890625,
0.043731689453125,
-0.006198883056640625,
0.0222320556640625,
-0.00638580322265625,
-0.0097198486328125,
-0.0020771026611328125,
0.0111846923828125,
-0.030059814453125,
0.0008907318115234375,
0.0226593017578125,
-0.00888824462890625,
0.04974365234375,
-0.01177978515625,
0.031036376953125,
0.0285186767578125,
-0.03192138671875,
-0.03509521484375,
-0.058807373046875,
-0.061614990234375,
0.01049041748046875,
-0.031890869140625,
0.00711822509765625,
-0.057037353515625,
-0.07647705078125,
0.029815673828125,
-0.006114959716796875,
-0.01326751708984375,
0.0080718994140625,
0.048187255859375,
0.0104827880859375,
-0.01499176025390625,
-0.0157928466796875,
0.045562744140625,
0.030731201171875,
-0.005321502685546875,
0.01554107666015625,
-0.00447845458984375,
-0.01085662841796875,
0.01177978515625,
-0.0005784034729003906,
0.0024814605712890625,
-0.00484466552734375,
0.031005859375,
0.00632476806640625,
-0.020721435546875,
0.01425933837890625,
-0.0048675537109375,
0.00644683837890625,
-0.0009145736694335938,
-0.0185394287109375,
-0.01406097412109375,
-0.0298919677734375,
0.027587890625,
0.03314208984375,
-0.01812744140625,
-0.037261962890625,
-0.007358551025390625,
0.00479888916015625,
0.026397705078125,
0.002040863037109375,
0.0197601318359375,
0.003726959228515625,
-0.0231475830078125,
-0.018463134765625,
-0.0225677490234375,
0.01605224609375,
0.0289306640625,
-0.0171051025390625,
0.03765869140625,
-0.0249786376953125,
-0.0227203369140625,
-0.0004100799560546875,
0.0007991790771484375,
0.038604736328125,
0.000007450580596923828,
-0.055267333984375,
-0.0273590087890625,
0.003940582275390625,
0.0511474609375,
0.0257568359375,
0.061126708984375,
0.054046630859375,
-0.004459381103515625,
0.002971649169921875,
-0.03955078125,
-0.003582000732421875,
0.009674072265625,
-0.04998779296875,
-0.04205322265625,
0.0228271484375,
-0.043212890625,
0.038787841796875,
-0.035919189453125,
0.0259246826171875,
-0.00653839111328125,
-0.0219268798828125,
-0.05255126953125,
-0.00295257568359375,
-0.002101898193359375,
0.006381988525390625,
0.07177734375,
0.00981903076171875,
-0.014312744140625,
0.08905029296875,
-0.044158935546875,
-0.048583984375,
0.0343017578125,
0.049285888671875,
0.0194244384765625,
-0.0036792755126953125,
-0.0202178955078125,
0.00867462158203125,
-0.019927978515625,
0.032928466796875,
0.0172119140625,
-0.0278167724609375,
-0.024383544921875,
0.0146484375,
0.022552490234375,
-0.00978851318359375,
0.0112457275390625,
0.0177459716796875,
0.006862640380859375,
-0.01165008544921875,
0.0584716796875,
-0.036041259765625,
-0.02032470703125,
-0.0010204315185546875,
-0.046875,
-0.04217529296875,
0.007720947265625,
-0.10968017578125,
-0.0157623291015625,
-0.0179290771484375,
-0.0009584426879882812,
-0.0008869171142578125,
-0.01898193359375,
0.040771484375,
0.0037899017333984375,
-0.022796630859375,
0.05767822265625,
0.0195465087890625,
0.00652313232421875,
-0.0141754150390625,
-0.048858642578125,
-0.0221405029296875,
-0.061126708984375,
-0.042999267578125,
-0.0660400390625,
-0.00948333740234375,
-0.06884765625,
0.0377197265625,
0.00835418701171875,
0.03326416015625,
-0.0257110595703125,
-0.02630615234375,
0.0103607177734375,
0.008758544921875,
0.0015134811401367188,
0.040130615234375,
-0.0028514862060546875,
0.051513671875,
-0.0193939208984375,
0.00882720947265625,
0.0203094482421875,
0.033294677734375,
0.01763916015625,
-0.0277862548828125,
0.0268096923828125,
-0.0212860107421875,
-0.03302001953125,
-0.011383056640625,
-0.05743408203125,
-0.006031036376953125,
0.038543701171875,
-0.0096588134765625,
0.03857421875,
-0.0152740478515625,
0.012847900390625,
-0.014801025390625,
-0.028839111328125,
-0.0556640625,
-0.0024662017822265625,
0.0240325927734375,
-0.0215301513671875,
0.03173828125,
0.0026874542236328125,
-0.0101776123046875,
0.019134521484375,
-0.005802154541015625,
0.030975341796875,
0.0065155029296875,
-0.034759521484375,
0.062469482421875,
0.046051025390625,
0.0005950927734375,
0.049896240234375,
0.017486572265625,
0.02130126953125,
0.026947021484375,
-0.00371551513671875,
0.01065826416015625,
-0.01690673828125,
0.01751708984375,
0.00864410400390625,
0.0301361083984375,
0.020477294921875,
0.0022258758544921875,
0.0081024169921875,
0.0748291015625,
0.047943115234375,
-0.107421875,
-0.0012826919555664062,
-0.0152130126953125,
0.000037670135498046875,
0.035491943359375,
-0.0213775634765625,
0.01140594482421875,
-0.0223846435546875,
0.0254058837890625,
-0.033416748046875,
-0.034332275390625,
-0.0162506103515625,
-0.034088134765625,
-0.0100250244140625,
0.00665283203125,
0.012847900390625,
0.0188140869140625,
0.055908203125,
-0.03155517578125,
-0.01507568359375,
0.017547607421875,
0.0061798095703125,
-0.0152740478515625,
0.01103973388671875,
-0.036956787109375,
-0.06488037109375,
-0.0012388229370117188,
-0.0484619140625,
-0.01502227783203125,
0.056854248046875,
-0.0002598762512207031,
-0.0153961181640625,
0.059326171875,
-0.0390625,
0.07476806640625,
0.006591796875,
-0.00733184814453125,
0.016876220703125,
-0.036224365234375,
0.0179290771484375,
-0.006519317626953125,
-0.040557861328125,
0.01424407958984375,
-0.0022430419921875,
-0.050445556640625,
-0.0043792724609375,
0.01013946533203125,
0.08074951171875,
-0.0150299072265625,
-0.03228759765625,
0.033416748046875,
-0.0177764892578125,
-0.034027099609375,
-0.03961181640625,
0.037933349609375,
-0.021392822265625,
0.0248260498046875,
-0.01580810546875,
0.0340576171875,
0.0033550262451171875,
-0.042266845703125,
-0.0364990234375,
0.0494384765625,
-0.0197906494140625,
-0.0209808349609375,
-0.0008907318115234375,
0.043212890625,
-0.018524169921875,
0.0302886962890625,
-0.0107421875,
0.06878662109375,
0.050079345703125,
0.0127716064453125,
-0.01214599609375,
-0.01324462890625,
0.003719329833984375,
0.0253448486328125,
0.00693511962890625,
-0.000012516975402832031,
0.0268402099609375,
-0.0205535888671875,
0.031402587890625,
0.050323486328125,
0.0153350830078125,
-0.005611419677734375,
-0.03558349609375,
0.0036296844482421875,
0.006378173828125,
-0.05517578125,
0.01067352294921875,
-0.002101898193359375,
-0.02581787109375,
-0.00992584228515625,
0.00583648681640625,
0.005367279052734375,
-0.0055694580078125,
0.0251617431640625,
-0.01494598388671875,
-0.0022640228271484375,
-0.007259368896484375,
0.04998779296875,
0.00440216064453125,
0.037109375,
-0.0027484893798828125,
-0.03466796875,
-0.040985107421875,
-0.029937744140625,
0.0276641845703125,
-0.0105438232421875,
0.0023326873779296875,
0.037322998046875,
0.029693603515625,
-0.03350830078125,
0.02410888671875,
0.031463623046875,
0.049835205078125,
-0.043243408203125,
0.01922607421875,
0.0141448974609375,
0.04766845703125,
-0.050994873046875,
-0.05609130859375,
0.02691650390625,
0.041107177734375,
0.0017442703247070312,
-0.055572509765625,
0.00852203369140625,
-0.0114898681640625,
-0.00258636474609375,
0.016815185546875,
0.032257080078125,
-0.0369873046875,
0.0021724700927734375,
-0.002826690673828125,
-0.017547607421875,
0.0302581787109375,
0.010406494140625,
-0.0023212432861328125,
0.02239990234375,
0.01776123046875,
-0.0014123916625976562,
-0.0404052734375,
-0.00624847412109375,
0.0254974365234375,
0.03533935546875,
0.0240020751953125,
0.0460205078125,
-0.00959014892578125,
-0.01092529296875,
-0.03765869140625,
0.032684326171875,
-0.0252532958984375,
0.0574951171875,
-0.0821533203125,
-0.05126953125,
0.007030487060546875,
0.04931640625,
-0.01751708984375,
0.0103607177734375,
0.049652099609375,
0.0159759521484375,
-0.0504150390625,
-0.0275115966796875,
0.0103912353515625,
-0.041534423828125,
-0.0203094482421875,
-0.0268402099609375,
-0.005069732666015625,
0.05059814453125,
-0.0009131431579589844,
-0.00502777099609375,
0.021270751953125,
0.03955078125,
-0.00186920166015625,
-0.0214996337890625,
0.00205230712890625,
-0.051025390625,
0.0175018310546875,
0.02044677734375,
0.012481689453125,
0.03631591796875,
-0.054443359375,
-0.01415252685546875,
-0.035736083984375,
-0.0162200927734375,
0.030914306640625,
0.03436279296875,
-0.009185791015625,
0.00952911376953125,
0.0205078125,
0.008331298828125,
0.00333404541015625,
-0.04339599609375,
0.023895263671875,
0.0080718994140625,
0.01061248779296875,
0.0183258056640625,
-0.027191162109375,
0.0078125,
-0.016632080078125,
0.01502227783203125,
0.00039649009704589844,
0.07373046875,
-0.01428985595703125,
0.0217132568359375,
-0.0170745849609375,
-0.0059967041015625,
-0.004611968994140625,
-0.01177215576171875,
-0.002208709716796875,
0.01285552978515625,
0.001434326171875,
-0.00943756103515625,
-0.1187744140625,
0.0232391357421875,
0.03076171875,
0.00472259521484375,
0.06793212890625,
-0.01201629638671875,
0.00887298583984375,
-0.039306640625,
0.0243988037109375,
-0.01242828369140625,
0.0303497314453125,
0.001094818115234375,
-0.0301361083984375,
0.035858154296875,
0.0029201507568359375,
0.0039215087890625,
0.0191192626953125,
-0.006877899169921875,
-0.00716400146484375,
0.03143310546875,
-0.0188446044921875,
0.0204620361328125,
0.0218963623046875,
-0.004840850830078125,
-0.00833892822265625,
0.0288238525390625,
-0.0011234283447265625,
-0.0150146484375,
0.036712646484375,
-0.0135955810546875,
0.054840087890625,
-0.0343017578125,
-0.0118408203125,
0.0037479400634765625,
0.0003559589385986328,
-0.034454345703125,
-0.01419830322265625,
0.0001093149185180664,
-0.0203704833984375,
-0.00004506111145019531,
0.00247955322265625,
-0.0242156982421875,
-0.02435302734375,
-0.0084381103515625,
0.028289794921875,
-0.0156707763671875,
-0.0180816650390625,
-0.04498291015625,
0.04296875,
0.03497314453125,
0.01800537109375,
-0.122802734375,
0.099609375,
-0.0282135009765625,
0.07098388671875,
-0.03070068359375,
0.03924560546875,
-0.0153350830078125,
-0.040252685546875,
-0.04461669921875,
0.01107025146484375,
-0.0355224609375,
0.0474853515625,
0.012298583984375,
-0.02203369140625,
-0.0035915374755859375,
0.0016698837280273438,
0.0241546630859375,
-0.044219970703125,
-0.022491455078125,
0.0104827880859375,
0.00235748291015625,
-0.022247314453125,
0.007419586181640625,
-0.0139923095703125,
0.033233642578125,
-0.0265960693359375,
-0.016815185546875,
-0.020416259765625,
-0.01113128662109375,
0.003459930419921875,
0.026336669921875,
0.0435791015625,
0.0012035369873046875,
-0.032501220703125,
0.0085906982421875,
0.0147552490234375,
-0.034698486328125,
0.01020050048828125,
0.0216217041015625,
-0.03802490234375,
0.02154541015625,
0.01509857177734375,
-0.024627685546875,
0.0439453125,
0.0266876220703125,
0.00522613525390625,
0.069091796875,
-0.0078125,
0.045013427734375,
-0.0262451171875,
0.0171051025390625,
-0.01471710205078125,
-0.005840301513671875,
0.018646240234375,
-0.01265716552734375,
0.023651123046875,
0.035064697265625,
-0.035614013671875,
0.04315185546875,
-0.01702880859375,
0.01332855224609375,
-0.00420379638671875,
-0.0073699951171875,
-0.037689208984375,
-0.0300445556640625,
0.07208251953125,
0.05035400390625,
0.0291748046875,
-0.020599365234375,
-0.0026493072509765625,
-0.004009246826171875,
0.004528045654296875,
0.00917816162109375,
0.00112152099609375,
-0.032012939453125,
0.007167816162109375,
0.00783538818359375,
-0.00675201416015625,
-0.0176849365234375,
-0.032440185546875,
-0.0168304443359375,
-0.017852783203125,
0.0038623809814453125,
0.026458740234375,
-0.0135345458984375,
0.04766845703125,
0.020599365234375,
-0.030059814453125,
-0.038055419921875,
-0.0005650520324707031,
-0.00830078125,
-0.03179931640625,
-0.032196044921875,
-0.022064208984375,
0.04522705078125,
-0.069091796875,
0.01605224609375,
-0.036712646484375,
0.055938720703125,
-0.08392333984375,
0.00862884521484375,
-0.0160064697265625,
0.04010009765625,
0.01995849609375,
0.062744140625,
-0.035003662109375,
0.05938720703125,
0.03729248046875,
0.0003287792205810547,
0.034637451171875,
0.0601806640625,
0.01470184326171875,
0.041107177734375,
0.006496429443359375,
-0.048126220703125,
0.029205322265625,
-0.0694580078125,
0.002979278564453125,
0.034942626953125,
-0.00917816162109375,
-0.029571533203125,
0.0186920166015625,
0.004276275634765625,
0.024505615234375,
0.005603790283203125
]
|
98db5ccb4d462b1c0f5f03bdb0c07c11ef2e86a0 | Wordpress Stackexchange
Q: Use author author display name in permalink structure for pages and posts I need to add the author name as a subdirectory prefix for all user's posts and pages.
For example:
example.com/johndoe/ //The author page for John Doe
example.com/johndoe/category/test-post/ //Test post by user John Doe
example.com/johndoe/test-page/ //Test page by user John Doe
If I change the permalink structure to: /%author%/%category%/%postname%/ this works fine for displaying a user's post but not a user's page.
However I'm not sure if there is something I can do in .htaccess or functions.php that will allow me to get the pages to work in the same manner.
I understand this can be accomplished with Multisite, however I'm trying to avoid using this because the client doesn't want to use it.
A: By the looks of it, there's a plugin to achieve exactly this, so save you rolling your own for it.
The plugin is: https://wordpress.org/plugins/permalinks-customizer/
I installed it to test that it does what you're looking for. Here's a screenshot that shows what you'd do:
| Q: Use author author display name in permalink structure for pages and posts I need to add the author name as a subdirectory prefix for all user's posts and pages.
For example:
example.com/johndoe/ //The author page for John Doe
example.com/johndoe/category/test-post/ //Test post by user John Doe
example.com/johndoe/test-page/ //Test page by user John Doe
If I change the permalink structure to: /%author%/%category%/%postname%/ this works fine for displaying a user's post but not a user's page.
However I'm not sure if there is something I can do in .htaccess or functions.php that will allow me to get the pages to work in the same manner.
I understand this can be accomplished with Multisite, however I'm trying to avoid using this because the client doesn't want to use it.
A: By the looks of it, there's a plugin to achieve exactly this, so save you rolling your own for it.
The plugin is: https://wordpress.org/plugins/permalinks-customizer/
I installed it to test that it does what you're looking for. Here's a screenshot that shows what you'd do:
A: Tested with Wordpress 5.0.4
The first problem to solve it's the post_name value for pages that would share the same slug (e.g. about-me).
The simpler solution I found is to add the author nicename (beware: in my solution it should not contain a hyphen!) as the first part of the slug:
about-me page post_name for john: john-about-me
about-me page post_name for mary: mary-about-me
This could be achieved using the wp_insert_post_data filter hook (see wp_insert_post() function defined in wp-includes/post.php) when creating the page:
// about-me => <author_name>-about-me
add_filter( 'wp_insert_post_data', 'custom_wp_insert_post_data', 99, 2);
function custom_wp_insert_post_data($data, $postarr)
{
if(($data["post_type"] == "page") && ($data["post_status"] != "auto-draft"))
{
$author_name = get_the_author_meta( 'user_nicename', $data["post_author"] );
// insert
if($postarr['hidden_post_status'] == "draft") {
$data["post_name"] = $author_name . "-" . $data["post_name"];
}
// update
else {
list($author, $slug) = explode("-", basename($data["post_name"]), 2 );
// wrong permalink -> prepend the author
if($author != $author_name) {
$data["post_name"] = $author_name . "-" . $data["post_name"];
}
}
}
return $data;
}
Next step it will be to change the wp rewrite rules to reflect our desires (you need also to update the settings > permalinks):
add_filter('page_rewrite_rules', 'custom_page_rewrite_rules');
function custom_page_rewrite_rules($page_rewrite)
{
// remove : john/about-me => index.php?pagename=john/about-me
unset($page_rewrite["(.?.+?)(?:/([0-9]+))?/?$"]);
// add: john/about-me => index.php?pagename=john-about-me
$page_rewrite["(.?.+?)/(.+?)/?$"] = "index.php?pagename=\$matches[1]-\$matches[2]";
return $page_rewrite;
}
add_filter('post_rewrite_rules', 'custom_post_rewrite_rules');
// posts have the /%author%/%category%/%postname% permalink structure
function custom_post_rewrite_rules($post_rewrite)
{
// remove: john/about-me => index.php?category_name=about-me&author_name=john
unset($post_rewrite["([^/]+)/(.+?)/?$"]);
return $post_rewrite;
}
Last step it will be to change the value returned when the code asks for a page permalink (e.g. in menus).
To do that we have to use the page_link filter hook (located in get_page_link() function defined in wp-includes/link-template.php)..
// http://www.example.com/john-about-me => http://www.example.com/john/about-me
add_filter('page_link', 'custom_page_link', 99, 3);
function custom_page_link( $link, $ID, $sample )
{
list($author, $slug) = explode("-", basename($link), 2 );
return ( site_url() . "/" . $author . "/" . $slug );
}
..but it won't work if you don't set to false the use_verbose_page_rules property of $wp_rewrite global instance; this will stop parse_request() to check if a "wrong" matched pagepath exixts:
add_action('init', 'disable_verbose_page_rule');
function disable_verbose_page_rule()
{
global $wp_rewrite;
$wp_rewrite->use_verbose_page_rules = false;
}
That's all.. Well, to be honest this is the main part, but it will be some other work to do, like change the rewrite rules also for all the attachment/comments/feed/embed stuff linked to a page and may be something else that I didn't have enough time to discover.
This is my first post; I hope it will help someone, like many others helped me.
| wordpress | {
"language": "en",
"length": 576,
"provenance": "stackexchange_00019.jsonl.gz:465194",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/225642"
} | [
0.051727294921875,
-0.005367279052734375,
0.00904083251953125,
-0.03350830078125,
-0.015838623046875,
-0.019866943359375,
-0.00542449951171875,
-0.035675048828125,
-0.0271759033203125,
0.038970947265625,
0.0037689208984375,
0.03826904296875,
0.0202178955078125,
-0.0178985595703125,
0.0251312255859375,
0.004611968994140625,
-0.0032978057861328125,
0.0247039794921875,
0.030029296875,
-0.010650634765625,
0.005146026611328125,
-0.014312744140625,
0.034881591796875,
-0.0309295654296875,
0.038543701171875,
-0.034942626953125,
0.08258056640625,
-0.044921875,
0.03656005859375,
-0.029205322265625,
0.0220947265625,
-0.0266876220703125,
-0.0012121200561523438,
0.0165557861328125,
0.0194244384765625,
0.07269287109375,
-0.0157928466796875,
0.030426025390625,
0.045379638671875,
0.00788116455078125,
0.024871826171875,
-0.0064849853515625,
-0.0181121826171875,
0.05755615234375,
-0.025848388671875,
-0.043670654296875,
0.031463623046875,
-0.03076171875,
0.00391387939453125,
-0.0037212371826171875,
-0.0081329345703125,
0.0257110595703125,
-0.0008225440979003906,
0.0157928466796875,
-0.0163421630859375,
-0.01325225830078125,
0.030364990234375,
-0.0280914306640625,
0.028961181640625,
-0.039642333984375,
-0.0283660888671875,
-0.000247955322265625,
0.03546142578125,
0.0277099609375,
0.0142364501953125,
0.00148773193359375,
-0.017181396484375,
0.0250396728515625,
0.004657745361328125,
0.01470947265625,
0.0058441162109375,
-0.031158447265625,
-0.00647735595703125,
-0.026885986328125,
-0.049591064453125,
-0.01483154296875,
-0.02740478515625,
-0.08160400390625,
0.0187225341796875,
-0.0150146484375,
-0.0243988037109375,
-0.02264404296875,
0.005706787109375,
-0.056060791015625,
0.0217132568359375,
-0.023162841796875,
-0.00951385498046875,
0.004535675048828125,
-0.061004638671875,
0.01169586181640625,
-0.037353515625,
-0.026885986328125,
-0.02239990234375,
0.01107025146484375,
-0.007083892822265625,
0.019989013671875,
0.026580810546875,
0.06378173828125,
-0.034088134765625,
0.0085906982421875,
-0.004596710205078125,
-0.029754638671875,
0.038848876953125,
-0.059722900390625,
-0.00830841064453125,
0.054290771484375,
0.04730224609375,
0.05780029296875,
0.021453857421875,
0.003566741943359375,
0.011871337890625,
0.01015472412109375,
-0.0220947265625,
-0.01251983642578125,
-0.031707763671875,
0.029754638671875,
-0.045440673828125,
-0.006298065185546875,
-0.0090789794921875,
0.0104522705078125,
-0.0025196075439453125,
0.04339599609375,
-0.0131378173828125,
-0.02301025390625,
-0.002437591552734375,
-0.0084991455078125,
0.002056121826171875,
-0.044952392578125,
0.0037479400634765625,
-0.00696563720703125,
-0.02655029296875,
0.0175323486328125,
0.0697021484375,
0.046966552734375,
0.016876220703125,
-0.0173187255859375,
0.0084686279296875,
-0.0219573974609375,
0.01165008544921875,
0.007415771484375,
-0.0221405029296875,
-0.0078277587890625,
0.05084228515625,
-0.03253173828125,
-0.0217742919921875,
0.0197296142578125,
0.008209228515625,
0.02410888671875,
0.01297760009765625,
-0.0401611328125,
-0.00385284423828125,
-0.02337646484375,
0.0300140380859375,
-0.00977325439453125,
0.00665283203125,
-0.019500732421875,
0.0006623268127441406,
-0.02471923828125,
0.0017137527465820312,
-0.0078277587890625,
0.042877197265625,
0.0168914794921875,
0.013702392578125,
-0.0115509033203125,
-0.02191162109375,
-0.032196044921875,
-0.04595947265625,
-0.00513458251953125,
0.01544952392578125,
0.0036716461181640625,
-0.0231475830078125,
0.0019817352294921875,
-0.0185394287109375,
0.0186920166015625,
0.014678955078125,
0.0241546630859375,
-0.0124053955078125,
0.048065185546875,
-0.00978851318359375,
0.061370849609375,
0.0256500244140625,
-0.0264129638671875,
0.02447509765625,
-0.0037994384765625,
-0.057281494140625,
0.038726806640625,
0.0291290283203125,
0.094970703125,
-0.0184326171875,
0.01546478271484375,
0.0489501953125,
0.032501220703125,
-0.06585693359375,
0.00299072265625,
-0.0022830963134765625,
-0.01108551025390625,
0.0210418701171875,
-0.00626373291015625,
0.0144195556640625,
0.006229400634765625,
-0.03594970703125,
-0.017303466796875,
0.035400390625,
0.01451873779296875,
-0.0159149169921875,
0.031951904296875,
-0.033477783203125,
0.0255584716796875,
0.029205322265625,
0.01824951171875,
0.007633209228515625,
0.01568603515625,
-0.0218658447265625,
-0.049468994140625,
-0.0240325927734375,
0.054901123046875,
0.017547607421875,
0.00415802001953125,
0.00010186433792114258,
0.005767822265625,
0.0281219482421875,
-0.0175323486328125,
0.007076263427734375,
0.0262603759765625,
0.030120849609375,
-0.050323486328125,
-0.0092926025390625,
-0.06024169921875,
-0.0325927734375,
-0.005313873291015625,
-0.0797119140625,
0.052093505859375,
0.049041748046875,
0.03717041015625,
-0.044952392578125,
0.003314971923828125,
-0.0171661376953125,
-0.00533294677734375,
-0.00942230224609375,
0.0372314453125,
0.0218048095703125,
-0.0247344970703125,
-0.0180511474609375,
-0.0013608932495117188,
0.013458251953125,
0.016998291015625,
0.028778076171875,
-0.0168914794921875,
0.0068511962890625,
0.052490234375,
0.0056915283203125,
0.0093994140625,
-0.0025730133056640625,
-0.088623046875,
0.01396942138671875,
0.051971435546875,
0.006256103515625,
-0.00606536865234375,
-0.01419830322265625,
0.00565338134765625,
0.0219879150390625,
0.0218658447265625,
-0.0157928466796875,
-0.006610870361328125,
0.0066375732421875,
0.01404571533203125,
0.01250457763671875,
0.02020263671875,
-0.03411865234375,
0.00844573974609375,
0.004772186279296875,
-0.004497528076171875,
0.0014514923095703125,
0.01213836669921875,
0.018280029296875,
-0.0452880859375,
-0.020721435546875,
0.0024433135986328125,
0.0015325546264648438,
0.0003681182861328125,
-0.0097198486328125,
0.0007505416870117188,
-0.0287017822265625,
0.00760650634765625,
0.0032405853271484375,
-0.053192138671875,
0.003345489501953125,
0.0321044921875,
-0.0192108154296875,
-0.0106201171875,
0.0121917724609375,
0.0303955078125,
-0.03131103515625,
0.03643798828125,
-0.017730712890625,
-0.003925323486328125,
0.016326904296875,
-0.07379150390625,
0.07275390625,
-0.056396484375,
0.0279388427734375,
0.06939697265625,
-0.00589752197265625,
0.00897216796875,
0.0137786865234375,
-0.0306854248046875,
0.0006160736083984375,
0.0296783447265625,
0.00691986083984375,
-0.040252685546875,
-0.01224517822265625,
0.01108551025390625,
0.0270538330078125,
0.03741455078125,
0.01056671142578125,
-0.0308837890625,
0.0093536376953125,
0.03814697265625,
-0.062744140625,
-0.07513427734375,
0.0229339599609375,
-0.0435791015625,
-0.0225067138671875,
0.01548004150390625,
-0.038818359375,
-0.0097503662109375,
0.0360107421875,
-0.012847900390625,
0.0006661415100097656,
-0.036712646484375,
-0.0711669921875,
-0.056640625,
-0.0751953125,
-0.0166168212890625,
-0.00865936279296875,
-0.00927734375,
0.00896453857421875,
-0.0224609375,
-0.0297393798828125,
-0.04559326171875,
-0.044281005859375,
0.045684814453125,
0.00963592529296875,
-0.04046630859375,
-0.025054931640625,
0.01715087890625,
0.0007829666137695312,
0.0021762847900390625,
0.048370361328125,
0.0305328369140625,
-0.030792236328125,
-0.00026869773864746094,
0.0100555419921875,
0.002376556396484375,
0.033935546875,
0.032257080078125,
-0.0033206939697265625,
0.026092529296875,
0.04132080078125,
-0.0362548828125,
-0.00504302978515625,
0.00258636474609375,
-0.037933349609375,
-0.01026153564453125,
0.01206207275390625,
-0.0205230712890625,
-0.01050567626953125,
-0.005725860595703125,
0.0404052734375,
0.0258026123046875,
-0.0011053085327148438,
0.006862640380859375,
0.0004260540008544922,
0.01448822021484375,
0.048431396484375,
-0.01110076904296875,
-0.006809234619140625,
-0.042510986328125,
0.0113525390625,
-0.02581787109375,
-0.035858154296875,
-0.02154541015625,
-0.01061248779296875,
-0.01409149169921875,
-0.080078125,
0.054840087890625,
-0.05169677734375,
-0.0274200439453125,
-0.051422119140625,
-0.0198211669921875,
-0.020721435546875,
0.0655517578125,
0.031768798828125,
-0.0180511474609375,
0.0190887451171875,
0.00904083251953125,
-0.060546875,
-0.001178741455078125,
-0.047698974609375,
-0.0029735565185546875,
-0.024139404296875,
-0.03936767578125,
-0.0323486328125,
-0.02935791015625,
-0.006450653076171875,
0.0182037353515625,
0.01032257080078125,
-0.01351165771484375,
0.00482940673828125,
-0.0030670166015625,
-0.01849365234375,
0.007244110107421875,
-0.03741455078125,
0.0023746490478515625,
-0.0012073516845703125,
-0.0289154052734375,
-0.07464599609375,
-0.02520751953125,
0.007747650146484375,
0.061676025390625,
-0.0206298828125,
0.002735137939453125,
-0.040618896484375,
0.0478515625,
0.00838470458984375,
0.053680419921875,
0.02154541015625,
-0.0028324127197265625,
0.04193115234375,
0.00858306884765625,
0.037017822265625,
-0.0002162456512451172,
0.03692626953125,
0.010772705078125,
-0.041839599609375,
-0.02069091796875,
-0.05596923828125,
0.0002244710922241211,
-0.006633758544921875,
-0.046295166015625,
-0.06158447265625,
-0.0633544921875,
-0.00917816162109375,
0.0298004150390625,
-0.00833892822265625,
0.0166473388671875,
-0.075439453125,
-0.0604248046875,
0.030303955078125,
-0.027252197265625,
0.0035800933837890625,
-0.0006394386291503906,
0.058746337890625,
0.01435089111328125,
-0.0159454345703125,
0.013336181640625,
0.01157379150390625,
0.033721923828125,
-0.032012939453125,
0.044403076171875,
0.0149993896484375,
-0.018798828125,
0.035858154296875,
-0.01654052734375,
-0.01678466796875,
-0.00710296630859375,
0.00966644287109375,
-0.0289459228515625,
-0.0740966796875,
0.04779052734375,
-0.03338623046875,
0.040863037109375,
0.01100921630859375,
-0.00666046142578125,
0.005458831787109375,
0.006092071533203125,
0.0215911865234375,
-0.007381439208984375,
0.01113128662109375,
-0.0271453857421875,
-0.02813720703125,
0.004131317138671875,
0.003589630126953125,
0.051055908203125,
0.014007568359375,
-0.00049591064453125,
0.02423095703125,
-0.002452850341796875,
-0.003566741943359375,
0.0210723876953125,
-0.01898193359375,
0.0229034423828125,
0.03125,
-0.02294921875,
-0.002567291259765625,
0.0030059814453125,
-0.00826263427734375,
0.09759521484375,
0.0256805419921875,
-0.00864410400390625,
0.002819061279296875,
-0.029296875,
-0.006000518798828125,
-0.0035076141357421875,
0.011260986328125,
0.0277557373046875,
0.017242431640625,
0.0160675048828125,
0.003032684326171875,
-0.005924224853515625,
0.018035888671875,
-0.0210418701171875,
0.034210205078125,
0.007427215576171875,
0.0035686492919921875,
-0.03619384765625,
0.10565185546875,
0.007236480712890625,
0.0253448486328125,
-0.022705078125,
0.0340576171875,
0.037750244140625,
0.0193939208984375,
0.0099639892578125,
0.01334381103515625,
-0.01056671142578125,
-0.00449371337890625,
0.0035152435302734375,
-0.019927978515625,
0.0279693603515625,
0.0238800048828125,
0.0435791015625,
0.0138397216796875,
-0.027801513671875,
-0.0056304931640625,
-0.05096435546875,
-0.0220489501953125,
0.03436279296875,
-0.01788330078125,
-0.038970947265625,
-0.048248291015625,
-0.015777587890625,
0.035308837890625,
-0.01959228515625,
-0.024658203125,
-0.0023860931396484375,
-0.039337158203125,
-0.0029449462890625,
0.025665283203125,
0.003108978271484375,
-0.0025119781494140625,
-0.01502227783203125,
-0.0134429931640625,
-0.0189361572265625,
-0.0052032470703125,
-0.00360870361328125,
0.0182342529296875,
-0.037261962890625,
-0.026885986328125,
0.055816650390625,
0.0028057098388671875,
0.05255126953125,
-0.04083251953125,
-0.00408935546875,
0.0355224609375,
-0.004535675048828125,
0.0423583984375,
0.0068817138671875,
-0.116455078125,
0.0419921875,
-0.027191162109375,
0.0361328125,
0.0272064208984375,
-0.006793975830078125,
-0.0576171875,
-0.04180908203125,
0.0031147003173828125,
-0.007396697998046875,
-0.01120758056640625,
0.0047149658203125,
-0.036773681640625,
0.04449462890625,
0.031036376953125,
-0.005580902099609375,
-0.02325439453125,
0.0572509765625,
-0.012481689453125,
0.048187255859375,
-0.00420379638671875,
0.034881591796875,
0.006275177001953125,
-0.036376953125,
-0.011322021484375,
-0.030609130859375,
-0.0166473388671875,
0.00864410400390625,
-0.02862548828125,
0.035797119140625,
0.06463623046875,
0.01398468017578125,
0.007785797119140625,
-0.003116607666015625,
0.00936126708984375,
-0.01328277587890625,
-0.043701171875,
-0.0024814605712890625,
-0.0184478759765625,
0.0030307769775390625,
0.0157623291015625,
0.03955078125,
-0.02288818359375,
-0.048431396484375,
0.00046515464782714844,
0.0217132568359375,
-0.00075531005859375,
0.0109100341796875,
-0.055328369140625,
0.0307769775390625,
0.0804443359375,
0.04046630859375,
0.06793212890625,
0.048980712890625,
0.038665771484375,
0.0261688232421875,
-0.0242767333984375,
0.005016326904296875,
0.019439697265625,
0.042694091796875,
0.006565093994140625,
0.0212554931640625,
0.050445556640625,
-0.004970550537109375,
-0.047088623046875,
0.0280609130859375,
0.0107269287109375,
-0.05828857421875,
-0.005527496337890625,
-0.0037097930908203125,
0.035369873046875,
0.00580596923828125,
-0.004058837890625,
-0.01251220703125,
0.01143646240234375,
0.061248779296875,
-0.0227813720703125,
-0.0068817138671875,
0.03240966796875,
-0.0038433074951171875,
0.0188140869140625,
-0.028656005859375,
0.055145263671875,
0.0017986297607421875,
0.0032672882080078125,
-0.0175628662109375,
-0.00792694091796875,
0.002834320068359375,
-0.025390625,
-0.025787353515625,
0.01922607421875,
-0.01538848876953125,
-0.0089874267578125,
0.03570556640625,
-0.044097900390625,
0.03411865234375,
-0.006267547607421875,
0.01085662841796875,
0.005817413330078125,
0.0278472900390625,
-0.00984954833984375,
-0.008758544921875,
0.017181396484375,
-0.0338134765625,
0.0660400390625,
-0.0173797607421875,
-0.0153656005859375,
0.029541015625,
-0.0223388671875,
0.0000355839729309082,
0.0006260871887207031,
0.0107574462890625,
-0.01497650146484375,
0.0029201507568359375,
0.10040283203125,
-0.041290283203125,
-0.033538818359375,
-0.0027828216552734375,
0.0004856586456298828,
-0.0025424957275390625,
0.03961181640625,
0.0146636962890625,
-0.042022705078125,
-0.052093505859375,
0.0309600830078125,
-0.06329345703125,
-0.00882720947265625,
0.02337646484375,
-0.06353759765625,
0.058837890625,
0.01192474365234375,
0.06329345703125,
0.014373779296875,
0.01316070556640625,
0.0048828125,
-0.005931854248046875,
-0.0115509033203125,
0.05389404296875,
0.0150909423828125,
0.035064697265625,
-0.033294677734375,
-0.0258026123046875,
0.028228759765625,
0.086181640625,
0.06494140625,
0.0230255126953125,
-0.044464111328125,
-0.0057830810546875,
0.0015106201171875,
-0.0236053466796875,
-0.04339599609375,
0.0665283203125,
-0.0101318359375,
-0.032257080078125,
0.01444244384765625,
0.023223876953125,
0.029937744140625,
0.004245758056640625,
-0.03680419921875,
0.00732421875,
0.03363037109375,
0.058319091796875,
0.01232147216796875,
-0.0263214111328125,
-0.0272064208984375,
-0.001567840576171875,
0.05126953125,
-0.047332763671875,
-0.01104736328125,
0.042510986328125,
0.058441162109375,
-0.053985595703125,
-0.03680419921875,
-0.026214599609375,
0.06451416015625,
0.044281005859375,
0.02783203125,
0.0008482933044433594,
0.01021575927734375,
0.005695343017578125,
0.0285491943359375,
0.015472412109375,
0.045318603515625,
-0.0066375732421875,
0.04815673828125,
0.034027099609375,
0.0284576416015625,
-0.0254364013671875,
-0.0517578125,
0.04498291015625,
0.06719970703125,
-0.0258941650390625,
-0.03216552734375,
0.00988006591796875,
-0.0197296142578125,
-0.0196075439453125,
-0.019012451171875,
-0.033782958984375,
0.0136566162109375,
0.01702880859375,
-0.036285400390625,
0.0008416175842285156,
0.005672454833984375,
0.05029296875,
-0.00931549072265625,
-0.026947021484375,
-0.0546875,
0.0030422210693359375,
-0.03082275390625,
-0.019927978515625,
0.0020694732666015625,
0.0205230712890625,
0.0262298583984375,
0.03826904296875,
0.039154052734375,
-0.01788330078125,
0.004261016845703125,
-0.00913238525390625,
0.0032825469970703125,
0.004947662353515625,
-0.018463134765625,
-0.0084228515625,
0.0180206298828125,
0.038909912109375,
0.0112762451171875,
0.0139617919921875,
0.015594482421875,
0.006664276123046875,
-0.00911712646484375,
-0.0149383544921875,
-0.00832366943359375,
-0.02789306640625,
0.036407470703125,
-0.03729248046875,
0.054473876953125,
0.0034656524658203125,
-0.0005555152893066406,
-0.022064208984375,
0.0218505859375,
0.03253173828125,
-0.043914794921875,
-0.012481689453125,
0.004573822021484375,
-0.07635498046875,
0.032745361328125,
-0.0118408203125,
0.058502197265625,
-0.0191650390625,
-0.028656005859375,
0.002445220947265625,
-0.037200927734375,
-0.05950927734375,
0.033355712890625,
0.0501708984375,
0.006076812744140625,
-0.0169525146484375,
-0.00039315223693847656,
0.004047393798828125,
0.0245361328125,
-0.026763916015625,
-0.01329803466796875,
0.031982421875,
0.02423095703125,
0.0005197525024414062,
-0.037506103515625,
-0.00682830810546875,
-0.005138397216796875,
0.01611328125,
-0.00983428955078125,
0.08770751953125,
-0.0277557373046875,
-0.0015106201171875,
-0.0263519287109375,
0.0097808837890625,
-0.06927490234375,
-0.03485107421875,
0.07373046875,
-0.038604736328125,
-0.045166015625,
0.01519775390625,
-0.041961669921875,
0.03643798828125,
0.006229400634765625,
-0.018157958984375,
0.0185394287109375,
-0.0123291015625,
0.005298614501953125,
0.000843048095703125,
0.023773193359375,
-0.0411376953125,
-0.0843505859375,
-0.058441162109375,
0.0204315185546875,
-0.0196533203125,
-0.005970001220703125,
-0.0338134765625,
0.01983642578125,
0.0335693359375,
-0.04583740234375,
0.0113372802734375,
-0.0202178955078125,
0.025115966796875,
0.02484130859375,
0.042327880859375,
-0.053619384765625,
0.025360107421875,
-0.001678466796875,
-0.007793426513671875,
0.015380859375,
0.0211639404296875,
0.035125732421875,
-0.05462646484375,
0.0180816650390625,
-0.01446533203125,
0.0389404296875,
0.01934814453125,
0.0002627372741699219,
-0.0478515625,
0.01276397705078125,
-0.01520538330078125,
-0.01434326171875,
-0.04632568359375,
-0.038909912109375,
0.043701171875,
0.0362548828125,
0.0016326904296875,
0.0002199411392211914,
-0.0999755859375,
-0.007160186767578125,
0.0253143310546875,
-0.01727294921875,
-0.0191802978515625,
0.0159454345703125,
-0.0477294921875,
0.03411865234375,
-0.0506591796875,
-0.042205810546875,
0.0063934326171875,
0.034820556640625,
-0.0191497802734375,
0.0123291015625,
-0.0550537109375,
-0.045867919921875,
-0.0279541015625,
0.00815582275390625,
0.032958984375,
-0.00807952880859375,
-0.015289306640625,
0.002063751220703125,
-0.00827789306640625,
0.0732421875,
-0.06549072265625,
-0.00989532470703125,
-0.014617919921875,
0.014312744140625,
-0.027801513671875,
-0.0853271484375,
0.032562255859375,
-0.06121826171875,
-0.0035228729248046875,
-0.0137176513671875,
0.004901885986328125,
0.0013866424560546875,
-0.01751708984375,
-0.01666259765625,
0.055755615234375,
0.0029735565185546875,
-0.0212860107421875,
-0.0316162109375,
-0.00417327880859375,
-0.02716064453125,
0.0755615234375,
0.0207061767578125,
-0.0310821533203125,
-0.0222015380859375,
0.021484375,
-0.00030303001403808594,
0.03216552734375,
-0.00809478759765625,
0.0012636184692382812,
-0.01120758056640625,
0.021514892578125,
0.0307769775390625,
-0.01348876953125,
0.047393798828125,
-0.018096923828125,
0.042633056640625,
0.0677490234375,
-0.0167694091796875,
0.00783538818359375,
-0.02410888671875,
-0.052520751953125,
-0.0158233642578125,
-0.04058837890625,
-0.0277862548828125,
-0.01296234130859375,
0.06231689453125,
0.037872314453125,
0.0222015380859375,
-0.03240966796875,
-0.0069580078125,
-0.038116455078125,
0.006961822509765625,
0.007007598876953125,
0.00345611572265625,
-0.045745849609375,
0.00839996337890625,
0.025848388671875,
-0.01494598388671875,
-0.0161895751953125,
0.01800537109375,
-0.042694091796875,
0.00551605224609375,
0.020263671875,
0.0023441314697265625,
-0.0209503173828125,
0.011199951171875,
0.00823974609375,
-0.031707763671875,
-0.045684814453125,
0.011810302734375,
-0.003650665283203125,
-0.045806884765625,
-0.00830078125,
-0.0281982421875,
0.006809234619140625,
-0.01727294921875,
0.018402099609375,
-0.007801055908203125,
0.0277252197265625,
-0.01554107666015625,
0.0082855224609375,
-0.0166778564453125,
0.0289154052734375,
-0.0031986236572265625,
0.004608154296875,
0.005023956298828125,
0.05108642578125,
0.01241302490234375,
0.0677490234375,
-0.01313018798828125,
-0.039825439453125,
-0.0364990234375,
0.03369140625,
-0.0217132568359375,
0.00952911376953125,
0.0116424560546875,
-0.0161895751953125,
-0.0015249252319335938,
-0.0013132095336914062,
0.007282257080078125,
-0.021942138671875,
0.0214080810546875,
-0.01438140869140625,
-0.002178192138671875,
0.0279388427734375
]
|
50f4cada0b01008d69578daaac454aaed4e38051 | Wordpress Stackexchange
Q: How to load paginated post pages via ajax Here's the case I got: I've setup post pagination for my website and everything works well. Except one thing - on every new page request all the resources are loaded again. This makes the website loading slow and breaks the user experience.
What I want to do is to load the content of the separate pages by ajax and replace them. The prev and next rel tags are setup so this won't be a problem for search engines to understand my content because they'll follow the tags.(correct me if I'm wrong)
However, I cannot find a way to do it because the post pages do not have a separate entry in the database. Any ideas how I can accomplish this?
Edit: I'm using <!--nextpage-->tag to separate my posts into pages.
| Q: How to load paginated post pages via ajax Here's the case I got: I've setup post pagination for my website and everything works well. Except one thing - on every new page request all the resources are loaded again. This makes the website loading slow and breaks the user experience.
What I want to do is to load the content of the separate pages by ajax and replace them. The prev and next rel tags are setup so this won't be a problem for search engines to understand my content because they'll follow the tags.(correct me if I'm wrong)
However, I cannot find a way to do it because the post pages do not have a separate entry in the database. Any ideas how I can accomplish this?
Edit: I'm using <!--nextpage-->tag to separate my posts into pages.
| wordpress | {
"language": "en",
"length": 139,
"provenance": "stackexchange_00019.jsonl.gz:465203",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/225666"
} | [
0.0914306640625,
0.0016574859619140625,
0.0178985595703125,
-0.07073974609375,
0.032867431640625,
-0.022705078125,
0.0276031494140625,
-0.0219879150390625,
0.0014019012451171875,
0.0017261505126953125,
-0.07781982421875,
0.01445770263671875,
-0.020538330078125,
0.00620269775390625,
-0.0132904052734375,
-0.059844970703125,
0.034393310546875,
-0.032958984375,
0.0185699462890625,
-0.006206512451171875,
0.00962066650390625,
0.00750732421875,
0.037078857421875,
0.049957275390625,
0.032806396484375,
0.0350341796875,
-0.01068115234375,
0.004283905029296875,
0.003246307373046875,
-0.0038928985595703125,
0.0240325927734375,
-0.0241546630859375,
0.0126953125,
-0.01369476318359375,
0.004199981689453125,
-0.048919677734375,
-0.0122222900390625,
0.00418853759765625,
0.0005297660827636719,
0.004596710205078125,
0.0172882080078125,
-0.0004374980926513672,
0.0538330078125,
0.0170745849609375,
0.00823974609375,
0.00820159912109375,
-0.00847625732421875,
-0.0794677734375,
-0.0041961669921875,
-0.0245819091796875,
0.015625,
0.0026302337646484375,
0.0318603515625,
-0.0182952880859375,
-0.01107025146484375,
-0.00547027587890625,
0.0132904052734375,
-0.01055145263671875,
0.04498291015625,
-0.040618896484375,
-0.03350830078125,
-0.029449462890625,
0.0262451171875,
-0.0016088485717773438,
-0.0386962890625,
-0.020355224609375,
-0.01119232177734375,
0.017364501953125,
-0.034149169921875,
-0.051300048828125,
0.0306854248046875,
-0.00989532470703125,
-0.0185699462890625,
-0.0287322998046875,
-0.01275634765625,
0.0156097412109375,
0.019378662109375,
-0.0144805908203125,
-0.006244659423828125,
-0.0020847320556640625,
-0.0235595703125,
0.055999755859375,
-0.0174102783203125,
-0.03277587890625,
-0.004627227783203125,
-0.014678955078125,
-0.030670166015625,
-0.0018100738525390625,
-0.04779052734375,
-0.042572021484375,
-0.03375244140625,
-0.037322998046875,
-0.036712646484375,
0.0158843994140625,
-0.03143310546875,
0.010345458984375,
-0.01363372802734375,
0.004245758056640625,
0.0005512237548828125,
0.01334381103515625,
-0.006694793701171875,
-0.032012939453125,
0.040679931640625,
-0.0299530029296875,
0.01702880859375,
-0.0019044876098632812,
0.002567291259765625,
0.0113677978515625,
0.07391357421875,
0.0229339599609375,
-0.0162353515625,
0.10205078125,
0.022613525390625,
0.0229644775390625,
-0.0760498046875,
-0.01494598388671875,
-0.003032684326171875,
-0.04840087890625,
-0.01145172119140625,
-0.0257110595703125,
-0.018402099609375,
-0.003894805908203125,
-0.040740966796875,
0.01123046875,
0.017242431640625,
0.0113983154296875,
0.0248260498046875,
-0.001346588134765625,
0.0286407470703125,
0.0211944580078125,
-0.013671875,
0.0137481689453125,
0.0287322998046875,
0.0243072509765625,
0.01032257080078125,
-0.0182952880859375,
0.0143585205078125,
-0.0482177734375,
-0.0183258056640625,
0.0216827392578125,
-0.01227569580078125,
-0.06024169921875,
-0.027191162109375,
-0.01395416259765625,
0.021209716796875,
0.0186309814453125,
0.005687713623046875,
0.01397705078125,
0.0087890625,
-0.00443267822265625,
-0.007709503173828125,
0.005336761474609375,
0.0239410400390625,
0.01000213623046875,
0.0225830078125,
-0.0231170654296875,
0.045196533203125,
-0.02679443359375,
-0.0029506683349609375,
-0.044403076171875,
0.033233642578125,
0.019500732421875,
0.00127410888671875,
-0.02044677734375,
-0.0347900390625,
-0.046051025390625,
-0.02825927734375,
0.01073455810546875,
0.02484130859375,
0.00963592529296875,
-0.00817108154296875,
-0.016754150390625,
-0.01396942138671875,
-0.00010573863983154297,
-0.00377655029296875,
0.020782470703125,
0.043701171875,
-0.023345947265625,
0.01513671875,
0.0142669677734375,
-0.036956787109375,
-0.033203125,
0.040557861328125,
-0.0341796875,
-0.040313720703125,
0.057586669921875,
0.020751953125,
0.07470703125,
-0.0264892578125,
0.03399658203125,
-0.0010766983032226562,
0.037109375,
0.00469207763671875,
-0.0016002655029296875,
0.028167724609375,
-0.03533935546875,
-0.040496826171875,
-0.0186920166015625,
0.00223541259765625,
-0.0193939208984375,
0.0106658935546875,
0.01558685302734375,
-0.034332275390625,
0.03350830078125,
-0.0196685791015625,
-0.0133514404296875,
0.0044708251953125,
0.0088958740234375,
0.02691650390625,
0.0215911865234375,
0.004825592041015625,
0.02239990234375,
-0.0135345458984375,
-0.058258056640625,
-0.045196533203125,
0.02288818359375,
-0.025421142578125,
-0.010101318359375,
-0.00585174560546875,
-0.002681732177734375,
-0.0193328857421875,
0.021026611328125,
-0.038055419921875,
-0.0018472671508789062,
0.052398681640625,
-0.003040313720703125,
-0.02276611328125,
-0.03839111328125,
0.0130462646484375,
-0.017852783203125,
-0.028289794921875,
0.0733642578125,
0.052093505859375,
0.06964111328125,
-0.0175018310546875,
-0.0160980224609375,
0.0148773193359375,
-0.01425933837890625,
0.00527191162109375,
0.033447265625,
0.01354217529296875,
0.0289306640625,
-0.0250091552734375,
0.009979248046875,
-0.0206756591796875,
-0.04034423828125,
0.00968170166015625,
0.006862640380859375,
-0.0149688720703125,
0.018798828125,
0.0061798095703125,
-0.0025177001953125,
0.0180511474609375,
-0.0296173095703125,
-0.012969970703125,
0.04913330078125,
0.041412353515625,
0.0511474609375,
-0.00518035888671875,
0.0024127960205078125,
-0.017669677734375,
0.0228271484375,
-0.018829345703125,
-0.0044097900390625,
0.039520263671875,
-0.01233673095703125,
0.045166015625,
0.036346435546875,
0.0156707763671875,
-0.022705078125,
-0.0037746429443359375,
-0.0166015625,
0.005279541015625,
0.01279449462890625,
0.01384735107421875,
0.0199737548828125,
-0.039459228515625,
-0.0017538070678710938,
0.038970947265625,
0.01305389404296875,
-0.004604339599609375,
0.0005526542663574219,
-0.0310821533203125,
0.0015592575073242188,
-0.0009093284606933594,
-0.0298919677734375,
0.00902557373046875,
0.042877197265625,
-0.012969970703125,
0.018218994140625,
0.0172119140625,
0.045379638671875,
0.0009756088256835938,
0.025421142578125,
-0.00919342041015625,
0.0205841064453125,
0.033660888671875,
-0.040557861328125,
0.0528564453125,
-0.045867919921875,
0.020416259765625,
0.05419921875,
0.005157470703125,
0.003955841064453125,
0.000484466552734375,
0.0145416259765625,
0.01462554931640625,
0.004970550537109375,
-0.0135955810546875,
-0.01326751708984375,
-0.0254058837890625,
0.0174560546875,
0.045623779296875,
0.07916259765625,
0.0181884765625,
-0.03399658203125,
0.0282135009765625,
0.06781005859375,
-0.0579833984375,
-0.0814208984375,
-0.010955810546875,
-0.07275390625,
-0.01425933837890625,
0.0199127197265625,
-0.035247802734375,
-0.007419586181640625,
0.050537109375,
0.007671356201171875,
-0.0223388671875,
-0.034515380859375,
-0.0733642578125,
-0.07489013671875,
-0.06781005859375,
0.05316162109375,
-0.00408172607421875,
0.007701873779296875,
-0.01629638671875,
0.05291748046875,
-0.0214691162109375,
-0.0843505859375,
-0.06103515625,
0.041046142578125,
-0.01439666748046875,
-0.02392578125,
-0.02459716796875,
0.007366180419921875,
-0.0023975372314453125,
0.001369476318359375,
0.0411376953125,
0.019439697265625,
-0.019561767578125,
0.0143280029296875,
-0.0284881591796875,
0.016632080078125,
-0.004833221435546875,
0.0240936279296875,
0.037994384765625,
0.029388427734375,
0.00848388671875,
-0.016326904296875,
-0.0445556640625,
-0.016265869140625,
-0.08599853515625,
-0.072021484375,
0.06365966796875,
0.0119171142578125,
-0.049530029296875,
-0.023529052734375,
-0.01136016845703125,
0.015045166015625,
0.005523681640625,
0.005718231201171875,
0.025482177734375,
-0.0294342041015625,
-0.021881103515625,
-0.0146636962890625,
0.023284912109375,
-0.0185546875,
0.01751708984375,
0.0025310516357421875,
-0.0018396377563476562,
-0.031036376953125,
0.0161590576171875,
-0.0311431884765625,
-0.05303955078125,
0.042327880859375,
0.0116424560546875,
-0.0017175674438476562,
-0.0000737309455871582,
-0.041748046875,
0.020294189453125,
0.08197021484375,
-0.05316162109375,
-0.0209197998046875,
-0.006435394287109375,
0.0177154541015625,
-0.01177215576171875,
-0.0633544921875,
-0.02752685546875,
-0.0240020751953125,
-0.0030155181884765625,
-0.009857177734375,
-0.012908935546875,
-0.0017957687377929688,
-0.0184326171875,
0.035552978515625,
0.0009355545043945312,
-0.01474761962890625,
0.041290283203125,
-0.028228759765625,
0.03228759765625,
-0.01117706298828125,
0.0151824951171875,
-0.030059814453125,
-0.033538818359375,
-0.00792694091796875,
-0.09271240234375,
-0.00841522216796875,
-0.022735595703125,
0.05194091796875,
0.01983642578125,
-0.057952880859375,
-0.030181884765625,
0.02081298828125,
0.0251312255859375,
0.0256195068359375,
0.007373809814453125,
-0.02886962890625,
0.039520263671875,
0.018402099609375,
0.00904083251953125,
-0.011932373046875,
-0.0015039443969726562,
-0.00788116455078125,
0.035491943359375,
0.018890380859375,
-0.06781005859375,
-0.0518798828125,
-0.06365966796875,
-0.0045318603515625,
-0.08050537109375,
-0.039794921875,
0.00018548965454101562,
0.0345458984375,
-0.0010318756103515625,
-0.0020198822021484375,
-0.048583984375,
-0.0826416015625,
0.0179901123046875,
0.0318603515625,
-0.026885986328125,
0.00510406494140625,
0.01568603515625,
0.022735595703125,
-0.0164031982421875,
-0.0238494873046875,
-0.007381439208984375,
0.0242156982421875,
-0.0279693603515625,
0.054107666015625,
0.00876617431640625,
-0.013702392578125,
0.08258056640625,
-0.024139404296875,
0.006153106689453125,
-0.006656646728515625,
0.024688720703125,
0.00627899169921875,
-0.00835418701171875,
0.0143280029296875,
0.00348663330078125,
-0.00804901123046875,
0.024322509765625,
-0.0212860107421875,
0.01369476318359375,
0.00772857666015625,
0.0158843994140625,
-0.0526123046875,
0.039398193359375,
-0.0037403106689453125,
-0.0005497932434082031,
-0.0067596435546875,
0.0391845703125,
0.062225341796875,
0.0269622802734375,
0.0079345703125,
0.03582763671875,
0.06451416015625,
0.0098114013671875,
0.016815185546875,
0.048614501953125,
-0.0211944580078125,
0.03826904296875,
0.0243072509765625,
0.00041484832763671875,
-0.01727294921875,
0.0026988983154296875,
0.004947662353515625,
-0.0035991668701171875,
-0.034027099609375,
-0.0496826171875,
0.00262451171875,
0.05084228515625,
0.01031494140625,
-0.005611419677734375,
-0.0002751350402832031,
0.008056640625,
0.01560211181640625,
0.001789093017578125,
0.0270538330078125,
-0.0211029052734375,
-0.006443023681640625,
0.033599853515625,
0.02899169921875,
0.0037364959716796875,
-0.0038700103759765625,
0.081787109375,
-0.00006645917892456055,
0.039520263671875,
-0.0210723876953125,
0.056610107421875,
-0.0054931640625,
0.05157470703125,
0.0038471221923828125,
0.0040130615234375,
-0.0017147064208984375,
0.0193023681640625,
-0.01214599609375,
-0.0199127197265625,
-0.01500701904296875,
0.019073486328125,
0.035369873046875,
-0.01617431640625,
-0.00182342529296875,
0.006969451904296875,
-0.020294189453125,
-0.03363037109375,
0.029998779296875,
0.030609130859375,
-0.040802001953125,
-0.03448486328125,
-0.0029773712158203125,
0.033416748046875,
0.0266876220703125,
-0.004802703857421875,
0.0221099853515625,
-0.01361846923828125,
0.037689208984375,
0.003940582275390625,
0.01166534423828125,
-0.01488494873046875,
-0.025909423828125,
0.00548553466796875,
-0.0215606689453125,
0.01407623291015625,
0.005443572998046875,
0.02191162109375,
-0.02203369140625,
0.0040740966796875,
0.0168304443359375,
0.00812530517578125,
0.046600341796875,
-0.03497314453125,
-0.01727294921875,
-0.0228271484375,
0.0129852294921875,
-0.000621795654296875,
-0.038818359375,
-0.035858154296875,
-0.00032639503479003906,
-0.0843505859375,
-0.03790283203125,
-0.029754638671875,
-0.0286865234375,
-0.0501708984375,
-0.0034923553466796875,
0.0308837890625,
0.038177490234375,
-0.039703369140625,
-0.048126220703125,
0.0184783935546875,
-0.0004208087921142578,
0.004638671875,
0.038970947265625,
-0.0156707763671875,
0.090087890625,
-0.021636962890625,
0.05810546875,
0.00797271728515625,
0.0439453125,
-0.0207977294921875,
-0.0092620849609375,
-0.0288848876953125,
-0.10693359375,
-0.0178375244140625,
0.059417724609375,
-0.05242919921875,
0.08282470703125,
0.01219940185546875,
0.0258331298828125,
-0.0113525390625,
-0.023223876953125,
-0.005992889404296875,
-0.00820159912109375,
0.04266357421875,
0.0116729736328125,
-0.01039886474609375,
0.0253448486328125,
0.01654052734375,
-0.0023956298828125,
0.00937652587890625,
-0.0228424072265625,
0.00806427001953125,
0.028839111328125,
0.007274627685546875,
-0.041656494140625,
-0.0213623046875,
-0.0138702392578125,
0.04022216796875,
0.03955078125,
0.06463623046875,
0.01507568359375,
0.046051025390625,
0.037139892578125,
0.018707275390625,
-0.004512786865234375,
-0.0009379386901855469,
0.0188140869140625,
-0.0058441162109375,
0.005695343017578125,
-0.005016326904296875,
-0.021942138671875,
-0.021575927734375,
0.038116455078125,
0.024322509765625,
-0.057830810546875,
-0.0021228790283203125,
0.0175018310546875,
-0.0057830810546875,
-0.025909423828125,
-0.01058197021484375,
0.0107421875,
-0.00563812255859375,
0.0345458984375,
0.0300750732421875,
0.003116607666015625,
0.0256805419921875,
-0.00972747802734375,
-0.008026123046875,
-0.0308074951171875,
-0.0010738372802734375,
0.0135650634765625,
-0.042236328125,
0.0222930908203125,
0.0257720947265625,
0.015106201171875,
-0.059967041015625,
0.003932952880859375,
0.031463623046875,
-0.01541900634765625,
-0.047454833984375,
0.060150146484375,
0.01300811767578125,
0.021514892578125,
0.03460693359375,
0.01442718505859375,
0.00508880615234375,
0.03216552734375,
0.00634765625,
-0.0011167526245117188,
-0.00965118408203125,
-0.01477813720703125,
-0.00032448768615722656,
-0.003429412841796875,
0.00984954833984375,
-0.01242828369140625,
0.01329803466796875,
-0.0015611648559570312,
-0.017425537109375,
-0.033477783203125,
-0.0213470458984375,
-0.033111572265625,
0.0806884765625,
-0.0271759033203125,
-0.0176239013671875,
0.01132965087890625,
0.045196533203125,
-0.003902435302734375,
-0.012969970703125,
-0.031280517578125,
0.0015249252319335938,
0.039276123046875,
-0.043121337890625,
-0.006561279296875,
0.0162200927734375,
-0.0552978515625,
-0.083740234375,
0.09075927734375,
0.0013866424560546875,
0.0472412109375,
0.0168914794921875,
0.032623291015625,
-0.041046142578125,
-0.004352569580078125,
-0.0232696533203125,
0.037261962890625,
-0.004962921142578125,
0.04559326171875,
-0.0557861328125,
-0.01361846923828125,
0.01081085205078125,
0.056396484375,
-0.01358795166015625,
-0.002422332763671875,
-0.044677734375,
-0.0513916015625,
-0.0016279220581054688,
0.0697021484375,
0.05487060546875,
0.00858306884765625,
-0.015838623046875,
0.027191162109375,
0.03192138671875,
-0.056121826171875,
0.005695343017578125,
0.0161285400390625,
-0.0147247314453125,
0.01557159423828125,
0.040252685546875,
0.0309906005859375,
0.004039764404296875,
-0.0102081298828125,
-0.044830322265625,
0.021697998046875,
0.03668212890625,
0.0379638671875,
0.032684326171875,
0.042938232421875,
0.06561279296875,
-0.05487060546875,
-0.058441162109375,
-0.018798828125,
0.0469970703125,
0.00412750244140625,
0.03253173828125,
0.0121002197265625,
0.020416259765625,
0.085693359375,
-0.031524658203125,
0.0100860595703125,
0.01488494873046875,
-0.00405120849609375,
0.07958984375,
0.04107666015625,
0.03265380859375,
-0.0697021484375,
-0.0755615234375,
0.048309326171875,
0.0994873046875,
-0.0291290283203125,
-0.053680419921875,
0.002567291259765625,
-0.0081939697265625,
-0.0080718994140625,
-0.011322021484375,
-0.011688232421875,
-0.01395416259765625,
0.0216827392578125,
-0.002178192138671875,
-0.04742431640625,
-0.031951904296875,
0.06732177734375,
0.0020751953125,
0.00860595703125,
0.004352569580078125,
-0.078125,
0.018402099609375,
-0.0280914306640625,
0.0139312744140625,
0.00959014892578125,
-0.00927734375,
0.0401611328125,
-0.0263214111328125,
0.0119171142578125,
0.01548004150390625,
0.031951904296875,
-0.030517578125,
-0.0029697418212890625,
-0.031951904296875,
-0.06787109375,
-0.0177154541015625,
0.043853759765625,
0.0025081634521484375,
0.0203094482421875,
0.0290069580078125,
0.056793212890625,
0.0217437744140625,
-0.0163421630859375,
0.0316162109375,
-0.0013589859008789062,
0.0138397216796875,
-0.031463623046875,
0.0185699462890625,
0.004703521728515625,
-0.005985260009765625,
-0.019927978515625,
0.0255584716796875,
0.0204620361328125,
-0.042083740234375,
0.061126708984375,
-0.0213470458984375,
-0.021820068359375,
0.0872802734375,
-0.0184478759765625,
0.09173583984375,
-0.0081024169921875,
-0.07586669921875,
0.0006914138793945312,
-0.0457763671875,
-0.03466796875,
0.00569915771484375,
0.0234222412109375,
-0.00919342041015625,
0.021697998046875,
0.0295257568359375,
0.0027027130126953125,
0.0172119140625,
-0.033416748046875,
0.025848388671875,
0.01318359375,
0.0131683349609375,
0.0159149169921875,
-0.0233001708984375,
-0.017303466796875,
0.0016260147094726562,
0.043670654296875,
-0.017181396484375,
0.04754638671875,
-0.01044464111328125,
0.01113128662109375,
0.031768798828125,
-0.00896453857421875,
0.005558013916015625,
0.005950927734375,
0.0038585662841796875,
-0.032440185546875,
0.01422882080078125,
-0.01061248779296875,
0.00296783447265625,
0.0537109375,
0.004535675048828125,
-0.0229644775390625,
0.01215362548828125,
-0.035064697265625,
0.005313873291015625,
0.0162353515625,
0.016204833984375,
-0.031524658203125,
-0.00604248046875,
-0.0220947265625,
-0.0104217529296875,
0.005275726318359375,
-0.0140838623046875,
-0.0151824951171875,
0.016143798828125,
0.0145721435546875,
-0.020263671875,
0.03704833984375,
-0.0282135009765625,
0.033294677734375,
0.011474609375,
0.002925872802734375,
-0.0285186767578125,
0.0209197998046875,
-0.01143646240234375,
0.004512786865234375,
0.017974853515625,
-0.0013036727905273438,
0.039886474609375,
-0.054718017578125,
-0.02191162109375,
0.033416748046875,
0.049713134765625,
-0.0043182373046875,
0.0281219482421875,
0.003406524658203125,
0.0009775161743164062,
-0.0011615753173828125,
-0.0090484619140625,
-0.022247314453125,
-0.0157470703125,
-0.017364501953125,
0.00812530517578125,
-0.0184783935546875,
-0.052734375,
-0.0509033203125,
-0.0355224609375,
-0.0007390975952148438,
0.04473876953125,
-0.06671142578125,
0.04736328125,
0.04071044921875,
-0.02685546875,
0.002567291259765625,
-0.0104522705078125,
-0.00897979736328125,
0.0210418701171875,
-0.0169525146484375,
-0.0190887451171875,
-0.032318115234375,
0.00608062744140625,
-0.028594970703125,
-0.003276824951171875,
0.026397705078125,
-0.02398681640625,
-0.03497314453125,
-0.01788330078125,
0.0015239715576171875,
0.043304443359375,
0.0364990234375,
0.0149078369140625,
0.0382080078125,
0.035614013671875,
-0.0474853515625,
-0.11468505859375,
-0.0039520263671875,
-0.023712158203125,
0.033538818359375,
-0.00916290283203125,
-0.005889892578125,
-0.006023406982421875,
-0.02923583984375,
-0.037811279296875,
0.0772705078125,
0.00968170166015625,
-0.018951416015625,
-0.0181121826171875,
-0.006252288818359375,
-0.008758544921875,
-0.022552490234375,
-0.005573272705078125,
-0.04278564453125,
-0.030731201171875,
0.028106689453125,
0.01165008544921875,
0.036102294921875,
0.032745361328125,
0.006488800048828125,
-0.0088958740234375,
0.020355224609375,
0.00473785400390625,
0.012237548828125,
-0.00595855712890625,
0.01313018798828125,
0.01519012451171875,
0.0518798828125,
-0.0169830322265625,
0.00543212890625,
-0.0007305145263671875,
-0.0025691986083984375,
0.00539398193359375,
-0.036773681640625,
-0.00008618831634521484,
-0.0099029541015625,
0.0347900390625,
0.007686614990234375,
0.006237030029296875,
-0.02215576171875,
0.0266571044921875,
-0.00731658935546875,
-0.03802490234375,
-0.002384185791015625,
0.00788116455078125,
-0.038604736328125,
0.00830841064453125,
0.0008730888366699219,
-0.01023101806640625,
0.0227203369140625,
-0.032989501953125,
-0.028076171875,
-0.01290130615234375,
-0.0278472900390625,
0.01222991943359375,
-0.0391845703125,
-0.003936767578125,
0.0384521484375,
-0.040435791015625,
-0.020172119140625,
0.035614013671875,
-0.00475311279296875,
-0.01299285888671875,
0.048828125,
-0.0027523040771484375,
0.05450439453125,
-0.0594482421875,
-0.0244903564453125,
0.0138702392578125,
0.02569580078125,
-0.0120391845703125,
0.0147552490234375,
-0.019683837890625,
0.030975341796875,
0.00920867919921875,
0.035308837890625,
-0.01245880126953125,
0.010223388671875,
0.0152587890625,
0.0258636474609375,
-0.02813720703125,
0.06646728515625,
-0.002471923828125,
0.0139923095703125,
-0.0115203857421875,
0.00878143310546875,
0.0391845703125,
-0.0218353271484375,
0.005001068115234375,
-0.0012950897216796875,
-0.0309295654296875,
-0.00608062744140625,
-0.0079803466796875,
-0.021392822265625,
-0.0189361572265625,
-0.006366729736328125
]
|
742a63301bd5411a51db3fb0e9eba487e748f960 | Wordpress Stackexchange
Q: Hook added to the_content seems to be called multiple times I have the following code running in a plugin:
add_filter('the_content','thousand_pay');
//Callback function
function thousand_pay($content)
{
echo $content;
if( !in_category( 'Stories') )
{
return;
}
?>
<hr></hr>
[Some HTML]
<?php
return
}
For some reason, on individual posts' pages the HTML gets printed multiple times:
Can anyone think of why this would be? I read here that I might have to add to the conditional to check is_singular() and is_main_query(), so it would look like if(!in_category('Stories') || !is_singular() || !is_main_query(), but that just seems to stop the HTML getting printed at all on a post page. Any ideas?
A: It is normal for content to be accessed multiple times. For example SEO plugins need to do this to access it and generate meta data from.
Also it is a filter hook. Filters should never echo anything to the page, they are meant to modify passed value and return it.
If you do want to do something at that point, but only within the loop then in_the_loop() is condition you need.
| Q: Hook added to the_content seems to be called multiple times I have the following code running in a plugin:
add_filter('the_content','thousand_pay');
//Callback function
function thousand_pay($content)
{
echo $content;
if( !in_category( 'Stories') )
{
return;
}
?>
<hr></hr>
[Some HTML]
<?php
return
}
For some reason, on individual posts' pages the HTML gets printed multiple times:
Can anyone think of why this would be? I read here that I might have to add to the conditional to check is_singular() and is_main_query(), so it would look like if(!in_category('Stories') || !is_singular() || !is_main_query(), but that just seems to stop the HTML getting printed at all on a post page. Any ideas?
A: It is normal for content to be accessed multiple times. For example SEO plugins need to do this to access it and generate meta data from.
Also it is a filter hook. Filters should never echo anything to the page, they are meant to modify passed value and return it.
If you do want to do something at that point, but only within the loop then in_the_loop() is condition you need.
A: I was having the same issue. My the_content filter was being called multiple times and this was slowing down page load as my the_content filter was calling an external API. So in my case, the API was being queried multiple times for the same data.
I tried using in_the_loop(), is_singular() and is_main_query() but sometimes, depending on the theme, those failed to limit calls to my filter to one time.
So I added a constant to my filter and that seems to have fixed the issue.
Here's an example of how to limit your calls to the the_content filter to one time:
add_filter( 'the_content', 'se225721_the_content' );
function se225721_the_content( $content ) {
if ( ! in_the_loop() ) {
return $content;
}
if ( ! is_singular() ) {
return $content;
}
if ( ! is_main_query() ) {
return $content;
}
$content = ucwords( $content );
remove_filter( 'the_content', 'se225721_the_content' );
return $content;
}
Hope that helps!
Eric
A: I have found another way to achieve this by using the did_action() function and a custom action hook.
Here is the solution:
$custom_hook = 'my_plugin_prefix_a_custom_action_hook';
function my_plugin_prefi_my_filter_callback($content){
if(did_action($custom_hook) == 0){
do_action($custom_hook);
//your filter action code goes here: modification of $content
}
return $content;
}
function my_plugin_prefix_custom_action_hook_callback(){
//do nothing
}
add_action($custom_hook, 'my_plugin_prefix_custom_action_hook_callback');
At first the run count of action hook $custom_hook will be 0 and do_action($custom_hook); statement will make the run count of $custom_hook to 1 and this will prevent subsequent execution of the body of the if statement.
| wordpress | {
"language": "en",
"length": 423,
"provenance": "stackexchange_00019.jsonl.gz:465216",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/225721"
} | [
0.0718994140625,
-0.00313568115234375,
0.01299285888671875,
-0.04852294921875,
0.0305023193359375,
-0.04425048828125,
0.051055908203125,
-0.0130767822265625,
-0.00675201416015625,
0.04315185546875,
-0.0265655517578125,
0.0103912353515625,
0.0133819580078125,
-0.009918212890625,
-0.0078125,
-0.00823974609375,
0.00823974609375,
0.0015506744384765625,
0.026397705078125,
-0.025787353515625,
0.024200439453125,
-0.025665283203125,
0.00010889768600463867,
0.02093505859375,
0.01105499267578125,
0.00414276123046875,
0.0792236328125,
-0.06707763671875,
0.024383544921875,
-0.0257568359375,
0.020599365234375,
-0.0190887451171875,
0.032318115234375,
0.051849365234375,
-0.08319091796875,
0.0197906494140625,
-0.0308990478515625,
0.0207977294921875,
-0.031158447265625,
0.06524658203125,
0.04315185546875,
-0.0107574462890625,
0.0178985595703125,
0.024993896484375,
-0.0008969306945800781,
-0.0297088623046875,
0.0496826171875,
-0.0128021240234375,
0.005626678466796875,
0.0018310546875,
0.01983642578125,
-0.018646240234375,
0.01324462890625,
0.0116424560546875,
-0.0018157958984375,
0.0242156982421875,
-0.047149658203125,
0.023895263671875,
0.04150390625,
0.0294036865234375,
-0.00893402099609375,
-0.01971435546875,
0.0014314651489257812,
-0.0328369140625,
0.00025391578674316406,
0.018096923828125,
-0.00154876708984375,
0.005634307861328125,
-0.029541015625,
-0.0006709098815917969,
0.017181396484375,
-0.053009033203125,
0.002429962158203125,
-0.0139617919921875,
-0.0396728515625,
-0.030181884765625,
0.0333251953125,
-0.031219482421875,
0.00974273681640625,
-0.02362060546875,
-0.0200958251953125,
-0.019744873046875,
-0.03265380859375,
0.023101806640625,
-0.0285491943359375,
0.0227813720703125,
-0.0205841064453125,
-0.005451202392578125,
-0.034942626953125,
-0.007175445556640625,
-0.019866943359375,
-0.0237274169921875,
0.0274505615234375,
-0.02581787109375,
-0.0380859375,
-0.014312744140625,
-0.00023353099822998047,
0.0648193359375,
-0.00792694091796875,
0.013946533203125,
0.0004303455352783203,
-0.0361328125,
0.031402587890625,
-0.058685302734375,
-0.01094818115234375,
0.026824951171875,
0.0043182373046875,
0.058746337890625,
0.07464599609375,
0.03302001953125,
0.01184844970703125,
0.0677490234375,
-0.0243682861328125,
-0.0106658935546875,
0.00890350341796875,
-0.00457000732421875,
-0.058013916015625,
0.032257080078125,
0.00730133056640625,
0.032501220703125,
0.00508880615234375,
0.01078033447265625,
-0.0020198822021484375,
-0.04632568359375,
0.009735107421875,
-0.035614013671875,
-0.0518798828125,
-0.003879547119140625,
0.033538818359375,
-0.00800323486328125,
-0.0208740234375,
0.0122833251953125,
0.007068634033203125,
0.0184326171875,
0.0009274482727050781,
0.0017118453979492188,
0.004482269287109375,
0.002166748046875,
-0.0167999267578125,
0.034759521484375,
-0.058013916015625,
-0.040924072265625,
0.0017852783203125,
-0.043792724609375,
0.0261383056640625,
0.0019130706787109375,
0.02978515625,
0.0223541259765625,
0.00958251953125,
0.0012273788452148438,
0.002101898193359375,
0.02056884765625,
0.040313720703125,
-0.02557373046875,
-0.0079498291015625,
-0.018646240234375,
-0.0207977294921875,
0.006595611572265625,
-0.0211181640625,
0.0008835792541503906,
0.0251922607421875,
-0.039459228515625,
-0.030914306640625,
-0.0745849609375,
-0.07989501953125,
0.023681640625,
-0.04669189453125,
-0.0012960433959960938,
0.0078582763671875,
0.0031147003173828125,
-0.003467559814453125,
0.023101806640625,
-0.050567626953125,
-0.034393310546875,
-0.0157318115234375,
-0.01479339599609375,
0.001186370849609375,
0.06231689453125,
0.0275421142578125,
-0.0260467529296875,
-0.03900146484375,
-0.06341552734375,
0.0765380859375,
-0.041961669921875,
-0.09527587890625,
0.05694580078125,
0.01258087158203125,
0.0880126953125,
0.01491546630859375,
-0.0018911361694335938,
0.05572509765625,
0.01146697998046875,
-0.046661376953125,
-0.01338958740234375,
0.048980712890625,
-0.01021575927734375,
-0.042877197265625,
-0.035919189453125,
0.0157318115234375,
-0.0027637481689453125,
0.06292724609375,
0.0089569091796875,
-0.0055389404296875,
-0.00804901123046875,
-0.05194091796875,
-0.009674072265625,
-0.00508880615234375,
0.0100555419921875,
-0.0277862548828125,
-0.001842498779296875,
0.012054443359375,
-0.01800537109375,
-0.020599365234375,
0.02691650390625,
-0.0172576904296875,
-0.0154266357421875,
-0.027801513671875,
0.0111541748046875,
0.017364501953125,
0.0199127197265625,
0.05084228515625,
-0.006389617919921875,
0.01953125,
-0.00038433074951171875,
0.07379150390625,
0.0038299560546875,
-0.02423095703125,
-0.029815673828125,
-0.000027120113372802734,
0.0167694091796875,
-0.1014404296875,
0.05804443359375,
0.07757568359375,
0.056610107421875,
-0.022003173828125,
-0.004085540771484375,
-0.0094451904296875,
-0.07891845703125,
-0.007965087890625,
0.06304931640625,
0.03466796875,
0.02337646484375,
-0.0003933906555175781,
0.002780914306640625,
0.045989990234375,
-0.07769775390625,
-0.00824737548828125,
-0.009429931640625,
0.01305389404296875,
0.040863037109375,
-0.0162811279296875,
0.0154876708984375,
0.0185089111328125,
-0.044036865234375,
0.01263427734375,
0.04559326171875,
-0.01351165771484375,
-0.0042877197265625,
-0.030517578125,
0.003177642822265625,
0.0312347412109375,
0.007198333740234375,
-0.028961181640625,
0.00809478759765625,
-0.0040283203125,
-0.021575927734375,
0.002750396728515625,
-0.006191253662109375,
0.005092620849609375,
-0.05072021484375,
0.0183258056640625,
0.006763458251953125,
-0.006565093994140625,
0.010009765625,
-0.02777099609375,
0.0026836395263671875,
-0.0203094482421875,
0.01166534423828125,
-0.0131683349609375,
-0.007152557373046875,
-0.0293121337890625,
0.042083740234375,
-0.041290283203125,
-0.016510009765625,
-0.0229034423828125,
-0.0015087127685546875,
-0.0204315185546875,
-0.0379638671875,
0.0168609619140625,
0.007152557373046875,
0.0281524658203125,
0.039764404296875,
-0.0037841796875,
0.0233917236328125,
-0.029052734375,
-0.0010519027709960938,
-0.0215606689453125,
-0.0193634033203125,
0.039276123046875,
-0.053070068359375,
0.01366424560546875,
0.03875732421875,
-0.03729248046875,
-0.00417327880859375,
0.008544921875,
0.0048980712890625,
-0.0159912109375,
-0.00909423828125,
-0.0141143798828125,
0.033905029296875,
-0.09130859375,
0.0303955078125,
0.037322998046875,
0.047027587890625,
-0.0164031982421875,
-0.04644775390625,
-0.022705078125,
0.01502227783203125,
-0.0872802734375,
-0.07989501953125,
0.0211944580078125,
-0.045074462890625,
0.000659942626953125,
-0.0036258697509765625,
-0.019317626953125,
-0.017303466796875,
0.014801025390625,
-0.01021575927734375,
0.0012378692626953125,
-0.003986358642578125,
-0.07220458984375,
-0.0201873779296875,
-0.04913330078125,
0.0811767578125,
-0.016571044921875,
0.01451873779296875,
0.01184844970703125,
0.060211181640625,
0.0222930908203125,
-0.032501220703125,
0.04095458984375,
-0.0196533203125,
-0.037384033203125,
0.0269317626953125,
-0.032470703125,
-0.0011014938354492188,
-0.011077880859375,
-0.0037860870361328125,
-0.0457763671875,
-0.004638671875,
0.02862548828125,
-0.015655517578125,
-0.01427459716796875,
0.0175628662109375,
0.0238037109375,
0.0411376953125,
0.03509521484375,
0.03741455078125,
0.05609130859375,
-0.027618408203125,
0.0181732177734375,
-0.037750244140625,
-0.035430908203125,
0.0067138671875,
0.02911376953125,
0.0015048980712890625,
-0.022735595703125,
0.011322021484375,
-0.04095458984375,
-0.01107025146484375,
-0.0004515647888183594,
-0.01235198974609375,
0.05078125,
-0.039276123046875,
-0.040435791015625,
0.003116607666015625,
0.00682830810546875,
-0.0168304443359375,
-0.01525115966796875,
-0.0184783935546875,
0.034698486328125,
0.012237548828125,
-0.005664825439453125,
-0.0184173583984375,
-0.0191192626953125,
0.0304412841796875,
-0.0283050537109375,
-0.0028896331787109375,
-0.024810791015625,
-0.01483917236328125,
-0.0279541015625,
0.05218505859375,
-0.09454345703125,
-0.00958251953125,
0.0220489501953125,
0.01666259765625,
0.0048675537109375,
-0.022735595703125,
-0.037353515625,
-0.038726806640625,
-0.043792724609375,
-0.0117034912109375,
-0.006885528564453125,
-0.02056884765625,
-0.0231475830078125,
-0.0184326171875,
-0.0281524658203125,
-0.0215911865234375,
0.03887939453125,
-0.03375244140625,
0.036895751953125,
-0.0176849365234375,
0.0129852294921875,
-0.031524658203125,
-0.028900146484375,
-0.027099609375,
-0.025238037109375,
0.003200531005859375,
-0.0290374755859375,
0.04339599609375,
0.05023193359375,
-0.0287628173828125,
-0.00853729248046875,
0.019500732421875,
0.011383056640625,
0.0146026611328125,
0.01100921630859375,
-0.00035262107849121094,
0.03662109375,
-0.020843505859375,
-0.005001068115234375,
-0.0217742919921875,
-0.01708984375,
0.0001952648162841797,
0.00975799560546875,
0.055145263671875,
-0.0458984375,
-0.0357666015625,
-0.040679931640625,
0.004779815673828125,
-0.07586669921875,
-0.02294921875,
0.00022351741790771484,
-0.038818359375,
-0.0306396484375,
0.01178741455078125,
0.00554656982421875,
-0.04620361328125,
0.0271148681640625,
-0.016326904296875,
-0.0202178955078125,
0.01512908935546875,
0.0675048828125,
0.023101806640625,
-0.0139617919921875,
-0.049530029296875,
0.01971435546875,
0.0229339599609375,
-0.025177001953125,
0.0703125,
0.0297698974609375,
-0.011932373046875,
0.08203125,
-0.009124755859375,
0.0257720947265625,
-0.029754638671875,
0.06524658203125,
0.0027332305908203125,
0.0132293701171875,
0.01898193359375,
0.00832366943359375,
-0.01166534423828125,
0.01074981689453125,
-0.029510498046875,
0.0107879638671875,
0.0357666015625,
0.004058837890625,
-0.06048583984375,
0.060211181640625,
0.015533447265625,
0.0092010498046875,
-0.0188446044921875,
0.038482666015625,
0.0904541015625,
0.041473388671875,
-0.0019273757934570312,
0.0131683349609375,
0.020294189453125,
0.02166748046875,
-0.01081085205078125,
0.031646728515625,
-0.023223876953125,
0.061248779296875,
0.0004367828369140625,
0.0204010009765625,
-0.03955078125,
-0.00525665283203125,
0.0136260986328125,
-0.025421142578125,
-0.021728515625,
-0.052825927734375,
-0.0065460205078125,
0.0162811279296875,
0.024261474609375,
0.0013418197631835938,
-0.0191650390625,
-0.017425537109375,
-0.0226287841796875,
0.032012939453125,
0.07476806640625,
-0.039215087890625,
0.01154327392578125,
-0.01470184326171875,
-0.01543426513671875,
-0.01371002197265625,
0.04150390625,
-0.0190277099609375,
-0.0185089111328125,
0.01528167724609375,
-0.01329803466796875,
0.014739990234375,
0.0040130615234375,
0.0030155181884765625,
0.0269622802734375,
0.004180908203125,
-0.0186309814453125,
0.0081939697265625,
0.004116058349609375,
-0.04345703125,
-0.007213592529296875,
0.03619384765625,
0.0202178955078125,
-0.006732940673828125,
-0.0101165771484375,
0.009735107421875,
0.0316162109375,
-0.019989013671875,
0.000032067298889160156,
-0.019775390625,
-0.0282135009765625,
-0.0077362060546875,
-0.01085662841796875,
-0.015777587890625,
-0.0018415451049804688,
-0.006488800048828125,
-0.0223541259765625,
0.00457000732421875,
0.0025844573974609375,
-0.00910186767578125,
-0.0242919921875,
0.0182647705078125,
0.0271453857421875,
0.0091705322265625,
-0.0275726318359375,
-0.0005044937133789062,
-0.06976318359375,
-0.0020599365234375,
-0.018707275390625,
0.01110076904296875,
0.0195159912109375,
-0.00933074951171875,
0.08416748046875,
-0.00936126708984375,
-0.06884765625,
0.016082763671875,
0.0137786865234375,
0.04766845703125,
0.03692626953125,
-0.06292724609375,
0.0305938720703125,
-0.060699462890625,
0.0106201171875,
-0.04913330078125,
-0.05206298828125,
-0.019989013671875,
0.00460052490234375,
0.025146484375,
0.041961669921875,
-0.0126800537109375,
-0.047698974609375,
0.0121612548828125,
-0.023834228515625,
0.003925323486328125,
0.05340576171875,
-0.051116943359375,
0.077880859375,
0.042572021484375,
0.024200439453125,
0.00021350383758544922,
0.0100250244140625,
0.003582000732421875,
-0.006015777587890625,
-0.0167694091796875,
-0.044342041015625,
0.02154541015625,
0.01763916015625,
0.007434844970703125,
0.0197906494140625,
0.0257568359375,
0.0146331787109375,
0.035125732421875,
0.0078277587890625,
0.0018787384033203125,
-0.004047393798828125,
-0.026123046875,
0.01163482666015625,
-0.00856781005859375,
0.0655517578125,
-0.022857666015625,
0.018341064453125,
-0.00821685791015625,
0.021026611328125,
0.01372528076171875,
-0.035552978515625,
0.00981903076171875,
0.03082275390625,
0.00200653076171875,
0.006771087646484375,
0.0104217529296875,
-0.01181793212890625,
0.03411865234375,
0.000728607177734375,
0.0160675048828125,
0.0252838134765625,
-0.023681640625,
0.048553466796875,
0.003116607666015625,
0.0309295654296875,
-0.015899658203125,
0.0179595947265625,
0.028167724609375,
-0.03045654296875,
0.004421234130859375,
0.0380859375,
0.0196380615234375,
-0.0682373046875,
-0.0008683204650878906,
-0.0092926025390625,
-0.0021953582763671875,
0.006824493408203125,
0.010772705078125,
0.006305694580078125,
-0.0005087852478027344,
0.01477813720703125,
0.036468505859375,
0.0037441253662109375,
0.0245208740234375,
0.00751495361328125,
0.00786590576171875,
0.0194091796875,
-0.001186370849609375,
-0.0053253173828125,
-0.036468505859375,
-0.028717041015625,
0.03350830078125,
-0.032196044921875,
-0.005107879638671875,
0.01300811767578125,
-0.00957489013671875,
-0.0238800048828125,
-0.03997802734375,
-0.01543426513671875,
-0.0018873214721679688,
-0.03387451171875,
0.0065765380859375,
-0.031280517578125,
0.0091094970703125,
0.0206451416015625,
-0.0240936279296875,
0.00885009765625,
0.01383209228515625,
-0.044586181640625,
-0.0167236328125,
0.0167388916015625,
0.0214691162109375,
0.02093505859375,
-0.0743408203125,
0.0241851806640625,
-0.06329345703125,
0.0203399658203125,
0.0005440711975097656,
-0.042388916015625,
0.0165252685546875,
0.03912353515625,
-0.039215087890625,
0.033355712890625,
-0.00004369020462036133,
-0.0140838623046875,
0.006168365478515625,
0.038787841796875,
-0.0364990234375,
-0.0172576904296875,
0.0321044921875,
-0.01094818115234375,
-0.05670166015625,
0.0026226043701171875,
-0.1046142578125,
0.085205078125,
0.0083770751953125,
0.061859130859375,
-0.017730712890625,
0.0233917236328125,
-0.01055908203125,
-0.0295562744140625,
-0.04864501953125,
0.0767822265625,
0.042816162109375,
0.0579833984375,
-0.047760009765625,
-0.01070404052734375,
0.021881103515625,
0.01470947265625,
0.01557159423828125,
0.0013704299926757812,
-0.016571044921875,
-0.0330810546875,
0.01503753662109375,
0.0244293212890625,
0.0011472702026367188,
0.0216522216796875,
-0.01107025146484375,
0.0303802490234375,
0.030914306640625,
-0.03570556640625,
0.04534912109375,
-0.0258636474609375,
-0.01702880859375,
0.0225830078125,
-0.00899505615234375,
-0.0156707763671875,
0.02105712890625,
-0.0269622802734375,
-0.0017185211181640625,
0.009033203125,
-0.0119171142578125,
0.01055908203125,
0.0089111328125,
0.029296875,
0.0281524658203125,
-0.05389404296875,
-0.000743865966796875,
-0.036041259765625,
0.05255126953125,
0.005992889404296875,
0.017608642578125,
-0.0110321044921875,
0.006633758544921875,
0.0236358642578125,
-0.01276397705078125,
0.0027484893798828125,
0.041717529296875,
-0.012481689453125,
0.031280517578125,
0.0032749176025390625,
0.0161590576171875,
-0.0300140380859375,
-0.0003669261932373047,
0.00830078125,
0.03448486328125,
-0.016845703125,
-0.0518798828125,
0.005279541015625,
0.00774383544921875,
0.003177642822265625,
-0.0149383544921875,
-0.0206298828125,
-0.0127716064453125,
0.042205810546875,
-0.040069580078125,
-0.0322265625,
0.004901885986328125,
0.0193328857421875,
-0.0102691650390625,
-0.004230499267578125,
0.03143310546875,
-0.0193634033203125,
-0.049163818359375,
0.007640838623046875,
0.00974273681640625,
0.07989501953125,
0.0193939208984375,
0.07659912109375,
-0.02728271484375,
-0.04302978515625,
0.01084136962890625,
0.005542755126953125,
-0.033111572265625,
0.0185089111328125,
-0.0401611328125,
-0.0604248046875,
0.0164947509765625,
0.0443115234375,
0.0172271728515625,
0.010162353515625,
0.033538818359375,
0.0399169921875,
-0.006427764892578125,
-0.006687164306640625,
0.0165557861328125,
-0.0154571533203125,
-0.0257110595703125,
-0.02679443359375,
-0.041412353515625,
0.00018036365509033203,
-0.019195556640625,
0.02032470703125,
-0.017974853515625,
0.004734039306640625,
0.03118896484375,
-0.031494140625,
0.01611328125,
-0.048797607421875,
0.041717529296875,
0.0190582275390625,
0.08807373046875,
0.044219970703125,
-0.072021484375,
0.0184783935546875,
-0.031463623046875,
-0.08251953125,
0.003147125244140625,
0.038848876953125,
-0.033447265625,
0.0189208984375,
0.021209716796875,
-0.0236053466796875,
0.019317626953125,
-0.0006694793701171875,
-0.0052032470703125,
-0.032379150390625,
0.01617431640625,
-0.022705078125,
-0.007808685302734375,
0.0194244384765625,
0.0240478515625,
-0.0009341239929199219,
0.003147125244140625,
0.0217742919921875,
0.0219573974609375,
0.007289886474609375,
0.0219268798828125,
-0.007480621337890625,
0.0203704833984375,
-0.00867462158203125,
0.024658203125,
-0.0039825439453125,
0.0015993118286132812,
-0.01151275634765625,
-0.0217437744140625,
-0.04803466796875,
0.043426513671875,
-0.042816162109375,
-0.0259246826171875,
-0.05908203125,
0.043487548828125,
0.0013647079467773438,
0.049835205078125,
-0.001140594482421875,
0.0291290283203125,
-0.01197052001953125,
-0.024810791015625,
0.07525634765625,
0.0572509765625,
0.0218048095703125,
0.0285491943359375,
0.0274810791015625,
0.01081085205078125,
-0.0115509033203125,
0.01262664794921875,
-0.0252227783203125,
0.0162353515625,
-0.0027561187744140625,
0.005222320556640625,
-0.00847625732421875,
-0.01873779296875,
0.0019073486328125,
0.0025348663330078125,
-0.0009641647338867188,
0.002780914306640625,
0.0035247802734375,
-0.01306915283203125,
0.00855255126953125,
0.04193115234375,
-0.01666259765625,
0.029296875,
-0.0064239501953125,
0.01280975341796875,
-0.0004773139953613281,
0.045623779296875,
-0.016845703125,
-0.01141357421875,
-0.01485443115234375,
-0.040740966796875,
0.0254669189453125,
-0.0789794921875,
0.016357421875,
0.0095367431640625,
0.0361328125,
-0.020050048828125,
-0.042236328125,
-0.015411376953125,
-0.0263214111328125,
0.0946044921875,
-0.0281219482421875,
-0.004924774169921875,
0.002201080322265625,
0.022308349609375,
-0.0206756591796875,
0.007259368896484375,
-0.03173828125,
-0.006053924560546875,
-0.0215911865234375,
0.006744384765625,
0.031951904296875,
-0.014862060546875,
-0.018280029296875,
-0.013824462890625,
-0.01264190673828125,
0.042877197265625,
-0.023712158203125,
-0.000576019287109375,
0.00405120849609375,
0.0280609130859375,
-0.0261993408203125,
-0.0298004150390625,
0.0182647705078125,
0.02239990234375,
-0.0156402587890625,
0.024139404296875,
0.00003701448440551758,
0.028411865234375,
-0.0221710205078125,
-0.056793212890625,
0.0259246826171875,
0.0108489990234375,
-0.02899169921875,
-0.049591064453125,
-0.0248260498046875,
0.0009822845458984375,
0.0030841827392578125,
-0.0267791748046875,
-0.0052337646484375,
-0.069091796875,
0.0298004150390625,
0.01213836669921875,
-0.0239105224609375,
0.052490234375,
-0.01763916015625,
-0.07489013671875,
-0.0201568603515625,
-0.01251220703125,
0.00437164306640625,
0.0013093948364257812,
-0.0005621910095214844,
0.0124053955078125,
0.0123291015625,
-0.036376953125,
0.0038909912109375,
0.0053863525390625,
0.0124359130859375,
-0.007244110107421875,
-0.0200958251953125,
-0.0305633544921875,
-0.00472259521484375,
0.097412109375,
0.036773681640625,
0.02362060546875,
-0.0452880859375,
0.0105743408203125,
-0.03594970703125,
-0.046966552734375,
-0.0079803466796875,
0.0182342529296875,
-0.032928466796875,
0.01580810546875,
-0.01209259033203125,
-0.01337432861328125,
-0.0005993843078613281,
-0.006710052490234375,
-0.045196533203125,
-0.0177764892578125,
-0.01543426513671875,
0.042022705078125,
-0.0775146484375,
-0.039947509765625,
-0.02288818359375,
0.006931304931640625,
-0.026824951171875,
0.014739990234375,
0.0153045654296875,
-0.04632568359375,
0.03533935546875,
-0.0207366943359375,
-0.0003952980041503906,
-0.0293731689453125,
-0.00307464599609375,
0.00433349609375,
0.0679931640625,
-0.0166015625,
0.004730224609375,
0.0089874267578125,
0.01629638671875,
-0.03839111328125,
0.0197601318359375,
0.039459228515625,
0.01380157470703125,
-0.042144775390625,
0.0787353515625,
-0.01458740234375,
0.09295654296875,
0.020721435546875,
0.0168609619140625,
-0.0233306884765625,
0.0150909423828125,
-0.00036835670471191406,
-0.0188751220703125,
-0.0058746337890625,
0.01111602783203125,
-0.00543975830078125,
-0.0252532958984375,
0.0269317626953125,
-0.056640625,
-0.0027790069580078125,
0.01485443115234375
]
|
19cc0e24ff1c6a62b7865952916ce4c2289fa6be | Wordpress Stackexchange
Q: Shortlink directly to a media file? We have a nice short domain name, but links to media files are way too long because the file names are long and you have the extended path for WordPress media. Like so:
http://example.com/wp-content/uploads/my-long-filename.pdf
You can link to the file like this:
http://example.com/?p=1234
This is nice and short (in fact this is the perfect short URL format) but this links to a template which merely contains a link to the file itself. We want a URL directly to the file itself.
Also, we don't want to use a URL shortening service as, for authority reasons, we want to be using our own domain name.
Do I need to do something with attachment.php or single-attachment.php (files I don't normally need in my themes).
A: It turns out this is easily solved by creating a file attachment.php and redirecting to the file itself.
*
*Create an attachment.php file in your WordPress theme folder
*Put this code in the file
<?php wp_redirect(wp_get_attachment_url(), 301); ?>
*Upload it and there you go
This link explains in full.
| Q: Shortlink directly to a media file? We have a nice short domain name, but links to media files are way too long because the file names are long and you have the extended path for WordPress media. Like so:
http://example.com/wp-content/uploads/my-long-filename.pdf
You can link to the file like this:
http://example.com/?p=1234
This is nice and short (in fact this is the perfect short URL format) but this links to a template which merely contains a link to the file itself. We want a URL directly to the file itself.
Also, we don't want to use a URL shortening service as, for authority reasons, we want to be using our own domain name.
Do I need to do something with attachment.php or single-attachment.php (files I don't normally need in my themes).
A: It turns out this is easily solved by creating a file attachment.php and redirecting to the file itself.
*
*Create an attachment.php file in your WordPress theme folder
*Put this code in the file
<?php wp_redirect(wp_get_attachment_url(), 301); ?>
*Upload it and there you go
This link explains in full.
| wordpress | {
"language": "en",
"length": 179,
"provenance": "stackexchange_00019.jsonl.gz:465220",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/225733"
} | [
0.05670166015625,
-0.0210113525390625,
0.028594970703125,
-0.01175689697265625,
-0.022491455078125,
-0.019775390625,
0.06353759765625,
-0.025299072265625,
-0.0256195068359375,
0.02923583984375,
0.0323486328125,
0.005603790283203125,
0.0206298828125,
-0.0416259765625,
0.0262451171875,
0.0008459091186523438,
0.0229339599609375,
-0.006946563720703125,
0.031341552734375,
0.00618743896484375,
0.0204925537109375,
0.0309600830078125,
0.024078369140625,
-0.018341064453125,
-0.02557373046875,
0.0208892822265625,
0.09942626953125,
-0.016571044921875,
-0.039154052734375,
-0.0400390625,
-0.0052337646484375,
0.0254058837890625,
0.0460205078125,
0.0164031982421875,
-0.057525634765625,
-0.0293121337890625,
0.003753662109375,
-0.00328826904296875,
-0.0230712890625,
0.013214111328125,
0.003658294677734375,
0.006725311279296875,
0.0098419189453125,
0.0187835693359375,
-0.0045013427734375,
-0.04913330078125,
0.0216827392578125,
-0.048248291015625,
-0.0028705596923828125,
0.07098388671875,
0.01806640625,
0.007717132568359375,
0.01174163818359375,
0.016448974609375,
-0.0010557174682617188,
-0.00554656982421875,
0.00777435302734375,
-0.01175689697265625,
0.0126800537109375,
-0.04083251953125,
-0.0303192138671875,
0.0159759521484375,
0.028717041015625,
0.019195556640625,
0.0013647079467773438,
0.004119873046875,
-0.023345947265625,
0.02056884765625,
-0.01262664794921875,
-0.00429534912109375,
0.01213836669921875,
-0.0305938720703125,
-0.0091705322265625,
-0.03857421875,
-0.007137298583984375,
0.026824951171875,
0.0069732666015625,
-0.00876617431640625,
-0.00998687744140625,
0.0009031295776367188,
-0.01332855224609375,
-0.0341796875,
-0.0191192626953125,
-0.01491546630859375,
0.02252197265625,
0.0234527587890625,
-0.01061248779296875,
-0.01534271240234375,
-0.02532958984375,
-0.01593017578125,
-0.0284271240234375,
0.005168914794921875,
0.02752685546875,
-0.035430908203125,
-0.045806884765625,
-0.0192718505859375,
-0.0009427070617675781,
0.007648468017578125,
0.03485107421875,
0.042510986328125,
-0.00331878662109375,
-0.044921875,
0.033935546875,
-0.032073974609375,
0.0006361007690429688,
0.04876708984375,
0.039520263671875,
-0.0205230712890625,
0.0002796649932861328,
-0.0202789306640625,
-0.00740814208984375,
0.034210205078125,
-0.01384735107421875,
0.0021209716796875,
-0.0153350830078125,
0.01226806640625,
-0.04705810546875,
0.03814697265625,
-0.007091522216796875,
0.046630859375,
0.001148223876953125,
0.01311492919921875,
0.01227569580078125,
0.02130126953125,
-0.02081298828125,
-0.01222991943359375,
-0.0110626220703125,
-0.0160369873046875,
0.02020263671875,
0.035552978515625,
0.0000737309455871582,
-0.002197265625,
-0.02423095703125,
-0.01157379150390625,
-0.02099609375,
-0.017364501953125,
-0.00408935546875,
-0.00982666015625,
0.0022525787353515625,
0.0007610321044921875,
0.041351318359375,
-0.017303466796875,
-0.00015294551849365234,
0.0232696533203125,
0.007843017578125,
0.03271484375,
0.0243072509765625,
0.0154571533203125,
-0.00794219970703125,
-0.052215576171875,
0.0034027099609375,
-0.0137939453125,
0.056671142578125,
-0.003856658935546875,
-0.038116455078125,
-0.06060791015625,
0.004634857177734375,
-0.03948974609375,
0.025543212890625,
-0.0689697265625,
0.00811767578125,
0.007781982421875,
0.028564453125,
-0.0237579345703125,
-0.02313232421875,
-0.015167236328125,
-0.0623779296875,
-0.01084136962890625,
0.02972412109375,
0.056610107421875,
0.0215606689453125,
-0.0660400390625,
-0.0552978515625,
0.01517486572265625,
-0.0018320083618164062,
0.0101776123046875,
0.01421356201171875,
-0.0023784637451171875,
0.024749755859375,
0.07086181640625,
0.01849365234375,
0.002227783203125,
0.060791015625,
-0.007843017578125,
-0.03741455078125,
0.04034423828125,
-0.003997802734375,
0.06390380859375,
0.011138916015625,
0.0161285400390625,
-0.0025119781494140625,
0.005886077880859375,
0.007732391357421875,
-0.002162933349609375,
-0.046142578125,
-0.0291748046875,
0.0020847320556640625,
0.0202789306640625,
-0.021514892578125,
0.022216796875,
-0.0234222412109375,
0.00003355741500854492,
0.01381683349609375,
0.018035888671875,
0.01568603515625,
0.018218994140625,
-0.011688232421875,
0.02728271484375,
-0.04248046875,
-0.0009465217590332031,
0.0211181640625,
0.0003063678741455078,
-0.0017385482788085938,
-0.08123779296875,
-0.004596710205078125,
0.0208587646484375,
0.0006122589111328125,
0.01053619384765625,
-0.01026153564453125,
0.01983642578125,
-0.0227813720703125,
-0.00377655029296875,
-0.0189208984375,
0.0277252197265625,
-0.0029125213623046875,
-0.0062103271484375,
-0.0182952880859375,
-0.006679534912109375,
-0.01739501953125,
0.015472412109375,
-0.016876220703125,
0.01558685302734375,
0.0032405853271484375,
-0.012451171875,
-0.0296783447265625,
0.010345458984375,
-0.022003173828125,
-0.0253448486328125,
0.005023956298828125,
0.041839599609375,
0.034637451171875,
0.02764892578125,
-0.003692626953125,
0.0059967041015625,
0.05712890625,
-0.0419921875,
0.0059967041015625,
-0.0159149169921875,
0.026824951171875,
0.0245513916015625,
-0.03546142578125,
-0.02813720703125,
0.02435302734375,
-0.0723876953125,
0.010345458984375,
0.028289794921875,
0.0200042724609375,
0.002346038818359375,
-0.04718017578125,
0.05291748046875,
0.000965118408203125,
0.01378631591796875,
-0.019775390625,
-0.004650115966796875,
0.003154754638671875,
0.0201568603515625,
0.036102294921875,
0.036865234375,
-0.01451873779296875,
0.004497528076171875,
0.0001379251480102539,
0.01367950439453125,
-0.0144805908203125,
0.0360107421875,
0.077392578125,
-0.070556640625,
0.01267242431640625,
-0.00965118408203125,
-0.032196044921875,
-0.01140594482421875,
-0.039215087890625,
-0.01013946533203125,
-0.0330810546875,
-0.020904541015625,
-0.016998291015625,
-0.0421142578125,
0.016204833984375,
-0.0260467529296875,
0.00458526611328125,
0.0170745849609375,
0.0276031494140625,
0.0278778076171875,
-0.0031833648681640625,
0.00795745849609375,
0.029266357421875,
-0.01279449462890625,
0.056976318359375,
-0.035247802734375,
0.060821533203125,
-0.058013916015625,
0.04986572265625,
0.057403564453125,
-0.073486328125,
0.044097900390625,
-0.012542724609375,
0.01904296875,
-0.0167388916015625,
-0.003307342529296875,
-0.004207611083984375,
-0.029022216796875,
-0.0110321044921875,
-0.016937255859375,
0.002063751220703125,
-0.0163421630859375,
-0.021881103515625,
-0.0226593017578125,
-0.034423828125,
-0.0206451416015625,
-0.1077880859375,
-0.055206298828125,
0.0283050537109375,
-0.07183837890625,
0.03057861328125,
0.01551055908203125,
-0.043548583984375,
-0.045989990234375,
0.07354736328125,
-0.0006561279296875,
0.0247955322265625,
-0.0196685791015625,
-0.032501220703125,
-0.020233154296875,
-0.05743408203125,
-0.0286865234375,
0.006839752197265625,
0.00188446044921875,
0.0170135498046875,
-0.0029144287109375,
0.004894256591796875,
0.011688232421875,
0.0352783203125,
0.041473388671875,
-0.0029697418212890625,
-0.0286865234375,
0.02178955078125,
-0.0018453598022460938,
-0.03350830078125,
0.0188751220703125,
0.0460205078125,
0.041168212890625,
-0.04925537109375,
-0.00606536865234375,
-0.006206512451171875,
-0.03448486328125,
-0.00024700164794921875,
0.032379150390625,
-0.004650115966796875,
-0.01399993896484375,
0.01715087890625,
-0.058258056640625,
-0.0078125,
-0.01105499267578125,
-0.03265380859375,
0.00485992431640625,
0.0220947265625,
-0.01030731201171875,
-0.0145416259765625,
0.01451873779296875,
-0.0043182373046875,
0.0119171142578125,
-0.0122222900390625,
-0.020416259765625,
0.0233306884765625,
0.003116607666015625,
0.0297393798828125,
0.016448974609375,
0.0194244384765625,
-0.005870819091796875,
0.0201568603515625,
0.01013946533203125,
0.01544952392578125,
0.0081939697265625,
0.004787445068359375,
-0.01175689697265625,
-0.08544921875,
0.06597900390625,
-0.050445556640625,
0.0166168212890625,
-0.085693359375,
-0.0362548828125,
-0.050506591796875,
0.1053466796875,
-0.0176239013671875,
-0.011474609375,
0.0029926300048828125,
0.018310546875,
-0.030426025390625,
-0.0528564453125,
-0.0300750732421875,
-0.0069580078125,
-0.04046630859375,
0.010223388671875,
-0.001800537109375,
-0.0110015869140625,
-0.01064300537109375,
-0.004695892333984375,
-0.0247955322265625,
-0.035736083984375,
0.02911376953125,
0.01528167724609375,
0.0308074951171875,
0.031951904296875,
0.01776123046875,
0.0225067138671875,
-0.03668212890625,
-0.006900787353515625,
-0.0579833984375,
-0.0191192626953125,
0.00832366943359375,
0.058746337890625,
-0.0049285888671875,
-0.0037403106689453125,
-0.0171051025390625,
0.050933837890625,
0.0098419189453125,
0.003631591796875,
0.0080413818359375,
-0.03753662109375,
0.0245208740234375,
0.0638427734375,
0.01245880126953125,
0.01055908203125,
0.01184844970703125,
-0.044189453125,
-0.044036865234375,
-0.01284027099609375,
-0.044219970703125,
0.040771484375,
-0.0255279541015625,
-0.009429931640625,
-0.04254150390625,
-0.027557373046875,
0.006992340087890625,
0.04718017578125,
-0.01128387451171875,
0.01104736328125,
-0.0469970703125,
-0.050018310546875,
0.036041259765625,
-0.00675201416015625,
-0.0107574462890625,
0.004894256591796875,
0.0484619140625,
0.006633758544921875,
-0.014251708984375,
-0.0594482421875,
0.02227783203125,
0.04632568359375,
-0.00868988037109375,
0.066650390625,
0.035614013671875,
-0.027069091796875,
0.059417724609375,
0.01959228515625,
0.02728271484375,
-0.00913238525390625,
0.033416748046875,
-0.00001633167266845703,
-0.00855255126953125,
0.0312042236328125,
-0.0064849853515625,
-0.0294647216796875,
0.0164947509765625,
0.00821685791015625,
-0.0152130126953125,
-0.0006270408630371094,
0.00539398193359375,
0.011260986328125,
0.01849365234375,
0.0028209686279296875,
-0.045013427734375,
-0.00792694091796875,
0.0029125213623046875,
0.0278167724609375,
0.0247344970703125,
-0.01349639892578125,
0.030364990234375,
0.0689697265625,
0.005626678466796875,
0.046295166015625,
0.0227813720703125,
-0.006549835205078125,
0.04229736328125,
-0.0024852752685546875,
-0.03106689453125,
0.0240020751953125,
-0.0045013427734375,
0.023681640625,
0.03594970703125,
0.0045013427734375,
-0.0202484130859375,
-0.00611114501953125,
-0.0364990234375,
-0.034210205078125,
-0.0096588134765625,
0.0268707275390625,
0.01097869873046875,
-0.02484130859375,
0.00920867919921875,
-0.034027099609375,
-0.0144500732421875,
-0.04864501953125,
0.036956787109375,
-0.0032291412353515625,
-0.006031036376953125,
0.04669189453125,
-0.00028228759765625,
-0.036773681640625,
0.0289764404296875,
-0.0037708282470703125,
0.021087646484375,
0.049713134765625,
-0.0002281665802001953,
0.03131103515625,
0.02001953125,
-0.01525115966796875,
-0.01432037353515625,
0.0012922286987304688,
-0.07281494140625,
0.0041961669921875,
0.0202789306640625,
0.09686279296875,
-0.0413818359375,
-0.061553955078125,
0.0361328125,
-0.06890869140625,
0.0051116943359375,
-0.00212860107421875,
-0.024871826171875,
-0.00682830810546875,
-0.0180511474609375,
0.00029540061950683594,
0.032073974609375,
-0.0030460357666015625,
0.00252532958984375,
-0.00940704345703125,
0.02191162109375,
0.02655029296875,
0.005970001220703125,
-0.00885772705078125,
0.0086669921875,
-0.003662109375,
0.0231475830078125,
0.029571533203125,
-0.01351165771484375,
-0.0236053466796875,
-0.04156494140625,
-0.023529052734375,
-0.0253143310546875,
0.1016845703125,
-0.02764892578125,
0.004302978515625,
-0.0268707275390625,
0.016021728515625,
-0.044830322265625,
0.00876617431640625,
0.043731689453125,
0.02960205078125,
-0.052276611328125,
-0.004947662353515625,
-0.034759521484375,
0.013946533203125,
0.0560302734375,
-0.0224456787109375,
0.0059051513671875,
-0.026763916015625,
-0.0010080337524414062,
0.0360107421875,
0.0017404556274414062,
-0.007625579833984375,
0.005229949951171875,
-0.0101470947265625,
-0.017242431640625,
0.00885009765625,
0.035186767578125,
-0.0277252197265625,
0.0304107666015625,
0.0180511474609375,
0.035797119140625,
-0.0212860107421875,
-0.035430908203125,
-0.053619384765625,
0.0159912109375,
-0.048126220703125,
-0.02294921875,
-0.011077880859375,
0.0012416839599609375,
0.013916015625,
-0.0012979507446289062,
-0.00788116455078125,
0.0030231475830078125,
-0.016754150390625,
-0.01123046875,
-0.029876708984375,
0.045806884765625,
-0.0135498046875,
0.0222015380859375,
-0.03338623046875,
-0.031341552734375,
0.01366424560546875,
0.0006313323974609375,
-0.0001533031463623047,
0.02239990234375,
-0.0160064697265625,
0.0059967041015625,
0.0305633544921875,
0.002895355224609375,
0.04217529296875,
0.08758544921875,
-0.052093505859375,
0.021087646484375,
0.047637939453125,
-0.041656494140625,
0.0110931396484375,
0.063232421875,
0.004673004150390625,
-0.051422119140625,
0.05389404296875,
0.016387939453125,
-0.0360107421875,
0.01390838623046875,
-0.04083251953125,
0.04278564453125,
0.04376220703125,
0.052398681640625,
-0.048614501953125,
-0.0005316734313964844,
-0.023681640625,
-0.046356201171875,
0.06243896484375,
-0.0330810546875,
0.0013799667358398438,
-0.020111083984375,
0.05999755859375,
0.0031414031982421875,
-0.0269317626953125,
0.0031719207763671875,
-0.00534820556640625,
0.0204620361328125,
0.01065826416015625,
0.0506591796875,
-0.01016998291015625,
-0.0745849609375,
-0.07208251953125,
0.052459716796875,
-0.05828857421875,
-0.01493072509765625,
-0.004482269287109375,
-0.0019292831420898438,
-0.013519287109375,
-0.005615234375,
0.02935791015625,
-0.035430908203125,
0.03759765625,
0.0012578964233398438,
-0.00853729248046875,
0.049713134765625,
0.043548583984375,
-0.0186767578125,
0.0269012451171875,
0.01006317138671875,
0.0266265869140625,
0.053619384765625,
-0.02288818359375,
-0.00750732421875,
-0.036529541015625,
-0.011383056640625,
-0.0137176513671875,
-0.033111572265625,
-0.0245819091796875,
-0.01103973388671875,
-0.0144195556640625,
0.08245849609375,
-0.06805419921875,
0.0013179779052734375,
0.028839111328125,
0.01316070556640625,
-0.02008056640625,
0.01371002197265625,
0.03594970703125,
-0.0316162109375,
-0.023193359375,
0.0142364501953125,
-0.04669189453125,
-0.006137847900390625,
-0.0016031265258789062,
-0.042266845703125,
0.097900390625,
-0.01580810546875,
0.0284576416015625,
0.0352783203125,
0.0335693359375,
-0.0195770263671875,
0.0195465087890625,
-0.0225677490234375,
0.046539306640625,
0.05126953125,
-0.0017309188842773438,
-0.01093292236328125,
-0.017791748046875,
0.01085662841796875,
0.0308685302734375,
0.07135009765625,
0.02099609375,
-0.053192138671875,
0.01004791259765625,
0.0819091796875,
0.00897216796875,
0.000988006591796875,
0.06280517578125,
-0.016387939453125,
-0.01605224609375,
0.0198974609375,
0.007595062255859375,
0.0281829833984375,
-0.01116180419921875,
-0.045440673828125,
-0.01059722900390625,
0.0260162353515625,
0.03424072265625,
-0.0022602081298828125,
0.0170745849609375,
-0.03643798828125,
0.00029969215393066406,
0.03680419921875,
-0.006977081298828125,
0.00455474853515625,
0.028167724609375,
0.0157012939453125,
-0.041107177734375,
-0.005268096923828125,
-0.038665771484375,
0.03936767578125,
-0.0162200927734375,
-0.017303466796875,
0.001964569091796875,
0.0055084228515625,
0.04766845703125,
-0.060791015625,
-0.0233612060546875,
-0.005764007568359375,
-0.00992584228515625,
0.0516357421875,
-0.032562255859375,
0.01342010498046875,
-0.08148193359375,
-0.0350341796875,
0.040557861328125,
0.062286376953125,
-0.028717041015625,
-0.001728057861328125,
0.0039215087890625,
-0.017242431640625,
0.007694244384765625,
-0.053985595703125,
0.004390716552734375,
-0.0089263916015625,
-0.043670654296875,
-0.05145263671875,
-0.0030422210693359375,
0.04608154296875,
0.0166015625,
-0.00312042236328125,
0.003490447998046875,
-0.0292510986328125,
-0.0040283203125,
-0.0267333984375,
0.026947021484375,
0.01418304443359375,
0.032135009765625,
-0.00994110107421875,
0.03814697265625,
0.0007753372192382812,
0.0011110305786132812,
-0.016845703125,
0.038330078125,
0.0114593505859375,
0.005817413330078125,
-0.0290985107421875,
-0.039703369140625,
0.051605224609375,
0.034027099609375,
0.044525146484375,
0.0296783447265625,
0.03106689453125,
0.021514892578125,
0.0221099853515625,
0.01265716552734375,
0.01104736328125,
-0.01517486572265625,
0.057952880859375,
-0.037628173828125,
0.0242767333984375,
-0.0118255615234375,
-0.0225830078125,
-0.023712158203125,
-0.0295562744140625,
0.0496826171875,
-0.01953125,
0.052947998046875,
-0.01103973388671875,
-0.01332855224609375,
0.0193634033203125,
-0.06805419921875,
0.0643310546875,
-0.0178070068359375,
-0.07177734375,
-0.0222015380859375,
-0.0020580291748046875,
-0.035552978515625,
0.032196044921875,
0.045379638671875,
-0.0157928466796875,
-0.00847625732421875,
-0.041748046875,
0.00559234619140625,
0.012359619140625,
-0.0216827392578125,
-0.00885009765625,
0.0190887451171875,
0.01242828369140625,
-0.00476837158203125,
-0.032989501953125,
-0.03125,
0.0009160041809082031,
0.050750732421875,
0.01470947265625,
0.1224365234375,
-0.04571533203125,
0.0077972412109375,
-0.027587890625,
0.01531219482421875,
-0.0288543701171875,
-0.0248260498046875,
-0.00457763671875,
0.0198822021484375,
0.0070037841796875,
-0.0172576904296875,
0.0181427001953125,
0.0139617919921875,
0.0143280029296875,
-0.033721923828125,
-0.0223236083984375,
-0.0260009765625,
0.017425537109375,
0.03240966796875,
0.0413818359375,
-0.027587890625,
-0.0584716796875,
-0.04083251953125,
0.01371002197265625,
0.0004925727844238281,
0.0072021484375,
-0.0259246826171875,
0.0228424072265625,
0.02978515625,
-0.0110626220703125,
0.0157318115234375,
-0.0163421630859375,
0.04351806640625,
0.035858154296875,
-0.0011739730834960938,
-0.0401611328125,
-0.006282806396484375,
-0.0131378173828125,
0.00806427001953125,
-0.01030731201171875,
0.045867919921875,
0.005077362060546875,
-0.0204925537109375,
0.022125244140625,
-0.01366424560546875,
0.0214996337890625,
-0.016815185546875,
-0.0218505859375,
-0.006671905517578125,
0.006153106689453125,
0.00801849365234375,
-0.0149688720703125,
-0.00542449951171875,
-0.040069580078125,
-0.01374053955078125,
0.024658203125,
-0.0260162353515625,
0.011566162109375,
-0.03729248046875,
-0.0147705078125,
0.039703369140625,
0.0240325927734375,
-0.0589599609375,
0.0200653076171875,
-0.00641632080078125,
0.01456451416015625,
0.0102081298828125,
0.051361083984375,
-0.0435791015625,
0.00659942626953125,
-0.043487548828125,
-0.08740234375,
-0.05609130859375,
0.08392333984375,
-0.0701904296875,
0.01068115234375,
0.01253509521484375,
-0.0121307373046875,
0.040679931640625,
0.0292205810546875,
0.0166473388671875,
0.08135986328125,
-0.024261474609375,
-0.02532958984375,
0.0087738037109375,
-0.028656005859375,
-0.0084381103515625,
-0.01708984375,
0.0131072998046875,
-0.056884765625,
-0.0181121826171875,
0.0013265609741210938,
-0.00867462158203125,
-0.01189422607421875,
-0.050567626953125,
-0.06707763671875,
-0.0037441253662109375,
0.00016891956329345703,
-0.049346923828125,
-0.04425048828125,
0.0264892578125,
-0.00969696044921875,
0.034576416015625,
0.0016298294067382812,
-0.025848388671875,
0.00428009033203125,
0.0279388427734375,
0.01067352294921875,
0.0269775390625,
-0.01128387451171875,
0.04718017578125,
0.0194091796875,
0.0439453125,
0.0213775634765625,
-0.023529052734375,
0.03228759765625,
-0.02508544921875,
0.06280517578125,
0.04290771484375,
-0.0399169921875,
0.036468505859375,
0.0018768310546875,
-0.047454833984375,
-0.0196533203125,
-0.0207977294921875,
-0.01885986328125,
-0.01397705078125,
0.013641357421875,
0.052001953125,
0.003448486328125,
-0.000015914440155029297,
-0.007129669189453125,
-0.01277923583984375,
-0.014862060546875,
-0.0076751708984375,
0.005340576171875,
-0.031951904296875,
0.0022258758544921875,
-0.01502227783203125,
0.0007867813110351562,
-0.00942230224609375,
0.000774383544921875,
-0.0262908935546875,
-0.0012559890747070312,
0.0176849365234375,
0.01032257080078125,
-0.0169525146484375,
-0.029998779296875,
0.111083984375,
-0.04815673828125,
0.0283050537109375,
0.0081329345703125,
0.033447265625,
0.06060791015625,
-0.01177978515625,
0.0213775634765625,
0.062286376953125,
-0.031707763671875,
-0.0164337158203125,
0.049163818359375,
-0.01678466796875,
-0.00005513429641723633,
-0.003215789794921875,
0.005168914794921875,
0.0246429443359375,
-0.0159149169921875,
0.0166778564453125,
0.0186614990234375,
0.01264190673828125,
-0.0179443359375,
0.052459716796875,
-0.01535797119140625,
-0.0159912109375,
-0.028472900390625,
0.0352783203125,
-0.0301513671875,
0.00004094839096069336,
0.00620269775390625,
-0.0186767578125,
0.0139312744140625,
0.022705078125,
-0.030975341796875,
0.00347137451171875,
-0.016448974609375,
-0.059478759765625,
-0.0031108856201171875,
-0.00395965576171875
]
|
c0fbe177aacdec24c73e62ffbeff1cbb5f3494bd | Wordpress Stackexchange
Q: $update is always true in save_post I'm trying to fire some code only when a document type is created using save_post, but $update is always true, even when first publishing it.
I assume this is because there's an autodraft created first. Is there any way around this?
A: So appreciate this is a bit late but I was having the exact same issue, the $update parameter is almost completely useless if you want to check whether it is a new post or not.
The way I got around this was to compare the $post->post_date with $post->post_modified. Full code snippet below.
add_action( 'save_post', 'save_post_callback', 10, 3 );
function save_post_callback($post_id, $post, $update) {
$is_new = $post->post_date === $post->post_modified;
if ( $is_new ) {
// first publish
} else {
// an update
}
}
Hope that helps anybody else finding this.
| Q: $update is always true in save_post I'm trying to fire some code only when a document type is created using save_post, but $update is always true, even when first publishing it.
I assume this is because there's an autodraft created first. Is there any way around this?
A: So appreciate this is a bit late but I was having the exact same issue, the $update parameter is almost completely useless if you want to check whether it is a new post or not.
The way I got around this was to compare the $post->post_date with $post->post_modified. Full code snippet below.
add_action( 'save_post', 'save_post_callback', 10, 3 );
function save_post_callback($post_id, $post, $update) {
$is_new = $post->post_date === $post->post_modified;
if ( $is_new ) {
// first publish
} else {
// an update
}
}
Hope that helps anybody else finding this.
A: One approach is to use get_post_status()
According to the codex http://codex.wordpress.org/Function_Reference/get_post_status
'publish' - A published post or page
'pending' - post is pending review
'draft' - a post in draft status
'auto-draft' - a newly created post, with no content
'future' - a post to publish in the future
'private' - not visible to users who are not logged in
'inherit' - a revision. see get_children.
'trash' - post is in trashbin. added with Version 2.9.
Possibly in your code the status is auto-draft or draft. If the status is true for both, it's probably the first save. If not, it's an update.
A: A more reliable way of checking is to get $_POST['original_publish'], as that will return 'Publish' on first publishing it, and 'Update' on updating it.
| wordpress | {
"language": "en",
"length": 269,
"provenance": "stackexchange_00019.jsonl.gz:465227",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/225760"
} | [
0.050811767578125,
-0.018829345703125,
0.007221221923828125,
-0.02947998046875,
-0.0208740234375,
-0.0267791748046875,
0.0069122314453125,
-0.0142974853515625,
0.0180206298828125,
0.0263214111328125,
-0.032684326171875,
0.00970458984375,
-0.005107879638671875,
-0.01409912109375,
-0.0108795166015625,
-0.004730224609375,
0.02972412109375,
-0.02581787109375,
-0.00536346435546875,
-0.01157379150390625,
-0.0155029296875,
0.01241302490234375,
0.0239715576171875,
0.03460693359375,
0.01445770263671875,
0.0123291015625,
0.0343017578125,
-0.0036449432373046875,
0.0264739990234375,
0.0016193389892578125,
0.0181427001953125,
-0.037139892578125,
0.0172271728515625,
0.04595947265625,
-0.056396484375,
0.0028400421142578125,
0.038055419921875,
-0.00421142578125,
-0.018402099609375,
0.0684814453125,
0.01215362548828125,
0.00003504753112792969,
0.01885986328125,
-0.016937255859375,
-0.0149688720703125,
-0.0335693359375,
0.0196990966796875,
-0.0026721954345703125,
0.03131103515625,
-0.009063720703125,
-0.00018167495727539062,
0.0256500244140625,
-0.0014047622680664062,
0.040191650390625,
-0.005115509033203125,
0.027191162109375,
-0.038543701171875,
-0.006420135498046875,
0.052825927734375,
0.006832122802734375,
-0.03131103515625,
-0.059661865234375,
0.026885986328125,
-0.0439453125,
-0.005527496337890625,
0.0017728805541992188,
0.031402587890625,
0.004482269287109375,
-0.09368896484375,
-0.035125732421875,
0.062347412109375,
-0.04937744140625,
0.0028228759765625,
-0.0038433074951171875,
0.00916290283203125,
-0.003261566162109375,
0.01256561279296875,
0.034088134765625,
-0.0012578964233398438,
0.0249176025390625,
0.043304443359375,
0.0247039794921875,
0.0210418701171875,
-0.0239410400390625,
0.00040912628173828125,
-0.0179290771484375,
-0.0010232925415039062,
-0.01071929931640625,
-0.0538330078125,
-0.035430908203125,
-0.033721923828125,
-0.038604736328125,
-0.03289794921875,
-0.03997802734375,
-0.0204010009765625,
-0.039337158203125,
0.0257110595703125,
0.07794189453125,
-0.040283203125,
0.01367950439453125,
-0.04052734375,
-0.0214385986328125,
-0.00372314453125,
-0.042388916015625,
0.00008910894393920898,
0.030181884765625,
0.025421142578125,
-0.062286376953125,
0.0016460418701171875,
0.0017156600952148438,
-0.00997161865234375,
0.0478515625,
-0.0158538818359375,
-0.01506805419921875,
-0.00731658935546875,
0.0127716064453125,
-0.059722900390625,
0.03515625,
0.001613616943359375,
0.0303802490234375,
0.03106689453125,
0.04925537109375,
-0.01387786865234375,
-0.0418701171875,
0.0187225341796875,
0.009765625,
-0.031951904296875,
-0.023956298828125,
0.0168304443359375,
0.0071258544921875,
-0.038848876953125,
0.004375457763671875,
0.05718994140625,
0.0198516845703125,
0.0191802978515625,
-0.0110931396484375,
-0.033721923828125,
-0.0138702392578125,
-0.0177154541015625,
0.0271453857421875,
-0.0301055908203125,
-0.03857421875,
0.0357666015625,
-0.00682830810546875,
-0.0311737060546875,
0.00934600830078125,
0.0179290771484375,
0.022979736328125,
-0.01052093505859375,
-0.0677490234375,
0.0188446044921875,
-0.02337646484375,
0.022735595703125,
0.019012451171875,
-0.029754638671875,
-0.0221099853515625,
0.0153656005859375,
-0.041656494140625,
0.00743865966796875,
-0.03594970703125,
0.034088134765625,
-0.0016012191772460938,
0.00308990478515625,
-0.01496124267578125,
-0.045013427734375,
0.0109710693359375,
-0.0572509765625,
-0.007617950439453125,
0.01558685302734375,
0.0268707275390625,
-0.0004634857177734375,
0.033355712890625,
0.03253173828125,
-0.01319122314453125,
-0.0240020751953125,
-0.024688720703125,
0.02630615234375,
-0.044403076171875,
0.0333251953125,
-0.00647735595703125,
-0.057525634765625,
-0.0172271728515625,
0.0276336669921875,
-0.0270843505859375,
-0.0175933837890625,
0.047027587890625,
-0.01087188720703125,
-0.005466461181640625,
0.0112152099609375,
-0.0031108856201171875,
-0.00588226318359375,
0.05780029296875,
-0.02740478515625,
0.033935546875,
-0.006328582763671875,
0.006366729736328125,
-0.053375244140625,
0.011199951171875,
-0.03680419921875,
-0.0244903564453125,
-0.00653076171875,
-0.0278778076171875,
-0.01055145263671875,
0.00838470458984375,
-0.06134033203125,
-0.0300140380859375,
-0.024566650390625,
0.015899658203125,
0.0143280029296875,
0.054931640625,
0.00478363037109375,
0.0255889892578125,
-0.034881591796875,
0.00820159912109375,
-0.01197052001953125,
-0.015106201171875,
-0.032989501953125,
0.0299835205078125,
-0.01306915283203125,
0.042022705078125,
-0.017425537109375,
-0.036895751953125,
-0.01180267333984375,
-0.007175445556640625,
0.043792724609375,
-0.0131378173828125,
-0.0026874542236328125,
-0.0233154296875,
0.047027587890625,
-0.00885009765625,
-0.002407073974609375,
0.037200927734375,
-0.02069091796875,
-0.0249786376953125,
-0.047760009765625,
-0.0180816650390625,
-0.059478759765625,
-0.08642578125,
0.00252532958984375,
0.07977294921875,
0.0208587646484375,
-0.0175018310546875,
-0.0030059814453125,
0.046478271484375,
0.03363037109375,
0.048370361328125,
0.0275421142578125,
0.0032901763916015625,
0.022003173828125,
0.033233642578125,
-0.015167236328125,
-0.00859832763671875,
0.024261474609375,
-0.0850830078125,
0.032196044921875,
0.04229736328125,
0.0038909912109375,
0.04669189453125,
-0.0265655517578125,
-0.00597381591796875,
-0.01322174072265625,
-0.04638671875,
-0.0092010498046875,
-0.029388427734375,
0.02777099609375,
-0.0162506103515625,
0.02301025390625,
0.02349853515625,
-0.0192413330078125,
-0.01552581787109375,
0.01861572265625,
-0.01102447509765625,
-0.004123687744140625,
0.089599609375,
0.00395965576171875,
0.0243988037109375,
-0.0270538330078125,
-0.015838623046875,
-0.010589599609375,
0.055419921875,
-0.031463623046875,
-0.01319122314453125,
0.028076171875,
-0.0050811767578125,
0.01227569580078125,
-0.0199127197265625,
0.03680419921875,
-0.029632568359375,
-0.00969696044921875,
-0.03863525390625,
0.00417327880859375,
-0.0102386474609375,
-0.0447998046875,
0.0285186767578125,
0.0094757080078125,
-0.0478515625,
-0.033599853515625,
-0.039886474609375,
0.031341552734375,
-0.02490234375,
0.033966064453125,
0.07586669921875,
-0.0050811767578125,
0.0176239013671875,
0.00036835670471191406,
0.01288604736328125,
0.00014984607696533203,
-0.0092620849609375,
-0.0296478271484375,
-0.01177215576171875,
-0.06317138671875,
-0.02410888671875,
0.0244903564453125,
0.07763671875,
-0.00875091552734375,
-0.032745361328125,
0.00927734375,
0.0270233154296875,
-0.06085205078125,
-0.07794189453125,
-0.033233642578125,
-0.0237274169921875,
-0.0030193328857421875,
-0.0031452178955078125,
0.007053375244140625,
-0.0003910064697265625,
0.00013184547424316406,
0.0138397216796875,
-0.0288238525390625,
-0.005161285400390625,
-0.041259765625,
-0.032257080078125,
-0.03643798828125,
0.016815185546875,
-0.0093841552734375,
0.0094757080078125,
0.00013709068298339844,
0.1033935546875,
0.013946533203125,
-0.0635986328125,
0.0038852691650390625,
-0.00428009033203125,
-0.035125732421875,
0.03350830078125,
0.01715087890625,
-0.0190582275390625,
0.01953125,
-0.00858306884765625,
0.0159149169921875,
0.024627685546875,
-0.01092529296875,
-0.0165863037109375,
-0.0126953125,
-0.0263824462890625,
0.011810302734375,
0.01222991943359375,
0.0006966590881347656,
0.015167236328125,
0.028106689453125,
-0.042144775390625,
-0.028778076171875,
-0.0110321044921875,
-0.04547119140625,
-0.01422119140625,
0.023223876953125,
-0.006931304931640625,
-0.03265380859375,
0.021148681640625,
-0.0439453125,
-0.0026702880859375,
0.0335693359375,
-0.046875,
0.044677734375,
-0.02960205078125,
-0.04400634765625,
-0.022979736328125,
0.0240325927734375,
-0.00818634033203125,
0.0029315948486328125,
-0.0001443624496459961,
0.03277587890625,
-0.00359344482421875,
0.019866943359375,
-0.053192138671875,
-0.038909912109375,
0.0133056640625,
-0.09075927734375,
0.01641845703125,
-0.06103515625,
0.0224609375,
-0.03466796875,
0.060302734375,
-0.02752685546875,
-0.0163726806640625,
-0.01078033447265625,
0.01399993896484375,
-0.0416259765625,
-0.057525634765625,
-0.0119171142578125,
0.00445556640625,
0.0204010009765625,
-0.009765625,
-0.01447296142578125,
0.01493072509765625,
-0.0288848876953125,
0.016265869140625,
0.0020961761474609375,
0.002208709716796875,
0.03240966796875,
-0.048187255859375,
0.01318359375,
0.045257568359375,
0.0159454345703125,
-0.01338958740234375,
-0.0104522705078125,
-0.03350830078125,
-0.1131591796875,
0.00502777099609375,
-0.01044464111328125,
0.038177490234375,
-0.0007767677307128906,
-0.00652313232421875,
-0.01224517822265625,
0.031341552734375,
0.033966064453125,
-0.00588226318359375,
0.0191650390625,
-0.006130218505859375,
-0.037689208984375,
-0.01392364501953125,
0.0128326416015625,
-0.046356201171875,
-0.006504058837890625,
0.0066375732421875,
-0.006549835205078125,
0.0269317626953125,
-0.0491943359375,
-0.0273895263671875,
-0.0266265869140625,
-0.0276947021484375,
-0.0228729248046875,
-0.031097412109375,
-0.033416748046875,
0.0291900634765625,
-0.0517578125,
0.0225830078125,
-0.04833984375,
-0.043792724609375,
0.067138671875,
-0.0276031494140625,
0.00010329484939575195,
-0.0017414093017578125,
0.1031494140625,
0.0018835067749023438,
-0.0091552734375,
-0.033477783203125,
0.0164642333984375,
0.0367431640625,
0.0200042724609375,
0.017608642578125,
0.0145416259765625,
-0.025970458984375,
0.02288818359375,
0.0194244384765625,
0.004962921142578125,
-0.049652099609375,
0.0767822265625,
-0.00943756103515625,
0.00720977783203125,
-0.0006737709045410156,
-0.0249481201171875,
0.03411865234375,
0.008880615234375,
-0.023468017578125,
0.0211181640625,
-0.0189666748046875,
0.00809478759765625,
-0.00856781005859375,
0.01366424560546875,
-0.036865234375,
-0.0202484130859375,
0.006465911865234375,
0.07501220703125,
0.0203399658203125,
0.015716552734375,
0.01059722900390625,
0.001300811767578125,
-0.0033321380615234375,
0.00899505615234375,
-0.0310516357421875,
0.007167816162109375,
-0.0194091796875,
0.035125732421875,
0.0063323974609375,
0.01538848876953125,
-0.03302001953125,
0.00868988037109375,
-0.0272979736328125,
-0.007472991943359375,
-0.060272216796875,
-0.0012378692626953125,
-0.0006957054138183594,
0.0704345703125,
0.01200103759765625,
0.0162200927734375,
0.03460693359375,
-0.00020492076873779297,
-0.00757598876953125,
-0.0003809928894042969,
0.0177764892578125,
-0.0087738037109375,
-0.034698486328125,
0.006809234619140625,
0.0264434814453125,
-0.03131103515625,
0.036865234375,
-0.0140533447265625,
0.04248046875,
-0.01486968994140625,
-0.031585693359375,
0.054962158203125,
0.06781005859375,
-0.0123291015625,
0.024627685546875,
0.01206207275390625,
-0.0037899017333984375,
-0.0285797119140625,
-0.019989013671875,
-0.032928466796875,
0.02459716796875,
0.03607177734375,
0.006008148193359375,
0.004825592041015625,
-0.048065185546875,
0.026519775390625,
-0.00011616945266723633,
-0.0193023681640625,
-0.006134033203125,
0.049163818359375,
-0.005268096923828125,
0.0245819091796875,
0.0195159912109375,
-0.0467529296875,
0.01389312744140625,
0.01421356201171875,
-0.0380859375,
-0.0182647705078125,
0.0045318603515625,
-0.062744140625,
0.00687408447265625,
-0.022979736328125,
-0.01180267333984375,
-0.0131683349609375,
-0.0562744140625,
-0.01552581787109375,
0.0802001953125,
0.045745849609375,
-0.043914794921875,
-0.0565185546875,
0.040283203125,
-0.0218963623046875,
0.0182037353515625,
-0.0364990234375,
-0.0010852813720703125,
-0.0189666748046875,
0.00891876220703125,
0.058258056640625,
0.04058837890625,
0.0283966064453125,
-0.0018138885498046875,
-0.04156494140625,
-0.0191650390625,
0.0076751708984375,
-0.036590576171875,
-0.009674072265625,
-0.037689208984375,
0.0209503173828125,
0.00463104248046875,
-0.0030155181884765625,
-0.03656005859375,
0.01514434814453125,
0.0134429931640625,
0.0162353515625,
0.0236968994140625,
0.0034770965576171875,
0.07928466796875,
-0.027679443359375,
0.069580078125,
0.0082855224609375,
0.006275177001953125,
-0.079345703125,
0.0014810562133789062,
-0.0081787109375,
-0.030975341796875,
0.016387939453125,
-0.003757476806640625,
0.0288848876953125,
-0.01541900634765625,
0.005126953125,
-0.003925323486328125,
0.01558685302734375,
-0.01142120361328125,
0.004150390625,
-0.0147705078125,
0.01522064208984375,
-0.018096923828125,
-0.0307769775390625,
0.055206298828125,
-0.046142578125,
-0.02764892578125,
0.004375457763671875,
-0.00635528564453125,
0.028045654296875,
-0.032958984375,
-0.00946044921875,
0.037750244140625,
-0.0176544189453125,
0.0032978057861328125,
0.0060272216796875,
0.01313018798828125,
0.03759765625,
-0.00868988037109375,
0.037384033203125,
0.0258941650390625,
0.005626678466796875,
-0.0350341796875,
-0.003498077392578125,
0.022613525390625,
0.0017423629760742188,
0.01268768310546875,
0.02435302734375,
-0.0005135536193847656,
0.057464599609375,
0.042633056640625,
0.08026123046875,
-0.06005859375,
0.036773681640625,
0.0418701171875,
-0.0279388427734375,
0.0516357421875,
-0.010711669921875,
-0.0291290283203125,
-0.03948974609375,
0.04248046875,
-0.0282135009765625,
-0.03411865234375,
0.0070953369140625,
-0.0118255615234375,
-0.0008292198181152344,
-0.0010738372802734375,
0.006870269775390625,
0.00269317626953125,
-0.0220184326171875,
0.00940704345703125,
0.01192474365234375,
0.01214599609375,
-0.01055908203125,
-0.004940032958984375,
-0.0091552734375,
-0.035736083984375,
-0.06768798828125,
-0.01678466796875,
-0.016204833984375,
-0.00583648681640625,
0.0031948089599609375,
0.01509857177734375,
0.045654296875,
0.059356689453125,
-0.00771331787109375,
0.02728271484375,
0.02081298828125,
0.028350830078125,
-0.10882568359375,
-0.039306640625,
0.031829833984375,
0.053802490234375,
-0.0301361083984375,
0.0606689453125,
-0.01502227783203125,
-0.040740966796875,
-0.00548553466796875,
-0.0360107421875,
0.040008544921875,
-0.0181427001953125,
-0.0178375244140625,
0.01114654541015625,
-0.00011289119720458984,
-0.0109100341796875,
0.006412506103515625,
-0.040740966796875,
-0.048583984375,
-0.0233001708984375,
-0.02447509765625,
-0.0684814453125,
-0.01142120361328125,
-0.026153564453125,
-0.05780029296875,
0.10406494140625,
-0.01495361328125,
0.0231475830078125,
-0.00010198354721069336,
0.040283203125,
-0.01019287109375,
0.026031494140625,
-0.05291748046875,
0.041839599609375,
0.028961181640625,
0.027069091796875,
-0.06353759765625,
-0.003139495849609375,
-0.0254364013671875,
0.0277862548828125,
0.01113128662109375,
-0.01065826416015625,
-0.007320404052734375,
0.0082855224609375,
0.0660400390625,
0.0176239013671875,
0.0017490386962890625,
0.0184326171875,
0.01824951171875,
0.0247955322265625,
0.042510986328125,
-0.027069091796875,
0.050506591796875,
-0.036712646484375,
0.00751495361328125,
0.03253173828125,
0.007495880126953125,
-0.007564544677734375,
-0.00884246826171875,
-0.02294921875,
-0.01496124267578125,
-0.007633209228515625,
-0.0002243518829345703,
0.035980224609375,
0.01641845703125,
0.019744873046875,
0.037628173828125,
-0.043487548828125,
-0.0181732177734375,
-0.01544952392578125,
0.049041748046875,
0.01386260986328125,
-0.0166015625,
0.0025157928466796875,
-0.0148468017578125,
0.0579833984375,
0.0299072265625,
-0.007965087890625,
0.060577392578125,
0.030487060546875,
0.0290985107421875,
0.02508544921875,
0.020721435546875,
-0.019073486328125,
-0.002346038818359375,
0.036956787109375,
0.033111572265625,
-0.02825927734375,
0.005435943603515625,
0.01447296142578125,
0.005466461181640625,
-0.0210418701171875,
-0.043212890625,
-0.0186309814453125,
-0.001102447509765625,
0.005519866943359375,
-0.0447998046875,
-0.00785064697265625,
0.02313232421875,
0.026702880859375,
-0.0050048828125,
0.0054168701171875,
-0.0270843505859375,
-0.03399658203125,
-0.052398681640625,
0.00653839111328125,
0.035247802734375,
0.07000732421875,
0.0205230712890625,
0.061248779296875,
-0.0037670135498046875,
-0.033233642578125,
-0.009124755859375,
0.03704833984375,
-0.0158538818359375,
0.024261474609375,
-0.0217742919921875,
-0.0338134765625,
0.003124237060546875,
0.03570556640625,
0.00530242919921875,
0.050262451171875,
0.0572509765625,
0.04461669921875,
-0.0193939208984375,
-0.0033416748046875,
0.0457763671875,
-0.029754638671875,
-0.023529052734375,
-0.007167816162109375,
-0.0040740966796875,
0.00817108154296875,
0.00119781494140625,
0.00505828857421875,
0.0428466796875,
0.00392913818359375,
0.00347137451171875,
0.00875091552734375,
0.01502227783203125,
-0.0177764892578125,
0.053375244140625,
0.0260772705078125,
0.062164306640625,
0.0440673828125,
0.01470947265625,
0.0226898193359375,
-0.049468994140625,
-0.0677490234375,
-0.0109710693359375,
0.003276824951171875,
-0.024932861328125,
0.055389404296875,
0.004467010498046875,
0.0220184326171875,
0.0265045166015625,
-0.033599853515625,
0.004085540771484375,
0.01061248779296875,
0.038970947265625,
0.0120086669921875,
-0.011505126953125,
-0.00087738037109375,
0.017059326171875,
0.027313232421875,
-0.049072265625,
0.07470703125,
-0.0268402099609375,
-0.0219268798828125,
0.012451171875,
0.037750244140625,
-0.06158447265625,
-0.01104736328125,
-0.0076141357421875,
-0.05181884765625,
0.00740814208984375,
0.0135498046875,
-0.0104522705078125,
-0.007232666015625,
0.03607177734375,
-0.01983642578125,
0.0177154541015625,
-0.034423828125,
0.0255279541015625,
-0.00682830810546875,
-0.005451202392578125,
-0.031707763671875,
-0.006496429443359375,
-0.0007944107055664062,
-0.013946533203125,
0.0192718505859375,
-0.00945281982421875,
0.0126800537109375,
0.04278564453125,
0.01203155517578125,
-0.022064208984375,
0.0276031494140625,
-0.05413818359375,
0.01512908935546875,
0.023895263671875,
0.01947021484375,
0.00890350341796875,
-0.028472900390625,
-0.018280029296875,
-0.022186279296875,
0.016998291015625,
-0.0169830322265625,
-0.01384735107421875,
-0.00566864013671875,
-0.025115966796875,
0.050262451171875,
0.046234130859375,
-0.0148162841796875,
0.03167724609375,
0.01861572265625,
-0.0191497802734375,
0.01154327392578125,
0.039886474609375,
-0.005252838134765625,
-0.02398681640625,
-0.017578125,
-0.0081634521484375,
-0.0133514404296875,
-0.025787353515625,
-0.005268096923828125,
0.00176239013671875,
0.0159759521484375,
-0.01959228515625,
-0.024139404296875,
-0.0185699462890625,
-0.0240631103515625,
0.061248779296875,
-0.031463623046875,
-0.0291595458984375,
0.0223236083984375,
0.06597900390625,
-0.0109710693359375,
0.002719879150390625,
-0.0011806488037109375,
0.0035152435302734375,
0.017669677734375,
0.0057373046875,
-0.0006079673767089844,
-0.006755828857421875,
-0.00689697265625,
-0.006519317626953125,
0.00716400146484375,
0.0330810546875,
0.0028057098388671875,
-0.033050537109375,
-0.003940582275390625,
-0.00878143310546875,
0.029083251953125,
-0.039581298828125,
-0.00952911376953125,
-0.0487060546875,
-0.0180206298828125,
-0.057708740234375,
0.04290771484375,
0.0440673828125,
-0.01189422607421875,
-0.0325927734375,
-0.004161834716796875,
-0.01180267333984375,
-0.0182952880859375,
-0.0017118453979492188,
-0.01898193359375,
-0.01239776611328125,
0.0565185546875,
0.002819061279296875,
-0.000035703182220458984,
-0.024139404296875,
0.01342010498046875,
-0.026824951171875,
0.08453369140625,
-0.0013761520385742188,
-0.0421142578125,
-0.024627685546875,
-0.04327392578125,
-0.04876708984375,
0.0015916824340820312,
-0.0311431884765625,
0.00838470458984375,
0.0343017578125,
0.05950927734375,
0.0180206298828125,
0.0244140625,
0.037353515625,
-0.0276031494140625,
-0.0311737060546875,
-0.0340576171875,
-0.043731689453125,
-0.0258636474609375,
0.114013671875,
0.07159423828125,
0.031280517578125,
-0.041229248046875,
0.0221099853515625,
-0.038238525390625,
-0.0916748046875,
0.040008544921875,
0.0257720947265625,
0.0108642578125,
0.07305908203125,
0.00475311279296875,
0.0152587890625,
-0.054718017578125,
0.0082550048828125,
-0.01171112060546875,
-0.044647216796875,
-0.0059967041015625,
-0.01123046875,
-0.0160064697265625,
0.00728607177734375,
0.0247802734375,
-0.0214691162109375,
-0.010772705078125,
0.0178375244140625,
0.001010894775390625,
-0.0002892017364501953,
0.04034423828125,
0.03070068359375,
0.09320068359375,
-0.0367431640625,
-0.0419921875,
0.04876708984375,
-0.027374267578125,
0.027587890625,
0.0014734268188476562,
-0.0015811920166015625,
-0.0038928985595703125,
0.006618499755859375,
-0.00928497314453125,
-0.016632080078125,
0.0207977294921875,
-0.009857177734375,
0.032745361328125,
-0.0014896392822265625,
-0.01192474365234375,
-0.00788116455078125,
0.0110321044921875,
0.0004954338073730469,
-0.010345458984375,
0.03094482421875,
-0.04669189453125,
-0.002399444580078125,
0.01149749755859375,
-0.03839111328125,
-0.032470703125,
0.017303466796875,
-0.049285888671875,
-0.0197296142578125,
0.0163421630859375
]
|
2ef8ec6d77e05892cf09112e4c537367a64e61f7 | Wordpress Stackexchange
Q: Pass a parameter to a menu walker Is there any way to pass a parameter to a menu walker? I'm trying to write a BEM-style walker, and I'd like to be able to pass a class to apply to the menu links via the walker. Something like:
<?php
wp_nav_menu(array(
"container" => false,
"depth" => 3,
"items_wrap" => "%3\$s",
"theme_location" => "primary",
"walker" => new BEMwalker("mobile"),
));
?>
A: As @toscho said, you can call the walker class with parameters as you did:
new BEMwalker( 'mobile' )
The constructor of BEMwalker will take the arguments (like any other function or method in PHP) so you can access the parameter(s) via $this:
class BEMwalker extends Walker_Nav_Menu {
private $classes;
public function __construct( $classes = '' ) {
$this->classes = $classes;
}
public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
$output .= sprintf( "<li class=\"%s\"><a href=\"%s\">%s</a></li>",
$this->classes,
$item->url,
$item->title
);
}
}
Further reading: There's also a GitHub repository called WordPress BEM Menu which might help you to implement a BEM-like syntax.
| Q: Pass a parameter to a menu walker Is there any way to pass a parameter to a menu walker? I'm trying to write a BEM-style walker, and I'd like to be able to pass a class to apply to the menu links via the walker. Something like:
<?php
wp_nav_menu(array(
"container" => false,
"depth" => 3,
"items_wrap" => "%3\$s",
"theme_location" => "primary",
"walker" => new BEMwalker("mobile"),
));
?>
A: As @toscho said, you can call the walker class with parameters as you did:
new BEMwalker( 'mobile' )
The constructor of BEMwalker will take the arguments (like any other function or method in PHP) so you can access the parameter(s) via $this:
class BEMwalker extends Walker_Nav_Menu {
private $classes;
public function __construct( $classes = '' ) {
$this->classes = $classes;
}
public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
$output .= sprintf( "<li class=\"%s\"><a href=\"%s\">%s</a></li>",
$this->classes,
$item->url,
$item->title
);
}
}
Further reading: There's also a GitHub repository called WordPress BEM Menu which might help you to implement a BEM-like syntax.
| wordpress | {
"language": "en",
"length": 178,
"provenance": "stackexchange_00019.jsonl.gz:465237",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/225799"
} | [
0.07550048828125,
-0.0299224853515625,
0.0303802490234375,
-0.03277587890625,
0.0013303756713867188,
-0.006927490234375,
0.05035400390625,
-0.0124053955078125,
-0.027496337890625,
0.0003178119659423828,
0.0002524852752685547,
0.010009765625,
-0.061676025390625,
-0.03448486328125,
0.0133209228515625,
-0.034912109375,
0.0020904541015625,
0.06427001953125,
0.0460205078125,
-0.005718231201171875,
0.00017333030700683594,
-0.0034637451171875,
0.0048370361328125,
0.0289764404296875,
0.036346435546875,
-0.005245208740234375,
0.01898193359375,
-0.0200347900390625,
0.01287841796875,
-0.006275177001953125,
0.0242156982421875,
-0.021087646484375,
0.0121307373046875,
-0.007244110107421875,
0.04248046875,
-0.021942138671875,
0.014678955078125,
-0.014434814453125,
0.0142822265625,
0.01555633544921875,
0.02557373046875,
-0.01267242431640625,
-0.054901123046875,
0.0120697021484375,
-0.030670166015625,
-0.047088623046875,
0.01299285888671875,
-0.022430419921875,
0.0081024169921875,
-0.05657958984375,
0.06158447265625,
0.0080718994140625,
0.058197021484375,
0.020111083984375,
-0.0185089111328125,
0.050048828125,
0.052825927734375,
-0.07684326171875,
0.0224456787109375,
0.056427001953125,
-0.022491455078125,
-0.0094757080078125,
0.0025634765625,
-0.0838623046875,
-0.003383636474609375,
0.01355743408203125,
0.032562255859375,
0.029022216796875,
-0.034820556640625,
-0.005313873291015625,
0.01212310791015625,
-0.0084075927734375,
0.0011053085327148438,
0.01104736328125,
-0.0010585784912109375,
-0.050140380859375,
0.046417236328125,
-0.01111602783203125,
-0.00988006591796875,
0.03143310546875,
-0.0169677734375,
-0.002178192138671875,
-0.036407470703125,
-0.03692626953125,
0.045074462890625,
0.01702880859375,
-0.0165252685546875,
-0.0086669921875,
0.0017795562744140625,
-0.0260467529296875,
-0.016571044921875,
0.01108551025390625,
0.00489044189453125,
-0.00762176513671875,
-0.04583740234375,
-0.0233154296875,
0.0042572021484375,
0.01654052734375,
0.0009598731994628906,
0.056304931640625,
0.00635528564453125,
-0.039031982421875,
0.0921630859375,
-0.04705810546875,
0.0015468597412109375,
0.04071044921875,
0.01103973388671875,
0.073974609375,
0.058624267578125,
0.0229644775390625,
0.0245361328125,
0.028717041015625,
0.01128387451171875,
-0.0145721435546875,
-0.0084228515625,
-0.0199737548828125,
-0.01812744140625,
0.006488800048828125,
0.0085906982421875,
-0.0487060546875,
-0.041778564453125,
-0.0143890380859375,
0.006237030029296875,
0.0384521484375,
0.0169830322265625,
0.01464080810546875,
0.0134735107421875,
-0.00348663330078125,
0.031524658203125,
-0.01336669921875,
-0.0204620361328125,
0.032470703125,
0.0279388427734375,
0.00823974609375,
-0.0157928466796875,
0.005260467529296875,
0.018157958984375,
0.0307464599609375,
-0.020477294921875,
0.00823974609375,
-0.001461029052734375,
-0.01690673828125,
-0.007564544677734375,
-0.0191192626953125,
0.017913818359375,
0.00496673583984375,
0.0190887451171875,
0.01493072509765625,
-0.01336669921875,
-0.040283203125,
0.044647216796875,
-0.036346435546875,
0.0282745361328125,
0.0173492431640625,
-0.03997802734375,
0.040557861328125,
0.008331298828125,
0.01654052734375,
-0.06329345703125,
-0.01239013671875,
-0.08453369140625,
0.01401519775390625,
0.08416748046875,
-0.0521240234375,
-0.0087890625,
-0.033905029296875,
-0.0011434555053710938,
0.004734039306640625,
0.01004791259765625,
0.016143798828125,
-0.020050048828125,
-0.0247650146484375,
0.017364501953125,
0.00909423828125,
-0.01824951171875,
0.00937652587890625,
-0.0007300376892089844,
-0.0167083740234375,
0.03497314453125,
-0.00826263427734375,
-0.021728515625,
-0.0328369140625,
0.06298828125,
-0.040435791015625,
-0.0236053466796875,
0.026580810546875,
0.0204010009765625,
0.0821533203125,
0.009185791015625,
0.0202789306640625,
-0.01251220703125,
-0.01436614990234375,
-0.052215576171875,
0.052520751953125,
-0.061798095703125,
-0.025115966796875,
0.0267486572265625,
0.0290985107421875,
-0.040008544921875,
0.00473785400390625,
-0.0162811279296875,
0.00157928466796875,
-0.0122222900390625,
-0.0011320114135742188,
-0.0270843505859375,
-0.0064849853515625,
-0.0017328262329101562,
0.031097412109375,
-0.00417327880859375,
0.02752685546875,
0.0168609619140625,
0.0205078125,
-0.02734375,
-0.033050537109375,
-0.023345947265625,
-0.0150299072265625,
-0.0012254714965820312,
0.0255279541015625,
-0.025390625,
-0.01033782958984375,
-0.030853271484375,
-0.062103271484375,
-0.03387451171875,
0.03656005859375,
0.0021419525146484375,
-0.00484466552734375,
-0.01471710205078125,
0.004383087158203125,
0.01073455810546875,
0.0158233642578125,
0.01158905029296875,
-0.0019435882568359375,
0.0396728515625,
0.04193115234375,
-0.0039043426513671875,
0.0033550262451171875,
0.0115814208984375,
-0.05731201171875,
-0.0017871856689453125,
0.0262451171875,
0.04034423828125,
0.02813720703125,
-0.015289306640625,
-0.0303192138671875,
0.05084228515625,
0.0035610198974609375,
0.037628173828125,
-0.04705810546875,
-0.0517578125,
-0.02191162109375,
0.048553466796875,
0.01140594482421875,
0.03375244140625,
0.07647705078125,
-0.0227508544921875,
0.00785064697265625,
-0.0114593505859375,
-0.037933349609375,
-0.0095062255859375,
-0.00957489013671875,
0.01338958740234375,
0.0028705596923828125,
-0.03192138671875,
0.0196685791015625,
-0.01186370849609375,
0.026519775390625,
0.013427734375,
0.033355712890625,
-0.0028896331787109375,
0.00835418701171875,
0.01079559326171875,
0.0278778076171875,
0.00357818603515625,
0.0286102294921875,
0.0003666877746582031,
-0.01029205322265625,
0.031829833984375,
-0.01250457763671875,
-0.0521240234375,
-0.01200103759765625,
0.0019330978393554688,
0.059539794921875,
0.033905029296875,
-0.01343536376953125,
-0.047698974609375,
-0.0224151611328125,
0.0251007080078125,
0.0079345703125,
-0.0167999267578125,
-0.00946044921875,
0.03582763671875,
-0.03704833984375,
-0.047119140625,
0.0198516845703125,
-0.0173797607421875,
-0.044708251953125,
0.07696533203125,
0.04901123046875,
-0.00646209716796875,
0.0213623046875,
0.01108551025390625,
0.0167999267578125,
-0.0312042236328125,
-0.01214599609375,
0.0085906982421875,
0.01107025146484375,
0.007785797119140625,
0.017578125,
0.00980377197265625,
-0.0301666259765625,
0.0161590576171875,
0.037933349609375,
0.00531005859375,
0.0269317626953125,
0.0013427734375,
-0.039794921875,
-0.007205963134765625,
0.0084991455078125,
-0.0273895263671875,
0.0265960693359375,
0.045013427734375,
-0.056549072265625,
0.048858642578125,
0.037628173828125,
-0.0301971435546875,
-0.06280517578125,
0.09588623046875,
-0.0027313232421875,
-0.01331329345703125,
-0.0176849365234375,
-0.053558349609375,
-0.052276611328125,
-0.0760498046875,
0.000553131103515625,
-0.0091552734375,
0.012542724609375,
-0.005092620849609375,
0.031494140625,
0.02069091796875,
0.01171112060546875,
0.045745849609375,
0.033050537109375,
0.01081085205078125,
0.0086517333984375,
0.02606201171875,
-0.03521728515625,
-0.01197052001953125,
-0.0005731582641601562,
0.08642578125,
0.0360107421875,
-0.048492431640625,
0.0068359375,
0.0030193328857421875,
0.0261688232421875,
0.0163421630859375,
-0.0083160400390625,
0.0034389495849609375,
0.03765869140625,
0.01324462890625,
-0.02154541015625,
-0.042083740234375,
-0.0269775390625,
-0.058807373046875,
0.044921875,
0.06756591796875,
0.0008802413940429688,
-0.01140594482421875,
-0.007198333740234375,
0.00276947021484375,
-0.00482177734375,
0.01322174072265625,
-0.03118896484375,
0.00530242919921875,
-0.00739288330078125,
0.0210723876953125,
0.00421905517578125,
0.036468505859375,
-0.00164031982421875,
0.004241943359375,
0.01511383056640625,
0.0005884170532226562,
0.0051116943359375,
-0.01326751708984375,
-0.035064697265625,
-0.0256500244140625,
0.0458984375,
0.018890380859375,
0.042083740234375,
-0.029449462890625,
-0.022308349609375,
-0.02935791015625,
0.0484619140625,
0.002208709716796875,
-0.03546142578125,
-0.0231475830078125,
0.0122528076171875,
-0.03515625,
-0.039398193359375,
0.005084991455078125,
-0.00498199462890625,
-0.0462646484375,
0.007282257080078125,
0.0017995834350585938,
-0.0276336669921875,
-0.022125244140625,
0.037139892578125,
-0.05059814453125,
-0.0189056396484375,
0.022369384765625,
0.00978851318359375,
0.007442474365234375,
0.0109405517578125,
-0.00955963134765625,
0.00753021240234375,
-0.0290374755859375,
-0.0006961822509765625,
-0.103759765625,
-0.0230865478515625,
-0.01491546630859375,
0.087890625,
0.02716064453125,
-0.04254150390625,
-0.01409149169921875,
0.072265625,
0.01861572265625,
0.0179595947265625,
0.0162811279296875,
-0.0157470703125,
0.0516357421875,
0.0156707763671875,
0.005588531494140625,
0.0007877349853515625,
0.019287109375,
0.01666259765625,
-0.073486328125,
0.003627777099609375,
-0.0243682861328125,
-0.0285186767578125,
0.039154052734375,
-0.075927734375,
-0.043304443359375,
-0.061492919921875,
-0.04034423828125,
-0.01045989990234375,
0.0008864402770996094,
-0.0190887451171875,
-0.04534912109375,
-0.04302978515625,
0.00753021240234375,
-0.0582275390625,
-0.006282806396484375,
-0.0014085769653320312,
0.051513671875,
0.0289154052734375,
0.01174163818359375,
0.0635986328125,
0.0165252685546875,
-0.00977325439453125,
-0.0251312255859375,
0.036651611328125,
-0.0104217529296875,
0.0190582275390625,
-0.0009627342224121094,
-0.056182861328125,
0.0198974609375,
-0.011016845703125,
0.038482666015625,
0.019134521484375,
-0.0111083984375,
0.0017080307006835938,
0.0287017822265625,
-0.0303955078125,
0.042083740234375,
-0.005496978759765625,
-0.01389312744140625,
0.004665374755859375,
0.038818359375,
-0.0238037109375,
-0.008026123046875,
-0.03790283203125,
-0.0100555419921875,
0.001861572265625,
-0.003780364990234375,
0.053741455078125,
0.038177490234375,
-0.0017995834350585938,
0.014190673828125,
0.02008056640625,
0.006633758544921875,
0.036346435546875,
0.0004715919494628906,
0.0174560546875,
0.038818359375,
0.01039886474609375,
0.0038776397705078125,
0.006649017333984375,
0.00859832763671875,
0.0301513671875,
0.042022705078125,
-0.01837158203125,
-0.01690673828125,
0.0247802734375,
-0.01345062255859375,
-0.038421630859375,
-0.022003173828125,
0.016143798828125,
0.0232086181640625,
0.017608642578125,
0.02484130859375,
-0.042816162109375,
0.00962066650390625,
0.00228118896484375,
0.0533447265625,
0.013153076171875,
-0.0016489028930664062,
0.006908416748046875,
0.04205322265625,
0.0369873046875,
-0.00928497314453125,
-0.028778076171875,
-0.0165557861328125,
-0.00136566162109375,
0.0168304443359375,
0.0322265625,
-0.026611328125,
0.007648468017578125,
-0.016357421875,
0.0290374755859375,
0.0159454345703125,
0.00531005859375,
0.019073486328125,
-0.0139312744140625,
0.0122222900390625,
0.01219940185546875,
0.0002703666687011719,
-0.000888824462890625,
0.00991058349609375,
0.0016641616821289062,
-0.033966064453125,
-0.04132080078125,
-0.006313323974609375,
0.003078460693359375,
0.0184173583984375,
-0.03839111328125,
0.02618408203125,
-0.0230255126953125,
0.054412841796875,
0.0197601318359375,
-0.017608642578125,
-0.00787353515625,
-0.005222320556640625,
0.004306793212890625,
0.0226287841796875,
-0.0216217041015625,
0.022003173828125,
-0.08892822265625,
0.0260772705078125,
-0.053192138671875,
-0.00726318359375,
0.05865478515625,
-0.02667236328125,
0.04345703125,
-0.024749755859375,
-0.00445556640625,
-0.037139892578125,
-0.0062408447265625,
0.05499267578125,
0.039703369140625,
0.0059967041015625,
-0.00469970703125,
-0.024383544921875,
-0.040863037109375,
-0.033050537109375,
-0.0274810791015625,
-0.046234130859375,
0.0015897750854492188,
-0.031707763671875,
0.010589599609375,
0.006744384765625,
0.038970947265625,
-0.0092926025390625,
0.024383544921875,
-0.022064208984375,
-0.01739501953125,
-0.0189056396484375,
0.06317138671875,
0.015594482421875,
0.0010862350463867188,
0.014739990234375,
0.01593017578125,
-0.0209503173828125,
0.009368896484375,
0.01218414306640625,
-0.024444580078125,
-0.021881103515625,
-0.0131683349609375,
-0.01210784912109375,
-0.00012576580047607422,
0.027069091796875,
-0.0006666183471679688,
0.029205322265625,
-0.0186767578125,
0.0013799667358398438,
-0.0338134765625,
0.01197052001953125,
-0.0241546630859375,
0.005496978759765625,
0.01433563232421875,
-0.0168914794921875,
0.00876617431640625,
-0.0136871337890625,
0.0576171875,
-0.039581298828125,
-0.0272674560546875,
-0.02587890625,
-0.0005593299865722656,
-0.04443359375,
0.0307464599609375,
0.1219482421875,
0.01641845703125,
0.0767822265625,
0.01076507568359375,
0.01617431640625,
0.059600830078125,
-0.025665283203125,
0.0692138671875,
0.033660888671875,
0.0635986328125,
-0.017059326171875,
0.007404327392578125,
0.02984619140625,
-0.02032470703125,
0.004108428955078125,
-0.020538330078125,
0.02923583984375,
0.006313323974609375,
0.0197601318359375,
0.0163726806640625,
-0.02471923828125,
0.02471923828125,
0.0210723876953125,
0.0160064697265625,
0.005584716796875,
-0.030731201171875,
-0.0163726806640625,
-0.0296478271484375,
-0.004611968994140625,
0.0106658935546875,
0.01114654541015625,
0.0167694091796875,
-0.010406494140625,
-0.005970001220703125,
-0.01904296875,
-0.035919189453125,
0.0176239013671875,
0.006961822509765625,
-0.05047607421875,
0.019622802734375,
0.01493072509765625,
0.000027418136596679688,
-0.0264434814453125,
0.06866455078125,
-0.014984130859375,
0.027984619140625,
0.00524139404296875,
0.030181884765625,
0.0350341796875,
0.0163421630859375,
0.01885986328125,
-0.021942138671875,
0.006458282470703125,
-0.024078369140625,
0.00595855712890625,
-0.031524658203125,
0.051025390625,
0.033843994140625,
-0.06817626953125,
0.033416748046875,
-0.004238128662109375,
-0.03314208984375,
-0.01059722900390625,
-0.02593994140625,
0.086669921875,
-0.045135498046875,
-0.014617919921875,
-0.0015840530395507812,
-0.0316162109375,
0.011566162109375,
-0.0006208419799804688,
0.04510498046875,
-0.057647705078125,
-0.007640838623046875,
0.0231781005859375,
0.0002772808074951172,
-0.02459716796875,
0.0023212432861328125,
-0.0235137939453125,
0.054473876953125,
-0.013092041015625,
-0.035888671875,
-0.0174102783203125,
0.046173095703125,
0.0196685791015625,
0.034088134765625,
-0.03948974609375,
0.053314208984375,
-0.002933502197265625,
0.0176544189453125,
-0.03717041015625,
0.0086822509765625,
0.001087188720703125,
-0.00528717041015625,
-0.05859375,
-0.0164642333984375,
-0.00017201900482177734,
0.02020263671875,
0.0229034423828125,
0.0019817352294921875,
0.002552032470703125,
0.01227569580078125,
0.0260467529296875,
-0.042083740234375,
0.0595703125,
-0.0255889892578125,
0.03692626953125,
-0.057891845703125,
0.07318115234375,
0.01425933837890625,
-0.0028057098388671875,
0.0021209716796875,
0.00010710954666137695,
0.0262298583984375,
-0.0269775390625,
-0.0008549690246582031,
0.00875091552734375,
-0.0228729248046875,
0.01506805419921875,
0.0233917236328125,
0.027313232421875,
-0.00809478759765625,
-0.014312744140625,
-0.0177764892578125,
0.038726806640625,
-0.0006008148193359375,
0.0197296142578125,
0.06854248046875,
0.01934814453125,
0.0190887451171875,
0.00921630859375,
0.00836181640625,
-0.0186920166015625,
0.03466796875,
0.0762939453125,
0.020050048828125,
0.0284881591796875,
-0.03973388671875,
0.0108184814453125,
0.06097412109375,
0.11151123046875,
-0.0526123046875,
-0.0296173095703125,
-0.00624847412109375,
0.0118255615234375,
0.03411865234375,
0.01090240478515625,
0.07159423828125,
-0.03515625,
-0.0055084228515625,
-0.0128631591796875,
0.006328582763671875,
0.0044708251953125,
-0.01544189453125,
-0.00655364990234375,
0.032623291015625,
-0.01116943359375,
0.0325927734375,
-0.02264404296875,
0.0020751953125,
0.00658416748046875,
0.035064697265625,
0.0018033981323242188,
0.059326171875,
-0.0053558349609375,
-0.002811431884765625,
-0.004833221435546875,
0.0140533447265625,
0.0125732421875,
-0.0127716064453125,
0.00392913818359375,
-0.005764007568359375,
0.0026340484619140625,
0.017852783203125,
0.02789306640625,
0.07977294921875,
0.037933349609375,
0.036376953125,
0.06201171875,
0.0257110595703125,
0.05926513671875,
-0.01009368896484375,
-0.004486083984375,
-0.004779815673828125,
-0.01451873779296875,
-0.0077362060546875,
-0.0150604248046875,
-0.0168304443359375,
0.00748443603515625,
0.0177001953125,
0.01459503173828125,
0.0286102294921875,
0.0019626617431640625,
-0.0113677978515625,
-0.0103607177734375,
-0.0228729248046875,
0.0343017578125,
0.022613525390625,
-0.08905029296875,
-0.003139495849609375,
-0.0020999908447265625,
-0.080078125,
0.03143310546875,
0.050140380859375,
-0.0211944580078125,
0.00811004638671875,
-0.007732391357421875,
0.03753662109375,
0.003253936767578125,
-0.0224761962890625,
-0.03533935546875,
-0.0178985595703125,
0.05255126953125,
-0.006092071533203125,
-0.0679931640625,
-0.037811279296875,
-0.0201263427734375,
0.0364990234375,
0.01348114013671875,
0.055511474609375,
-0.0046539306640625,
0.0261688232421875,
-0.04107666015625,
0.0180206298828125,
-0.01280975341796875,
-0.0380859375,
0.036163330078125,
0.0445556640625,
0.013641357421875,
-0.020172119140625,
-0.0174407958984375,
0.03118896484375,
0.0570068359375,
-0.02008056640625,
0.0079498291015625,
0.0247650146484375,
0.013580322265625,
-0.048736572265625,
0.04046630859375,
-0.01053619384765625,
-0.0057830810546875,
-0.021392822265625,
-0.0259857177734375,
0.0478515625,
0.0295562744140625,
0.0107269287109375,
0.00608062744140625,
0.045166015625,
-0.03656005859375,
0.025115966796875,
0.0041046142578125,
0.02435302734375,
0.041473388671875,
0.03167724609375,
-0.0215301513671875,
-0.016265869140625,
-0.007434844970703125,
-0.01174163818359375,
0.02752685546875,
-0.04168701171875,
0.007160186767578125,
-0.032562255859375,
0.06768798828125,
0.06842041015625,
0.051116943359375,
-0.0280914306640625,
0.034576416015625,
0.06915283203125,
-0.010406494140625,
0.0245819091796875,
-0.06768798828125,
-0.0309600830078125,
-0.07696533203125,
-0.00421905517578125,
0.04095458984375,
-0.055816650390625,
-0.017120361328125,
-0.06884765625,
0.00027823448181152344,
0.0265045166015625,
0.003170013427734375,
-0.025360107421875,
0.002445220947265625,
-0.0200042724609375,
0.041534423828125,
-0.01171112060546875,
-0.013427734375,
0.0123748779296875,
0.0269622802734375,
-0.0274200439453125,
-0.0031642913818359375,
-0.0203399658203125,
0.0100860595703125,
-0.0048980712890625,
0.037200927734375,
0.044647216796875,
-0.03271484375,
-0.0230865478515625,
0.00849151611328125,
0.01898193359375,
0.05548095703125,
-0.019805908203125,
-0.05438232421875,
-0.0224609375,
0.01312255859375,
0.03839111328125,
-0.0301513671875,
-0.0120086669921875,
-0.035400390625,
0.0063934326171875,
0.0498046875,
-0.038909912109375,
-0.00899505615234375,
-0.04522705078125,
-0.0894775390625,
0.006046295166015625,
0.0181427001953125,
-0.0576171875,
-0.0014238357543945312,
-0.01557159423828125,
-0.00371551513671875,
0.0153656005859375,
0.0062408447265625,
-0.01349639892578125,
-0.0269622802734375,
-0.005092620849609375,
0.003936767578125,
0.050201416015625,
-0.013824462890625,
0.0181121826171875,
-0.0262451171875,
0.037384033203125,
0.0208282470703125,
0.00200653076171875,
-0.00396728515625,
-0.0157928466796875,
0.02874755859375,
0.0418701171875,
-0.039276123046875,
-0.022735595703125,
0.006847381591796875,
0.025634765625,
-0.01285552978515625,
-0.0275726318359375,
-0.01256561279296875,
-0.012786865234375,
0.0209197998046875,
0.016510009765625,
-0.00843048095703125,
-0.0118408203125,
-0.01287078857421875,
-0.015869140625,
-0.0231781005859375,
0.0170440673828125,
0.03338623046875,
-0.07568359375,
-0.005687713623046875,
0.0313720703125,
-0.005817413330078125,
-0.012115478515625,
0.017333984375,
-0.0181884765625,
-0.0013341903686523438,
0.01371002197265625,
-0.0209503173828125,
-0.018951416015625,
-0.036712646484375,
0.05206298828125,
-0.0257720947265625,
0.0290679931640625,
-0.005084991455078125,
0.026519775390625,
0.0362548828125,
0.01035308837890625,
-0.045074462890625,
0.035675048828125,
-0.019134521484375,
0.007793426513671875,
-0.00428009033203125,
0.053131103515625,
-0.019317626953125,
0.038909912109375,
-0.021270751953125,
0.01800537109375,
0.0303192138671875,
0.028717041015625,
-0.056671142578125,
0.023193359375,
0.026031494140625,
-0.0005850791931152344,
0.015228271484375,
-0.031646728515625,
-0.0033702850341796875,
0.0303955078125,
-0.0193328857421875,
-0.0247650146484375,
0.0094451904296875,
-0.068115234375,
0.00408935546875,
-0.02337646484375,
-0.008148193359375,
-0.0718994140625,
0.040008544921875,
0.043426513671875,
-0.0270233154296875,
0.04400634765625
]
|
9725117383f56b3ac5c306eab4bc490b0184adc6 | Wordpress Stackexchange
Q: How to filter or search the posts using postmeta tables custom meta fields with wordpress REST API I'm new to wordpress and also working with WP REST API for mobile application development for the wordpress website. Here I want get data's filter & search based post meta custom fields.
I've tried for this example but getting all results not belongs property_featured=1
Kindly find my postmeta table structure for example.
meta id post id meta key meta value
---------------------------------------------
2548 1000 property_featured
3068 1078 property_featured 1
3619 1124 property_featured 1
Here i want to get the post based on property_featured=1 only. Pls help to me fix on this.
A: You will need to add custom query vars:
add_filter('rest_query_vars', 'wpse225850_add_rest_query_vars');
function wpse225850_add_rest_query_vars($query_vars) {
$query_vars = array_merge( $query_vars, array('meta_key', 'meta_value', 'meta_compare') );
return $query_vars;
}
Now, get your posts at example.com/wp-json/wp/v2/posts?filter[meta_key]=property_featured&filter[meta_value]=1.
You can follow this ticket for more info.
| Q: How to filter or search the posts using postmeta tables custom meta fields with wordpress REST API I'm new to wordpress and also working with WP REST API for mobile application development for the wordpress website. Here I want get data's filter & search based post meta custom fields.
I've tried for this example but getting all results not belongs property_featured=1
Kindly find my postmeta table structure for example.
meta id post id meta key meta value
---------------------------------------------
2548 1000 property_featured
3068 1078 property_featured 1
3619 1124 property_featured 1
Here i want to get the post based on property_featured=1 only. Pls help to me fix on this.
A: You will need to add custom query vars:
add_filter('rest_query_vars', 'wpse225850_add_rest_query_vars');
function wpse225850_add_rest_query_vars($query_vars) {
$query_vars = array_merge( $query_vars, array('meta_key', 'meta_value', 'meta_compare') );
return $query_vars;
}
Now, get your posts at example.com/wp-json/wp/v2/posts?filter[meta_key]=property_featured&filter[meta_value]=1.
You can follow this ticket for more info.
| wordpress | {
"language": "en",
"length": 147,
"provenance": "stackexchange_00019.jsonl.gz:465252",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/225850"
} | [
0.0008425712585449219,
-0.020843505859375,
0.0076446533203125,
0.0205230712890625,
-0.0123291015625,
-0.0147857666015625,
0.03619384765625,
-0.0191497802734375,
0.032562255859375,
0.0268707275390625,
-0.0153045654296875,
-0.0279388427734375,
0.0025997161865234375,
-0.033905029296875,
-0.0246734619140625,
-0.0265350341796875,
0.02655029296875,
0.0155792236328125,
0.01493072509765625,
-0.0058135986328125,
0.0096893310546875,
0.00925445556640625,
-0.0201416015625,
0.0202484130859375,
0.03643798828125,
-0.0288848876953125,
0.033966064453125,
-0.0249786376953125,
0.0220184326171875,
-0.0020694732666015625,
0.0136566162109375,
-0.01517486572265625,
0.0113372802734375,
-0.006526947021484375,
0.0290985107421875,
-0.01273345947265625,
0.040252685546875,
0.0029010772705078125,
0.005397796630859375,
0.0007600784301757812,
0.0360107421875,
-0.023773193359375,
-0.056610107421875,
0.0111541748046875,
-0.039031982421875,
-0.018310546875,
0.029083251953125,
-0.01922607421875,
0.003772735595703125,
0.0264434814453125,
-0.03179931640625,
0.0185089111328125,
-0.0200653076171875,
-0.01519775390625,
-0.002796173095703125,
-0.05322265625,
0.058502197265625,
-0.07489013671875,
0.044097900390625,
-0.0474853515625,
-0.03656005859375,
-0.041534423828125,
0.04779052734375,
0.0033740997314453125,
-0.002117156982421875,
-0.005672454833984375,
0.0197296142578125,
0.00583648681640625,
0.005695343017578125,
0.0000426173210144043,
0.0119171142578125,
-0.009246826171875,
0.0137481689453125,
0.003570556640625,
-0.0241546630859375,
-0.03143310546875,
0.007778167724609375,
-0.03204345703125,
0.0111083984375,
0.0175933837890625,
0.031768798828125,
-0.0133514404296875,
-0.012939453125,
0.0004992485046386719,
-0.01507568359375,
0.0016336441040039062,
-0.00841522216796875,
-0.00437164306640625,
-0.038970947265625,
-0.043243408203125,
-0.01157379150390625,
-0.09197998046875,
-0.120361328125,
0.037872314453125,
0.050750732421875,
-0.050811767578125,
0.002986907958984375,
0.006412506103515625,
-0.018798828125,
0.01428985595703125,
0.00797271728515625,
-0.036224365234375,
0.0267486572265625,
-0.023895263671875,
0.0211944580078125,
0.027069091796875,
-0.02813720703125,
-0.0091705322265625,
0.0460205078125,
0.038299560546875,
0.014312744140625,
0.0200347900390625,
0.018951416015625,
0.0265655517578125,
-0.07391357421875,
-0.027557373046875,
0.0017175674438476562,
-0.054656982421875,
-0.026885986328125,
-0.046783447265625,
-0.004680633544921875,
-0.01213836669921875,
0.0482177734375,
0.0029811859130859375,
0.024322509765625,
0.0246734619140625,
-0.047637939453125,
-0.010986328125,
-0.0567626953125,
0.06304931640625,
-0.0021190643310546875,
0.00485992431640625,
0.0036220550537109375,
0.0029296875,
-0.045074462890625,
-0.0223388671875,
0.033172607421875,
-0.01654052734375,
-0.00632476806640625,
0.00775146484375,
0.006984710693359375,
-0.01024627685546875,
0.00885772705078125,
-0.006557464599609375,
-0.03240966796875,
0.0084381103515625,
0.027008056640625,
0.011260986328125,
-0.0111846923828125,
-0.0457763671875,
-0.030914306640625,
0.0307464599609375,
0.0222015380859375,
0.0221099853515625,
0.0010166168212890625,
-0.00688934326171875,
0.059722900390625,
-0.03497314453125,
-0.0238037109375,
-0.058319091796875,
0.01812744140625,
-0.00650787353515625,
-0.0132293701171875,
0.016754150390625,
-0.01788330078125,
-0.00724029541015625,
0.0192718505859375,
-0.0027942657470703125,
0.015625,
0.05902099609375,
-0.00229644775390625,
-0.0169677734375,
-0.01342010498046875,
-0.0012063980102539062,
-0.0135955810546875,
-0.0006594657897949219,
0.01111602783203125,
-0.016082763671875,
0.04510498046875,
-0.005718231201171875,
-0.0275421142578125,
-0.01470947265625,
0.07000732421875,
-0.01508331298828125,
-0.0550537109375,
0.06817626953125,
0.00904083251953125,
0.0506591796875,
-0.0025501251220703125,
0.0036602020263671875,
0.053741455078125,
0.0283966064453125,
-0.009796142578125,
0.02301025390625,
0.0030517578125,
-0.041534423828125,
0.01038360595703125,
-0.01502227783203125,
-0.0002636909484863281,
0.00832366943359375,
-0.006282806396484375,
-0.010009765625,
0.043731689453125,
-0.01522064208984375,
-0.0104522705078125,
0.0034332275390625,
-0.0198974609375,
0.031585693359375,
-0.03607177734375,
0.0135345458984375,
0.030670166015625,
-0.01108551025390625,
-0.04443359375,
0.055999755859375,
0.01898193359375,
-0.007415771484375,
0.0300750732421875,
0.01253509521484375,
0.009552001953125,
-0.00384521484375,
0.0265655517578125,
-0.0104217529296875,
-0.01300048828125,
0.042205810546875,
0.04498291015625,
-0.0036220550537109375,
-0.00927734375,
-0.01064300537109375,
0.078857421875,
-0.0009775161743164062,
0.03472900390625,
0.01418304443359375,
0.03717041015625,
0.00383758544921875,
-0.036773681640625,
0.009185791015625,
0.0091094970703125,
-0.031463623046875,
-0.0039215087890625,
0.044464111328125,
0.0253143310546875,
0.027191162109375,
0.003345489501953125,
0.0247650146484375,
0.053436279296875,
-0.04022216796875,
-0.010711669921875,
0.01044464111328125,
0.0278167724609375,
0.042724609375,
-0.05828857421875,
-0.01203155517578125,
0.021453857421875,
-0.09674072265625,
0.01140594482421875,
0.056365966796875,
-0.0173492431640625,
0.013336181640625,
-0.0261383056640625,
-0.005496978759765625,
-0.0024318695068359375,
-0.0335693359375,
-0.0291748046875,
-0.0119171142578125,
0.048187255859375,
0.0253143310546875,
0.062347412109375,
0.06854248046875,
-0.034820556640625,
0.0177001953125,
-0.0037288665771484375,
0.0445556640625,
-0.0014982223510742188,
0.01120758056640625,
-0.008697509765625,
0.0213775634765625,
-0.0203857421875,
-0.0009984970092773438,
0.0110626220703125,
0.00039839744567871094,
-0.00002771615982055664,
0.01318359375,
-0.057861328125,
-0.0004668235778808594,
0.006542205810546875,
-0.01776123046875,
-0.0117034912109375,
0.023345947265625,
0.0357666015625,
0.044525146484375,
0.03497314453125,
0.039642333984375,
0.0168914794921875,
0.0294952392578125,
0.008453369140625,
0.006168365478515625,
-0.00021338462829589844,
-0.028900146484375,
0.03515625,
-0.041015625,
0.00726318359375,
0.0430908203125,
-0.0175018310546875,
0.022216796875,
-0.0032253265380859375,
-0.006404876708984375,
-0.012847900390625,
0.0232086181640625,
-0.01372528076171875,
-0.039154052734375,
-0.0272216796875,
0.0012264251708984375,
0.03558349609375,
0.006195068359375,
0.04150390625,
-0.0117645263671875,
-0.0014677047729492188,
0.0277252197265625,
-0.09149169921875,
-0.11041259765625,
0.05560302734375,
-0.01020050048828125,
-0.025726318359375,
-0.03460693359375,
-0.0293731689453125,
0.0074615478515625,
-0.034210205078125,
-0.0263519287109375,
0.03240966796875,
0.00809478759765625,
-0.095703125,
0.0002758502960205078,
-0.06390380859375,
0.0086212158203125,
-0.01800537109375,
-0.0081024169921875,
0.0083160400390625,
0.06494140625,
0.01070404052734375,
-0.03759765625,
0.0251312255859375,
0.026947021484375,
-0.031036376953125,
0.01168060302734375,
-0.0286712646484375,
0.0207977294921875,
0.004180908203125,
-0.000016987323760986328,
0.032928466796875,
0.04400634765625,
-0.04473876953125,
0.01233673095703125,
-0.00521087646484375,
0.0098419189453125,
0.0159759521484375,
-0.004924774169921875,
-0.01224517822265625,
0.03179931640625,
0.0283050537109375,
-0.0135040283203125,
-0.0333251953125,
-0.0143890380859375,
-0.0438232421875,
-0.0274505615234375,
0.0269622802734375,
0.00885009765625,
-0.036529541015625,
0.0311431884765625,
0.01505279541015625,
-0.01024627685546875,
0.0026454925537109375,
-0.042236328125,
0.027984619140625,
0.008636474609375,
0.03668212890625,
-0.0078582763671875,
0.014984130859375,
-0.033355712890625,
0.01702880859375,
-0.00058746337890625,
-0.010040283203125,
-0.0189666748046875,
-0.0130615234375,
-0.03387451171875,
-0.0077972412109375,
0.07928466796875,
0.040802001953125,
0.04534912109375,
-0.0239715576171875,
-0.06317138671875,
-0.035064697265625,
0.0892333984375,
-0.033294677734375,
-0.01508331298828125,
0.0101776123046875,
-0.005527496337890625,
-0.0081939697265625,
0.0162353515625,
-0.05029296875,
0.0031452178955078125,
-0.06268310546875,
-0.004085540771484375,
-0.0250244140625,
-0.02362060546875,
-0.00864410400390625,
-0.00420379638671875,
-0.03778076171875,
-0.034912109375,
0.037689208984375,
-0.033477783203125,
0.02178955078125,
0.0015716552734375,
0.00978851318359375,
-0.01348114013671875,
0.00016880035400390625,
-0.0264739990234375,
-0.047576904296875,
-0.032745361328125,
0.01543426513671875,
0.0638427734375,
0.002239227294921875,
-0.01143646240234375,
-0.007724761962890625,
0.0413818359375,
0.01495361328125,
0.0226898193359375,
-0.009033203125,
-0.02471923828125,
0.0033740997314453125,
0.0312042236328125,
0.01293182373046875,
-0.00724029541015625,
-0.028564453125,
-0.02294921875,
-0.007221221923828125,
0.0142364501953125,
-0.01215362548828125,
0.006832122802734375,
0.00046515464782714844,
-0.00467681884765625,
-0.0225677490234375,
-0.003597259521484375,
0.01123809814453125,
0.01099395751953125,
-0.011199951171875,
-0.00946807861328125,
-0.001964569091796875,
-0.022247314453125,
0.039398193359375,
0.01001739501953125,
-0.0011854171752929688,
0.00547027587890625,
0.047607421875,
0.007595062255859375,
-0.03741455078125,
-0.054229736328125,
-0.0213623046875,
0.002834320068359375,
-0.00027489662170410156,
0.040496826171875,
0.00702667236328125,
0.002399444580078125,
0.047515869140625,
-0.00766754150390625,
-0.01151275634765625,
0.0119476318359375,
0.02545166015625,
0.0167236328125,
0.016693115234375,
-0.032379150390625,
0.0117340087890625,
-0.006053924560546875,
-0.003856658935546875,
-0.00450897216796875,
-0.016021728515625,
0.0281982421875,
0.0389404296875,
-0.0282440185546875,
0.0157470703125,
-0.0195465087890625,
0.004047393798828125,
0.002712249755859375,
0.004093170166015625,
0.043212890625,
0.0054931640625,
0.00421905517578125,
-0.005191802978515625,
0.01137542724609375,
0.030975341796875,
-0.0090484619140625,
0.036590576171875,
-0.035675048828125,
0.054931640625,
-0.0236358642578125,
-0.00225830078125,
-0.0223388671875,
-0.00293731689453125,
0.01078033447265625,
-0.047515869140625,
-0.0732421875,
-0.00946807861328125,
-0.01027679443359375,
0.0274200439453125,
0.06756591796875,
-0.025360107421875,
0.02838134765625,
0.0946044921875,
-0.021697998046875,
-0.0025787353515625,
0.0018377304077148438,
0.045684814453125,
-0.0452880859375,
0.035003662109375,
-0.00020575523376464844,
0.0164794921875,
-0.04583740234375,
0.132568359375,
-0.033355712890625,
0.06982421875,
-0.0141143798828125,
0.031707763671875,
0.019195556640625,
0.04180908203125,
-0.005207061767578125,
-0.01232147216796875,
-0.00021791458129882812,
0.048797607421875,
0.005886077880859375,
0.0013132095336914062,
-0.0010366439819335938,
-0.00799560546875,
0.00699615478515625,
-0.029205322265625,
-0.00583648681640625,
0.046051025390625,
-0.0187225341796875,
-0.0160980224609375,
-0.0084228515625,
-0.0254974365234375,
-0.00006794929504394531,
-0.036712646484375,
-0.017608642578125,
0.035888671875,
0.0276031494140625,
0.01116180419921875,
-0.0203399658203125,
0.00708770751953125,
0.047515869140625,
-0.053802490234375,
0.03570556640625,
-0.001903533935546875,
-0.017547607421875,
0.0009031295776367188,
-0.011474609375,
-0.0214691162109375,
-0.040313720703125,
-0.0276336669921875,
-0.01161956787109375,
-0.0024890899658203125,
0.045196533203125,
-0.018035888671875,
0.045440673828125,
-0.014068603515625,
-0.024688720703125,
-0.00153350830078125,
0.0125579833984375,
0.023681640625,
0.00634002685546875,
-0.007480621337890625,
-0.0259857177734375,
-0.033233642578125,
-0.033203125,
0.0545654296875,
0.037353515625,
-0.0137786865234375,
-0.006072998046875,
-0.013580322265625,
0.0247039794921875,
0.0012845993041992188,
0.007602691650390625,
-0.029815673828125,
-0.0160675048828125,
0.001140594482421875,
0.0191802978515625,
-0.0287628173828125,
0.09368896484375,
-0.032989501953125,
0.056671142578125,
0.00325775146484375,
0.0479736328125,
-0.02288818359375,
-0.01361083984375,
0.01837158203125,
-0.07940673828125,
-0.035888671875,
0.00531005859375,
-0.0709228515625,
0.0216217041015625,
0.0206756591796875,
-0.01287078857421875,
0.01273345947265625,
0.0013484954833984375,
-0.001415252685546875,
-0.0234222412109375,
-0.03680419921875,
0.0021820068359375,
0.022552490234375,
-0.008514404296875,
0.00865936279296875,
0.01271820068359375,
-0.0292205810546875,
-0.029876708984375,
0.004047393798828125,
0.0145111083984375,
0.0048828125,
0.00969696044921875,
-0.00872039794921875,
0.0182952880859375,
0.075927734375,
0.026123046875,
0.051116943359375,
0.014556884765625,
0.0134429931640625,
0.01021575927734375,
-0.029388427734375,
0.01446533203125,
0.0264434814453125,
0.06817626953125,
-0.01016998291015625,
-0.0203094482421875,
0.068115234375,
-0.036956787109375,
0.0092010498046875,
0.0010175704956054688,
0.0169525146484375,
-0.036712646484375,
0.0047607421875,
-0.007030487060546875,
-0.0063018798828125,
0.025634765625,
0.051361083984375,
-0.0235595703125,
-0.03875732421875,
-0.051422119140625,
0.0180511474609375,
-0.004878997802734375,
-0.0018835067749023438,
0.037109375,
-0.01158905029296875,
-0.0243377685546875,
0.0097808837890625,
-0.015289306640625,
0.01462554931640625,
-0.0288848876953125,
-0.009368896484375,
-0.01126861572265625,
0.019287109375,
0.0147552490234375,
-0.0020351409912109375,
-0.0462646484375,
-0.08087158203125,
-0.024566650390625,
-0.015777587890625,
-0.06866455078125,
0.020294189453125,
0.0309295654296875,
0.057861328125,
0.0261688232421875,
0.0301666259765625,
-0.01342010498046875,
0.0027866363525390625,
-0.00026226043701171875,
-0.006256103515625,
-0.04278564453125,
-0.026519775390625,
0.038177490234375,
-0.0013608932495117188,
0.02313232421875,
0.026702880859375,
-0.0302886962890625,
-0.006694793701171875,
-0.051788330078125,
0.05694580078125,
-0.0156402587890625,
-0.01812744140625,
0.0112457275390625,
-0.007213592529296875,
-0.0026035308837890625,
0.0251007080078125,
0.0435791015625,
-0.0298614501953125,
-0.016815185546875,
0.021484375,
-0.03375244140625,
-0.031280517578125,
0.0230712890625,
-0.043304443359375,
0.039398193359375,
0.008941650390625,
-0.0266571044921875,
-0.0195770263671875,
0.034515380859375,
-0.0009984970092773438,
0.01049041748046875,
-0.0421142578125,
0.07305908203125,
-0.02093505859375,
0.057342529296875,
-0.05706787109375,
0.00550079345703125,
0.0238494873046875,
0.02850341796875,
0.08660888671875,
0.0206298828125,
-0.0572509765625,
-0.042633056640625,
0.01497650146484375,
0.01544189453125,
-0.0245208740234375,
0.0606689453125,
-0.0018682479858398438,
0.11065673828125,
0.054595947265625,
-0.10162353515625,
-0.0018901824951171875,
0.004009246826171875,
-0.0162506103515625,
0.032745361328125,
0.024688720703125,
0.04400634765625,
-0.0220947265625,
0.002933502197265625,
0.030487060546875,
-0.02459716796875,
0.006427764892578125,
-0.05242919921875,
-0.0125885009765625,
0.0244598388671875,
0.0257720947265625,
-0.0229949951171875,
-0.0208282470703125,
-0.0203857421875,
0.0280914306640625,
0.0209503173828125,
0.047332763671875,
0.0474853515625,
0.0340576171875,
0.002155303955078125,
-0.0007805824279785156,
0.033843994140625,
0.0208282470703125,
-0.051025390625,
0.06317138671875,
0.00228118896484375,
0.01377105712890625,
-0.0277862548828125,
0.049468994140625,
-0.00006681680679321289,
0.0499267578125,
-0.055694580078125,
-0.03289794921875,
0.0284576416015625,
0.00839996337890625,
-0.032073974609375,
0.01552581787109375,
-0.01702880859375,
0.01007843017578125,
0.0675048828125,
-0.04656982421875,
0.005382537841796875,
0.0085906982421875,
0.01537322998046875,
-0.00670623779296875,
0.0131072998046875,
-0.02215576171875,
-0.0024738311767578125,
-0.05645751953125,
0.004657745361328125,
0.039947509765625,
0.06298828125,
0.0058135986328125,
0.06689453125,
-0.011077880859375,
-0.02459716796875,
-0.036529541015625,
0.00514984130859375,
0.047027587890625,
0.01020050048828125,
-0.021392822265625,
0.0144805908203125,
0.0194549560546875,
0.036651611328125,
0.043853759765625,
0.0220794677734375,
0.0478515625,
0.0018644332885742188,
-0.035736083984375,
0.000965118408203125,
0.03076171875,
-0.0282135009765625,
-0.0242462158203125,
-0.048095703125,
0.00433349609375,
-0.00582122802734375,
0.00045228004455566406,
0.02734375,
0.015289306640625,
-0.0179443359375,
0.0197601318359375,
0.01251220703125,
0.015625,
-0.0009446144104003906,
0.0003046989440917969,
0.0124053955078125,
0.01837158203125,
0.026214599609375,
-0.0516357421875,
0.020477294921875,
-0.055694580078125,
-0.0604248046875,
0.0172119140625,
0.0302734375,
-0.01824951171875,
0.0136871337890625,
-0.0222015380859375,
-0.043548583984375,
0.0115203857421875,
0.0145111083984375,
0.0171966552734375,
0.03875732421875,
0.00445556640625,
-0.002994537353515625,
-0.027313232421875,
-0.0042266845703125,
0.00323486328125,
-0.0035724639892578125,
0.0026035308837890625,
0.0848388671875,
-0.024200439453125,
0.0036220550537109375,
-0.06365966796875,
0.016357421875,
-0.037872314453125,
-0.0207977294921875,
-0.00325775146484375,
0.0070037841796875,
-0.0135040283203125,
0.0017862319946289062,
0.0168609619140625,
-0.031890869140625,
0.07879638671875,
-0.056793212890625,
-0.00428009033203125,
-0.0032501220703125,
0.0209197998046875,
-0.0762939453125,
0.00110626220703125,
-0.043121337890625,
-0.004962921142578125,
-0.033355712890625,
-0.04351806640625,
0.0249786376953125,
0.006511688232421875,
0.0482177734375,
-0.01016998291015625,
0.03753662109375,
-0.0216522216796875,
0.0400390625,
0.00844573974609375,
0.10369873046875,
0.051116943359375,
-0.04296875,
0.045623779296875,
0.0255584716796875,
-0.0153656005859375,
0.02587890625,
0.01666259765625,
-0.00920867919921875,
0.0226287841796875,
-0.0216064453125,
-0.01166534423828125,
0.0191802978515625,
0.050933837890625,
0.0030803680419921875,
0.015380859375,
-0.0027523040771484375,
-0.01377105712890625,
-0.023651123046875,
0.024993896484375,
-0.01418304443359375,
-0.0276947021484375,
0.0003654956817626953,
0.00801849365234375,
0.006908416748046875,
-0.0063018798828125,
-0.00714111328125,
-0.00023293495178222656,
0.023101806640625,
0.0021762847900390625,
-0.03375244140625,
0.03466796875,
-0.036468505859375,
-0.00882720947265625,
0.002193450927734375,
-0.021392822265625,
-0.004638671875,
0.0201416015625,
-0.016387939453125,
-0.006687164306640625,
-0.0305633544921875,
-0.00749969482421875,
-0.0097503662109375,
-0.0011348724365234375,
0.00469207763671875,
-0.0025691986083984375,
-0.00254058837890625,
0.006465911865234375,
0.004974365234375,
0.045867919921875,
0.00249481201171875,
-0.017486572265625,
-0.004238128662109375,
0.01580810546875,
-0.037994384765625,
-0.061614990234375,
0.034820556640625,
-0.078369140625,
-0.0137786865234375,
-0.0018415451049804688,
0.0292205810546875,
0.04315185546875,
-0.03155517578125,
-0.1212158203125,
0.06866455078125,
-0.043212890625,
-0.04046630859375,
-0.06158447265625,
-0.047210693359375,
0.006687164306640625,
0.00974273681640625,
-0.01285552978515625,
-0.05572509765625,
-0.08038330078125,
0.04412841796875,
0.0168609619140625,
0.0106201171875,
0.02545166015625,
0.012115478515625,
-0.052947998046875,
-0.004302978515625,
-0.0253753662109375,
0.0008573532104492188,
-0.0191650390625,
0.023406982421875,
0.01506805419921875,
0.0163421630859375,
-0.04058837890625,
0.01473236083984375,
-0.00823974609375,
-0.002223968505859375,
-0.0111236572265625,
-0.0364990234375,
-0.031463623046875,
-0.02435302734375,
0.08575439453125,
0.0267333984375,
0.0138092041015625,
-0.02392578125,
0.005889892578125,
-0.036163330078125,
0.0081329345703125,
-0.04254150390625,
-0.005298614501953125,
-0.046356201171875,
-0.034027099609375,
0.0005965232849121094,
0.018463134765625,
0.0302581787109375,
-0.054534912109375,
0.009124755859375,
-0.021270751953125,
0.0036869049072265625,
0.012176513671875,
-0.03399658203125,
0.020965576171875,
0.004543304443359375,
-0.0313720703125,
-0.0238037109375,
0.007228851318359375,
-0.0147705078125,
-0.0203704833984375,
0.0244293212890625,
-0.0164947509765625,
-0.00927734375,
0.00027108192443847656,
0.0000776052474975586,
0.0200042724609375,
-0.01168060302734375,
0.0263519287109375,
-0.0010194778442382812,
-0.0263824462890625,
0.006771087646484375,
0.03094482421875,
0.007511138916015625,
-0.032135009765625,
-0.004283905029296875,
-0.00020956993103027344,
0.01334381103515625,
0.0011749267578125,
0.03033447265625,
-0.0154266357421875,
0.054473876953125,
0.00689697265625,
-0.03887939453125,
0.04144287109375,
-0.01226043701171875,
-0.007091522216796875,
0.0004878044128417969,
-0.0281524658203125,
-0.046905517578125,
-0.00302886962890625,
0.0306243896484375,
-0.00904083251953125,
0.0186614990234375
]
|
1c92f1ddde456ee0dbf5787329d41e66f73ff58f | Wordpress Stackexchange
Q: how to sanitize checkbox input? I've added meta box: checkbox on admin edit screen
<input type="checkbox" name="changeposition" />
So how could we sanitize the input came from the checkbox as we do for input type text by sanitize_text_field(). Is there any function like this for checkbox sanitization or should we create custom method for it?
A: Be sure to set the value in your markup. You should have.
<input type="checkbox" name="changeposition" value="yes" />
Then, I'd suggest using sanitize_key() to sanitize.
Keys are used as internal identifiers. Lowercase alphanumeric
characters, dashes and underscores are allowed.
Think of the word yes, as a key. That's what you're expecting is a lowercase alphanumeric value.
See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox
If the value attribute was omitted, the submitted data would be given a default value of on, so the submitted data in that case would be subscribe=on.
| Q: how to sanitize checkbox input? I've added meta box: checkbox on admin edit screen
<input type="checkbox" name="changeposition" />
So how could we sanitize the input came from the checkbox as we do for input type text by sanitize_text_field(). Is there any function like this for checkbox sanitization or should we create custom method for it?
A: Be sure to set the value in your markup. You should have.
<input type="checkbox" name="changeposition" value="yes" />
Then, I'd suggest using sanitize_key() to sanitize.
Keys are used as internal identifiers. Lowercase alphanumeric
characters, dashes and underscores are allowed.
Think of the word yes, as a key. That's what you're expecting is a lowercase alphanumeric value.
See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox
If the value attribute was omitted, the submitted data would be given a default value of on, so the submitted data in that case would be subscribe=on.
A: I would suggest the filter_var() function in PHP.
It has some predefined filters thats you can use.
To sanitize a number:
$sanitizedCheckbox = filter_var( $yourVar, FILTER_SANITIZE_NUMBER_INT );
For a string you would just change _NUM_INT to _STRING.
| wordpress | {
"language": "en",
"length": 180,
"provenance": "stackexchange_00019.jsonl.gz:465295",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226044"
} | [
0.04608154296875,
0.031890869140625,
-0.007293701171875,
-0.0540771484375,
0.0283050537109375,
-0.0080718994140625,
-0.0223236083984375,
-0.042999267578125,
0.0177459716796875,
0.0714111328125,
0.0197296142578125,
-0.032379150390625,
0.02313232421875,
-0.0282745361328125,
-0.0777587890625,
-0.0032100677490234375,
0.0004203319549560547,
-0.0190887451171875,
0.007678985595703125,
-0.0254974365234375,
0.010040283203125,
-0.032501220703125,
0.0137481689453125,
-0.08050537109375,
0.022003173828125,
-0.06927490234375,
0.036712646484375,
0.0029506683349609375,
0.0009164810180664062,
-0.01247406005859375,
0.0288238525390625,
0.01219940185546875,
0.0181884765625,
0.036834716796875,
-0.0277099609375,
0.07275390625,
-0.012542724609375,
0.03070068359375,
0.0011396408081054688,
0.030059814453125,
0.045867919921875,
-0.03717041015625,
0.019378662109375,
0.01364898681640625,
-0.00894927978515625,
-0.03082275390625,
0.0516357421875,
-0.0267791748046875,
0.0164794921875,
-0.0159912109375,
-0.003265380859375,
0.0171051025390625,
0.03253173828125,
-0.0941162109375,
-0.01422882080078125,
-0.031402587890625,
-0.037445068359375,
-0.049163818359375,
0.0088653564453125,
0.114501953125,
0.036773681640625,
-0.0126495361328125,
-0.032989501953125,
-0.088134765625,
0.0080108642578125,
-0.005626678466796875,
-0.0098419189453125,
0.0026721954345703125,
-0.043060302734375,
0.021636962890625,
0.060089111328125,
-0.03826904296875,
0.020111083984375,
-0.045196533203125,
0.0059814453125,
0.005672454833984375,
-0.023345947265625,
-0.0174102783203125,
0.02716064453125,
-0.0144805908203125,
0.022186279296875,
0.0026092529296875,
-0.01361846923828125,
-0.0081634521484375,
0.0188751220703125,
0.00585174560546875,
-0.0016269683837890625,
-0.00989532470703125,
0.02276611328125,
-0.0640869140625,
0.0018339157104492188,
-0.021697998046875,
0.00299072265625,
-0.0202178955078125,
-0.034912109375,
-0.056549072265625,
0.022430419921875,
0.04150390625,
-0.007740020751953125,
0.004863739013671875,
0.002117156982421875,
-0.0282135009765625,
0.00415802001953125,
-0.0171356201171875,
0.00040459632873535156,
0.0035037994384765625,
-0.007526397705078125,
0.021942138671875,
0.02886962890625,
0.028472900390625,
-0.01340484619140625,
-0.001216888427734375,
-0.018035888671875,
0.0014514923095703125,
-0.027679443359375,
0.022674560546875,
-0.0128326416015625,
-0.004085540771484375,
-0.0182037353515625,
0.0038814544677734375,
0.0189361572265625,
0.0257110595703125,
-0.0222320556640625,
-0.01290130615234375,
-0.0263519287109375,
-0.037933349609375,
-0.00972747802734375,
-0.0035991668701171875,
-0.05303955078125,
0.0235137939453125,
-0.06976318359375,
0.01288604736328125,
0.1229248046875,
0.05706787109375,
0.04229736328125,
-0.036102294921875,
0.026275634765625,
-0.008636474609375,
0.00255584716796875,
0.0122222900390625,
-0.01151275634765625,
0.00003916025161743164,
0.034576416015625,
-0.01715087890625,
0.027587890625,
0.056793212890625,
0.024505615234375,
-0.0286712646484375,
-0.0127716064453125,
-0.048431396484375,
0.00691986083984375,
-0.07421875,
0.055419921875,
0.0108642578125,
-0.06231689453125,
-0.024078369140625,
-0.01457977294921875,
-0.031951904296875,
-0.0159912109375,
-0.054168701171875,
0.02764892578125,
0.0125885009765625,
0.042266845703125,
-0.01172637939453125,
-0.0106048583984375,
-0.02972412109375,
-0.046783447265625,
-0.0145416259765625,
0.0105743408203125,
-0.0195770263671875,
0.060821533203125,
0.0499267578125,
-0.0479736328125,
-0.0290985107421875,
0.0203399658203125,
-0.041748046875,
-0.01172637939453125,
0.03790283203125,
-0.0076446533203125,
0.00069427490234375,
-0.00025773048400878906,
-0.052764892578125,
-0.009552001953125,
0.0136260986328125,
-0.0501708984375,
0.0203094482421875,
-0.016693115234375,
0.0023021697998046875,
0.02923583984375,
-0.011566162109375,
0.0634765625,
0.021514892578125,
-0.0384521484375,
0.02764892578125,
-0.006084442138671875,
0.0108489990234375,
-0.0253143310546875,
0.0165863037109375,
-0.0161285400390625,
-0.0213775634765625,
0.03253173828125,
-0.0274505615234375,
0.0179443359375,
-0.016204833984375,
0.008880615234375,
-0.0252838134765625,
-0.00891876220703125,
-0.0003323554992675781,
0.0011644363403320312,
0.0216064453125,
0.00937652587890625,
-0.022735595703125,
-0.02142333984375,
0.006267547607421875,
-0.0083770751953125,
0.005199432373046875,
0.003734588623046875,
0.0208282470703125,
-0.005001068115234375,
0.026702880859375,
0.0008306503295898438,
-0.050384521484375,
-0.017425537109375,
0.001312255859375,
-0.0136260986328125,
0.004779815673828125,
-0.010223388671875,
0.00124359130859375,
0.01285552978515625,
-0.01012420654296875,
0.0416259765625,
0.043182373046875,
0.03045654296875,
0.0006794929504394531,
-0.0012292861938476562,
-0.0014562606811523438,
0.018585205078125,
-0.1038818359375,
-0.0018749237060546875,
0.056884765625,
0.0117645263671875,
0.035400390625,
-0.0145416259765625,
0.035919189453125,
0.06744384765625,
-0.03692626953125,
-0.02484130859375,
0.02764892578125,
0.001110076904296875,
0.0121307373046875,
-0.04510498046875,
-0.0252685546875,
0.0251617431640625,
-0.0732421875,
-0.01108551025390625,
0.03240966796875,
-0.06365966796875,
-0.048370361328125,
0.02410888671875,
-0.01428985595703125,
-0.00002771615982055664,
-0.052093505859375,
0.009185791015625,
-0.038726806640625,
0.06927490234375,
-0.044189453125,
0.005542755126953125,
-0.00128173828125,
0.003360748291015625,
-0.006824493408203125,
0.00897979736328125,
-0.10504150390625,
-0.002101898193359375,
0.0226287841796875,
0.021392822265625,
-0.005977630615234375,
-0.038238525390625,
0.0017347335815429688,
0.0238494873046875,
0.00543212890625,
-0.01013946533203125,
0.0008950233459472656,
0.00238800048828125,
-0.01366424560546875,
0.016448974609375,
-0.0182647705078125,
0.02557373046875,
-0.00943756103515625,
-0.0125274658203125,
0.0008373260498046875,
0.025146484375,
-0.0009260177612304688,
0.0072174072265625,
-0.0158843994140625,
0.033050537109375,
-0.0211334228515625,
0.053253173828125,
0.0173797607421875,
0.0098876953125,
-0.00939178466796875,
0.033477783203125,
0.0374755859375,
-0.01708984375,
0.0102386474609375,
0.0020465850830078125,
0.00432586669921875,
0.00795745849609375,
0.00949859619140625,
-0.0070648193359375,
-0.01496124267578125,
-0.048736572265625,
-0.03570556640625,
0.01035308837890625,
0.00811004638671875,
-0.0012044906616210938,
-0.0156097412109375,
-0.0112152099609375,
0.02197265625,
-0.0445556640625,
-0.024688720703125,
-0.012786865234375,
0.00843048095703125,
-0.0230865478515625,
0.034393310546875,
0.005146026611328125,
-0.0016431808471679688,
0.0253448486328125,
-0.00836944580078125,
0.0139312744140625,
0.0007801055908203125,
-0.02508544921875,
0.01605224609375,
-0.0156707763671875,
0.026123046875,
-0.0104522705078125,
-0.00738525390625,
0.01070404052734375,
0.053192138671875,
-0.00022149085998535156,
-0.04119873046875,
0.0029125213623046875,
-0.001007080078125,
0.00208282470703125,
0.03216552734375,
0.00965118408203125,
-0.060272216796875,
0.033050537109375,
-0.0010128021240234375,
-0.0147247314453125,
0.0039825439453125,
0.0207672119140625,
-0.01215362548828125,
0.01544952392578125,
-0.0211334228515625,
0.0167083740234375,
0.01042938232421875,
-0.01568603515625,
-0.004673004150390625,
0.0160064697265625,
-0.039154052734375,
-0.01507568359375,
0.0258636474609375,
0.01154327392578125,
-0.058013916015625,
-0.0648193359375,
-0.0016698837280273438,
-0.0235137939453125,
0.0491943359375,
0.04815673828125,
0.0204620361328125,
0.0167236328125,
0.0093841552734375,
-0.025909423828125,
0.0034198760986328125,
0.0268096923828125,
-0.044708251953125,
-0.032806396484375,
-0.03875732421875,
0.04345703125,
-0.0274505615234375,
-0.0138702392578125,
-0.032135009765625,
0.0609130859375,
-0.004230499267578125,
-0.0557861328125,
0.056732177734375,
-0.031097412109375,
0.03204345703125,
-0.047515869140625,
-0.0294189453125,
-0.0032100677490234375,
0.106689453125,
-0.015289306640625,
-0.01837158203125,
-0.0123291015625,
0.0160369873046875,
-0.02203369140625,
-0.0462646484375,
-0.01192474365234375,
-0.00836944580078125,
-0.10784912109375,
0.00270843505859375,
0.0013294219970703125,
-0.05810546875,
0.024200439453125,
-0.05120849609375,
-0.043609619140625,
-0.05523681640625,
0.02459716796875,
-0.021392822265625,
0.005954742431640625,
0.0167999267578125,
0.0218048095703125,
-0.0250701904296875,
-0.00325775146484375,
-0.03570556640625,
-0.0023479461669921875,
-0.027099609375,
0.00844573974609375,
0.048065185546875,
0.0200347900390625,
-0.023651123046875,
0.0039005279541015625,
0.052886962890625,
-0.038970947265625,
-0.01953125,
0.014312744140625,
0.047332763671875,
-0.015869140625,
0.01132965087890625,
-0.0031871795654296875,
-0.025970458984375,
-0.0212554931640625,
0.0116424560546875,
-0.01384735107421875,
0.0021820068359375,
-0.00725555419921875,
-0.059783935546875,
0.041656494140625,
-0.036834716796875,
-0.0040740966796875,
-0.04852294921875,
-0.0430908203125,
0.0010652542114257812,
-0.0256805419921875,
0.00308990478515625,
-0.056793212890625,
-0.029876708984375,
0.03424072265625,
-0.0499267578125,
0.0000934600830078125,
0.0060882568359375,
0.07122802734375,
0.0179595947265625,
0.0008902549743652344,
0.0010824203491210938,
-0.041015625,
0.01200103759765625,
0.00542449951171875,
0.0001386404037475586,
-0.0084686279296875,
-0.027496337890625,
0.026763916015625,
-0.011749267578125,
-0.00435638427734375,
-0.0003933906555175781,
0.0294036865234375,
0.0105133056640625,
-0.0068206787109375,
-0.01947021484375,
-0.00811767578125,
0.01050567626953125,
0.0139007568359375,
0.0072021484375,
0.00742340087890625,
-0.01641845703125,
-0.0113372802734375,
-0.004467010498046875,
-0.0001544952392578125,
0.013671875,
-0.0303497314453125,
0.006343841552734375,
-0.034454345703125,
0.048309326171875,
0.0389404296875,
-0.0017404556274414062,
0.02691650390625,
0.00925445556640625,
-0.0199737548828125,
-0.05535888671875,
-0.050994873046875,
-0.01021575927734375,
0.00693511962890625,
-0.0357666015625,
-0.0107574462890625,
-0.01142120361328125,
-0.0058441162109375,
0.038116455078125,
-0.01422119140625,
-0.0217132568359375,
-0.044586181640625,
-0.018218994140625,
0.0230712890625,
0.0174560546875,
0.0071258544921875,
-0.0113677978515625,
-0.001674652099609375,
0.005558013916015625,
0.0144500732421875,
0.01236724853515625,
0.01605224609375,
-0.012115478515625,
0.0180206298828125,
0.044342041015625,
-0.022613525390625,
0.01325225830078125,
0.0416259765625,
0.0390625,
-0.0046234130859375,
-0.0216827392578125,
0.0180511474609375,
0.0244293212890625,
-0.002658843994140625,
0.02471923828125,
0.0113067626953125,
0.00814056396484375,
-0.03851318359375,
-0.01366424560546875,
0.00012564659118652344,
-0.0394287109375,
0.005863189697265625,
-0.005008697509765625,
-0.01015472412109375,
0.0311126708984375,
0.0011739730834960938,
0.00595855712890625,
-0.0143280029296875,
0.004550933837890625,
-0.04705810546875,
-0.054901123046875,
-0.0175933837890625,
-0.054779052734375,
-0.00567626953125,
-0.0187225341796875,
-0.00811767578125,
-0.003917694091796875,
-0.0660400390625,
-0.0036067962646484375,
0.033203125,
-0.0016546249389648438,
-0.022918701171875,
-0.0345458984375,
-0.0146636962890625,
-0.0194854736328125,
-0.0511474609375,
-0.0194244384765625,
-0.031341552734375,
0.0175933837890625,
-0.0186614990234375,
0.0306243896484375,
-0.01132965087890625,
0.04962158203125,
-0.037109375,
0.004669189453125,
0.0124664306640625,
0.016021728515625,
0.01357269287109375,
-0.01336669921875,
0.0064849853515625,
-0.0268402099609375,
-0.04864501953125,
-0.0198516845703125,
-0.0467529296875,
-0.02996826171875,
-0.0129241943359375,
0.005268096923828125,
-0.00995635986328125,
0.0435791015625,
-0.051055908203125,
-0.037078857421875,
0.0167999267578125,
-0.011962890625,
-0.01287841796875,
0.0626220703125,
-0.042236328125,
0.0352783203125,
-0.0065460205078125,
0.00949859619140625,
-0.038787841796875,
-0.015655517578125,
0.0254974365234375,
0.00818634033203125,
-0.006866455078125,
-0.047576904296875,
0.0002913475036621094,
-0.0172271728515625,
0.0290985107421875,
0.03216552734375,
0.0369873046875,
-0.0017652511596679688,
0.072998046875,
-0.006511688232421875,
0.020751953125,
-0.006687164306640625,
-0.0364990234375,
-0.058929443359375,
0.0379638671875,
0.0255889892578125,
-0.02227783203125,
-0.0284271240234375,
0.00913238525390625,
-0.005645751953125,
-0.00676727294921875,
0.0075531005859375,
-0.025482177734375,
0.0159759521484375,
-0.017730712890625,
0.0076751708984375,
0.062744140625,
0.01617431640625,
0.048431396484375,
0.01549530029296875,
0.033935546875,
0.035369873046875,
0.0304412841796875,
-0.02435302734375,
-0.0035152435302734375,
0.049041748046875,
0.0159912109375,
-0.0079345703125,
0.0274505615234375,
-0.01165771484375,
0.03363037109375,
0.084228515625,
0.09039306640625,
-0.11981201171875,
0.023193359375,
0.035888671875,
-0.024078369140625,
-0.0024967193603515625,
0.0002872943878173828,
-0.01108551025390625,
-0.05810546875,
-0.004825592041015625,
-0.0117340087890625,
-0.041015625,
-0.03057861328125,
-0.014892578125,
-0.01543426513671875,
-0.024169921875,
0.058624267578125,
0.01082611083984375,
-0.01202392578125,
-0.006931304931640625,
0.0003306865692138672,
-0.01299285888671875,
-0.010040283203125,
0.0138702392578125,
0.00830841064453125,
-0.0423583984375,
-0.0650634765625,
-0.0205078125,
0.0227203369140625,
-0.040313720703125,
-0.0592041015625,
0.0071258544921875,
0.04803466796875,
0.031341552734375,
-0.0014019012451171875,
-0.040435791015625,
0.00827789306640625,
0.0290069580078125,
0.0181884765625,
-0.0469970703125,
-0.0227203369140625,
0.0206146240234375,
-0.0171966552734375,
0.0114898681640625,
0.005970001220703125,
-0.01399993896484375,
0.0007491111755371094,
0.06439208984375,
0.064208984375,
0.003173828125,
-0.036529541015625,
0.037353515625,
-0.005336761474609375,
-0.0178375244140625,
-0.0107269287109375,
0.004222869873046875,
-0.0374755859375,
-0.0199737548828125,
0.0028285980224609375,
-0.0308837890625,
0.0289459228515625,
0.01080322265625,
-0.05963134765625,
0.0472412109375,
0.045684814453125,
0.0014467239379882812,
-0.01910400390625,
0.0287017822265625,
-0.041046142578125,
-0.02020263671875,
-0.015899658203125,
0.02838134765625,
-0.0270843505859375,
0.04345703125,
-0.06927490234375,
-0.02130126953125,
0.002391815185546875,
0.055877685546875,
-0.0305633544921875,
-0.016082763671875,
0.005626678466796875,
0.0013027191162109375,
0.0301666259765625,
0.03131103515625,
0.01345062255859375,
-0.0011701583862304688,
0.00815582275390625,
0.0433349609375,
0.050445556640625,
-0.036956787109375,
0.0169830322265625,
-0.01288604736328125,
-0.0065155029296875,
0.03875732421875,
0.0061798095703125,
-0.01253509521484375,
-0.00518798828125,
-0.0038700103759765625,
-0.036163330078125,
0.00998687744140625,
0.0139312744140625,
0.0219879150390625,
0.00286865234375,
0.01081085205078125,
0.01442718505859375,
-0.002105712890625,
-0.005970001220703125,
-0.0103759765625,
0.03436279296875,
0.012420654296875,
0.0701904296875,
0.0489501953125,
0.0278778076171875,
0.06585693359375,
0.018707275390625,
0.036651611328125,
0.01312255859375,
-0.00720977783203125,
0.005741119384765625,
-0.00582122802734375,
0.00937652587890625,
-0.01959228515625,
0.021514892578125,
0.049102783203125,
0.01146697998046875,
-0.030548095703125,
-0.0137481689453125,
0.007701873779296875,
0.0283966064453125,
0.017120361328125,
-0.01551055908203125,
0.043212890625,
-0.045013427734375,
-0.01194000244140625,
0.004604339599609375,
0.0273590087890625,
0.054962158203125,
-0.019927978515625,
0.0279541015625,
0.07354736328125,
-0.06463623046875,
0.05322265625,
-0.04559326171875,
-0.00237274169921875,
0.00504302978515625,
0.027008056640625,
0.02874755859375,
0.002826690673828125,
0.055938720703125,
-0.00783538818359375,
-0.0233612060546875,
0.0184783935546875,
0.052734375,
0.0007772445678710938,
0.01276397705078125,
0.041412353515625,
0.034637451171875,
-0.016326904296875,
0.0225372314453125,
0.03704833984375,
0.045501708984375,
0.0287017822265625,
-0.0233306884765625,
-0.000705718994140625,
0.06640625,
-0.0234375,
-0.006046295166015625,
-0.0164947509765625,
0.016510009765625,
0.0482177734375,
0.0015153884887695312,
-0.0234222412109375,
0.007305145263671875,
0.06268310546875,
-0.00414276123046875,
0.0306854248046875,
0.002017974853515625,
-0.01410675048828125,
-0.0013742446899414062,
-0.0325927734375,
0.006916046142578125,
0.01090240478515625,
0.0088958740234375,
-0.0015344619750976562,
-0.005527496337890625,
-0.02874755859375,
0.0122833251953125,
0.0235443115234375,
-0.0250701904296875,
0.041046142578125,
0.0307769775390625,
-0.037353515625,
0.0167999267578125,
0.05059814453125,
0.0008287429809570312,
0.0135498046875,
0.0247650146484375,
-0.01427459716796875,
0.000843048095703125,
0.0066986083984375,
0.047088623046875,
0.0060577392578125,
-0.05419921875,
0.0161590576171875,
-0.00713348388671875,
-0.015350341796875,
-0.044525146484375,
-0.00244140625,
-0.0426025390625,
-0.024688720703125,
0.05126953125,
0.001590728759765625,
-0.0435791015625,
0.0049285888671875,
0.03094482421875,
0.051727294921875,
0.021240234375,
-0.0435791015625,
0.048004150390625,
-0.00707244873046875,
-0.00388336181640625,
-0.05853271484375,
0.041107177734375,
-0.0021953582763671875,
-0.05023193359375,
-0.0230865478515625,
0.0179595947265625,
0.0231475830078125,
0.08343505859375,
-0.0285186767578125,
0.0305328369140625,
-0.0123138427734375,
0.020263671875,
0.01690673828125,
-0.0207366943359375,
0.019744873046875,
0.02130126953125,
-0.05999755859375,
-0.0024280548095703125,
-0.01654052734375,
-0.01666259765625,
-0.003368377685546875,
0.0184783935546875,
-0.032012939453125,
-0.0038318634033203125,
0.0308380126953125,
-0.01367950439453125,
0.0284576416015625,
0.028839111328125,
0.0265655517578125,
0.00439453125,
0.0130767822265625,
-0.020721435546875,
-0.060546875,
0.00734710693359375,
-0.00691986083984375,
-0.0066375732421875,
-0.01342010498046875,
0.006717681884765625,
0.02490234375,
-0.041748046875,
0.016357421875,
0.030120849609375,
0.0137481689453125,
-0.0220184326171875,
-0.006008148193359375,
-0.01245880126953125,
-0.0199432373046875,
0.07080078125,
-0.0135498046875,
0.038177490234375,
-0.0291595458984375,
0.0166778564453125,
-0.056854248046875,
-0.024688720703125,
-0.04034423828125,
0.021209716796875,
-0.035064697265625,
0.009674072265625,
0.006786346435546875,
-0.008087158203125,
-0.0078277587890625,
0.01270294189453125,
0.015716552734375,
0.048583984375,
0.021820068359375,
-0.0082550048828125,
0.031646728515625,
0.0230712890625,
-0.015625,
-0.15380859375,
-0.037506103515625,
-0.067626953125,
0.076416015625,
0.00617218017578125,
-0.008148193359375,
0.01568603515625,
-0.032440185546875,
-0.07806396484375,
0.02276611328125,
0.00749969482421875,
-0.044464111328125,
-0.00601959228515625,
0.00530242919921875,
0.0228729248046875,
0.020111083984375,
-0.0028133392333984375,
0.01436614990234375,
-0.04339599609375,
-0.0279541015625,
-0.0210723876953125,
0.0204925537109375,
0.01629638671875,
-0.01409912109375,
-0.04083251953125,
-0.024017333984375,
-0.0283660888671875,
-0.0278472900390625,
0.006420135498046875,
-0.045501708984375,
0.02093505859375,
0.013519287109375,
-0.06939697265625,
-0.06512451171875,
0.006519317626953125,
0.03424072265625,
0.01959228515625,
-0.0052642822265625,
-0.028961181640625,
-0.009246826171875,
0.0248260498046875,
0.0216217041015625,
0.00794219970703125,
-0.0386962890625,
-0.005504608154296875,
-0.058837890625,
0.01800537109375,
-0.035003662109375,
-0.01438140869140625,
-0.04302978515625,
-0.00809478759765625,
0.0010061264038085938,
-0.0153045654296875,
-0.01551055908203125,
0.01157379150390625,
-0.01016998291015625,
-0.0004949569702148438,
0.017547607421875,
-0.031494140625,
0.041351318359375,
-0.019012451171875,
0.04901123046875,
-0.05224609375,
-0.037506103515625,
0.018218994140625,
0.0210723876953125,
-0.00135040283203125,
0.00397491455078125,
0.0228729248046875,
0.0159149169921875,
-0.042572021484375,
-0.0167388916015625,
0.015380859375,
0.0210723876953125,
-0.01458740234375,
-0.0312042236328125,
-0.003917694091796875,
-0.0017375946044921875,
0.0061187744140625,
0.0035552978515625,
-0.014129638671875,
0.005016326904296875,
-0.0197906494140625,
0.0301361083984375,
-0.01079559326171875,
-0.0207672119140625,
-0.0228729248046875,
0.06597900390625,
0.0309600830078125,
-0.040313720703125,
0.078857421875,
-0.058441162109375,
0.0196685791015625,
-0.03759765625,
-0.006885528564453125,
-0.031890869140625,
0.0110015869140625,
-0.04638671875,
-0.03399658203125,
0.0287017822265625
]
|
37e8c22c1d3f559bef2f5e46994aa7715f508a24 | Wordpress Stackexchange
Q: I have a CPT that have menu_order enabled, how can I make the menu_order values unique so it won't have duplicates I have a CPT named homeslider. I have menu_order page-attribute enabled, how can I make the menu_order values unique so it won't have duplicates when assigning values to it?
A: You can interfere with save_post action then change menu_order to post_ID:
add_action('save_post', function($post_id, $post, $update) {
if ($post->menu_order === $post_id) {
return $post_id;
} else {
global $wpdb;
$q = "UPDATE $wpdb->posts SET menu_order=%d WHERE ID=%d";
$wpdb->query( $wpdb->prepare($q, [$post_id, $post_id]) );
return $post_id;
}
}, 9, 3);
| Q: I have a CPT that have menu_order enabled, how can I make the menu_order values unique so it won't have duplicates I have a CPT named homeslider. I have menu_order page-attribute enabled, how can I make the menu_order values unique so it won't have duplicates when assigning values to it?
A: You can interfere with save_post action then change menu_order to post_ID:
add_action('save_post', function($post_id, $post, $update) {
if ($post->menu_order === $post_id) {
return $post_id;
} else {
global $wpdb;
$q = "UPDATE $wpdb->posts SET menu_order=%d WHERE ID=%d";
$wpdb->query( $wpdb->prepare($q, [$post_id, $post_id]) );
return $post_id;
}
}, 9, 3);
| wordpress | {
"language": "en",
"length": 99,
"provenance": "stackexchange_00019.jsonl.gz:465297",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226051"
} | [
0.0972900390625,
0.046356201171875,
0.03228759765625,
-0.02630615234375,
0.0692138671875,
-0.03192138671875,
0.0977783203125,
-0.072998046875,
0.010009765625,
0.0249176025390625,
-0.0105438232421875,
0.0263824462890625,
-0.0179595947265625,
-0.0172119140625,
-0.0025768280029296875,
-0.0123443603515625,
0.0005083084106445312,
0.031524658203125,
0.032318115234375,
-0.00203704833984375,
0.0225677490234375,
0.0120697021484375,
-0.0290374755859375,
0.033050537109375,
0.051605224609375,
-0.0423583984375,
-0.009490966796875,
0.01053619384765625,
0.03936767578125,
0.0172119140625,
0.028228759765625,
-0.0223846435546875,
0.02642822265625,
-0.0172576904296875,
-0.003265380859375,
0.00829315185546875,
0.01299285888671875,
-0.0015821456909179688,
-0.01444244384765625,
0.042755126953125,
0.0127105712890625,
0.002956390380859375,
-0.00479888916015625,
0.01267242431640625,
-0.0276336669921875,
-0.045684814453125,
0.03717041015625,
0.0161590576171875,
0.001239776611328125,
0.004486083984375,
-0.00786590576171875,
-0.0146484375,
-0.00983428955078125,
0.0237274169921875,
-0.01605224609375,
-0.01319122314453125,
-0.012359619140625,
-0.052642822265625,
0.00940704345703125,
0.0740966796875,
0.029052734375,
0.0018949508666992188,
-0.002841949462890625,
-0.056884765625,
0.0095977783203125,
0.0141143798828125,
0.06268310546875,
0.01035308837890625,
-0.0523681640625,
-0.00226593017578125,
0.037261962890625,
-0.02008056640625,
0.0033359527587890625,
-0.005401611328125,
0.003002166748046875,
-0.0230255126953125,
-0.02764892578125,
-0.03509521484375,
0.038055419921875,
0.00878143310546875,
0.048736572265625,
-0.01290130615234375,
-0.026947021484375,
0.0121002197265625,
-0.001617431640625,
0.03192138671875,
-0.00014019012451171875,
-0.028656005859375,
-0.019683837890625,
-0.0113677978515625,
-0.03167724609375,
-0.016693115234375,
0.0037631988525390625,
0.008087158203125,
-0.0295867919921875,
-0.007659912109375,
0.03076171875,
0.08392333984375,
-0.048431396484375,
0.00902557373046875,
-0.0208587646484375,
-0.028656005859375,
0.028533935546875,
-0.06048583984375,
0.004669189453125,
0.00916290283203125,
0.0380859375,
-0.020233154296875,
-0.0025577545166015625,
-0.002819061279296875,
-0.042572021484375,
0.0312042236328125,
-0.011260986328125,
-0.046722412109375,
-0.01036834716796875,
0.0201263427734375,
-0.03277587890625,
0.024505615234375,
0.0172119140625,
0.01187896728515625,
-0.01497650146484375,
0.021514892578125,
0.018035888671875,
-0.001934051513671875,
0.0215911865234375,
0.02313232421875,
-0.008880615234375,
-0.046722412109375,
-0.0345458984375,
0.0184478759765625,
-0.057586669921875,
0.01397705078125,
0.10064697265625,
0.044036865234375,
0.028228759765625,
-0.0302734375,
-0.0029430389404296875,
-0.03460693359375,
-0.031494140625,
0.0310211181640625,
-0.00591278076171875,
-0.032745361328125,
-0.0010938644409179688,
-0.0305938720703125,
-0.0105133056640625,
0.0298309326171875,
0.00748443603515625,
-0.0193939208984375,
0.005153656005859375,
-0.0023860931396484375,
-0.059722900390625,
-0.0221099853515625,
0.0191650390625,
0.0171051025390625,
-0.07403564453125,
0.00493621826171875,
-0.0237579345703125,
0.00748443603515625,
-0.00872802734375,
-0.031829833984375,
-0.0287933349609375,
-0.0193634033203125,
0.0012302398681640625,
-0.06121826171875,
-0.045654296875,
-0.006267547607421875,
0.003696441650390625,
0.0148773193359375,
0.0311737060546875,
0.06488037109375,
-0.031494140625,
-0.02862548828125,
0.01445770263671875,
0.0172882080078125,
-0.0207366943359375,
0.035552978515625,
0.013092041015625,
-0.0228729248046875,
0.0257415771484375,
0.01195526123046875,
-0.0212860107421875,
-0.0274658203125,
0.020233154296875,
-0.01090240478515625,
-0.0777587890625,
0.063720703125,
-0.0284423828125,
0.078369140625,
0.05859375,
0.007781982421875,
0.031890869140625,
-0.0183563232421875,
0.0006537437438964844,
0.0124969482421875,
-0.01483917236328125,
-0.0236663818359375,
-0.0325927734375,
0.0128173828125,
-0.0140380859375,
-0.01267242431640625,
-0.03240966796875,
0.005771636962890625,
-0.0205230712890625,
-0.0008306503295898438,
-0.046722412109375,
-0.004940032958984375,
-0.016448974609375,
0.037261962890625,
-0.00926971435546875,
0.02020263671875,
0.01690673828125,
-0.002590179443359375,
-0.023529052734375,
-0.006542205810546875,
-0.005870819091796875,
0.0179443359375,
-0.02935791015625,
0.0159454345703125,
-0.03363037109375,
0.0249481201171875,
-0.046478271484375,
-0.039337158203125,
-0.028167724609375,
0.00681304931640625,
0.00429534912109375,
-0.01103973388671875,
-0.029815673828125,
-0.00707244873046875,
0.0032939910888671875,
-0.0059814453125,
0.01126861572265625,
0.025115966796875,
0.031768798828125,
0.02435302734375,
-0.0194549560546875,
0.003826141357421875,
-0.004169464111328125,
-0.0885009765625,
-0.0048828125,
0.05413818359375,
0.0272064208984375,
-0.01192474365234375,
-0.036590576171875,
-0.01424407958984375,
-0.00013744831085205078,
-0.01654052734375,
0.01123809814453125,
-0.007709503173828125,
0.0137786865234375,
0.048248291015625,
0.01343536376953125,
-0.0031757354736328125,
0.0198516845703125,
-0.00785064697265625,
0.006923675537109375,
0.03741455078125,
-0.0160980224609375,
0.059478759765625,
-0.00009745359420776367,
-0.0165557861328125,
-0.0347900390625,
0.034576416015625,
0.058868408203125,
-0.01045989990234375,
0.0261993408203125,
-0.0041351318359375,
0.023468017578125,
0.00968170166015625,
-0.0119476318359375,
0.00384521484375,
0.011749267578125,
-0.0216217041015625,
-0.00463104248046875,
-0.00875091552734375,
-0.00792694091796875,
-0.009857177734375,
-0.00597381591796875,
0.007602691650390625,
-0.007328033447265625,
-0.01166534423828125,
-0.026092529296875,
-0.0125579833984375,
-0.0199737548828125,
-0.005657196044921875,
0.0014162063598632812,
-0.062103271484375,
0.020538330078125,
0.01129150390625,
-0.0606689453125,
-0.0089263916015625,
0.0212554931640625,
0.0237274169921875,
-0.01947021484375,
0.0120697021484375,
-0.0482177734375,
0.005413055419921875,
0.0029201507568359375,
0.0139923095703125,
-0.0157470703125,
0.003398895263671875,
0.055267333984375,
0.0537109375,
0.01512908935546875,
-0.00864410400390625,
0.0029125213623046875,
0.011810302734375,
0.00243377685546875,
0.01152801513671875,
-0.0019054412841796875,
0.0080108642578125,
-0.02606201171875,
0.049774169921875,
0.036590576171875,
0.049102783203125,
0.0260772705078125,
-0.0202178955078125,
0.007526397705078125,
0.0386962890625,
-0.05340576171875,
-0.1033935546875,
-0.0170440673828125,
-0.01122283935546875,
0.06707763671875,
0.0246429443359375,
0.01367950439453125,
-0.045501708984375,
0.045745849609375,
0.038482666015625,
-0.003902435302734375,
0.01482391357421875,
-0.0300140380859375,
-0.007720947265625,
-0.0175628662109375,
0.000919342041015625,
-0.017425537109375,
-0.0058746337890625,
-0.004329681396484375,
0.04571533203125,
0.0036907196044921875,
-0.01654052734375,
0.030731201171875,
-0.05743408203125,
-0.0009512901306152344,
0.034454345703125,
0.02093505859375,
-0.035797119140625,
0.00502777099609375,
0.007167816162109375,
0.0152130126953125,
0.017791748046875,
-0.005283355712890625,
-0.0229034423828125,
0.0225067138671875,
0.02288818359375,
0.04638671875,
0.0285186767578125,
-0.034820556640625,
0.061767578125,
0.061767578125,
-0.0110015869140625,
-0.0362548828125,
-0.0300140380859375,
-0.051605224609375,
0.01387786865234375,
0.0175933837890625,
0.0266571044921875,
-0.04302978515625,
0.060028076171875,
0.01465606689453125,
0.0207366943359375,
0.022125244140625,
-0.000202178955078125,
0.0253448486328125,
-0.0131072998046875,
-0.01410675048828125,
-0.043182373046875,
0.036651611328125,
0.0160675048828125,
-0.0278167724609375,
-0.0022487640380859375,
0.007724761962890625,
-0.03271484375,
0.0185546875,
-0.06683349609375,
-0.047943115234375,
0.0266265869140625,
-0.0355224609375,
0.056610107421875,
-0.047393798828125,
-0.02642822265625,
0.004749298095703125,
0.11553955078125,
-0.056915283203125,
-0.03631591796875,
0.00004935264587402344,
0.0165252685546875,
0.030029296875,
-0.016265869140625,
0.003673553466796875,
-0.03350830078125,
-0.044097900390625,
0.0150909423828125,
-0.0105133056640625,
-0.015716552734375,
-0.016510009765625,
-0.0245819091796875,
-0.036834716796875,
-0.03143310546875,
0.0560302734375,
-0.0254669189453125,
0.0255126953125,
0.05181884765625,
0.0133819580078125,
0.0297698974609375,
-0.060333251953125,
-0.00870513916015625,
-0.062744140625,
-0.0147705078125,
-0.044921875,
0.06524658203125,
0.04388427734375,
-0.01348876953125,
-0.0011816024780273438,
0.03704833984375,
-0.0196075439453125,
0.018096923828125,
0.011077880859375,
0.04150390625,
0.001434326171875,
-0.04376220703125,
-0.0113525390625,
-0.04998779296875,
0.0252227783203125,
0.01739501953125,
-0.017120361328125,
0.02392578125,
-0.037750244140625,
0.0034389495849609375,
0.005878448486328125,
-0.037628173828125,
-0.08746337890625,
-0.058746337890625,
-0.046478271484375,
0.0183563232421875,
0.003467559814453125,
-0.022552490234375,
-0.056884765625,
-0.12042236328125,
-0.036376953125,
-0.042236328125,
-0.0301971435546875,
0.0299224853515625,
0.01503753662109375,
0.021636962890625,
0.0243072509765625,
0.006610870361328125,
-0.006855010986328125,
0.034759521484375,
0.0333251953125,
0.00989532470703125,
0.017547607421875,
-0.027923583984375,
0.01293182373046875,
0.02752685546875,
-0.00893402099609375,
-0.00547027587890625,
0.064208984375,
0.0005145072937011719,
-0.001758575439453125,
0.00742340087890625,
-0.020172119140625,
-0.0018329620361328125,
0.037811279296875,
-0.0102996826171875,
-0.032440185546875,
-0.013885498046875,
0.06231689453125,
-0.0018587112426757812,
0.00946044921875,
-0.05438232421875,
-0.02337646484375,
0.015350341796875,
-0.020660400390625,
0.03875732421875,
-0.007152557373046875,
0.01313018798828125,
0.016510009765625,
0.028900146484375,
-0.0098876953125,
0.02490234375,
0.055084228515625,
0.0128631591796875,
0.0257110595703125,
0.0221710205078125,
-0.01421356201171875,
-0.0235595703125,
-0.004398345947265625,
0.06298828125,
0.0026149749755859375,
-0.0279998779296875,
-0.017303466796875,
-0.016387939453125,
0.015869140625,
0.0147247314453125,
-0.0251922607421875,
0.0146636962890625,
0.008270263671875,
-0.018585205078125,
0.00289154052734375,
-0.0245819091796875,
-0.01837158203125,
-0.0226287841796875,
0.0195770263671875,
0.0269317626953125,
-0.010711669921875,
0.0262451171875,
0.0242919921875,
0.049041748046875,
0.0037517547607421875,
-0.0281829833984375,
0.0189056396484375,
0.04522705078125,
-0.0004754066467285156,
0.0012063980102539062,
0.01548004150390625,
-0.027374267578125,
0.0151214599609375,
0.0252685546875,
-0.0203704833984375,
0.01195526123046875,
0.0035037994384765625,
0.0045623779296875,
0.0187530517578125,
-0.01102447509765625,
0.027496337890625,
-0.01308441162109375,
-0.0036411285400390625,
0.01061248779296875,
-0.024871826171875,
-0.0355224609375,
-0.004474639892578125,
-0.00926971435546875,
-0.0017213821411132812,
-0.024871826171875,
-0.01067352294921875,
-0.0092926025390625,
-0.033294677734375,
0.0184173583984375,
-0.009246826171875,
-0.00852203369140625,
0.00165557861328125,
0.0033893585205078125,
-0.009765625,
0.00302886962890625,
0.002201080322265625,
-0.022003173828125,
-0.02410888671875,
-0.009918212890625,
-0.020751953125,
0.036407470703125,
-0.0245819091796875,
0.03277587890625,
-0.0165557861328125,
-0.0033855438232421875,
0.0011310577392578125,
0.0167694091796875,
0.0253448486328125,
0.0225982666015625,
0.0241241455078125,
-0.0150146484375,
-0.0438232421875,
-0.026824951171875,
0.046844482421875,
-0.00336456298828125,
0.00685882568359375,
-0.0250091552734375,
0.011260986328125,
0.0179290771484375,
0.0161895751953125,
0.000354766845703125,
-0.001983642578125,
-0.004619598388671875,
0.0009622573852539062,
0.02105712890625,
-0.042388916015625,
0.063720703125,
0.01018524169921875,
0.022064208984375,
-0.0265045166015625,
0.018646240234375,
0.0279541015625,
0.0006647109985351562,
0.015716552734375,
0.00635528564453125,
-0.024566650390625,
-0.03302001953125,
-0.00806427001953125,
-0.0098724365234375,
0.04547119140625,
-0.010101318359375,
0.08551025390625,
-0.0242156982421875,
0.01580810546875,
-0.0304718017578125,
-0.042266845703125,
-0.11114501953125,
0.009002685546875,
0.036407470703125,
-0.0235443115234375,
0.0214080810546875,
-0.00812530517578125,
-0.00640869140625,
0.025482177734375,
-0.0247802734375,
0.03900146484375,
0.01100921630859375,
-0.05340576171875,
0.027069091796875,
0.0623779296875,
0.07318115234375,
0.069580078125,
-0.00009930133819580078,
0.049774169921875,
0.007328033447265625,
-0.0201416015625,
0.0301971435546875,
0.0108184814453125,
0.032745361328125,
-0.03179931640625,
0.004253387451171875,
0.0053558349609375,
-0.0225982666015625,
0.0269012451171875,
0.0037937164306640625,
0.0675048828125,
-0.0267333984375,
0.0108184814453125,
0.030487060546875,
-0.01464080810546875,
0.01229095458984375,
0.026092529296875,
-0.00946044921875,
-0.01300811767578125,
0.022369384765625,
-0.050811767578125,
-0.00505828857421875,
0.0058746337890625,
-0.0192718505859375,
-0.01522064208984375,
0.0023212432861328125,
-0.0050506591796875,
-0.0055999755859375,
0.0240478515625,
-0.0384521484375,
-0.0225067138671875,
-0.0114593505859375,
-0.0302276611328125,
-0.042572021484375,
0.05035400390625,
-0.059417724609375,
-0.11285400390625,
-0.020538330078125,
-0.03607177734375,
-0.00966644287109375,
0.0153656005859375,
0.00919342041015625,
0.0132904052734375,
0.0266265869140625,
0.0106964111328125,
-0.0261383056640625,
-0.0200042724609375,
0.0092010498046875,
0.006076812744140625,
-0.03961181640625,
-0.005031585693359375,
0.0220947265625,
-0.0137176513671875,
0.01454925537109375,
0.01534271240234375,
-0.0281219482421875,
-0.0019130706787109375,
0.021759033203125,
0.07861328125,
-0.04327392578125,
-0.0198822021484375,
0.00045228004455566406,
0.059417724609375,
0.01708984375,
-0.002147674560546875,
0.053253173828125,
-0.063232421875,
-0.037811279296875,
0.03173828125,
-0.0165863037109375,
-0.0193328857421875,
0.01453399658203125,
-0.046630859375,
0.101318359375,
-0.027862548828125,
0.0028228759765625,
0.0087127685546875,
0.064208984375,
-0.01392364501953125,
0.050872802734375,
-0.02191162109375,
0.07696533203125,
-0.049560546875,
0.0511474609375,
-0.0841064453125,
-0.0164794921875,
0.01335906982421875,
0.06341552734375,
0.04498291015625,
0.0211029052734375,
-0.05078125,
0.0157623291015625,
0.041015625,
0.01751708984375,
-0.0044403076171875,
0.05914306640625,
-0.0220947265625,
0.0241851806640625,
0.0216827392578125,
-0.06402587890625,
0.007259368896484375,
-0.012298583984375,
-0.003261566162109375,
0.01015472412109375,
0.0025157928466796875,
-0.004547119140625,
-0.03497314453125,
-0.052032470703125,
-0.010009765625,
-0.0193634033203125,
-0.012664794921875,
0.0239715576171875,
0.0022525787353515625,
0.044219970703125,
0.026336669921875,
0.0070648193359375,
-0.0238494873046875,
-0.0092010498046875,
0.034759521484375,
0.00391387939453125,
0.0145721435546875,
0.0150299072265625,
0.003971099853515625,
0.01654052734375,
0.01445770263671875,
-0.008880615234375,
0.0214080810546875,
-0.003353118896484375,
0.0117340087890625,
0.053253173828125,
0.03057861328125,
0.0027637481689453125,
-0.0279693603515625,
0.00931549072265625,
0.017730712890625,
-0.01788330078125,
0.01480865478515625,
0.018402099609375,
0.025787353515625,
-0.005176544189453125,
-0.03173828125,
0.0301513671875,
-0.02435302734375,
-0.00836944580078125,
0.0142669677734375,
-0.01045989990234375,
0.002330780029296875,
0.0234832763671875,
0.0164337158203125,
0.031951904296875,
-0.0304412841796875,
-0.007595062255859375,
-0.057861328125,
0.04901123046875,
0.0550537109375,
0.059234619140625,
-0.0274658203125,
0.08782958984375,
0.0068359375,
-0.0146026611328125,
-0.01389312744140625,
0.020751953125,
0.004215240478515625,
0.021087646484375,
-0.042022705078125,
-0.04498291015625,
0.0281524658203125,
0.032379150390625,
0.0013380050659179688,
0.06158447265625,
0.052459716796875,
0.05548095703125,
-0.0165863037109375,
0.004985809326171875,
0.0755615234375,
-0.0300750732421875,
-0.051422119140625,
-0.023345947265625,
-0.0078887939453125,
0.0168914794921875,
0.00879669189453125,
0.0186767578125,
0.045989990234375,
-0.003345489501953125,
0.037200927734375,
0.0004305839538574219,
0.005519866943359375,
0.005352020263671875,
0.0057220458984375,
-0.00626373291015625,
-0.0028209686279296875,
0.05035400390625,
-0.045135498046875,
-0.01454925537109375,
-0.041748046875,
-0.0174560546875,
0.0296630859375,
0.043121337890625,
0.00948333740234375,
0.00449371337890625,
0.0293731689453125,
-0.0138397216796875,
-0.0175323486328125,
-0.01042938232421875,
0.03631591796875,
0.013824462890625,
-0.004116058349609375,
0.032745361328125,
-0.08673095703125,
-0.0297698974609375,
-0.0133056640625,
-0.01065826416015625,
0.00290679931640625,
0.0154266357421875,
0.059600830078125,
0.0233001708984375,
0.003910064697265625,
0.032470703125,
-0.02203369140625,
-0.01947021484375,
0.05218505859375,
0.006748199462890625,
0.0083770751953125,
-0.01288604736328125,
-0.022430419921875,
-0.03240966796875,
0.06707763671875,
-0.03411865234375,
-0.01751708984375,
-0.029296875,
0.040679931640625,
-0.01291656494140625,
0.06085205078125,
-0.00530242919921875,
0.0094146728515625,
-0.0027599334716796875,
-0.0113067626953125,
0.042083740234375,
0.06689453125,
0.045989990234375,
0.036895751953125,
-0.006256103515625,
-0.02001953125,
0.0247955322265625,
-0.0266265869140625,
0.0235137939453125,
0.024688720703125,
-0.0232086181640625,
0.0074462890625,
-0.01227569580078125,
-0.021484375,
0.034820556640625,
-0.0117950439453125,
-0.0030517578125,
0.00992584228515625,
-0.06512451171875,
0.017669677734375,
0.048797607421875,
0.0400390625,
-0.00711822509765625,
0.0210113525390625,
0.04180908203125,
-0.0238494873046875,
0.01139068603515625,
0.0257568359375,
-0.016326904296875,
0.0038509368896484375,
0.004180908203125,
0.0071868896484375,
0.01177215576171875,
-0.00333404541015625,
-0.053436279296875,
-0.01541900634765625,
0.047271728515625,
-0.0093994140625,
0.004161834716796875,
0.021881103515625,
-0.05072021484375,
-0.062408447265625,
0.01174163818359375,
-0.013275146484375,
-0.0018377304077148438,
0.024139404296875,
0.000732421875,
0.0012445449829101562,
-0.0294647216796875,
0.0238189697265625,
0.0095672607421875,
-0.01309967041015625,
0.0171356201171875,
-0.004550933837890625,
-0.0214691162109375,
-0.029937744140625,
0.00658416748046875,
0.0007162094116210938,
0.0176239013671875,
-0.00858306884765625,
-0.00554656982421875,
-0.0038700103759765625,
-0.0143585205078125,
-0.035247802734375,
0.02874755859375,
-0.0869140625,
-0.0428466796875,
-0.057830810546875,
0.0270843505859375,
0.00861358642578125,
-0.029449462890625,
-0.054595947265625,
0.049652099609375,
-0.0297088623046875,
-0.017486572265625,
0.01201629638671875,
-0.035247802734375,
-0.0501708984375,
0.03912353515625,
0.020172119140625,
-0.038909912109375,
0.0006222724914550781,
0.031707763671875,
-0.0119171142578125,
0.0692138671875,
0.0139007568359375,
-0.00481414794921875,
-0.02935791015625,
-0.019073486328125,
-0.04498291015625,
0.0130767822265625,
0.0002586841583251953,
0.00824737548828125,
-0.00611114501953125,
0.017486572265625,
-0.046478271484375,
-0.0165557861328125,
-0.029510498046875,
0.00494384765625,
0.012359619140625,
0.0031890869140625,
-0.0389404296875,
0.01477813720703125,
0.045867919921875,
0.08392333984375,
0.0161285400390625,
-0.06494140625,
0.02117919921875,
-0.0180816650390625,
-0.010589599609375,
-0.0296630859375,
0.0038242340087890625,
-0.0595703125,
-0.033050537109375,
0.017303466796875,
-0.0167083740234375,
0.01102447509765625,
0.025115966796875,
-0.005474090576171875,
0.005474090576171875,
0.063232421875,
0.0015277862548828125,
-0.058258056640625,
0.0205230712890625,
-0.0018157958984375,
-0.0228118896484375,
-0.026947021484375,
-0.01311492919921875,
-0.003505706787109375,
-0.0218963623046875,
-0.01247406005859375,
-0.033050537109375,
0.038482666015625,
-0.06292724609375,
-0.00650787353515625,
-0.01447296142578125,
0.038909912109375,
-0.0465087890625,
0.024383544921875,
-0.050201416015625,
0.00019037723541259766,
0.027374267578125,
0.0037326812744140625,
-0.022857666015625,
-0.03216552734375,
0.02374267578125,
0.015289306640625,
-0.0220489501953125,
0.046173095703125,
0.010040283203125,
0.004985809326171875,
-0.01525115966796875,
0.004116058349609375,
0.0450439453125,
-0.045196533203125,
0.00536346435546875,
-0.007793426513671875,
-0.00013339519500732422,
-0.040863037109375,
0.01776123046875,
-0.001476287841796875,
0.00847625732421875,
0.01528167724609375
]
|
7913df1189079d55a3a292f8c4470ad1187f557d | Wordpress Stackexchange
Q: WordPress trims off the forward slash when import I have an XML file with some posts to import to WordPress
But, when I import, it seems that WordPress takes off the forward slash from the permalink, so instead of showing the address like this:
http://localhost/site/man-clothes/jeans-pants/ripped/rock-style
WordPress take off the forward slash from the itens, e prints out like this:
http://localhost/site/man-clothesjeans-pantsrippedrock-style
But if I change the link to underscore insted of the forward slash, wordpress didn´t trims of the underscore and prints out the address like this:
http://localhost/site/man-clothes_jeans-pants_ripped_rock-style
Someone knows why the forward slash is getting cutoff.
My .htaccess is
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On RewriteBase /votanalei/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /votanalei/index.php [L]
</IfModule>
# END WordPress
| Q: WordPress trims off the forward slash when import I have an XML file with some posts to import to WordPress
But, when I import, it seems that WordPress takes off the forward slash from the permalink, so instead of showing the address like this:
http://localhost/site/man-clothes/jeans-pants/ripped/rock-style
WordPress take off the forward slash from the itens, e prints out like this:
http://localhost/site/man-clothesjeans-pantsrippedrock-style
But if I change the link to underscore insted of the forward slash, wordpress didn´t trims of the underscore and prints out the address like this:
http://localhost/site/man-clothes_jeans-pants_ripped_rock-style
Someone knows why the forward slash is getting cutoff.
My .htaccess is
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On RewriteBase /votanalei/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /votanalei/index.php [L]
</IfModule>
# END WordPress
| wordpress | {
"language": "en",
"length": 127,
"provenance": "stackexchange_00019.jsonl.gz:465312",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226108"
} | [
0.01120758056640625,
0.0089874267578125,
-0.0167999267578125,
-0.0006794929504394531,
-0.01493072509765625,
-0.01995849609375,
0.007564544677734375,
-0.044677734375,
-0.002742767333984375,
-0.0023899078369140625,
-0.0112152099609375,
0.00041174888610839844,
-0.0216522216796875,
-0.057769775390625,
0.038482666015625,
-0.0191650390625,
-0.0031986236572265625,
-0.00811004638671875,
0.01395416259765625,
-0.02740478515625,
0.029541015625,
-0.015838623046875,
0.007137298583984375,
-0.034942626953125,
-0.0158233642578125,
-0.0048980712890625,
0.11370849609375,
-0.02215576171875,
-0.0165252685546875,
-0.045745849609375,
0.0031147003173828125,
0.021575927734375,
0.01715087890625,
0.00804901123046875,
-0.00432586669921875,
-0.03424072265625,
-0.036346435546875,
0.0223236083984375,
-0.007289886474609375,
0.0145416259765625,
0.0160675048828125,
-0.0193023681640625,
0.0222930908203125,
0.0294036865234375,
-0.0154571533203125,
-0.02587890625,
0.0207977294921875,
-0.039764404296875,
0.0184173583984375,
0.041290283203125,
0.006397247314453125,
0.0111083984375,
0.004894256591796875,
0.025543212890625,
0.0008177757263183594,
-0.0113983154296875,
-0.0281829833984375,
0.00180816650390625,
0.0136566162109375,
0.05487060546875,
0.0007081031799316406,
0.0207977294921875,
-0.0149993896484375,
-0.036285400390625,
-0.060089111328125,
-0.0301055908203125,
0.0130767822265625,
0.0022602081298828125,
-0.03167724609375,
-0.049530029296875,
0.039276123046875,
0.01238250732421875,
0.01152801513671875,
0.00005239248275756836,
-0.0200042724609375,
-0.011505126953125,
0.01861572265625,
0.0003209114074707031,
0.01248931884765625,
-0.0020999908447265625,
-0.0133056640625,
-0.01007080078125,
-0.091552734375,
-0.037506103515625,
0.0452880859375,
0.00457000732421875,
-0.00362396240234375,
-0.002712249755859375,
-0.024322509765625,
-0.01556396484375,
-0.026336669921875,
-0.0216522216796875,
-0.0008716583251953125,
-0.032562255859375,
-0.03497314453125,
-0.0145721435546875,
-0.00655364990234375,
-0.0011348724365234375,
0.01047515869140625,
0.01355743408203125,
0.011749267578125,
-0.041351318359375,
0.037628173828125,
-0.033843994140625,
-0.01389312744140625,
-0.00011086463928222656,
0.0164947509765625,
0.018798828125,
0.05438232421875,
0.03814697265625,
-0.014678955078125,
0.08856201171875,
0.00958251953125,
0.0033855438232421875,
-0.04437255859375,
0.0239715576171875,
0.01421356201171875,
-0.01261138916015625,
-0.00518798828125,
0.020111083984375,
-0.029052734375,
0.011810302734375,
-0.042327880859375,
-0.00717926025390625,
0.0278472900390625,
0.018585205078125,
0.01523590087890625,
0.0018482208251953125,
-0.04510498046875,
0.107666015625,
-0.0144805908203125,
-0.0093231201171875,
-0.0010633468627929688,
-0.0343017578125,
-0.060821533203125,
-0.052978515625,
0.01210784912109375,
-0.038818359375,
-0.0247802734375,
0.0443115234375,
-0.025054931640625,
-0.057098388671875,
-0.0017242431640625,
-0.00943756103515625,
0.01318359375,
0.023193359375,
0.00815582275390625,
0.03118896484375,
-0.001438140869140625,
-0.0189971923828125,
0.004486083984375,
-0.03509521484375,
0.0703125,
0.009033203125,
-0.0142669677734375,
-0.055999755859375,
0.06378173828125,
-0.0635986328125,
-0.031494140625,
-0.0751953125,
-0.004596710205078125,
-0.01291656494140625,
0.015045166015625,
-0.046630859375,
-0.06732177734375,
0.03125,
-0.044158935546875,
-0.0220947265625,
0.0292816162109375,
0.040924072265625,
-0.022064208984375,
0.01329803466796875,
0.054351806640625,
-0.0009746551513671875,
-0.022705078125,
-0.0030231475830078125,
0.021392822265625,
-0.034759521484375,
-0.0156707763671875,
0.09356689453125,
0.0255889892578125,
-0.0178375244140625,
-0.00833892822265625,
0.003337860107421875,
-0.030609130859375,
0.0280914306640625,
0.025238037109375,
0.06280517578125,
-0.004608154296875,
0.028411865234375,
0.0145111083984375,
0.0257415771484375,
-0.0552978515625,
0.0006656646728515625,
-0.005718231201171875,
-0.0055694580078125,
0.01024627685546875,
-0.00655364990234375,
0.0017099380493164062,
0.034271240234375,
-0.018768310546875,
0.02984619140625,
-0.0170745849609375,
0.0309906005859375,
-0.01303863525390625,
0.0294189453125,
-0.00799560546875,
0.034271240234375,
0.00150299072265625,
0.0439453125,
0.01216888427734375,
0.0236053466796875,
-0.03125,
-0.04754638671875,
-0.02081298828125,
0.0215606689453125,
0.0111236572265625,
0.0305938720703125,
0.0033969879150390625,
0.0127105712890625,
0.023345947265625,
-0.0301513671875,
0.031524658203125,
0.0299072265625,
0.00569915771484375,
-0.0177764892578125,
-0.0193328857421875,
-0.0211639404296875,
-0.0362548828125,
-0.01043701171875,
-0.0213775634765625,
0.048431396484375,
0.0299224853515625,
0.046630859375,
-0.0189208984375,
-0.0024662017822265625,
-0.014984130859375,
-0.03009033203125,
-0.00832366943359375,
0.031829833984375,
0.026153564453125,
0.01158905029296875,
-0.016143798828125,
0.006458282470703125,
-0.00235748291015625,
-0.05712890625,
0.006862640380859375,
-0.0010852813720703125,
0.005695343017578125,
-0.00875091552734375,
-0.0419921875,
-0.0129547119140625,
0.0640869140625,
-0.026458740234375,
-0.0252685546875,
0.049774169921875,
-0.02301025390625,
-0.032745361328125,
-0.01055908203125,
0.01020050048828125,
0.01861572265625,
-0.00029277801513671875,
-0.01934814453125,
0.0019855499267578125,
-0.0142059326171875,
0.016265869140625,
0.02392578125,
0.035247802734375,
-0.0041046142578125,
-0.015625,
0.0099029541015625,
0.036651611328125,
-0.0105743408203125,
0.00487518310546875,
0.0560302734375,
0.0095672607421875,
-0.03607177734375,
0.01441192626953125,
-0.01474761962890625,
0.00481414794921875,
-0.0178070068359375,
0.01922607421875,
0.040679931640625,
-0.0021038055419921875,
-0.0287017822265625,
-0.06268310546875,
0.037017822265625,
-0.006542205810546875,
0.0128326416015625,
0.027557373046875,
0.01629638671875,
0.055145263671875,
0.00823974609375,
0.023590087890625,
0.0139617919921875,
0.007541656494140625,
0.024139404296875,
-0.0277099609375,
0.022491455078125,
-0.02215576171875,
0.044342041015625,
0.04388427734375,
-0.02734375,
-0.005615234375,
0.015350341796875,
-0.0145721435546875,
0.0086212158203125,
0.03497314453125,
0.005023956298828125,
-0.010711669921875,
-0.09478759765625,
-0.04656982421875,
0.026611328125,
0.023345947265625,
-0.0069580078125,
-0.019500732421875,
-0.0150909423828125,
0.0200347900390625,
-0.04833984375,
-0.02618408203125,
0.012176513671875,
-0.046875,
0.018218994140625,
-0.0034618377685546875,
-0.0195159912109375,
-0.0294952392578125,
0.015380859375,
0.0133209228515625,
0.026611328125,
-0.052215576171875,
-0.05352783203125,
-0.07122802734375,
-0.0782470703125,
-0.055267333984375,
0.0088043212890625,
0.002735137939453125,
0.0009851455688476562,
-0.030914306640625,
0.0058135986328125,
-0.00879669189453125,
0.0272216796875,
0.04681396484375,
-0.003925323486328125,
-0.0305023193359375,
0.007595062255859375,
-0.00795745849609375,
-0.0180206298828125,
-0.00560760498046875,
0.050445556640625,
0.037078857421875,
-0.03314208984375,
0.0185699462890625,
0.0252532958984375,
-0.0035419464111328125,
0.006717681884765625,
0.02734375,
-0.00988006591796875,
0.00934600830078125,
0.021331787109375,
-0.04620361328125,
-0.04974365234375,
-0.0170440673828125,
-0.053375244140625,
0.0106201171875,
0.036346435546875,
-0.0162353515625,
-0.0007076263427734375,
0.007793426513671875,
0.03790283203125,
0.00591278076171875,
0.02484130859375,
-0.0118408203125,
0.0029888153076171875,
-0.0018749237060546875,
0.035125732421875,
-0.04644775390625,
0.06298828125,
-0.00792694091796875,
0.035491943359375,
0.03631591796875,
-0.0117034912109375,
-0.0122833251953125,
-0.023590087890625,
-0.0567626953125,
-0.05706787109375,
0.039093017578125,
-0.02789306640625,
-0.041839599609375,
-0.009613037109375,
-0.009429931640625,
-0.006656646728515625,
0.049285888671875,
-0.0150909423828125,
-0.01157379150390625,
0.01503753662109375,
0.0107421875,
-0.056060791015625,
-0.0149993896484375,
-0.07257080078125,
0.003509521484375,
-0.06243896484375,
-0.0180206298828125,
-0.0110931396484375,
-0.0285797119140625,
0.036895751953125,
-0.060943603515625,
0.00530242919921875,
-0.0491943359375,
0.01168060302734375,
-0.00641632080078125,
0.023468017578125,
0.0267791748046875,
0.016082763671875,
0.0255584716796875,
-0.0012807846069335938,
-0.03948974609375,
-0.0679931640625,
-0.0227813720703125,
0.0189971923828125,
0.0579833984375,
-0.00006669759750366211,
-0.0394287109375,
-0.00969696044921875,
0.052703857421875,
-0.0203704833984375,
-0.006435394287109375,
0.01291656494140625,
0.0077972412109375,
0.000042498111724853516,
0.039398193359375,
0.01436614990234375,
0.003658294677734375,
-0.0086669921875,
-0.0016727447509765625,
-0.042144775390625,
-0.01849365234375,
-0.0060577392578125,
-0.00978851318359375,
0.05963134765625,
-0.045166015625,
-0.03961181640625,
-0.0299530029296875,
-0.0154876708984375,
0.0200958251953125,
0.00559234619140625,
-0.01654052734375,
-0.043304443359375,
-0.049591064453125,
0.00992584228515625,
-0.06439208984375,
0.01494598388671875,
0.0240478515625,
0.06787109375,
0.005115509033203125,
0.0079345703125,
0.050018310546875,
0.02056884765625,
0.04180908203125,
-0.00809478759765625,
0.04193115234375,
0.02874755859375,
-0.007843017578125,
0.046905517578125,
-0.0037517547607421875,
-0.017364501953125,
-0.010589599609375,
0.0230865478515625,
-0.0027103424072265625,
-0.02569580078125,
0.0281982421875,
-0.0234832763671875,
0.032623291015625,
0.0533447265625,
0.01137542724609375,
-0.0226593017578125,
0.0165863037109375,
0.0103302001953125,
-0.02911376953125,
-0.0160064697265625,
0.004611968994140625,
-0.02679443359375,
0.0316162109375,
-0.0252532958984375,
0.03887939453125,
-0.0164947509765625,
0.0251007080078125,
0.00801849365234375,
0.0182342529296875,
-0.0177001953125,
0.01085662841796875,
-0.0038204193115234375,
-0.0235595703125,
0.0115814208984375,
0.00899505615234375,
-0.0271148681640625,
0.0124969482421875,
0.01404571533203125,
0.020111083984375,
-0.0032787322998046875,
0.003208160400390625,
-0.10443115234375,
0.009490966796875,
-0.020263671875,
0.0119171142578125,
0.002735137939453125,
0.01270294189453125,
-0.0016040802001953125,
-0.0148468017578125,
0.00897979736328125,
0.0015077590942382812,
-0.03216552734375,
-0.028717041015625,
-0.012298583984375,
-0.0103759765625,
-0.0135498046875,
-0.0026092529296875,
0.036712646484375,
-0.01012420654296875,
-0.0022983551025390625,
0.002960205078125,
-0.0173797607421875,
-0.048919677734375,
0.06439208984375,
0.0226593017578125,
-0.037445068359375,
0.01549530029296875,
0.039215087890625,
0.0136260986328125,
-0.029449462890625,
-0.004241943359375,
0.0626220703125,
0.061126708984375,
-0.007129669189453125,
-0.038970947265625,
-0.0283660888671875,
-0.03363037109375,
-0.007076263427734375,
0.027862548828125,
-0.02020263671875,
-0.04266357421875,
-0.0227203369140625,
-0.01233673095703125,
0.020751953125,
-0.024627685546875,
-0.032562255859375,
0.0179443359375,
-0.01459503173828125,
0.0175323486328125,
0.0665283203125,
-0.049285888671875,
0.0198974609375,
0.0245819091796875,
0.031707763671875,
-0.0044708251953125,
0.004627227783203125,
0.0065765380859375,
0.001544952392578125,
-0.02813720703125,
-0.0235443115234375,
0.044097900390625,
0.00505828857421875,
0.01142120361328125,
-0.0283050537109375,
-0.0025272369384765625,
0.0230712890625,
-0.0120849609375,
0.06292724609375,
0.0099639892578125,
-0.01934814453125,
-0.0019588470458984375,
-0.036712646484375,
-0.01415252685546875,
0.0160064697265625,
-0.00247955322265625,
-0.050262451171875,
-0.01393890380859375,
-0.0176849365234375,
-0.00943756103515625,
-0.0322265625,
-0.01082611083984375,
-0.0262908935546875,
0.04150390625,
0.025177001953125,
0.009979248046875,
-0.034210205078125,
0.017059326171875,
0.0220184326171875,
0.0105133056640625,
-0.010894775390625,
0.0176849365234375,
0.041229248046875,
-0.0258636474609375,
-0.00235748291015625,
-0.038848876953125,
-0.0025997161865234375,
0.006740570068359375,
-0.0006308555603027344,
0.0227813720703125,
0.03985595703125,
0.0020809173583984375,
0.005939483642578125,
-0.02789306640625,
-0.00009107589721679688,
-0.0246429443359375,
0.00818634033203125,
-0.0264739990234375,
0.0240478515625,
-0.033843994140625,
0.038055419921875,
0.07391357421875,
0.0017938613891601562,
-0.01392364501953125,
-0.029937744140625,
0.0265350341796875,
0.00876617431640625,
-0.04461669921875,
-0.0384521484375,
0.021026611328125,
0.08575439453125,
0.034942626953125,
0.048614501953125,
0.02740478515625,
0.02825927734375,
0.041595458984375,
-0.01654052734375,
-0.01055908203125,
0.00455474853515625,
-0.0092010498046875,
-0.0123748779296875,
0.001285552978515625,
-0.013519287109375,
0.001544952392578125,
0.036376953125,
0.043548583984375,
0.083251953125,
-0.0660400390625,
0.0308380126953125,
0.034271240234375,
-0.01454925537109375,
0.0335693359375,
0.033843994140625,
-0.01302337646484375,
-0.006694793701171875,
-0.0169525146484375,
-0.0238037109375,
-0.007720947265625,
-0.01082611083984375,
0.022552490234375,
0.01092529296875,
-0.0289459228515625,
0.054901123046875,
-0.00786590576171875,
-0.026580810546875,
-0.034698486328125,
0.02667236328125,
-0.0141448974609375,
-0.004302978515625,
-0.0216217041015625,
-0.002307891845703125,
-0.033233642578125,
-0.051116943359375,
-0.0185699462890625,
-0.04510498046875,
0.000018596649169921875,
-0.0014543533325195312,
-0.01032257080078125,
0.0162811279296875,
0.0127410888671875,
-0.0226898193359375,
-0.01548004150390625,
-0.0199432373046875,
0.0009284019470214844,
0.04180908203125,
-0.024505615234375,
-0.006824493408203125,
0.01209259033203125,
0.02191162109375,
0.00205230712890625,
0.02105712890625,
-0.04656982421875,
-0.0128173828125,
-0.0132293701171875,
0.0718994140625,
-0.034088134765625,
-0.023956298828125,
0.0136871337890625,
0.01348876953125,
0.0051422119140625,
0.00783538818359375,
0.027862548828125,
-0.038970947265625,
-0.0284576416015625,
0.007328033447265625,
-0.03857421875,
-0.032196044921875,
-0.02490234375,
-0.0699462890625,
0.061431884765625,
0.00009047985076904297,
0.0574951171875,
0.0257568359375,
-0.0092010498046875,
-0.025360107421875,
-0.023223876953125,
0.00620269775390625,
0.04937744140625,
-0.00009042024612426758,
-0.0167388916015625,
-0.0208740234375,
-0.013702392578125,
-0.01401519775390625,
0.035064697265625,
0.080810546875,
0.01410675048828125,
-0.0232696533203125,
-0.0003352165222167969,
0.07122802734375,
0.047607421875,
0.0029430389404296875,
0.03240966796875,
-0.0104522705078125,
0.036224365234375,
0.0233612060546875,
-0.039703369140625,
0.0251312255859375,
-0.01161956787109375,
-0.035400390625,
0.0208892822265625,
0.028717041015625,
0.0360107421875,
0.033966064453125,
0.0102386474609375,
0.0098876953125,
0.0130462646484375,
0.0207061767578125,
-0.05743408203125,
0.015716552734375,
0.006153106689453125,
0.0015459060668945312,
-0.03350830078125,
-0.052978515625,
-0.0183258056640625,
0.0253448486328125,
-0.0157928466796875,
0.044921875,
0.0301513671875,
0.00951385498046875,
0.055633544921875,
-0.0002789497375488281,
0.024322509765625,
0.010406494140625,
-0.00948333740234375,
0.06683349609375,
0.041656494140625,
0.042236328125,
-0.0094451904296875,
-0.007701873779296875,
0.01971435546875,
0.071533203125,
-0.04425048828125,
-0.03472900390625,
-0.00669097900390625,
-0.006946563720703125,
0.00820159912109375,
-0.0241851806640625,
0.021881103515625,
-0.031951904296875,
-0.039031982421875,
0.0107574462890625,
0.0157470703125,
0.031524658203125,
0.019805908203125,
0.00978851318359375,
0.038848876953125,
-0.08782958984375,
0.023681640625,
-0.041259765625,
0.0073699951171875,
-0.01107025146484375,
0.031982421875,
0.030670166015625,
0.02459716796875,
0.00838470458984375,
-0.00872039794921875,
0.0241241455078125,
0.01238250732421875,
-0.006000518798828125,
-0.02020263671875,
0.018096923828125,
-0.02716064453125,
0.01041412353515625,
0.00933837890625,
-0.004119873046875,
0.0270233154296875,
0.04595947265625,
-0.00926971435546875,
-0.056732177734375,
-0.00714874267578125,
0.00803375244140625,
-0.039642333984375,
-0.0062103271484375,
-0.057098388671875,
0.032318115234375,
0.006832122802734375,
0.005985260009765625,
0.006755828857421875,
0.01983642578125,
0.00838470458984375,
-0.0242462158203125,
0.06329345703125,
-0.0163726806640625,
-0.001972198486328125,
0.022430419921875,
-0.017791748046875,
0.037841796875,
0.005603790283203125,
-0.012176513671875,
-0.01885986328125,
0.0330810546875,
0.0257568359375,
-0.036224365234375,
0.015869140625,
0.029876708984375,
0.0018520355224609375,
0.0157012939453125,
-0.015838623046875,
0.0233154296875,
-0.01142120361328125,
0.01248931884765625,
0.03167724609375,
0.00820159912109375,
0.005138397216796875,
-0.029327392578125,
-0.0276336669921875,
-0.034271240234375,
0.04754638671875,
0.01151275634765625,
0.1395263671875,
-0.05712890625,
0.01210784912109375,
0.0014362335205078125,
-0.0065765380859375,
-0.007244110107421875,
-0.01290130615234375,
0.005550384521484375,
-0.01404571533203125,
-0.003108978271484375,
0.00707244873046875,
-0.0728759765625,
-0.01198577880859375,
0.0146484375,
-0.03668212890625,
-0.00968170166015625,
-0.007106781005859375,
0.0225982666015625,
0.007198333740234375,
0.05419921875,
-0.0305023193359375,
-0.07916259765625,
-0.05047607421875,
0.0274200439453125,
-0.009246826171875,
0.01361083984375,
-0.042388916015625,
-0.0003147125244140625,
0.06475830078125,
-0.0195159912109375,
0.0176239013671875,
-0.0036182403564453125,
0.08154296875,
0.044647216796875,
-0.0036411285400390625,
-0.01398468017578125,
-0.00417327880859375,
-0.01273345947265625,
0.00771331787109375,
0.00016427040100097656,
0.02301025390625,
0.0095367431640625,
-0.038055419921875,
-0.007625579833984375,
-0.00716400146484375,
0.0322265625,
0.019927978515625,
0.017974853515625,
-0.05364990234375,
-0.00200653076171875,
0.0197601318359375,
-0.036773681640625,
-0.0237579345703125,
0.00115966796875,
-0.003452301025390625,
0.032562255859375,
-0.0287322998046875,
-0.029815673828125,
-0.06396484375,
-0.026397705078125,
0.03179931640625,
0.00724029541015625,
-0.03216552734375,
0.0156707763671875,
-0.01299285888671875,
0.03228759765625,
-0.01454925537109375,
0.006153106689453125,
-0.022308349609375,
0.0057373046875,
-0.033599853515625,
-0.06878662109375,
-0.038848876953125,
0.06268310546875,
-0.06781005859375,
0.0156097412109375,
0.0435791015625,
-0.019775390625,
-0.0166473388671875,
-0.01494598388671875,
0.001483917236328125,
0.03460693359375,
-0.038421630859375,
-0.037139892578125,
-0.0176544189453125,
0.032135009765625,
-0.0193939208984375,
-0.0167999267578125,
0.0169525146484375,
-0.01427459716796875,
-0.007411956787109375,
-0.0260009765625,
-0.0146636962890625,
-0.004367828369140625,
-0.047515869140625,
-0.0791015625,
0.011322021484375,
-0.01052093505859375,
-0.040252685546875,
0.0183258056640625,
-0.0277252197265625,
-0.02716064453125,
0.08502197265625,
0.032928466796875,
-0.0194854736328125,
-0.0300750732421875,
0.01338958740234375,
0.01214599609375,
0.08087158203125,
-0.005481719970703125,
0.0024471282958984375,
0.047882080078125,
0.03253173828125,
0.0266571044921875,
0.0245361328125,
0.0084381103515625,
0.001689910888671875,
0.049896240234375,
0.06646728515625,
0.01123809814453125,
0.086669921875,
0.017333984375,
-0.0797119140625,
-0.016693115234375,
-0.0288543701171875,
-0.035247802734375,
-0.024444580078125,
0.087646484375,
0.04998779296875,
0.0181732177734375,
-0.037139892578125,
-0.0011167526245117188,
0.001010894775390625,
0.00911712646484375,
0.0083465576171875,
0.007427215576171875,
-0.034423828125,
-0.015869140625,
0.002742767333984375,
-0.051849365234375,
-0.00614166259765625,
-0.0452880859375,
-0.08837890625,
0.0263671875,
-0.06524658203125,
0.00701904296875,
-0.059844970703125,
0.0294036865234375,
0.06927490234375,
-0.057891845703125,
-0.005649566650390625,
-0.00696563720703125,
0.00862884521484375,
0.0120391845703125,
-0.0576171875,
-0.0040130615234375,
0.0251617431640625,
-0.0185699462890625,
0.0086822509765625,
0.0186920166015625,
0.0008625984191894531,
-0.01387786865234375,
-0.0081787109375,
0.04296875,
-0.01552581787109375,
-0.033782958984375,
-0.0274200439453125,
0.034515380859375,
0.0110015869140625,
-0.07421875,
0.07806396484375,
-0.00789642333984375,
0.030364990234375,
-0.0255584716796875,
0.037139892578125,
-0.055877685546875,
0.0196685791015625,
-0.0247955322265625,
0.005504608154296875,
-0.01220703125,
0.0233306884765625,
-0.0276641845703125,
-0.047119140625,
0.0140228271484375,
0.006683349609375,
0.004093170166015625,
0.0004329681396484375
]
|
e2888ab72632c1e52cdcbb2c62713b4994aa6d75 | Wordpress Stackexchange
Q: Detect if WP is running under WP-CLI I use the wonderful WP-CLI tool. Due to dependence on Apache environment variables for a specific use case, I need to enable a bit of code to run only when running under WP-CLI. How can I detect if WP is running under WP-CLI?
In this specific case I could check for the presence of the Apache environment variables in question. However, I would like to know the more general, canonical method to check. Thank you.
A: Within the php/wp-cli.php we find these lines:
// Can be used by plugins/themes to check if WP-CLI is running or not
define( 'WP_CLI', true );
define( 'WP_CLI_VERSION', trim( file_get_contents( WP_CLI_ROOT . '/VERSION' ) ) );
define( 'WP_CLI_START_MICROTIME', microtime( true ) );
so you could check if WP_CLI or WP_CLI_VERSION are defined.
| Q: Detect if WP is running under WP-CLI I use the wonderful WP-CLI tool. Due to dependence on Apache environment variables for a specific use case, I need to enable a bit of code to run only when running under WP-CLI. How can I detect if WP is running under WP-CLI?
In this specific case I could check for the presence of the Apache environment variables in question. However, I would like to know the more general, canonical method to check. Thank you.
A: Within the php/wp-cli.php we find these lines:
// Can be used by plugins/themes to check if WP-CLI is running or not
define( 'WP_CLI', true );
define( 'WP_CLI_VERSION', trim( file_get_contents( WP_CLI_ROOT . '/VERSION' ) ) );
define( 'WP_CLI_START_MICROTIME', microtime( true ) );
so you could check if WP_CLI or WP_CLI_VERSION are defined.
A: The canonical check for WP-CLI, which is used in most plugins and is explicitly mentioned in the docs, is the check whether WP_CLI is defined and set to true:
if ( defined( 'WP_CLI' ) && WP_CLI ) {
// Do WP-CLI specific things.
}
| wordpress | {
"language": "en",
"length": 180,
"provenance": "stackexchange_00019.jsonl.gz:465324",
"question_score": "27",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226152"
} | [
-0.0345458984375,
-0.01398468017578125,
-0.027313232421875,
-0.0225067138671875,
-0.0264739990234375,
-0.0015878677368164062,
-0.0262451171875,
-0.00153350830078125,
0.00016629695892333984,
-0.020233154296875,
-0.03948974609375,
0.0204010009765625,
-0.041046142578125,
-0.019866943359375,
0.020843505859375,
-0.04876708984375,
0.0372314453125,
-0.0276947021484375,
0.01885986328125,
-0.0078277587890625,
0.0014925003051757812,
0.009246826171875,
0.04400634765625,
0.057159423828125,
0.03070068359375,
-0.054534912109375,
0.07977294921875,
0.013458251953125,
0.0047607421875,
-0.0116424560546875,
0.0303192138671875,
-0.00736236572265625,
0.004505157470703125,
0.02313232421875,
0.020538330078125,
0.0313720703125,
-0.0130157470703125,
0.017547607421875,
0.036102294921875,
-0.0176849365234375,
-0.005413055419921875,
-0.0011081695556640625,
0.0728759765625,
-0.0011510848999023438,
0.01181793212890625,
-0.01519775390625,
-0.0004723072052001953,
-0.04937744140625,
0.0017118453979492188,
0.0216064453125,
-0.0225677490234375,
0.01554107666015625,
-0.00203704833984375,
-0.0093841552734375,
0.0010538101196289062,
-0.016082763671875,
-0.00762176513671875,
0.0186920166015625,
0.0308685302734375,
-0.01032257080078125,
-0.042755126953125,
-0.026458740234375,
0.023040771484375,
-0.0182037353515625,
0.005023956298828125,
-0.0234832763671875,
0.0025787353515625,
0.0167083740234375,
-0.0291595458984375,
0.00243377685546875,
0.041748046875,
-0.01690673828125,
0.00897216796875,
-0.00443267822265625,
0.04058837890625,
-0.054656982421875,
0.00980377197265625,
-0.0146484375,
0.007259368896484375,
0.028533935546875,
0.07232666015625,
0.029998779296875,
-0.0141143798828125,
0.03192138671875,
0.004367828369140625,
0.051300048828125,
0.004299163818359375,
-0.0556640625,
-0.0157623291015625,
-0.0257110595703125,
-0.026397705078125,
0.03143310546875,
-0.0231781005859375,
-0.036102294921875,
-0.045074462890625,
-0.01788330078125,
0.01242828369140625,
0.004184722900390625,
-0.0198516845703125,
-0.011627197265625,
0.0204010009765625,
-0.0289154052734375,
-0.0002617835998535156,
-0.0072784423828125,
-0.0012407302856445312,
0.10321044921875,
0.041778564453125,
0.053497314453125,
-0.0024242401123046875,
-0.004302978515625,
0.0229644775390625,
-0.057220458984375,
-0.0120391845703125,
0.00656890869140625,
-0.04931640625,
-0.002185821533203125,
-0.057464599609375,
0.0007543563842773438,
-0.0207672119140625,
0.0288543701171875,
0.0260162353515625,
0.0352783203125,
0.02081298828125,
0.006145477294921875,
0.0153350830078125,
0.038116455078125,
0.0011701583862304688,
-0.07562255859375,
-0.053314208984375,
0.050750732421875,
-0.00933837890625,
-0.007183074951171875,
0.00237274169921875,
0.006885528564453125,
-0.0313720703125,
-0.02423095703125,
0.037017822265625,
0.020965576171875,
0.03729248046875,
0.0018463134765625,
0.0004563331604003906,
-0.0309906005859375,
-0.0125732421875,
-0.0017900466918945312,
-0.0148468017578125,
0.022735595703125,
0.0045928955078125,
0.0062408447265625,
-0.0227203369140625,
-0.03704833984375,
-0.00428009033203125,
-0.0338134765625,
0.0032196044921875,
0.03668212890625,
0.05181884765625,
0.004131317138671875,
0.048736572265625,
-0.034454345703125,
0.01270294189453125,
-0.01947021484375,
-0.0338134765625,
-0.00058746337890625,
0.03277587890625,
-0.02740478515625,
-0.0268096923828125,
0.0268402099609375,
-0.021331787109375,
-0.0013685226440429688,
0.0194854736328125,
-0.00580596923828125,
0.03472900390625,
-0.0172271728515625,
0.00015437602996826172,
-0.00286865234375,
0.01053619384765625,
0.0066986083984375,
0.0097198486328125,
0.0071258544921875,
0.035552978515625,
0.02288818359375,
-0.025604248046875,
-0.031890869140625,
0.07666015625,
-0.032806396484375,
-0.02783203125,
-0.021026611328125,
0.00444793701171875,
0.0277099609375,
0.0382080078125,
0.01512908935546875,
0.00850677490234375,
-0.0313720703125,
0.0128173828125,
0.021087646484375,
-0.004917144775390625,
-0.01065826416015625,
-0.03582763671875,
0.005893707275390625,
-0.02178955078125,
-0.01499176025390625,
0.03515625,
-0.0181427001953125,
-0.0050506591796875,
-0.019134521484375,
-0.1396484375,
-0.001434326171875,
-0.05010986328125,
0.018707275390625,
0.043914794921875,
0.006687164306640625,
-0.01551055908203125,
-0.0078125,
0.032257080078125,
-0.0811767578125,
-0.057708740234375,
0.05780029296875,
-0.029022216796875,
0.0265655517578125,
-0.0165252685546875,
0.046295166015625,
-0.04254150390625,
-0.005176544189453125,
-0.037811279296875,
-0.0247650146484375,
-0.0225982666015625,
0.0166473388671875,
-0.01384735107421875,
0.03515625,
0.0287017822265625,
0.025360107421875,
0.09033203125,
-0.031524658203125,
-0.0193939208984375,
-0.0010318756103515625,
-0.0188446044921875,
-0.01296234130859375,
-0.0019273757934570312,
-0.07623291015625,
0.032867431640625,
0.050994873046875,
0.0292816162109375,
0.0236663818359375,
-0.004459381103515625,
-0.0117340087890625,
0.0582275390625,
-0.0251922607421875,
0.01056671142578125,
-0.0262603759765625,
-0.0082855224609375,
0.03857421875,
-0.04095458984375,
-0.005645751953125,
0.01502227783203125,
-0.0090789794921875,
-0.047027587890625,
0.0478515625,
0.01507568359375,
-0.016845703125,
0.022216796875,
0.01285552978515625,
0.0014238357543945312,
0.0223846435546875,
-0.037384033203125,
0.02520751953125,
-0.0220489501953125,
0.0026569366455078125,
-0.0084991455078125,
-0.0004413127899169922,
0.004428863525390625,
-0.01103973388671875,
0.01157379150390625,
-0.0435791015625,
0.013275146484375,
0.02642822265625,
-0.016021728515625,
0.03692626953125,
-0.042694091796875,
-0.001377105712890625,
0.02008056640625,
0.0262908935546875,
-0.031829833984375,
0.01141357421875,
0.0272979736328125,
-0.0146484375,
-0.01549530029296875,
-0.00937652587890625,
0.049896240234375,
-0.0180511474609375,
0.011138916015625,
-0.0291290283203125,
0.010284423828125,
-0.0019359588623046875,
-0.0283050537109375,
0.040985107421875,
-0.005695343017578125,
-0.051971435546875,
0.04559326171875,
-0.0303955078125,
0.0298004150390625,
-0.006191253662109375,
0.002353668212890625,
0.043975830078125,
0.023040771484375,
-0.02825927734375,
-0.00732421875,
0.05010986328125,
0.03875732421875,
-0.044403076171875,
-0.04364013671875,
0.016510009765625,
-0.07342529296875,
-0.01554107666015625,
0.0015735626220703125,
-0.0277862548828125,
0.012664794921875,
-0.029632568359375,
-0.0098419189453125,
-0.02398681640625,
-0.09979248046875,
-0.0948486328125,
-0.03033447265625,
-0.021026611328125,
-0.01244354248046875,
-0.01342010498046875,
-0.007568359375,
0.01253509521484375,
-0.006275177001953125,
0.008514404296875,
0.00467681884765625,
-0.04290771484375,
-0.023040771484375,
-0.07904052734375,
-0.058685302734375,
-0.034515380859375,
0.00910186767578125,
0.0036907196044921875,
0.006847381591796875,
0.08599853515625,
0.0113983154296875,
-0.07720947265625,
0.000873565673828125,
0.022369384765625,
-0.027557373046875,
0.032318115234375,
0.003185272216796875,
-0.01654052734375,
0.01885986328125,
-0.0188446044921875,
0.01031494140625,
0.031158447265625,
-0.0029544830322265625,
-0.0149078369140625,
0.034332275390625,
-0.049835205078125,
0.0097808837890625,
0.02935791015625,
-0.0352783203125,
-0.047576904296875,
0.0018310546875,
-0.0672607421875,
-0.02264404296875,
-0.00506591796875,
-0.0288848876953125,
0.01800537109375,
0.0145416259765625,
-0.00798797607421875,
-0.01476287841796875,
0.02392578125,
0.0007834434509277344,
0.00846099853515625,
-0.0098419189453125,
-0.0013837814331054688,
0.060760498046875,
0.007007598876953125,
0.01415252685546875,
-0.0100555419921875,
0.034027099609375,
-0.0215911865234375,
-0.0526123046875,
-0.00838470458984375,
-0.0246429443359375,
-0.03143310546875,
0.005634307861328125,
-0.032745361328125,
0.022216796875,
0.0180816650390625,
0.0047149658203125,
0.05303955078125,
-0.006893157958984375,
-0.01451873779296875,
-0.013397216796875,
0.03094482421875,
-0.021820068359375,
-0.0526123046875,
0.0094451904296875,
0.024566650390625,
-0.036773681640625,
-0.0163116455078125,
-0.0099029541015625,
-0.025360107421875,
-0.05096435546875,
0.01259613037109375,
0.0023555755615234375,
-0.0286102294921875,
-0.008209228515625,
0.001636505126953125,
-0.035797119140625,
-0.03668212890625,
0.02947998046875,
-0.060577392578125,
0.0400390625,
-0.01406097412109375,
0.01849365234375,
-0.0251922607421875,
-0.0121612548828125,
-0.0657958984375,
-0.09722900390625,
-0.0090179443359375,
-0.0301971435546875,
0.051239013671875,
-0.004520416259765625,
-0.00414276123046875,
-0.0185394287109375,
0.036773681640625,
0.007038116455078125,
0.0257720947265625,
0.0088348388671875,
-0.01007080078125,
0.035797119140625,
0.0262298583984375,
0.018280029296875,
0.007450103759765625,
0.01146697998046875,
-0.0159149169921875,
-0.02386474609375,
-0.01062774658203125,
-0.0177154541015625,
0.0207672119140625,
0.0187225341796875,
-0.04266357421875,
0.0200958251953125,
-0.039215087890625,
-0.01007843017578125,
0.0006680488586425781,
-0.0225677490234375,
0.01384735107421875,
-0.0281524658203125,
0.0276947021484375,
0.07568359375,
-0.0306243896484375,
0.01447296142578125,
-0.0164794921875,
0.103271484375,
0.0028820037841796875,
-0.026702880859375,
0.0120697021484375,
0.012054443359375,
0.0131683349609375,
0.005645751953125,
0.050445556640625,
0.00787353515625,
0.0177459716796875,
-0.00646209716796875,
0.0009489059448242188,
-0.0295257568359375,
0.045257568359375,
-0.01934814453125,
0.046875,
-0.0023975372314453125,
-0.03570556640625,
0.031219482421875,
0.01415252685546875,
0.03271484375,
0.01187896728515625,
-0.036865234375,
0.0418701171875,
0.051605224609375,
-0.0223388671875,
-0.0193939208984375,
-0.040313720703125,
-0.05126953125,
0.0157012939453125,
-0.0880126953125,
0.0205230712890625,
0.0045013427734375,
-0.0135040283203125,
0.028594970703125,
0.00830078125,
-0.004810333251953125,
0.01074981689453125,
0.074951171875,
-0.0216064453125,
0.04296875,
0.0155792236328125,
-0.0218505859375,
-0.037811279296875,
-0.00960540771484375,
0.0567626953125,
-0.01296234130859375,
-0.0440673828125,
-0.018218994140625,
-0.024688720703125,
-0.0013322830200195312,
0.0313720703125,
0.0018396377563476562,
0.049896240234375,
-0.01461029052734375,
-0.05364990234375,
-0.0214080810546875,
-0.0318603515625,
-0.07440185546875,
-0.06982421875,
-0.04638671875,
-0.022186279296875,
-0.0123443603515625,
0.02691650390625,
0.0170745849609375,
-0.0494384765625,
0.0287933349609375,
0.007472991943359375,
0.03607177734375,
0.0259552001953125,
0.00809478759765625,
0.00634765625,
0.00453948974609375,
0.01739501953125,
-0.03570556640625,
0.012969970703125,
-0.005222320556640625,
-0.0350341796875,
0.035430908203125,
0.0252685546875,
-0.0136260986328125,
0.007007598876953125,
-0.0011119842529296875,
-0.00013577938079833984,
-0.0040283203125,
-0.00495147705078125,
-0.004486083984375,
0.01189422607421875,
-0.033050537109375,
-0.0224151611328125,
0.03240966796875,
0.019744873046875,
-0.028472900390625,
0.046722412109375,
-0.0011758804321289062,
0.0136871337890625,
0.07403564453125,
-0.047943115234375,
0.0165557861328125,
0.0294036865234375,
-0.00897216796875,
-0.03631591796875,
-0.005615234375,
0.01056671142578125,
0.0159149169921875,
-0.045379638671875,
-0.0301971435546875,
0.04156494140625,
-0.049896240234375,
-0.0330810546875,
-0.006145477294921875,
0.033355712890625,
-0.005313873291015625,
0.01751708984375,
0.042327880859375,
0.039794921875,
-0.04534912109375,
0.0005431175231933594,
-0.047393798828125,
-0.01523590087890625,
-0.030120849609375,
-0.05462646484375,
-0.055450439453125,
-0.00067901611328125,
0.021026611328125,
-0.0105133056640625,
0.0181121826171875,
0.01491546630859375,
-0.042572021484375,
0.08001708984375,
0.053192138671875,
0.0352783203125,
-0.0054168701171875,
0.03070068359375,
0.003452301025390625,
0.0013599395751953125,
-0.00286102294921875,
0.01184844970703125,
0.005992889404296875,
-0.00872039794921875,
0.0207366943359375,
0.0095977783203125,
-0.00817108154296875,
-0.050262451171875,
0.06719970703125,
-0.021881103515625,
0.034210205078125,
-0.00849151611328125,
0.00171661376953125,
-0.0096435546875,
-0.005889892578125,
-0.0173187255859375,
0.01366424560546875,
0.005321502685546875,
0.0170135498046875,
-0.01837158203125,
-0.060211181640625,
-0.030303955078125,
0.01454925537109375,
0.032379150390625,
0.0037517547607421875,
-0.0347900390625,
-0.0247802734375,
0.052520751953125,
-0.03558349609375,
0.07281494140625,
0.115478515625,
0.0035533905029296875,
0.07379150390625,
0.0264892578125,
0.020782470703125,
0.04510498046875,
-0.0145111083984375,
-0.00499725341796875,
-0.0006937980651855469,
0.0341796875,
0.0058135986328125,
0.021148681640625,
0.0362548828125,
-0.0001195669174194336,
-0.0021419525146484375,
0.025543212890625,
0.0670166015625,
-0.0114288330078125,
-0.00677490234375,
0.04754638671875,
-0.019195556640625,
-0.0156707763671875,
-0.0333251953125,
-0.00959014892578125,
-0.04461669921875,
0.07342529296875,
0.0030765533447265625,
-0.032318115234375,
0.0158538818359375,
-0.00785064697265625,
-0.0069122314453125,
-0.0278778076171875,
0.040863037109375,
0.019012451171875,
-0.0221405029296875,
0.040008544921875,
0.0263214111328125,
0.016357421875,
-0.0173797607421875,
0.0033435821533203125,
-0.0234832763671875,
-0.0172882080078125,
-0.05224609375,
-0.0139617919921875,
-0.0252227783203125,
-0.007476806640625,
0.04644775390625,
0.0196685791015625,
0.0308074951171875,
0.056121826171875,
0.0037555694580078125,
0.01055908203125,
0.0304107666015625,
-0.0086517333984375,
-0.041229248046875,
-0.0201263427734375,
0.0321044921875,
0.04315185546875,
-0.07366943359375,
0.0234527587890625,
-0.05267333984375,
0.01374053955078125,
0.0004258155822753906,
0.0094757080078125,
0.07562255859375,
-0.0164031982421875,
-0.03173828125,
0.03277587890625,
-0.008270263671875,
-0.01035308837890625,
0.0015926361083984375,
0.056732177734375,
-0.0311279296875,
-0.0231170654296875,
0.020172119140625,
-0.04815673828125,
-0.046844482421875,
-0.0127410888671875,
-0.01465606689453125,
0.025970458984375,
-0.00572967529296875,
-0.017181396484375,
0.041015625,
0.0092315673828125,
-0.024261474609375,
-0.0007381439208984375,
-0.03729248046875,
0.04449462890625,
-0.00424957275390625,
0.05279541015625,
-0.032318115234375,
-0.004550933837890625,
0.02734375,
0.025787353515625,
0.025390625,
0.006145477294921875,
0.0268707275390625,
-0.0018634796142578125,
0.0250091552734375,
0.0256500244140625,
-0.00806427001953125,
0.00864410400390625,
-0.003330230712890625,
0.040985107421875,
0.030364990234375,
-0.03265380859375,
0.0302886962890625,
-0.0283966064453125,
-0.021209716796875,
0.0165557861328125,
0.02850341796875,
0.0433349609375,
-0.0127410888671875,
0.05047607421875,
0.0008707046508789062,
-0.0124359130859375,
0.01424407958984375,
-0.01409149169921875,
0.01331329345703125,
-0.0037593841552734375,
-0.038482666015625,
0.0297698974609375,
-0.024871826171875,
-0.0032196044921875,
0.0127410888671875,
-0.015655517578125,
-0.01393890380859375,
-0.034088134765625,
-0.0012531280517578125,
-0.01383209228515625,
-0.0187835693359375,
-0.018035888671875,
0.039642333984375,
-0.0284423828125,
-0.006378173828125,
0.044189453125,
0.036773681640625,
0.033294677734375,
0.05072021484375,
-0.01001739501953125,
-0.027435302734375,
-0.019744873046875,
-0.05084228515625,
0.0212554931640625,
0.0191192626953125,
-0.0261688232421875,
-0.0020618438720703125,
-0.037811279296875,
0.00983428955078125,
0.08624267578125,
0.00688934326171875,
-0.016998291015625,
0.0007472038269042969,
0.022613525390625,
0.021240234375,
0.05389404296875,
-0.0228118896484375,
-0.03277587890625,
-0.01020050048828125,
-0.0163726806640625,
0.0181884765625,
0.0643310546875,
0.011260986328125,
0.026123046875,
-0.045745849609375,
-0.0196990966796875,
-0.0194091796875,
0.00946044921875,
-0.00414276123046875,
0.018341064453125,
-0.01277923583984375,
0.0031375885009765625,
-0.000016689300537109375,
0.036468505859375,
0.03314208984375,
0.019622802734375,
0.03192138671875,
0.034210205078125,
0.00994110107421875,
0.0166778564453125,
0.09033203125,
-0.003307342529296875,
-0.038116455078125,
-0.0012540817260742188,
-0.003948211669921875,
0.025238037109375,
-0.0224609375,
-0.0124664306640625,
0.0587158203125,
0.0002460479736328125,
-0.0302276611328125,
0.023529052734375,
-0.0009260177612304688,
0.00027632713317871094,
0.0287322998046875,
0.01119232177734375,
-0.0007724761962890625,
0.00530242919921875,
-0.022064208984375,
-0.003673553466796875,
0.00868988037109375,
-0.02618408203125,
-0.0021762847900390625,
0.0294952392578125,
-0.01216888427734375,
0.0207977294921875,
-0.00873565673828125,
0.0046234130859375,
0.0016460418701171875,
0.00704193115234375,
-0.012603759765625,
-0.003231048583984375,
0.035308837890625,
-0.00954437255859375,
-0.01560211181640625,
-0.021636962890625,
-0.041900634765625,
0.0751953125,
0.041900634765625,
0.0357666015625,
-0.03228759765625,
0.048309326171875,
0.0195465087890625,
-0.0038776397705078125,
0.007564544677734375,
0.01474761962890625,
-0.00048279762268066406,
0.00977325439453125,
0.00466156005859375,
-0.0194854736328125,
-0.0704345703125,
0.032196044921875,
0.017425537109375,
0.0115509033203125,
0.043701171875,
-0.0286102294921875,
0.0244903564453125,
-0.0014925003051757812,
-0.009185791015625,
-0.044586181640625,
-0.06256103515625,
-0.038299560546875,
0.0025348663330078125,
0.0025386810302734375,
0.0189361572265625,
0.01120758056640625,
-0.01285552978515625,
-0.009033203125,
-0.0234222412109375,
0.005619049072265625,
0.0124664306640625,
-0.0256805419921875,
0.018585205078125,
0.005664825439453125,
-0.01023101806640625,
-0.021392822265625,
-0.02154541015625,
-0.0013675689697265625,
0.012664794921875,
0.0054779052734375,
-0.01061248779296875,
0.0183868408203125,
-0.0235595703125,
-0.0181732177734375,
0.030364990234375,
-0.033355712890625,
0.002685546875,
-0.0161590576171875,
0.0202178955078125,
0.015869140625,
-0.0802001953125,
-0.037841796875,
-0.065673828125,
0.01090240478515625,
0.055450439453125,
-0.03985595703125,
0.00435638427734375,
-0.0295562744140625,
-0.0187225341796875,
0.032623291015625,
-0.0233306884765625,
0.02667236328125,
-0.0006804466247558594,
-0.052398681640625,
-0.05291748046875,
0.0009398460388183594,
0.05206298828125,
-0.048095703125,
-0.042266845703125,
-0.007781982421875,
-0.01395416259765625,
-0.03375244140625,
0.082763671875,
0.0218963623046875,
0.01280975341796875,
0.039306640625,
-0.017333984375,
-0.0361328125,
-0.0038738250732421875,
-0.003284454345703125,
0.038787841796875,
0.0163421630859375,
0.00010865926742553711,
-0.0170440673828125,
0.0311279296875,
-0.05859375,
-0.0631103515625,
0.0292510986328125,
-0.0262603759765625,
-0.023834228515625,
-0.0180816650390625,
0.0170745849609375,
0.02703857421875,
-0.02923583984375,
-0.11444091796875,
0.04119873046875,
-0.0282745361328125,
-0.03662109375,
-0.058319091796875,
-0.02130126953125,
-0.00733184814453125,
0.007171630859375,
-0.035491943359375,
0.006435394287109375,
-0.0194854736328125,
0.05914306640625,
-0.005344390869140625,
0.005382537841796875,
0.0249786376953125,
-0.031097412109375,
-0.014617919921875,
0.006862640380859375,
0.03533935546875,
0.0226287841796875,
0.024383544921875,
0.01107025146484375,
0.0031414031982421875,
0.046630859375,
-0.0210418701171875,
0.0116119384765625,
-0.0226287841796875,
-0.0302734375,
0.0005412101745605469,
-0.0275421142578125,
-0.039703369140625,
-0.00859832763671875,
0.06610107421875,
0.06439208984375,
0.0216217041015625,
-0.036041259765625,
-0.06268310546875,
-0.03656005859375,
0.028472900390625,
-0.0130462646484375,
0.005413055419921875,
-0.07293701171875,
0.015655517578125,
0.018951416015625,
0.01483154296875,
-0.00571441650390625,
-0.020050048828125,
-0.00792694091796875,
-0.016357421875,
0.01261138916015625,
-0.0004749298095703125,
0.00543212890625,
-0.046417236328125,
0.06060791015625,
-0.033172607421875,
0.028228759765625,
-0.022216796875,
0.04931640625,
0.044952392578125,
-0.0018939971923828125,
-0.00484466552734375,
0.015838623046875,
-0.01280975341796875,
0.0155181884765625,
0.005107879638671875,
-0.005733489990234375,
-0.00751495361328125,
-0.0026149749755859375,
0.0033321380615234375,
0.01174163818359375,
-0.0084381103515625,
0.006351470947265625,
0.01541900634765625,
-0.018402099609375,
-0.004985809326171875,
0.01280975341796875,
0.021514892578125,
-0.0016202926635742188,
-0.0038852691650390625,
0.048553466796875,
-0.006595611572265625,
-0.026031494140625,
-0.00902557373046875,
0.0004229545593261719,
0.00994110107421875,
0.03106689453125,
-0.01078033447265625,
-0.0333251953125,
0.0172576904296875,
0.08038330078125,
-0.0015077590942382812,
0.0194244384765625
]
|
5328010756058a6ab5063511be7e768093f813df | Wordpress Stackexchange
Q: Where can I find the code how wordpress parses a post? When you write a post in text section instead of visual WordPress will work with HTML. But when you save the post and preview it, it will transform your HTML-like text into real HTML with proper paragraphs etc. Where can I find the code how WordPress does this?
I need that algorithm to transform some text from HTML into HTML of my own that's coming from WordPress posts.
A: The specific function you are referring to is wpautop, which adds paragraphs & HTML linebreaks to already intermixed HTML & plain text.
wpautop is part of a family of content-processing functions hooked to the_content, a filter applied to the post content after pulling from the database just before outputting. Taking a look at wp-includes/default-filters.php, you can see the default functions are:
add_filter( 'the_content', 'wptexturize' );
add_filter( 'the_content', 'convert_smilies' );
add_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'shortcode_unautop' );
add_filter( 'the_content', 'prepend_attachment' );
add_filter( 'the_content', 'wp_make_content_images_responsive' );
You can remove them with remove_filter( 'the_content', 'name_of_function' ), and add your own with add_filter( 'the_content', 'my_function' ); - see the documentation for more information on adding filters.
| Q: Where can I find the code how wordpress parses a post? When you write a post in text section instead of visual WordPress will work with HTML. But when you save the post and preview it, it will transform your HTML-like text into real HTML with proper paragraphs etc. Where can I find the code how WordPress does this?
I need that algorithm to transform some text from HTML into HTML of my own that's coming from WordPress posts.
A: The specific function you are referring to is wpautop, which adds paragraphs & HTML linebreaks to already intermixed HTML & plain text.
wpautop is part of a family of content-processing functions hooked to the_content, a filter applied to the post content after pulling from the database just before outputting. Taking a look at wp-includes/default-filters.php, you can see the default functions are:
add_filter( 'the_content', 'wptexturize' );
add_filter( 'the_content', 'convert_smilies' );
add_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'shortcode_unautop' );
add_filter( 'the_content', 'prepend_attachment' );
add_filter( 'the_content', 'wp_make_content_images_responsive' );
You can remove them with remove_filter( 'the_content', 'name_of_function' ), and add your own with add_filter( 'the_content', 'my_function' ); - see the documentation for more information on adding filters.
| wordpress | {
"language": "en",
"length": 194,
"provenance": "stackexchange_00019.jsonl.gz:465327",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226161"
} | [
0.0007643699645996094,
-0.0015811920166015625,
-0.02410888671875,
-0.005237579345703125,
0.0230865478515625,
-0.040618896484375,
0.038543701171875,
-0.0218658447265625,
-0.00897216796875,
0.0180206298828125,
-0.03533935546875,
-0.0164947509765625,
-0.0232391357421875,
-0.020294189453125,
-0.0207061767578125,
-0.05511474609375,
0.0183868408203125,
-0.003814697265625,
0.01305389404296875,
-0.006580352783203125,
-0.0190277099609375,
0.004634857177734375,
0.0031223297119140625,
0.007793426513671875,
0.00034236907958984375,
0.01479339599609375,
0.07904052734375,
-0.03436279296875,
0.00414276123046875,
-0.0177154541015625,
0.0175323486328125,
0.00009900331497192383,
0.0260772705078125,
0.03948974609375,
-0.076904296875,
0.0064239501953125,
-0.013458251953125,
0.006099700927734375,
-0.0277557373046875,
0.033966064453125,
-0.00014793872833251953,
0.00537109375,
0.034027099609375,
0.01153564453125,
0.0006055831909179688,
-0.033233642578125,
0.018280029296875,
-0.058837890625,
0.00848388671875,
-0.004856109619140625,
0.026336669921875,
-0.01947021484375,
0.04595947265625,
-0.06304931640625,
-0.020355224609375,
-0.004558563232421875,
-0.004741668701171875,
0.0024566650390625,
0.033447265625,
-0.0086822509765625,
-0.0206298828125,
0.0011844635009765625,
0.01358795166015625,
0.001979827880859375,
-0.01262664794921875,
0.01910400390625,
0.00609588623046875,
-0.0159149169921875,
-0.021026611328125,
-0.01004791259765625,
0.017333984375,
-0.03179931640625,
-0.001049041748046875,
-0.040191650390625,
0.0265045166015625,
0.005634307861328125,
-0.0296630859375,
-0.02001953125,
0.0257720947265625,
0.01473236083984375,
0.07354736328125,
-0.003936767578125,
0.024322509765625,
-0.03558349609375,
0.0290985107421875,
-0.0293731689453125,
0.0201873779296875,
-0.01215362548828125,
-0.034088134765625,
-0.0269927978515625,
-0.0166015625,
0.007049560546875,
-0.051849365234375,
-0.007419586181640625,
-0.01557159423828125,
-0.01568603515625,
0.002674102783203125,
0.000006735324859619141,
-0.02911376953125,
0.03558349609375,
0.042633056640625,
-0.07269287109375,
0.12396240234375,
-0.047821044921875,
0.0194549560546875,
0.032440185546875,
-0.020355224609375,
0.03509521484375,
0.08251953125,
0.0183258056640625,
0.01201629638671875,
0.0201263427734375,
-0.0289306640625,
-0.023529052734375,
-0.0167083740234375,
0.022491455078125,
-0.0290679931640625,
-0.01171875,
-0.0015583038330078125,
-0.0221405029296875,
-0.01006317138671875,
-0.007358551025390625,
0.00110626220703125,
-0.033203125,
0.0102691650390625,
-0.0227203369140625,
-0.015838623046875,
-0.007389068603515625,
0.04345703125,
0.0180206298828125,
-0.0142822265625,
0.0046844482421875,
-0.006320953369140625,
0.01126861572265625,
0.0026760101318359375,
-0.00997161865234375,
0.0268707275390625,
-0.036529541015625,
-0.00786590576171875,
0.01325225830078125,
0.0029582977294921875,
-0.02093505859375,
-0.0169525146484375,
-0.0061798095703125,
0.0301055908203125,
0.0222625732421875,
0.0211639404296875,
0.01078033447265625,
-0.0079498291015625,
-0.06427001953125,
0.0234222412109375,
0.0002124309539794922,
0.034149169921875,
0.0164337158203125,
-0.00588226318359375,
-0.042999267578125,
0.0467529296875,
-0.060760498046875,
0.00751495361328125,
-0.08251953125,
0.062103271484375,
-0.0084075927734375,
-0.007007598876953125,
0.0310516357421875,
-0.00460052490234375,
0.0038814544677734375,
-0.07891845703125,
-0.00615692138671875,
0.0250244140625,
0.00707244873046875,
-0.0213623046875,
-0.01739501953125,
0.001125335693359375,
0.005992889404296875,
0.0010614395141601562,
0.02960205078125,
-0.04083251953125,
0.00543975830078125,
0.0166015625,
0.046417236328125,
0.031341552734375,
-0.018402099609375,
0.02435302734375,
0.02008056640625,
-0.054107666015625,
0.0152740478515625,
0.03155517578125,
0.0740966796875,
0.01654052734375,
0.046478271484375,
0.0033817291259765625,
-0.004116058349609375,
-0.03375244140625,
-0.00481414794921875,
0.003711700439453125,
-0.02471923828125,
-0.0156402587890625,
-0.01873779296875,
-0.0010747909545898438,
0.03179931640625,
0.034271240234375,
-0.003726959228515625,
0.03216552734375,
-0.0246429443359375,
-0.036346435546875,
0.01074981689453125,
-0.0257720947265625,
0.038482666015625,
-0.0234527587890625,
-0.0246734619140625,
0.035369873046875,
-0.0280914306640625,
-0.01316070556640625,
-0.0235595703125,
-0.041778564453125,
0.002307891845703125,
-0.011993408203125,
-0.0087738037109375,
0.0008678436279296875,
-0.0028934478759765625,
0.0143890380859375,
-0.03564453125,
-0.0257720947265625,
-0.006450653076171875,
0.046722412109375,
-0.004337310791015625,
-0.0158233642578125,
-0.00824737548828125,
0.0217132568359375,
-0.0048828125,
0.00122833251953125,
0.045928955078125,
0.025604248046875,
0.02783203125,
-0.0218963623046875,
-0.0023136138916015625,
0.00946044921875,
-0.0312042236328125,
-0.0048828125,
0.040069580078125,
0.04913330078125,
0.064697265625,
0.00992584228515625,
-0.0227813720703125,
0.11309814453125,
-0.007450103759765625,
0.01125335693359375,
-0.030120849609375,
0.034393310546875,
0.0281829833984375,
-0.02264404296875,
-0.03009033203125,
0.037506103515625,
-0.08673095703125,
0.030181884765625,
0.0258636474609375,
0.0014066696166992188,
0.002490997314453125,
-0.03863525390625,
0.031341552734375,
0.003467559814453125,
0.0293121337890625,
-0.00908660888671875,
-0.005405426025390625,
0.031036376953125,
0.0009098052978515625,
0.053741455078125,
0.0204315185546875,
-0.021728515625,
-0.005565643310546875,
0.025177001953125,
0.0279541015625,
-0.003749847412109375,
-0.0013942718505859375,
-0.00911712646484375,
0.012969970703125,
-0.01934814453125,
0.0084228515625,
0.01064300537109375,
-0.006683349609375,
-0.01242828369140625,
0.0489501953125,
-0.038330078125,
-0.035614013671875,
-0.0036163330078125,
-0.0360107421875,
-0.028564453125,
-0.03839111328125,
0.0294342041015625,
0.0134735107421875,
-0.00030875205993652344,
0.048187255859375,
0.01531219482421875,
0.043487548828125,
0.0230255126953125,
0.0167236328125,
0.00948333740234375,
-0.04437255859375,
0.04705810546875,
-0.0311431884765625,
0.036224365234375,
0.0738525390625,
0.01045989990234375,
0.002719879150390625,
0.0012102127075195312,
-0.005870819091796875,
0.0197601318359375,
0.0137176513671875,
0.001434326171875,
-0.0101165771484375,
-0.04608154296875,
0.0000966191291809082,
0.01157379150390625,
-0.01812744140625,
-0.0284881591796875,
-0.030914306640625,
-0.045806884765625,
-0.0276336669921875,
-0.0982666015625,
-0.031524658203125,
0.024627685546875,
-0.05169677734375,
-0.07537841796875,
0.03302001953125,
-0.06048583984375,
0.027252197265625,
0.0433349609375,
-0.021942138671875,
-0.04620361328125,
-0.014404296875,
-0.06573486328125,
-0.04693603515625,
-0.059967041015625,
0.0621337890625,
-0.00820159912109375,
0.042877197265625,
0.0106353759765625,
0.0305328369140625,
0.025970458984375,
-0.038421630859375,
0.0208740234375,
0.0191192626953125,
-0.0203399658203125,
0.0198211669921875,
0.00928497314453125,
-0.033203125,
-0.01421356201171875,
0.0029926300048828125,
-0.0009555816650390625,
0.007198333740234375,
-0.007534027099609375,
0.0019168853759765625,
-0.028106689453125,
0.0160675048828125,
-0.011962890625,
0.0195770263671875,
0.04150390625,
-0.0015964508056640625,
0.01068878173828125,
-0.042694091796875,
-0.017608642578125,
-0.01326751708984375,
-0.02392578125,
0.0345458984375,
-0.005039215087890625,
-0.0005388259887695312,
-0.00630950927734375,
0.039337158203125,
0.029510498046875,
0.008026123046875,
0.07281494140625,
-0.0171356201171875,
0.0166778564453125,
-0.00213623046875,
0.01067352294921875,
-0.0665283203125,
0.035430908203125,
-0.01226043701171875,
0.004238128662109375,
0.0187225341796875,
0.0236053466796875,
0.0200653076171875,
-0.019256591796875,
-0.01058197021484375,
0.0011043548583984375,
0.056365966796875,
0.053955078125,
0.027069091796875,
0.0108489990234375,
-0.0494384765625,
0.01629638671875,
0.06549072265625,
-0.0212554931640625,
0.00577545166015625,
0.0167236328125,
-0.004756927490234375,
-0.004833221435546875,
-0.0330810546875,
-0.06256103515625,
-0.0241851806640625,
-0.067626953125,
-0.018707275390625,
-0.044891357421875,
-0.006549835205078125,
-0.011688232421875,
0.0047760009765625,
-0.02392578125,
-0.048065185546875,
0.049041748046875,
0.000637054443359375,
0.0308074951171875,
0.003154754638671875,
0.00542449951171875,
-0.00899505615234375,
-0.03216552734375,
-0.0002799034118652344,
-0.04669189453125,
-0.000020444393157958984,
-0.054656982421875,
0.03271484375,
0.035675048828125,
-0.013153076171875,
0.0017290115356445312,
0.0266876220703125,
0.0281524658203125,
0.005168914794921875,
-0.00836944580078125,
-0.00962066650390625,
0.00342559814453125,
-0.031341552734375,
-0.001873016357421875,
-0.046112060546875,
0.00601959228515625,
-0.004940032958984375,
-0.00682830810546875,
0.061004638671875,
-0.020965576171875,
0.014404296875,
-0.0312042236328125,
-0.001964569091796875,
-0.05755615234375,
-0.0289764404296875,
-0.030853271484375,
0.00856781005859375,
-0.04144287109375,
0.012969970703125,
-0.021270751953125,
-0.05224609375,
0.057861328125,
0.00647735595703125,
-0.002361297607421875,
-0.006191253662109375,
0.079833984375,
0.016021728515625,
-0.023651123046875,
-0.003681182861328125,
-0.0184326171875,
0.036865234375,
0.0305023193359375,
0.039642333984375,
0.042083740234375,
-0.017486572265625,
0.026214599609375,
0.0330810546875,
0.0176239013671875,
-0.023834228515625,
0.04736328125,
0.0204315185546875,
0.024322509765625,
-0.00942230224609375,
0.0171051025390625,
0.014007568359375,
0.01560211181640625,
0.012359619140625,
-0.019775390625,
0.07196044921875,
0.01436614990234375,
-0.0182342529296875,
-0.01422882080078125,
0.00890350341796875,
-0.0119171142578125,
-0.00982666015625,
-0.00656890869140625,
0.042510986328125,
0.0242156982421875,
0.0025691986083984375,
0.005680084228515625,
0.0297393798828125,
0.01800537109375,
-0.014007568359375,
-0.0015401840209960938,
-0.0300445556640625,
0.060516357421875,
-0.039306640625,
-0.00034117698669433594,
0.001049041748046875,
0.01284027099609375,
-0.0280914306640625,
0.0005936622619628906,
-0.0059356689453125,
-0.047088623046875,
0.035247802734375,
0.00628662109375,
-0.0027866363525390625,
-0.003597259521484375,
0.044586181640625,
0.03656005859375,
-0.02734375,
0.0054168701171875,
0.0021800994873046875,
-0.0159912109375,
-0.057281494140625,
-0.0214996337890625,
-0.02545166015625,
0.0158233642578125,
0.02978515625,
-0.0150604248046875,
-0.0134735107421875,
0.006809234619140625,
-0.01483917236328125,
0.012451171875,
0.0223541259765625,
0.0038661956787109375,
0.0095062255859375,
0.01317596435546875,
0.0025424957275390625,
-0.0206756591796875,
0.0193328857421875,
-0.051849365234375,
-0.0394287109375,
0.0186004638671875,
0.0625,
-0.0133819580078125,
-0.0020599365234375,
0.001827239990234375,
0.00341033935546875,
-0.006481170654296875,
0.00963592529296875,
0.0004220008850097656,
-0.0198974609375,
-0.03289794921875,
0.003841400146484375,
0.037384033203125,
0.0137939453125,
-0.0203399658203125,
0.010223388671875,
-0.0077972412109375,
0.01287078857421875,
0.041595458984375,
-0.035247802734375,
0.0090789794921875,
0.01372528076171875,
0.0120697021484375,
-0.0285186767578125,
-0.04583740234375,
-0.02874755859375,
-0.00868988037109375,
-0.0012578964233398438,
0.00600433349609375,
0.067626953125,
-0.0250244140625,
-0.0035305023193359375,
-0.0309295654296875,
0.022918701171875,
-0.024566650390625,
-0.000039577484130859375,
0.057373046875,
0.01030731201171875,
-0.0273284912109375,
-0.0174560546875,
-0.044921875,
-0.02545166015625,
-0.0279541015625,
-0.01629638671875,
-0.051910400390625,
0.006649017333984375,
-0.0241241455078125,
-0.0026302337646484375,
-0.025421142578125,
0.020050048828125,
-0.01073455810546875,
0.02520751953125,
-0.007152557373046875,
0.019317626953125,
-0.0245208740234375,
0.082275390625,
-0.006259918212890625,
0.0841064453125,
0.012451171875,
0.025390625,
0.00032639503479003906,
-0.0239715576171875,
0.01189422607421875,
-0.0728759765625,
-0.033355712890625,
-0.0121002197265625,
-0.0228271484375,
0.0396728515625,
-0.011016845703125,
-0.0026874542236328125,
0.0149993896484375,
-0.0155487060546875,
-0.015411376953125,
-0.031524658203125,
0.006572723388671875,
-0.0113525390625,
0.01666259765625,
-0.006069183349609375,
-0.0292510986328125,
-0.0117034912109375,
-0.00998687744140625,
-0.0235137939453125,
0.0234527587890625,
-0.0040435791015625,
-0.01151275634765625,
0.05322265625,
-0.0023593902587890625,
0.0134735107421875,
0.057220458984375,
0.001033782958984375,
0.023223876953125,
0.0184783935546875,
-0.0030879974365234375,
0.0013589859008789062,
-0.0107421875,
0.005306243896484375,
0.01629638671875,
0.0404052734375,
-0.00827789306640625,
-0.019561767578125,
0.01256561279296875,
-0.042083740234375,
0.0201568603515625,
0.061187744140625,
0.087158203125,
-0.07421875,
0.004421234130859375,
0.04473876953125,
-0.01461029052734375,
-0.014678955078125,
0.005138397216796875,
-0.038787841796875,
-0.03692626953125,
0.058563232421875,
-0.0005221366882324219,
-0.003437042236328125,
0.035797119140625,
0.0221710205078125,
-0.0294342041015625,
-0.0146636962890625,
0.046356201171875,
0.019989013671875,
-0.050689697265625,
0.0210723876953125,
0.0274658203125,
-0.0216064453125,
-0.057830810546875,
0.0211639404296875,
0.018463134765625,
-0.0020313262939453125,
-0.0635986328125,
0.032684326171875,
0.0180206298828125,
0.00576019287109375,
-0.0112762451171875,
-0.0140380859375,
0.005157470703125,
0.064453125,
-0.046417236328125,
0.043304443359375,
0.0215301513671875,
-0.01515960693359375,
-0.035919189453125,
-0.02166748046875,
0.01255035400390625,
0.035369873046875,
-0.061737060546875,
0.027923583984375,
-0.038726806640625,
-0.00510406494140625,
-0.004230499267578125,
-0.051055908203125,
0.0209503173828125,
-0.0014524459838867188,
-0.0161895751953125,
0.037933349609375,
-0.027130126953125,
-0.01019287109375,
-0.0225677490234375,
0.00649261474609375,
-0.034942626953125,
-0.0281829833984375,
-0.02923583984375,
-0.07928466796875,
-0.00740814208984375,
-0.051605224609375,
-0.097412109375,
0.07281494140625,
0.036102294921875,
0.03619384765625,
0.0146026611328125,
0.0106353759765625,
-0.0716552734375,
-0.042510986328125,
-0.033477783203125,
0.054962158203125,
-0.005535125732421875,
0.048614501953125,
-0.04486083984375,
-0.00814056396484375,
0.022796630859375,
0.048248291015625,
-0.0005998611450195312,
0.0016527175903320312,
-0.0235595703125,
-0.0144500732421875,
0.016754150390625,
0.03155517578125,
-0.00295257568359375,
0.0093231201171875,
-0.0242156982421875,
0.0251312255859375,
-0.030853271484375,
-0.06097412109375,
0.01422882080078125,
-0.04638671875,
-0.051727294921875,
0.0012292861938476562,
0.01263427734375,
0.01531982421875,
0.014556884765625,
0.017791748046875,
-0.00792694091796875,
-0.00493621826171875,
0.01439666748046875,
-0.01201629638671875,
-0.0027256011962890625,
0.05059814453125,
0.040557861328125,
-0.07373046875,
-0.07073974609375,
-0.0291900634765625,
0.0293121337890625,
0.0031299591064453125,
0.07562255859375,
0.047821044921875,
0.03961181640625,
0.035858154296875,
0.0014476776123046875,
0.04632568359375,
0.007843017578125,
-0.0229644775390625,
0.015106201171875,
-0.00431060791015625,
-0.00637054443359375,
-0.06463623046875,
-0.0003974437713623047,
0.05926513671875,
0.0355224609375,
-0.0284271240234375,
-0.00792694091796875,
0.0199432373046875,
0.009368896484375,
-0.00751495361328125,
-0.01174163818359375,
0.0214080810546875,
-0.06103515625,
-0.052581787109375,
-0.01593017578125,
-0.03240966796875,
0.035919189453125,
0.004116058349609375,
0.007843017578125,
0.03265380859375,
0.006832122802734375,
-0.0306396484375,
-0.0550537109375,
0.0091705322265625,
0.0262603759765625,
0.0556640625,
0.017578125,
0.059967041015625,
0.0078125,
-0.027587890625,
-0.0211944580078125,
0.0309600830078125,
-0.01166534423828125,
0.031646728515625,
-0.020538330078125,
-0.009002685546875,
-0.0035228729248046875,
0.0279693603515625,
0.0205230712890625,
-0.0027904510498046875,
0.01352691650390625,
0.009918212890625,
-0.0335693359375,
-0.00231170654296875,
0.03240966796875,
-0.019256591796875,
-0.0005812644958496094,
-0.033416748046875,
-0.004016876220703125,
0.006053924560546875,
-0.01334381103515625,
0.0119781494140625,
-0.01035308837890625,
0.042816162109375,
-0.005680084228515625,
0.03448486328125,
-0.0117645263671875,
-0.0161285400390625,
0.0703125,
-0.01053619384765625,
0.0654296875,
0.0144195556640625,
-0.1121826171875,
0.0033111572265625,
-0.03900146484375,
-0.10137939453125,
0.040740966796875,
0.042633056640625,
-0.06707763671875,
0.0201263427734375,
0.0149993896484375,
-0.0340576171875,
0.0218353271484375,
0.007843017578125,
-0.0002237558364868164,
-0.004520416259765625,
-0.0035552978515625,
-0.02313232421875,
-0.0099029541015625,
-0.01453399658203125,
-0.0193939208984375,
0.0673828125,
-0.0030040740966796875,
0.10589599609375,
-0.0635986328125,
0.031280517578125,
-0.029571533203125,
0.0102691650390625,
-0.01898193359375,
-0.005405426025390625,
0.0261993408203125,
0.0465087890625,
0.0028839111328125,
-0.037322998046875,
0.0090789794921875,
-0.029754638671875,
0.04302978515625,
-0.038116455078125,
-0.031402587890625,
-0.0207366943359375,
0.02239990234375,
-0.017364501953125,
0.0224151611328125,
-0.0039520263671875,
0.01145172119140625,
-0.0113983154296875,
-0.0255126953125,
0.05096435546875,
0.0311431884765625,
0.01617431640625,
0.0310821533203125,
0.037506103515625,
0.006603240966796875,
0.028167724609375,
-0.0202484130859375,
0.066162109375,
0.0584716796875,
-0.03704833984375,
-0.0101318359375,
0.003627777099609375,
-0.01824951171875,
-0.01016998291015625,
0.0058441162109375,
0.0018768310546875,
0.018341064453125,
-0.10205078125,
0.002880096435546875,
-0.033050537109375,
0.0285491943359375,
-0.0149078369140625,
-0.006679534912109375,
-0.01201629638671875,
-0.0011749267578125,
-0.00858306884765625,
0.04974365234375,
-0.01053619384765625,
-0.01023101806640625,
-0.0377197265625,
-0.004779815673828125,
-0.027923583984375,
-0.032135009765625,
-0.05377197265625,
-0.019195556640625,
0.06298828125,
0.02972412109375,
-0.054931640625,
-0.00664520263671875,
0.01061248779296875,
0.01898193359375,
0.038177490234375,
0.01111602783203125,
-0.028472900390625,
-0.00146484375,
-0.03411865234375,
-0.052490234375,
-0.0626220703125,
0.04925537109375,
-0.059112548828125,
0.0217742919921875,
0.04656982421875,
-0.016510009765625,
-0.0126495361328125,
0.039581298828125,
-0.00494384765625,
0.09002685546875,
-0.0574951171875,
-0.002849578857421875,
0.03997802734375,
0.0171966552734375,
-0.015716552734375,
-0.04229736328125,
-0.0236663818359375,
0.0220947265625,
0.039886474609375,
0.037841796875,
-0.02728271484375,
-0.012054443359375,
-0.0305938720703125,
-0.0697021484375,
0.0007472038269042969,
0.01158905029296875,
-0.03729248046875,
-0.01062774658203125,
0.00405120849609375,
0.004161834716796875,
-0.0014257431030273438,
-0.0136871337890625,
-0.012603759765625,
-0.029144287109375,
0.00614166259765625,
-0.0173187255859375,
0.055938720703125,
-0.0189208984375,
-0.022674560546875,
-0.01824951171875,
0.01137542724609375,
0.01406097412109375,
-0.0023784637451171875,
-0.0230255126953125,
-0.0112152099609375,
0.024261474609375,
0.0276031494140625,
-0.0172119140625,
-0.01403045654296875,
0.01727294921875,
-0.01490020751953125,
-0.01340484619140625,
-0.03692626953125,
-0.002384185791015625,
-0.012115478515625,
0.046539306640625,
0.035430908203125,
-0.0008683204650878906,
-0.018890380859375,
0.0111541748046875,
-0.0220489501953125,
-0.024627685546875,
-0.0184326171875,
0.0022258758544921875,
-0.038604736328125,
-0.026123046875,
-0.005512237548828125,
-0.0245819091796875,
0.019378662109375,
-0.0693359375,
-0.041259765625,
-0.01421356201171875,
-0.06622314453125,
0.026947021484375,
-0.05322265625,
-0.044769287109375,
0.049591064453125,
-0.0301361083984375,
0.012237548828125,
-0.004833221435546875,
0.032012939453125,
0.023956298828125,
0.0234222412109375,
-0.007537841796875,
-0.005191802978515625,
0.00015032291412353516,
-0.007534027099609375,
0.0247039794921875,
-0.0073089599609375,
0.02178955078125,
-0.006008148193359375,
0.004016876220703125,
-0.01392364501953125,
0.0082550048828125,
-0.0161590576171875,
-0.0166015625,
-0.0005846023559570312,
-0.0261993408203125,
-0.00341796875,
-0.0190582275390625,
0.00623321533203125,
-0.0185394287109375,
0.02490234375,
-0.00927734375,
-0.0074615478515625,
0.036529541015625,
-0.0101776123046875,
-0.00006985664367675781,
-0.036285400390625,
-0.00958251953125,
-0.0516357421875,
0.0234527587890625,
-0.057281494140625,
0.0013065338134765625,
0.020782470703125
]
|
46411f8287d381b80a9a61e7b983ebf991822525 | Wordpress Stackexchange
Q: Detect whether a page is a product subcategory page? How can I detect whether current page is a product sub category page?
I've tried with the following but it will always print out "NO"
function is_subcategory($category = null) {
if (is_category()) {
if (null != $category){
$cat = get_category($category);
}else{
$cat = get_category(get_query_var('cat'),false);
}
if ($cat->parent == 0 ){
return false;
}else{
return true;
}
}
return false;
}
if (is_subcategory()){
echo "YES";
}else{
echo "NO";
}
A: is_category() only check the built in post category. Product categories are custom taxonomies. So you need to use is_tax() instead of is_category() and get_term() instead of get_category().
Check this example:-
function is_subcategory($cat_id = null) {
if (is_tax('product_cat')) {
if (empty($cat_id)){
$cat_id = get_queried_object_id();
}
$cat = get_term(get_queried_object_id(), 'product_cat');
if ( empty($cat->parent) ){
return false;
}else{
return true;
}
}
return false;
}
Also safe side instead of get_query_var() use get_queried_object_id()
| Q: Detect whether a page is a product subcategory page? How can I detect whether current page is a product sub category page?
I've tried with the following but it will always print out "NO"
function is_subcategory($category = null) {
if (is_category()) {
if (null != $category){
$cat = get_category($category);
}else{
$cat = get_category(get_query_var('cat'),false);
}
if ($cat->parent == 0 ){
return false;
}else{
return true;
}
}
return false;
}
if (is_subcategory()){
echo "YES";
}else{
echo "NO";
}
A: is_category() only check the built in post category. Product categories are custom taxonomies. So you need to use is_tax() instead of is_category() and get_term() instead of get_category().
Check this example:-
function is_subcategory($cat_id = null) {
if (is_tax('product_cat')) {
if (empty($cat_id)){
$cat_id = get_queried_object_id();
}
$cat = get_term(get_queried_object_id(), 'product_cat');
if ( empty($cat->parent) ){
return false;
}else{
return true;
}
}
return false;
}
Also safe side instead of get_query_var() use get_queried_object_id()
| wordpress | {
"language": "en",
"length": 149,
"provenance": "stackexchange_00019.jsonl.gz:465332",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226180"
} | [
0.0032634735107421875,
-0.00015783309936523438,
-0.033477783203125,
-0.06475830078125,
0.02239990234375,
-0.020782470703125,
0.0004794597625732422,
0.0137939453125,
-0.007205963134765625,
-0.0230865478515625,
-0.038848876953125,
-0.02264404296875,
-0.033111572265625,
-0.0433349609375,
0.0148773193359375,
-0.0599365234375,
0.02178955078125,
-0.0150909423828125,
0.0074462890625,
-0.01277923583984375,
-0.00885009765625,
0.003231048583984375,
0.0195770263671875,
0.0232391357421875,
0.03790283203125,
-0.07672119140625,
0.063720703125,
-0.034332275390625,
0.02587890625,
-0.04742431640625,
0.0278167724609375,
0.02374267578125,
0.004642486572265625,
0.024566650390625,
0.0140380859375,
0.037078857421875,
-0.0035800933837890625,
0.0182647705078125,
0.052490234375,
-0.0038204193115234375,
0.034820556640625,
-0.0178070068359375,
0.00910186767578125,
0.0180511474609375,
0.0012607574462890625,
-0.0238037109375,
0.0163116455078125,
-0.04254150390625,
0.01189422607421875,
-0.019256591796875,
0.02056884765625,
0.002170562744140625,
0.0285797119140625,
-0.033294677734375,
-0.0201416015625,
0.0089111328125,
-0.00006633996963500977,
-0.004596710205078125,
0.037841796875,
0.0143280029296875,
-0.046173095703125,
-0.0186309814453125,
0.01346588134765625,
-0.061126708984375,
0.0145263671875,
0.0085296630859375,
-0.0124053955078125,
0.0250396728515625,
-0.0323486328125,
-0.0117645263671875,
0.011871337890625,
-0.02874755859375,
0.02239990234375,
0.03704833984375,
-0.025054931640625,
-0.09722900390625,
0.04376220703125,
-0.018707275390625,
0.004329681396484375,
0.0226593017578125,
-0.01425933837890625,
0.00047087669372558594,
-0.05218505859375,
0.0010938644409179688,
-0.0130462646484375,
0.0228729248046875,
-0.018157958984375,
-0.0162200927734375,
-0.042724609375,
-0.03973388671875,
-0.03240966796875,
-0.031280517578125,
-0.037109375,
-0.032379150390625,
-0.03558349609375,
-0.03594970703125,
0.031982421875,
0.0755615234375,
-0.0310211181640625,
-0.016754150390625,
-0.01544952392578125,
-0.030670166015625,
-0.0259857177734375,
-0.033416748046875,
0.038970947265625,
0.055938720703125,
-0.0146636962890625,
-0.034637451171875,
0.06707763671875,
0.01015472412109375,
0.034332275390625,
0.06683349609375,
-0.01018524169921875,
-0.03839111328125,
-0.035980224609375,
0.06500244140625,
0.0133056640625,
-0.0374755859375,
-0.0026702880859375,
0.004016876220703125,
0.033935546875,
0.068603515625,
0.0192718505859375,
-0.042144775390625,
0.03741455078125,
0.040985107421875,
-0.019378662109375,
-0.06036376953125,
0.0187835693359375,
-0.03277587890625,
-0.047607421875,
0.032196044921875,
0.06689453125,
0.00016987323760986328,
0.007144927978515625,
-0.006992340087890625,
0.0221099853515625,
0.0362548828125,
0.039398193359375,
-0.0292510986328125,
0.044921875,
0.00720977783203125,
0.020233154296875,
0.01087188720703125,
-0.055206298828125,
-0.01033782958984375,
0.0068359375,
0.0300750732421875,
-0.010101318359375,
-0.0457763671875,
0.033966064453125,
-0.060211181640625,
0.03399658203125,
-0.003765106201171875,
-0.03778076171875,
-0.033477783203125,
-0.0086822509765625,
-0.0101776123046875,
-0.007068634033203125,
-0.047607421875,
0.042755126953125,
-0.006755828857421875,
0.031341552734375,
-0.0240020751953125,
-0.038360595703125,
0.0036830902099609375,
-0.09564208984375,
-0.0188446044921875,
0.0185089111328125,
0.031280517578125,
0.037261962890625,
-0.00969696044921875,
-0.0097503662109375,
0.0165863037109375,
0.002979278564453125,
-0.004608154296875,
-0.0111846923828125,
0.0165557861328125,
0.04248046875,
-0.0240325927734375,
-0.049591064453125,
-0.04705810546875,
0.037445068359375,
-0.03155517578125,
-0.0433349609375,
0.043212890625,
0.0214080810546875,
0.044189453125,
-0.03106689453125,
-0.001819610595703125,
0.06817626953125,
0.052764892578125,
-0.042144775390625,
0.003429412841796875,
0.01462554931640625,
-0.0206756591796875,
0.0214996337890625,
-0.00860595703125,
0.0018672943115234375,
-0.015594482421875,
0.023651123046875,
0.00421142578125,
-0.018035888671875,
-0.0012350082397460938,
-0.063720703125,
0.005340576171875,
-0.0204010009765625,
0.0285491943359375,
0.005062103271484375,
0.0572509765625,
-0.00034308433532714844,
0.004413604736328125,
-0.02545166015625,
0.006099700927734375,
0.0186920166015625,
-0.01355743408203125,
-0.001201629638671875,
0.00412750244140625,
-0.012847900390625,
-0.0028514862060546875,
-0.038116455078125,
0.03778076171875,
-0.019927978515625,
0.019439697265625,
0.044708251953125,
0.035736083984375,
-0.005859375,
0.00881195068359375,
0.06451416015625,
0.06121826171875,
-0.041015625,
-0.04364013671875,
0.062286376953125,
0.0260467529296875,
-0.0300140380859375,
0.0119171142578125,
0.0174713134765625,
-0.04266357421875,
-0.025177001953125,
0.051239013671875,
0.03668212890625,
-0.0123138427734375,
-0.025390625,
-0.03070068359375,
0.08953857421875,
-0.045257568359375,
-0.0313720703125,
-0.004726409912109375,
-0.01203155517578125,
0.0457763671875,
-0.0225067138671875,
0.051361083984375,
0.00994873046875,
0.0278472900390625,
-0.006656646728515625,
0.041748046875,
0.0070648193359375,
-0.0195770263671875,
0.00548553466796875,
0.006656646728515625,
-0.00031757354736328125,
0.0210418701171875,
-0.023040771484375,
0.016754150390625,
0.0516357421875,
0.006214141845703125,
0.0574951171875,
0.0435791015625,
0.0154266357421875,
-0.01042938232421875,
-0.0173492431640625,
-0.04119873046875,
-0.007411956787109375,
0.037872314453125,
0.06866455078125,
-0.01126861572265625,
-0.05401611328125,
-0.0099334716796875,
0.01488494873046875,
0.018768310546875,
-0.0084991455078125,
0.07171630859375,
0.017486572265625,
-0.021820068359375,
-0.0455322265625,
-0.0289459228515625,
-0.005893707275390625,
-0.0194549560546875,
-0.00801849365234375,
0.007205963134765625,
0.0289459228515625,
0.04608154296875,
-0.01654052734375,
0.0533447265625,
-0.04571533203125,
0.00487518310546875,
0.044830322265625,
-0.022735595703125,
0.0458984375,
-0.03173828125,
0.02215576171875,
0.0465087890625,
-0.02374267578125,
0.01299285888671875,
-0.0004239082336425781,
-0.018310546875,
0.00879669189453125,
-0.0110931396484375,
-0.022705078125,
0.0214996337890625,
-0.07562255859375,
0.004058837890625,
0.01235198974609375,
0.0369873046875,
0.0135650634765625,
-0.031463623046875,
0.03729248046875,
0.00820159912109375,
-0.051605224609375,
-0.0731201171875,
-0.0008344650268554688,
-0.0237274169921875,
0.00911712646484375,
-0.0035190582275390625,
0.0111236572265625,
-0.0236968994140625,
0.0058135986328125,
-0.0088348388671875,
-0.00928497314453125,
-0.05535888671875,
-0.029541015625,
-0.07110595703125,
-0.04931640625,
0.00669097900390625,
0.00396728515625,
-0.006778717041015625,
0.007099151611328125,
0.037994384765625,
0.0217742919921875,
-0.045135498046875,
0.0117950439453125,
0.045196533203125,
-0.0144195556640625,
0.01457977294921875,
-0.0243377685546875,
-0.0213470458984375,
0.036285400390625,
0.00937652587890625,
-0.01214599609375,
-0.0032901763916015625,
0.02325439453125,
-0.0260009765625,
0.005367279052734375,
0.046417236328125,
0.03790283203125,
0.01085662841796875,
-0.01230621337890625,
0.0706787109375,
0.0391845703125,
0.00629425048828125,
-0.05426025390625,
-0.01456451416015625,
-0.052703857421875,
0.0305938720703125,
0.019287109375,
0.013397216796875,
0.0266265869140625,
0.008026123046875,
0.006336212158203125,
-0.00383758544921875,
-0.00489044189453125,
-0.02471923828125,
-0.005596160888671875,
0.014404296875,
0.01520538330078125,
0.01242828369140625,
0.035186767578125,
-0.02923583984375,
0.00934600830078125,
0.00662994384765625,
-0.0256805419921875,
-0.005756378173828125,
-0.0220794677734375,
0.0037136077880859375,
-0.03369140625,
0.02734375,
-0.0316162109375,
0.00818634033203125,
-0.040679931640625,
-0.01371002197265625,
-0.00972747802734375,
0.06976318359375,
0.006755828857421875,
-0.01690673828125,
-0.01134490966796875,
0.00856781005859375,
-0.02874755859375,
-0.047027587890625,
-0.031524658203125,
0.0038509368896484375,
-0.056396484375,
-0.00830078125,
-0.022796630859375,
-0.019866943359375,
-0.0262298583984375,
0.02301025390625,
-0.049346923828125,
-0.01983642578125,
0.026336669921875,
-0.0557861328125,
-0.0003681182861328125,
0.0192108154296875,
-0.013397216796875,
0.0012350082397460938,
-0.0184783935546875,
-0.0299072265625,
-0.044403076171875,
0.0004818439483642578,
0.00839996337890625,
-0.01003265380859375,
-0.023895263671875,
0.0007662773132324219,
-0.008056640625,
0.040618896484375,
0.0233306884765625,
-0.013275146484375,
0.0252838134765625,
-0.006206512451171875,
-0.002521514892578125,
-0.00731658935546875,
-0.0020275115966796875,
-0.027587890625,
0.007633209228515625,
-0.0120391845703125,
-0.0001531839370727539,
-0.001987457275390625,
-0.05657958984375,
-0.0172882080078125,
-0.027801513671875,
-0.00820159912109375,
-0.033050537109375,
-0.037872314453125,
-0.02239990234375,
-0.005939483642578125,
-0.031341552734375,
0.00582122802734375,
-0.0226898193359375,
-0.031646728515625,
0.0303192138671875,
0.017913818359375,
-0.01898193359375,
0.00014388561248779297,
0.0176239013671875,
0.01383209228515625,
-0.0294647216796875,
-0.0169525146484375,
0.0226287841796875,
0.019775390625,
-0.004108428955078125,
0.03936767578125,
0.00920867919921875,
-0.0203399658203125,
0.0266265869140625,
0.01025390625,
0.0037670135498046875,
0.0093994140625,
0.040618896484375,
-0.01007080078125,
-0.0247802734375,
0.0010557174682617188,
-0.0298309326171875,
0.01543426513671875,
0.0052642822265625,
-0.02227783203125,
-0.044921875,
-0.02777099609375,
0.053436279296875,
0.0071563720703125,
0.03887939453125,
-0.03143310546875,
-0.0205535888671875,
0.0087127685546875,
0.043365478515625,
0.037078857421875,
0.03070068359375,
0.0011453628540039062,
0.02386474609375,
0.023895263671875,
0.02044677734375,
-0.0128631591796875,
0.037567138671875,
-0.0309600830078125,
0.033905029296875,
-0.0195465087890625,
-0.01271820068359375,
-0.026458740234375,
0.0218353271484375,
-0.0509033203125,
-0.029754638671875,
-0.0186004638671875,
-0.0269317626953125,
0.0079193115234375,
-0.0145263671875,
0.02044677734375,
-0.02471923828125,
0.01270294189453125,
0.0006947517395019531,
-0.0282440185546875,
0.01776123046875,
-0.05096435546875,
-0.0021915435791015625,
-0.036102294921875,
-0.031097412109375,
-0.0200958251953125,
-0.0085601806640625,
0.006389617919921875,
0.041534423828125,
-0.028656005859375,
0.040771484375,
0.0009312629699707031,
0.004604339599609375,
0.0247650146484375,
0.049530029296875,
0.0256500244140625,
-0.046783447265625,
-0.01026153564453125,
0.031158447265625,
0.03228759765625,
-0.040435791015625,
-0.01885986328125,
0.028839111328125,
0.05224609375,
-0.03509521484375,
-0.031768798828125,
0.00391387939453125,
-0.0227813720703125,
-0.032470703125,
0.0183563232421875,
-0.003032684326171875,
-0.028411865234375,
-0.0306396484375,
-0.01221466064453125,
0.01384735107421875,
0.01308441162109375,
-0.0295562744140625,
0.004543304443359375,
-0.06134033203125,
0.003711700439453125,
-0.0006084442138671875,
-0.0146484375,
0.01262664794921875,
0.007198333740234375,
-0.072265625,
-0.01308441162109375,
0.04656982421875,
-0.018096923828125,
0.004497528076171875,
-0.02764892578125,
-0.060455322265625,
0.0249176025390625,
0.0148773193359375,
0.060272216796875,
-0.042694091796875,
-0.03857421875,
-0.0160064697265625,
-0.01983642578125,
0.07525634765625,
0.045013427734375,
-0.030059814453125,
-0.0171661376953125,
-0.058990478515625,
-0.0189361572265625,
-0.00324249267578125,
-0.022613525390625,
-0.0182647705078125,
-0.003963470458984375,
-0.0009598731994628906,
0.0300750732421875,
-0.02020263671875,
-0.037994384765625,
-0.0206298828125,
0.00982666015625,
0.011444091796875,
0.01971435546875,
-0.034454345703125,
0.0633544921875,
0.0075531005859375,
0.0015630722045898438,
-0.0006527900695800781,
0.00826263427734375,
-0.006946563720703125,
0.00832366943359375,
-0.04217529296875,
-0.054229736328125,
0.054931640625,
0.01467132568359375,
0.01435089111328125,
0.00811767578125,
0.030914306640625,
0.031829833984375,
0.007335662841796875,
0.005435943603515625,
-0.0013647079467773438,
-0.01227569580078125,
-0.0206298828125,
0.03643798828125,
0.02398681640625,
0.0124053955078125,
-0.029876708984375,
0.00014007091522216797,
0.0010528564453125,
-0.0213165283203125,
0.03277587890625,
-0.007411956787109375,
0.02728271484375,
0.0247344970703125,
-0.04559326171875,
0.059814453125,
0.062103271484375,
0.00460052490234375,
0.058746337890625,
-0.00437164306640625,
0.03485107421875,
0.036102294921875,
0.011749267578125,
-0.0023784637451171875,
-0.0078582763671875,
0.0484619140625,
0.003910064697265625,
-0.0097808837890625,
0.042724609375,
-0.0201568603515625,
-0.0180206298828125,
0.0163116455078125,
0.0287933349609375,
-0.0295257568359375,
-0.00244140625,
0.0058135986328125,
-0.03338623046875,
-0.0223236083984375,
0.00681304931640625,
-0.006427764892578125,
0.01043701171875,
0.0218505859375,
-0.038360595703125,
-0.0257110595703125,
0.0108795166015625,
-0.0073699951171875,
0.013397216796875,
-0.0029315948486328125,
0.0821533203125,
0.0188751220703125,
-0.00036835670471191406,
-0.0189361572265625,
-0.005451202392578125,
0.0187225341796875,
-0.016204833984375,
0.010406494140625,
-0.0017004013061523438,
0.00637054443359375,
-0.0230560302734375,
0.041290283203125,
0.00006848573684692383,
0.01256561279296875,
-0.0111541748046875,
-0.005828857421875,
0.00620269775390625,
0.03656005859375,
-0.0197296142578125,
-0.0176849365234375,
0.0249481201171875,
-0.07073974609375,
-0.00024366378784179688,
0.015411376953125,
0.00539398193359375,
0.00994873046875,
-0.04400634765625,
-0.01132965087890625,
-0.069091796875,
0.042877197265625,
-0.0026340484619140625,
-0.0049896240234375,
0.03985595703125,
-0.0310821533203125,
-0.016845703125,
0.01421356201171875,
0.01410675048828125,
0.007724761962890625,
-0.00247955322265625,
0.02459716796875,
-0.004505157470703125,
0.00560760498046875,
0.00691986083984375,
0.006511688232421875,
-0.021575927734375,
-0.0228118896484375,
-0.06329345703125,
0.0243682861328125,
-0.030364990234375,
0.04095458984375,
0.00696563720703125,
-0.0031070709228515625,
0.017791748046875,
-0.0213470458984375,
-0.024505615234375,
0.0236663818359375,
0.0479736328125,
0.0521240234375,
0.006504058837890625,
-0.031585693359375,
0.05023193359375,
0.05999755859375,
0.011322021484375,
0.004764556884765625,
-0.006317138671875,
-0.011932373046875,
-0.03070068359375,
-0.0170745849609375,
-0.0325927734375,
0.045623779296875,
-0.018218994140625,
-0.025238037109375,
0.072021484375,
-0.025238037109375,
0.044158935546875,
-0.00879669189453125,
0.00925445556640625,
-0.02093505859375,
0.01953125,
0.04290771484375,
-0.046142578125,
0.01114654541015625,
0.0198974609375,
-0.03936767578125,
0.00565338134765625,
-0.0411376953125,
0.045196533203125,
0.007717132568359375,
0.0377197265625,
-0.060638427734375,
0.017059326171875,
-0.026519775390625,
0.053924560546875,
-0.0140380859375,
0.039459228515625,
0.025604248046875,
0.01529693603515625,
0.08929443359375,
0.0218505859375,
0.024505615234375,
0.0291595458984375,
-0.00371551513671875,
0.0292205810546875,
0.03143310546875,
0.023834228515625,
0.0013484954833984375,
0.041351318359375,
0.041900634765625,
0.0269012451171875,
-0.0377197265625,
-0.08367919921875,
0.0167694091796875,
-0.0060272216796875,
0.004444122314453125,
0.048065185546875,
-0.0117340087890625,
0.0321044921875,
0.07794189453125,
-0.02508544921875,
-0.003261566162109375,
0.0372314453125,
0.01812744140625,
0.022369384765625,
0.0015316009521484375,
-0.035797119140625,
-0.0190887451171875,
-0.018768310546875,
-0.0157928466796875,
0.026397705078125,
0.06787109375,
0.0161895751953125,
0.049102783203125,
-0.04254150390625,
-0.042449951171875,
-0.0001405477523803711,
-0.00061798095703125,
-0.0154876708984375,
-0.005214691162109375,
-0.0188140869140625,
-0.0440673828125,
0.03570556640625,
0.0323486328125,
0.0208740234375,
0.0186767578125,
0.01216888427734375,
0.04345703125,
0.031982421875,
0.0027561187744140625,
0.0855712890625,
-0.0004367828369140625,
0.0016021728515625,
-0.02288818359375,
0.0179595947265625,
0.0199432373046875,
0.0046844482421875,
-0.0244293212890625,
0.02880859375,
0.041107177734375,
-0.005340576171875,
0.0247344970703125,
0.005481719970703125,
-0.0304718017578125,
0.058441162109375,
0.005168914794921875,
0.081298828125,
0.022918701171875,
-0.056365966796875,
0.005008697509765625,
-0.0273895263671875,
-0.015228271484375,
0.007740020751953125,
0.00872039794921875,
-0.03466796875,
0.043609619140625,
0.03741455078125,
-0.01381683349609375,
0.016937255859375,
0.0200653076171875,
-0.017578125,
-0.01406097412109375,
0.03778076171875,
-0.003208160400390625,
0.0501708984375,
0.0350341796875,
0.05682373046875,
-0.01293182373046875,
0.0003795623779296875,
0.002574920654296875,
0.0011444091796875,
-0.007549285888671875,
-0.00031638145446777344,
0.053863525390625,
-0.093505859375,
-0.0452880859375,
0.08306884765625,
-0.059906005859375,
-0.01470184326171875,
0.01406097412109375,
-0.0154571533203125,
0.0014333724975585938,
0.029052734375,
-0.010894775390625,
0.013763427734375,
-0.03826904296875,
0.0187530517578125,
-0.01617431640625,
0.030914306640625,
-0.007640838623046875,
-0.0206451416015625,
-0.00945281982421875,
-0.0165252685546875,
0.03790283203125,
0.053497314453125,
-0.00884246826171875,
0.0205535888671875,
-0.0239715576171875,
-0.0231781005859375,
0.0221405029296875,
-0.024200439453125,
0.0187530517578125,
0.03289794921875,
-0.055023193359375,
0.042205810546875,
0.0290374755859375,
-0.00614166259765625,
0.040985107421875,
0.0221405029296875,
-0.014068603515625,
0.039886474609375,
-0.0088653564453125,
0.0167083740234375,
0.0345458984375,
0.02362060546875,
-0.037353515625,
-0.0173187255859375,
0.07135009765625,
-0.0304718017578125,
-0.0406494140625,
-0.043060302734375,
-0.0257720947265625,
-0.034271240234375,
0.00494384765625,
-0.00708770751953125,
0.01317596435546875,
-0.0450439453125,
0.0302581787109375,
-0.00537109375,
0.042724609375,
0.0033473968505859375,
-0.04144287109375,
-0.004962921142578125,
-0.0133514404296875,
0.07183837890625,
-0.0091705322265625,
0.0055389404296875,
-0.0097503662109375,
-0.0261993408203125,
-0.056671142578125,
0.0643310546875,
-0.0390625,
-0.06402587890625,
0.02508544921875,
0.026641845703125,
0.01959228515625,
-0.045166015625,
-0.04437255859375,
0.01396942138671875,
0.031890869140625,
0.046875,
0.051971435546875,
-0.029571533203125,
-0.009765625,
0.038482666015625,
-0.024169921875,
-0.01233673095703125,
0.0190582275390625,
-0.01395416259765625,
0.0020618438720703125,
-0.0203399658203125,
0.0179290771484375,
0.026947021484375,
-0.02227783203125,
-0.043548583984375,
0.05633544921875,
-0.01416015625,
-0.0254364013671875,
-0.01226806640625,
-0.00965118408203125,
-0.029449462890625,
0.035308837890625,
-0.0072784423828125,
-0.01401519775390625,
0.006267547607421875,
0.049224853515625,
0.031097412109375,
0.0257720947265625,
0.0156707763671875,
0.0162506103515625,
-0.0555419921875,
0.003387451171875,
-0.029266357421875,
0.0274200439453125,
-0.040618896484375,
0.030059814453125,
-0.03497314453125,
0.01873779296875,
-0.033050537109375,
-0.02777099609375,
0.00846099853515625,
0.0340576171875,
0.019073486328125,
-0.0257110595703125,
-0.01410675048828125,
-0.034027099609375,
0.0183563232421875,
0.005695343017578125,
0.0008664131164550781,
0.0056610107421875,
-0.041839599609375,
-0.061248779296875,
-0.033905029296875,
-0.016571044921875,
0.030517578125,
-0.0845947265625,
0.0238800048828125,
0.04815673828125,
0.001068115234375,
-0.022003173828125,
0.0013103485107421875,
-0.05218505859375,
-0.004421234130859375,
-0.0019521713256835938,
0.0030879974365234375,
-0.03173828125,
0.01580810546875,
-0.027984619140625,
-0.025360107421875,
-0.08734130859375,
0.0187530517578125,
-0.0135955810546875,
-0.08038330078125,
0.00848388671875,
0.006069183349609375,
0.054229736328125,
-0.048492431640625,
-0.03570556640625,
0.03240966796875,
0.0164337158203125,
0.03179931640625,
-0.001132965087890625,
-0.0079498291015625,
0.01165771484375,
0.0020847320556640625,
-0.00772857666015625,
-0.024810791015625,
0.042022705078125,
0.0076141357421875,
0.0650634765625,
0.01229095458984375,
0.0238494873046875,
-0.005916595458984375,
0.058197021484375,
0.037322998046875,
-0.04510498046875,
0.048858642578125,
-0.04315185546875,
-0.0088043212890625,
-0.002239227294921875,
-0.04229736328125,
-0.0416259765625,
0.01506805419921875,
-0.0155792236328125,
-0.0206756591796875,
0.01522064208984375
]
|
f9a3f181f63a7ff273d789ba202fceddaadd9855 | Wordpress Stackexchange
Q: Show modified time if post is actually modified I want to display post updated time only if post is modified, I am using function the_modified_time() . So I just read about that there is if statement that can be used to check if post is even modified that looks like this:
if (get_the_modified_time() != get_the_time())
So I put this in my template where the time itself is being displayed so it looks like this now:
if (get_the_modified_time() != get_the_time()){
echo 'Last updated:' . the_modified_time();
}
And it is not showing at all. So obviously I am missing something here.
A: Loosely what you have should work already. However few things are off.
*
*Calling these function without time format will produce values like 1:36 pm (depending on your site's settings), which are not exactly comparable.
*Post modified time can be less than published in some cases, like scheduled posts.
So I would write it along the lines of:
if ( get_the_modified_time( 'U' ) > get_the_time( 'U' ) ) {
echo 'Last updated:' . get_the_modified_time();
}
U format stands for a numeric Unix timestamp, which is comparison–friendly.
| Q: Show modified time if post is actually modified I want to display post updated time only if post is modified, I am using function the_modified_time() . So I just read about that there is if statement that can be used to check if post is even modified that looks like this:
if (get_the_modified_time() != get_the_time())
So I put this in my template where the time itself is being displayed so it looks like this now:
if (get_the_modified_time() != get_the_time()){
echo 'Last updated:' . the_modified_time();
}
And it is not showing at all. So obviously I am missing something here.
A: Loosely what you have should work already. However few things are off.
*
*Calling these function without time format will produce values like 1:36 pm (depending on your site's settings), which are not exactly comparable.
*Post modified time can be less than published in some cases, like scheduled posts.
So I would write it along the lines of:
if ( get_the_modified_time( 'U' ) > get_the_time( 'U' ) ) {
echo 'Last updated:' . get_the_modified_time();
}
U format stands for a numeric Unix timestamp, which is comparison–friendly.
| wordpress | {
"language": "en",
"length": 187,
"provenance": "stackexchange_00019.jsonl.gz:465337",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226196"
} | [
0.044952392578125,
-0.003704071044921875,
-0.00522613525390625,
-0.0299224853515625,
0.019927978515625,
-0.0229949951171875,
0.023284912109375,
-0.0242462158203125,
-0.017578125,
0.00960540771484375,
-0.0197296142578125,
-0.004207611083984375,
-0.00873565673828125,
-0.0277252197265625,
0.0081329345703125,
-0.03326416015625,
0.044647216796875,
-0.016693115234375,
0.03314208984375,
-0.0136871337890625,
-0.0020313262939453125,
0.0193939208984375,
0.039520263671875,
0.055450439453125,
0.039276123046875,
-0.016387939453125,
0.09967041015625,
0.004695892333984375,
0.044464111328125,
0.00931549072265625,
0.035675048828125,
-0.0762939453125,
0.00652313232421875,
0.0294036865234375,
-0.01303863525390625,
0.011871337890625,
0.01654052734375,
0.009613037109375,
-0.006610870361328125,
0.03997802734375,
0.00595855712890625,
0.0005984306335449219,
-0.0163726806640625,
0.021881103515625,
-0.0362548828125,
-0.02996826171875,
0.005279541015625,
-0.0239715576171875,
0.0199127197265625,
0.041290283203125,
0.0207672119140625,
0.00469207763671875,
0.02362060546875,
0.0310821533203125,
-0.00431060791015625,
0.00937652587890625,
-0.01464080810546875,
0.03973388671875,
0.04766845703125,
-0.048980712890625,
-0.0487060546875,
-0.0386962890625,
0.03997802734375,
0.0138702392578125,
-0.01523590087890625,
0.0146942138671875,
0.057403564453125,
-0.00957489013671875,
-0.10382080078125,
-0.038787841796875,
0.07171630859375,
-0.043304443359375,
-0.0113677978515625,
0.010284423828125,
-0.0182342529296875,
-0.040435791015625,
0.0052337646484375,
-0.045654296875,
0.0225982666015625,
0.0249176025390625,
0.02679443359375,
0.0211029052734375,
-0.0197296142578125,
-0.00914764404296875,
0.0012350082397460938,
0.005855560302734375,
-0.005252838134765625,
-0.03033447265625,
-0.0479736328125,
-0.0021419525146484375,
-0.030242919921875,
-0.0223846435546875,
-0.054107666015625,
0.0137481689453125,
-0.005279541015625,
-0.00812530517578125,
0.007007598876953125,
0.045989990234375,
-0.06243896484375,
-0.033294677734375,
-0.023406982421875,
0.006195068359375,
-0.06048583984375,
-0.01103973388671875,
-0.010894775390625,
0.03985595703125,
0.03887939453125,
0.052734375,
0.0233917236328125,
0.00506591796875,
0.0015974044799804688,
0.01194000244140625,
-0.0364990234375,
-0.01509857177734375,
-0.030670166015625,
0.052978515625,
-0.0239715576171875,
-0.01313018798828125,
-0.003810882568359375,
0.0226287841796875,
0.02520751953125,
0.04278564453125,
0.04302978515625,
-0.0743408203125,
0.0116729736328125,
-0.002574920654296875,
-0.048614501953125,
-0.042388916015625,
0.03564453125,
0.028564453125,
-0.01447296142578125,
-0.00600433349609375,
-0.0034027099609375,
0.01059722900390625,
0.0074310302734375,
-0.016357421875,
-0.0244140625,
-0.039825439453125,
-0.0295257568359375,
0.046173095703125,
-0.08062744140625,
-0.0180816650390625,
0.0738525390625,
-0.07666015625,
-0.06488037109375,
0.02056884765625,
0.0247650146484375,
0.004352569580078125,
-0.0182037353515625,
-0.1146240234375,
0.0115966796875,
-0.0247039794921875,
0.0234375,
-0.0006875991821289062,
-0.0047149658203125,
-0.0311279296875,
0.0007581710815429688,
-0.028594970703125,
0.00960540771484375,
-0.029205322265625,
0.010833740234375,
-0.014251708984375,
-0.00551605224609375,
0.00637054443359375,
-0.038421630859375,
0.0269622802734375,
-0.007595062255859375,
-0.0045318603515625,
0.0262908935546875,
-0.007808685302734375,
0.042388916015625,
-0.0245361328125,
0.0215606689453125,
0.01520538330078125,
-0.0017538070678710938,
0.01934814453125,
0.016876220703125,
-0.0017099380493164062,
0.007843017578125,
0.02752685546875,
-0.0181427001953125,
-0.031707763671875,
0.037261962890625,
-0.0273895263671875,
-0.01473236083984375,
0.01351165771484375,
0.004344940185546875,
0.00861358642578125,
0.0181121826171875,
0.00928497314453125,
-0.002117156982421875,
0.038238525390625,
-0.033721923828125,
0.032196044921875,
-0.00873565673828125,
0.0231170654296875,
-0.0626220703125,
0.01374053955078125,
-0.027862548828125,
-0.03167724609375,
0.005138397216796875,
0.0228424072265625,
-0.0199737548828125,
0.00632476806640625,
-0.12310791015625,
0.048431396484375,
-0.061248779296875,
0.048126220703125,
-0.0102081298828125,
0.0171661376953125,
0.0160369873046875,
-0.005191802978515625,
-0.03350830078125,
0.00595855712890625,
-0.01544952392578125,
0.0221405029296875,
-0.045440673828125,
-0.001216888427734375,
-0.03271484375,
0.0124359130859375,
-0.035888671875,
-0.03961181640625,
-0.0364990234375,
-0.002414703369140625,
0.024993896484375,
0.00823211669921875,
0.005687713623046875,
0.007427215576171875,
0.0467529296875,
0.031158447265625,
-0.001369476318359375,
-0.029937744140625,
-0.00009441375732421875,
0.0013685226440429688,
-0.03863525390625,
-0.0114288330078125,
-0.03961181640625,
-0.06475830078125,
0.0016660690307617188,
0.07049560546875,
0.0281219482421875,
-0.002384185791015625,
0.0221099853515625,
0.051788330078125,
0.07025146484375,
0.0067138671875,
0.0209197998046875,
0.01486968994140625,
0.01378631591796875,
0.036651611328125,
-0.033477783203125,
-0.00989532470703125,
0.024505615234375,
-0.047760009765625,
-0.020660400390625,
0.04974365234375,
-0.0195770263671875,
0.040313720703125,
-0.033172607421875,
0.0057220458984375,
-0.0272369384765625,
-0.0223541259765625,
0.031982421875,
-0.03643798828125,
0.04010009765625,
0.00024127960205078125,
0.035919189453125,
0.026458740234375,
-0.0278167724609375,
0.005245208740234375,
0.00838470458984375,
-0.0069580078125,
0.0185089111328125,
0.0225067138671875,
-0.04656982421875,
0.05523681640625,
-0.0258941650390625,
0.007617950439453125,
0.013946533203125,
0.0029659271240234375,
-0.0191650390625,
-0.01163482666015625,
0.00670623779296875,
-0.00412750244140625,
0.0269622802734375,
-0.0186004638671875,
0.02197265625,
0.001209259033203125,
0.042144775390625,
0.01336669921875,
0.0472412109375,
0.002918243408203125,
-0.0026416778564453125,
0.046417236328125,
-0.026763916015625,
-0.02801513671875,
-0.048797607421875,
-0.041046142578125,
0.0267791748046875,
-0.0235595703125,
-0.006103515625,
0.063232421875,
0.026458740234375,
0.002956390380859375,
0.007358551025390625,
-0.010406494140625,
0.004131317138671875,
0.01041412353515625,
-0.01345062255859375,
0.00902557373046875,
-0.07440185546875,
-0.005062103271484375,
0.006015777587890625,
0.0026912689208984375,
-0.0260467529296875,
-0.05181884765625,
-0.03814697265625,
-0.0194854736328125,
-0.11724853515625,
-0.0645751953125,
-0.043365478515625,
-0.097412109375,
-0.0232086181640625,
0.0013399124145507812,
-0.0472412109375,
0.0295562744140625,
0.023895263671875,
0.0217742919921875,
0.0252227783203125,
-0.0106048583984375,
-0.030609130859375,
0.0013952255249023438,
-0.0421142578125,
0.014434814453125,
0.0025043487548828125,
0.004276275634765625,
-0.0177154541015625,
0.0904541015625,
0.0028095245361328125,
-0.10418701171875,
-0.0843505859375,
0.044219970703125,
-0.03350830078125,
-0.0015163421630859375,
0.013427734375,
0.00954437255859375,
0.0298919677734375,
0.016448974609375,
-0.0282440185546875,
0.030364990234375,
-0.0211639404296875,
-0.048980712890625,
-0.00027370452880859375,
-0.0278778076171875,
0.0277099609375,
0.016265869140625,
-0.0288238525390625,
0.044830322265625,
0.06640625,
-0.01336669921875,
-0.02520751953125,
-0.00644683837890625,
-0.03497314453125,
0.02197265625,
0.024688720703125,
-0.0189971923828125,
-0.00949859619140625,
0.023590087890625,
-0.029205322265625,
-0.0162200927734375,
0.0200347900390625,
-0.028656005859375,
0.03643798828125,
-0.00756072998046875,
-0.0222015380859375,
-0.002109527587890625,
-0.031494140625,
-0.01934814453125,
0.0179290771484375,
-0.0290985107421875,
0.03057861328125,
-0.00812530517578125,
0.05792236328125,
-0.0257415771484375,
-0.01558685302734375,
0.0159149169921875,
-0.048858642578125,
0.014739990234375,
-0.046295166015625,
-0.005344390869140625,
-0.016571044921875,
0.06304931640625,
-0.03741455078125,
-0.03387451171875,
-0.037750244140625,
0.01148223876953125,
-0.0247650146484375,
-0.0256500244140625,
0.0076904296875,
-0.00490570068359375,
-0.06011962890625,
0.034210205078125,
-0.0230865478515625,
0.006317138671875,
-0.051910400390625,
0.0185699462890625,
-0.04022216796875,
-0.0302886962890625,
0.01247406005859375,
0.033721923828125,
-0.028167724609375,
0.0258941650390625,
-0.0269622802734375,
0.0073089599609375,
-0.00843048095703125,
-0.00894927978515625,
-0.05169677734375,
-0.0014543533325195312,
-0.019195556640625,
0.00013148784637451172,
0.03973388671875,
-0.05255126953125,
0.0209808349609375,
0.034088134765625,
0.04254150390625,
-0.0020294189453125,
0.0016088485717773438,
-0.04608154296875,
0.032440185546875,
0.0213775634765625,
0.010711669921875,
0.005069732666015625,
-0.0175933837890625,
-0.022430419921875,
-0.0296630859375,
-0.01422119140625,
-0.0195770263671875,
0.01139068603515625,
0.0054779052734375,
-0.012786865234375,
-0.00119781494140625,
-0.006465911865234375,
-0.003681182861328125,
0.0386962890625,
-0.00930023193359375,
0.007068634033203125,
-0.036529541015625,
-0.0286712646484375,
0.039520263671875,
0.04010009765625,
-0.0269927978515625,
-0.00994110107421875,
0.03887939453125,
0.021270751953125,
-0.047271728515625,
-0.0291290283203125,
0.0016536712646484375,
0.044464111328125,
-0.0125885009765625,
-0.00893402099609375,
-0.004390716552734375,
-0.043182373046875,
0.0489501953125,
-0.01178741455078125,
-0.01087188720703125,
0.0036830902099609375,
0.04742431640625,
0.01204681396484375,
0.0031719207763671875,
-0.010955810546875,
-0.0220794677734375,
0.00246429443359375,
0.0017547607421875,
-0.0093536376953125,
-0.0270843505859375,
-0.001140594482421875,
0.04302978515625,
-0.02935791015625,
0.05902099609375,
-0.017913818359375,
-0.0672607421875,
0.0221710205078125,
-0.01396942138671875,
0.0258026123046875,
0.007534027099609375,
0.00905609130859375,
0.037322998046875,
0.0175933837890625,
-0.0230712890625,
-0.054901123046875,
-0.031005859375,
-0.0227508544921875,
0.0007071495056152344,
-0.007843017578125,
-0.013153076171875,
-0.021148681640625,
-0.014434814453125,
0.0565185546875,
0.020782470703125,
-0.030059814453125,
0.0171661376953125,
-0.0132904052734375,
0.0238800048828125,
0.0193023681640625,
0.0149993896484375,
0.01096343994140625,
0.0110931396484375,
-0.00843048095703125,
0.023651123046875,
0.040008544921875,
0.00296783447265625,
-0.007564544677734375,
0.031158447265625,
0.0293731689453125,
-0.0185699462890625,
0.017242431640625,
0.03619384765625,
0.04425048828125,
0.0025005340576171875,
-0.032989501953125,
0.032470703125,
0.0197296142578125,
0.04534912109375,
0.01016998291015625,
-0.000055670738220214844,
-0.01800537109375,
0.0183258056640625,
-0.0193939208984375,
-0.0079345703125,
-0.0318603515625,
0.018035888671875,
0.01186370849609375,
-0.0077056884765625,
0.0100860595703125,
0.0147552490234375,
0.0102081298828125,
-0.027069091796875,
0.0022106170654296875,
0.03802490234375,
-0.00799560546875,
-0.004253387451171875,
0.01131439208984375,
-0.0017347335815429688,
0.0491943359375,
0.0100250244140625,
-0.01904296875,
-0.0297393798828125,
0.00890350341796875,
-0.050537109375,
0.035919189453125,
-0.03814697265625,
-0.037933349609375,
-0.0310211181640625,
-0.042449951171875,
-0.0126190185546875,
0.0218048095703125,
0.00823974609375,
-0.006031036376953125,
-0.01102447509765625,
0.0043487548828125,
-0.002811431884765625,
0.025726318359375,
-0.028656005859375,
-0.0024547576904296875,
-0.021484375,
-0.0024089813232421875,
0.046661376953125,
0.018524169921875,
-0.06658935546875,
-0.00896453857421875,
-0.0406494140625,
-0.01415252685546875,
-0.03741455078125,
-0.041534423828125,
-0.044769287109375,
0.00389862060546875,
0.043914794921875,
0.033355712890625,
0.0062713623046875,
-0.035064697265625,
-0.025970458984375,
0.0149993896484375,
0.0321044921875,
0.0897216796875,
-0.007564544677734375,
0.0843505859375,
0.02947998046875,
0.06591796875,
0.01666259765625,
0.0323486328125,
-0.058197021484375,
-0.0086212158203125,
0.03131103515625,
0.035430908203125,
-0.036834716796875,
-0.03125,
0.0093536376953125,
-0.06658935546875,
0.0107269287109375,
-0.0196075439453125,
-0.0157318115234375,
-0.0175018310546875,
0.00914764404296875,
-0.0282440185546875,
0.029022216796875,
-0.0145111083984375,
-0.015716552734375,
0.00312042236328125,
-0.01268768310546875,
-0.012176513671875,
-0.005893707275390625,
-0.01480865478515625,
0.00405120849609375,
0.01493072509765625,
-0.004901885986328125,
-0.026458740234375,
0.00858306884765625,
0.018585205078125,
0.048583984375,
0.00992584228515625,
0.0450439453125,
0.030731201171875,
0.041748046875,
0.006771087646484375,
-0.032012939453125,
0.00984954833984375,
-0.001224517822265625,
0.0164794921875,
-0.0165252685546875,
0.01053619384765625,
0.02935791015625,
-0.0004801750183105469,
0.030914306640625,
0.05828857421875,
0.041229248046875,
-0.08636474609375,
0.014068603515625,
0.00799560546875,
0.00568389892578125,
0.035919189453125,
0.002803802490234375,
-0.025238037109375,
-0.0640869140625,
0.054443359375,
-0.023193359375,
-0.002620697021484375,
0.02117919921875,
-0.00731658935546875,
0.002105712890625,
-0.0445556640625,
0.09332275390625,
0.0199737548828125,
0.0044403076171875,
0.01617431640625,
-0.020599365234375,
0.0205841064453125,
-0.027252197265625,
0.0047607421875,
-0.012054443359375,
-0.025543212890625,
-0.054473876953125,
0.005908966064453125,
-0.00930023193359375,
0.01157379150390625,
0.0227203369140625,
0.01186370849609375,
0.04071044921875,
0.05364990234375,
-0.0036907196044921875,
-0.00901031494140625,
0.029144287109375,
-0.00608062744140625,
-0.0194854736328125,
-0.01873779296875,
0.0213470458984375,
0.05645751953125,
-0.0240936279296875,
0.029815673828125,
-0.00383758544921875,
-0.0233306884765625,
-0.006366729736328125,
-0.0182952880859375,
0.059112548828125,
-0.0249786376953125,
-0.029571533203125,
0.00940704345703125,
0.00922393798828125,
-0.0166778564453125,
-0.01116943359375,
0.0165252685546875,
-0.0120391845703125,
0.0296783447265625,
-0.0292205810546875,
-0.0283355712890625,
-0.0213165283203125,
-0.0413818359375,
-0.061798095703125,
0.052001953125,
0.027435302734375,
0.0482177734375,
-0.020782470703125,
0.0094757080078125,
-0.0020275115966796875,
0.0031280517578125,
-0.050689697265625,
0.08251953125,
-0.0189208984375,
0.08721923828125,
-0.08331298828125,
-0.00390625,
0.0285491943359375,
0.048858642578125,
-0.0085601806640625,
0.0019273757934570312,
-0.0113067626953125,
-0.01251983642578125,
-0.003978729248046875,
0.02630615234375,
0.0045318603515625,
0.02642822265625,
-0.0293121337890625,
0.031951904296875,
0.045989990234375,
-0.054412841796875,
0.01275634765625,
0.022247314453125,
-0.036773681640625,
0.004482269287109375,
0.0236968994140625,
0.032745361328125,
-0.0219573974609375,
-0.02008056640625,
-0.002292633056640625,
-0.0230865478515625,
0.01043701171875,
-0.020599365234375,
-0.0021343231201171875,
0.039093017578125,
0.050262451171875,
-0.07562255859375,
-0.014404296875,
-0.035675048828125,
0.05328369140625,
-0.0018301010131835938,
-0.0235595703125,
0.0242462158203125,
0.0035152435302734375,
0.0176849365234375,
0.0183563232421875,
-0.004955291748046875,
0.031005859375,
0.026947021484375,
0.005771636962890625,
0.06549072265625,
0.0295562744140625,
0.0283660888671875,
-0.0079498291015625,
0.082275390625,
0.0264892578125,
-0.005474090576171875,
-0.006160736083984375,
0.0201416015625,
0.0014190673828125,
-0.02301025390625,
-0.030548095703125,
-0.0196075439453125,
-0.031158447265625,
-0.0034732818603515625,
-0.0046844482421875,
-0.0286102294921875,
0.004993438720703125,
0.03167724609375,
0.01446533203125,
0.02496337890625,
-0.017730712890625,
-0.042755126953125,
-0.05572509765625,
0.0030002593994140625,
0.0194244384765625,
0.04217529296875,
0.020050048828125,
0.042999267578125,
0.036468505859375,
-0.00835418701171875,
0.018646240234375,
-0.0162506103515625,
0.007480621337890625,
-0.018585205078125,
-0.00626373291015625,
0.00533294677734375,
-0.0157318115234375,
0.031982421875,
0.032501220703125,
-0.03875732421875,
0.028778076171875,
0.0251007080078125,
-0.0288848876953125,
-0.004528045654296875,
0.01284027099609375,
-0.0142974853515625,
-0.06658935546875,
-0.0224609375,
0.0029850006103515625,
0.056793212890625,
0.024139404296875,
0.0523681640625,
0.01251983642578125,
0.05999755859375,
-0.0379638671875,
0.05584716796875,
-0.0006356239318847656,
0.0207061767578125,
0.03521728515625,
-0.0004367828369140625,
0.016387939453125,
-0.0011920928955078125,
-0.005451202392578125,
0.016998291015625,
-0.035491943359375,
-0.047637939453125,
-0.0022640228271484375,
0.017974853515625,
0.00977325439453125,
-0.0006279945373535156,
-0.021087646484375,
-0.01226043701171875,
0.0084991455078125,
-0.006984710693359375,
0.0221710205078125,
-0.01073455810546875,
-0.00856781005859375,
-0.01654052734375,
-0.044189453125,
-0.040435791015625,
-0.024505615234375,
0.053802490234375,
0.00946044921875,
0.0249786376953125,
-0.0010423660278320312,
0.0262908935546875,
-0.0109100341796875,
-0.0019216537475585938,
-0.0399169921875,
-0.03167724609375,
0.060302734375,
-0.0281982421875,
-0.021759033203125,
-0.0008602142333984375,
-0.02313232421875,
0.0177154541015625,
0.051055908203125,
-0.00013196468353271484,
0.0276947021484375,
0.00023055076599121094,
0.01186370849609375,
-0.047760009765625,
-0.0188751220703125,
-0.0215606689453125,
0.00827789306640625,
0.0653076171875,
0.01099395751953125,
0.0029964447021484375,
-0.022186279296875,
-0.002349853515625,
0.017242431640625,
0.0297698974609375,
-0.039398193359375,
0.01016998291015625,
-0.0178680419921875,
0.0214080810546875,
0.047119140625,
-0.01247406005859375,
0.0292816162109375,
-0.042510986328125,
-0.025360107421875,
0.01097869873046875,
0.0097198486328125,
-0.005718231201171875,
-0.03411865234375,
0.076171875,
-0.044342041015625,
-0.0113067626953125,
-0.00652313232421875,
-0.038360595703125,
-0.01488494873046875,
-0.004791259765625,
-0.006748199462890625,
-0.01493072509765625,
0.0021839141845703125,
-0.03338623046875,
-0.048583984375,
0.0140838623046875,
0.0196685791015625,
-0.003498077392578125,
0.00429534912109375,
-0.01093292236328125,
-0.038177490234375,
0.0010499954223632812,
-0.0172271728515625,
0.0221710205078125,
-0.0226287841796875,
-0.00778961181640625,
-0.0016584396362304688,
-0.02740478515625,
-0.006084442138671875,
0.0063934326171875,
0.038543701171875,
-0.0292205810546875,
-0.0222320556640625,
-0.0159149169921875,
0.0237579345703125,
-0.0059661865234375,
-0.0250701904296875,
-0.0019855499267578125,
-0.0009813308715820312,
-0.019989013671875,
-0.022003173828125,
0.00384521484375,
-0.0005774497985839844,
-0.017913818359375,
-0.0182647705078125,
0.0023326873779296875,
-0.00628662109375,
-0.020965576171875,
-0.0287933349609375,
0.0200042724609375,
-0.065185546875,
-0.01197052001953125,
0.01904296875,
-0.0209808349609375,
-0.0087890625,
-0.0379638671875,
-0.036834716796875,
0.033355712890625,
0.003780364990234375,
-0.02301025390625,
-0.05670166015625,
0.0271453857421875,
-0.0044403076171875,
0.075439453125,
0.004161834716796875,
-0.014739990234375,
-0.013092041015625,
0.00676727294921875,
0.00849151611328125,
0.016326904296875,
0.039886474609375,
0.0009012222290039062,
-0.053131103515625,
-0.032073974609375,
-0.05096435546875,
-0.01105499267578125,
-0.036041259765625,
0.01528167724609375,
-0.00603485107421875,
0.0177459716796875,
-0.022674560546875,
-0.0226898193359375,
0.01372528076171875,
0.01995849609375,
-0.007137298583984375,
0.006816864013671875,
-0.0684814453125,
-0.0244140625,
0.08221435546875,
0.09759521484375,
0.0364990234375,
-0.04302978515625,
0.004486083984375,
-0.065185546875,
-0.0655517578125,
0.0218505859375,
0.0260467529296875,
-0.027374267578125,
0.042022705078125,
0.039886474609375,
-0.0191497802734375,
0.005596160888671875,
-0.00830841064453125,
-0.048431396484375,
-0.00763702392578125,
-0.02490234375,
0.001377105712890625,
-0.042510986328125,
0.01483917236328125,
0.006805419921875,
-0.019134521484375,
-0.018035888671875,
0.0015325546264648438,
0.000255584716796875,
-0.007488250732421875,
0.019775390625,
0.0247039794921875,
0.051239013671875,
-0.0189971923828125,
-0.01922607421875,
0.041046142578125,
-0.018310546875,
0.0174560546875,
-0.007053375244140625,
-0.0245208740234375,
-0.034912109375,
-0.004993438720703125,
-0.07073974609375,
0.020233154296875,
-0.016998291015625,
-0.0217437744140625,
0.05963134765625,
0.00836944580078125,
0.017059326171875,
-0.017852783203125,
0.037933349609375,
0.0033397674560546875,
-0.02191162109375,
0.01509857177734375,
-0.0268096923828125,
-0.00007623434066772461,
-0.006805419921875,
-0.0158233642578125,
-0.036590576171875,
0.018798828125,
-0.08038330078125,
-0.00963592529296875,
0.017608642578125
]
|
cd4ef5dbfac29a311da38e9caab80d4104108372 | Wordpress Stackexchange
Q: Using ob_start() in plugin I'm learning how to build a WordPress plugin. In the sample plugin code, I have this PHP/HTML:
ob_start();
// other plugin code
<?php function plugin_rvce_options_page() { ?>
<div>
<form action="options.php" method="post">
<?php settings_fields('plugin_options'); ?>
<?php do_settings_sections('plugin'); ?>
<input name="Submit" type="submit" value="<?php esc_attr_e('Save Changes'); ?>" />
</form>
</div>
<?php } ?>
Initially, this was causing the warning "Headers already sent" before I found ob_start. After implementing ob_start I don't get the warnings.. but am I using it correctly by just adding ob_start at the top of my plugin file?
A: No, this is not a correct use for ob_start(). You're getting the warning because your script is outputting code before the page headers are sent - meaning you're printing output before the html page.
Without knowing what's going on in your // other plugin code it's difficult to say what's happening exactly. I would guess you're calling plugin_rvce_options_page() somewhere in the root of the functions.php file instead of in a function that outputs to an admin page. In any case, try and fix the issue and don't use ob_start() as a work-around.
| Q: Using ob_start() in plugin I'm learning how to build a WordPress plugin. In the sample plugin code, I have this PHP/HTML:
ob_start();
// other plugin code
<?php function plugin_rvce_options_page() { ?>
<div>
<form action="options.php" method="post">
<?php settings_fields('plugin_options'); ?>
<?php do_settings_sections('plugin'); ?>
<input name="Submit" type="submit" value="<?php esc_attr_e('Save Changes'); ?>" />
</form>
</div>
<?php } ?>
Initially, this was causing the warning "Headers already sent" before I found ob_start. After implementing ob_start I don't get the warnings.. but am I using it correctly by just adding ob_start at the top of my plugin file?
A: No, this is not a correct use for ob_start(). You're getting the warning because your script is outputting code before the page headers are sent - meaning you're printing output before the html page.
Without knowing what's going on in your // other plugin code it's difficult to say what's happening exactly. I would guess you're calling plugin_rvce_options_page() somewhere in the root of the functions.php file instead of in a function that outputs to an admin page. In any case, try and fix the issue and don't use ob_start() as a work-around.
A: You definitely shouldn't be using ob_start() to prevent premature outputting of html. Rather you should use add_action() at the top of the plugin to start outputting your code in the right place.
For backend the usual hook is add_action ('admin_init','your_main_function');
For frontend the usual hook is add_action ('wp_head','your_main_function');
Here's a list of all available hooks: https://codex.wordpress.org/Plugin_API/Action_Reference
A: The output is happening when you call the function plugin_rvce_options_page, not when you declare it.
Try this:
// other plugin code
<?php function plugin_rvce_options_page() {
ob_start();
?>
<div>
<form action="options.php" method="post">
<?php settings_fields('plugin_options'); ?>
<?php do_settings_sections('plugin'); ?>
<input name="Submit" type="submit" value="<?php esc_attr_e('Save Changes'); ?>" />
</form>
</div>
<?php
return ob_get_clean();
}
?>
| wordpress | {
"language": "en",
"length": 296,
"provenance": "stackexchange_00019.jsonl.gz:465344",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226216"
} | [
0.049652099609375,
-0.01259613037109375,
0.021087646484375,
-0.02191162109375,
0.0032215118408203125,
-0.0162200927734375,
0.01293182373046875,
-0.032135009765625,
-0.046142578125,
-0.0190277099609375,
0.0029239654541015625,
0.005382537841796875,
-0.064208984375,
-0.05401611328125,
0.035491943359375,
-0.043975830078125,
0.047393798828125,
-0.00873565673828125,
0.043212890625,
0.0051116943359375,
-0.015777587890625,
0.03759765625,
0.04461669921875,
0.038787841796875,
0.005290985107421875,
-0.049530029296875,
0.0732421875,
-0.025848388671875,
-0.0025959014892578125,
-0.0457763671875,
-0.0006060600280761719,
0.021209716796875,
0.0169219970703125,
0.0419921875,
-0.032470703125,
-0.0185089111328125,
-0.00487518310546875,
0.01375579833984375,
-0.0044708251953125,
0.03515625,
0.02880859375,
-0.0206451416015625,
-0.01166534423828125,
-0.004940032958984375,
-0.01041412353515625,
-0.03289794921875,
0.037445068359375,
-0.0290374755859375,
-0.0184478759765625,
0.03875732421875,
-0.0010347366333007812,
-0.0285186767578125,
-0.002735137939453125,
0.01012420654296875,
-0.0025463104248046875,
-0.02545166015625,
-0.046112060546875,
0.0489501953125,
0.0179901123046875,
0.05194091796875,
-0.003448486328125,
0.0185394287109375,
-0.01049041748046875,
-0.036407470703125,
-0.01351165771484375,
-0.0016145706176757812,
-0.0100250244140625,
0.019989013671875,
-0.0207366943359375,
-0.030181884765625,
0.004901885986328125,
-0.01507568359375,
0.02337646484375,
0.00661468505859375,
0.00373077392578125,
-0.05810546875,
0.0011987686157226562,
-0.01242828369140625,
0.022857666015625,
0.0166168212890625,
0.01163482666015625,
0.0175933837890625,
-0.004161834716796875,
-0.0208740234375,
0.004199981689453125,
-0.005603790283203125,
-0.01364898681640625,
-0.01129913330078125,
-0.0190277099609375,
0.0024242401123046875,
-0.01470184326171875,
0.01116943359375,
0.0160675048828125,
-0.034942626953125,
-0.03802490234375,
-0.01898193359375,
-0.022613525390625,
-0.0004482269287109375,
0.00955963134765625,
-0.008087158203125,
0.006977081298828125,
-0.0249786376953125,
-0.0143280029296875,
-0.0036640167236328125,
-0.01471710205078125,
0.04888916015625,
0.0178375244140625,
-0.012481689453125,
0.015594482421875,
0.0179901123046875,
0.007534027099609375,
0.0178985595703125,
-0.016876220703125,
-0.0540771484375,
0.016876220703125,
0.01434326171875,
-0.032318115234375,
0.02813720703125,
0.0293731689453125,
-0.00537109375,
0.0297088623046875,
0.04571533203125,
-0.0188140869140625,
-0.090087890625,
0.0142364501953125,
-0.0183563232421875,
-0.04345703125,
-0.0187530517578125,
-0.048675537109375,
-0.0108795166015625,
-0.001293182373046875,
0.020660400390625,
0.06903076171875,
0.058685302734375,
0.009063720703125,
0.0037708282470703125,
0.04974365234375,
-0.0235748291015625,
0.01230621337890625,
0.03424072265625,
-0.00644683837890625,
-0.05828857421875,
-0.029327392578125,
-0.01000213623046875,
-0.060089111328125,
-0.004772186279296875,
0.024810791015625,
0.034820556640625,
-0.053680419921875,
-0.06939697265625,
0.01105499267578125,
-0.0095062255859375,
0.05584716796875,
-0.02984619140625,
-0.0185546875,
-0.01285552978515625,
0.025970458984375,
-0.0093994140625,
-0.0400390625,
-0.021881103515625,
-0.0445556640625,
-0.0230712890625,
0.0406494140625,
-0.06707763671875,
-0.05474853515625,
0.0194854736328125,
-0.037384033203125,
-0.0133514404296875,
0.0201568603515625,
0.00688934326171875,
0.030670166015625,
0.0254058837890625,
0.0111236572265625,
0.0102081298828125,
0.0061798095703125,
0.0038013458251953125,
-0.0178985595703125,
-0.0095062255859375,
0.0455322265625,
-0.0147705078125,
-0.033447265625,
-0.019622802734375,
0.0360107421875,
-0.004085540771484375,
-0.065673828125,
0.057220458984375,
0.005573272705078125,
0.0748291015625,
0.00366973876953125,
0.00815582275390625,
0.041900634765625,
0.0243988037109375,
0.020782470703125,
0.0097198486328125,
-0.0178375244140625,
-0.02935791015625,
0.01274871826171875,
0.03228759765625,
-0.0202789306640625,
-0.0213165283203125,
0.0010280609130859375,
-0.0241851806640625,
0.0221710205078125,
-0.0037250518798828125,
-0.06353759765625,
-0.004184722900390625,
-0.032379150390625,
0.027801513671875,
0.02520751953125,
0.026458740234375,
-0.001712799072265625,
0.00173187255859375,
-0.019775390625,
0.0170745849609375,
-0.0263824462890625,
0.0081024169921875,
-0.0377197265625,
0.0721435546875,
0.002613067626953125,
0.1019287109375,
0.003936767578125,
-0.0604248046875,
0.005695343017578125,
-0.036407470703125,
0.035888671875,
0.002483367919921875,
-0.004779815673828125,
-0.0224456787109375,
0.0196380615234375,
-0.0019083023071289062,
-0.004547119140625,
0.036163330078125,
0.0208740234375,
0.036102294921875,
-0.02471923828125,
-0.01922607421875,
-0.02264404296875,
-0.048431396484375,
0.0003228187561035156,
0.03778076171875,
0.031982421875,
0.05670166015625,
0.0021038055419921875,
0.01515960693359375,
0.03570556640625,
-0.078857421875,
-0.01384735107421875,
0.008270263671875,
0.05078125,
0.0011472702026367188,
-0.0024127960205078125,
-0.07464599609375,
0.0382080078125,
-0.04302978515625,
0.052215576171875,
0.00846099853515625,
-0.03082275390625,
-0.0953369140625,
0.04656982421875,
-0.0076751708984375,
0.030517578125,
-0.06085205078125,
-0.050079345703125,
0.000019252300262451172,
0.05853271484375,
-0.01934814453125,
0.0275115966796875,
0.0088043212890625,
-0.0200042724609375,
-0.0008950233459472656,
0.030487060546875,
-0.007251739501953125,
-0.0243377685546875,
0.0084228515625,
0.033294677734375,
-0.0296478271484375,
-0.057769775390625,
0.021240234375,
-0.0158843994140625,
-0.0024318695068359375,
-0.0096435546875,
-0.01113128662109375,
-0.0215301513671875,
-0.0131683349609375,
0.0210418701171875,
-0.006916046142578125,
0.021484375,
0.00888824462890625,
0.024444580078125,
-0.02239990234375,
0.037139892578125,
-0.050262451171875,
-0.06817626953125,
0.060577392578125,
-0.037811279296875,
-0.08258056640625,
0.0204620361328125,
-0.030029296875,
0.0095672607421875,
0.00269317626953125,
0.06658935546875,
0.06005859375,
0.0177154541015625,
-0.003498077392578125,
-0.0130462646484375,
-0.006229400634765625,
-0.016998291015625,
0.00025391578674316406,
-0.018035888671875,
-0.005138397216796875,
-0.08697509765625,
-0.01568603515625,
0.035369873046875,
0.06048583984375,
0.017852783203125,
-0.03680419921875,
0.0025348663330078125,
0.0458984375,
-0.034881591796875,
-0.0477294921875,
-0.0276641845703125,
-0.027435302734375,
0.0207977294921875,
-0.00572967529296875,
0.0005884170532226562,
-0.0105133056640625,
0.0174102783203125,
0.0240631103515625,
-0.0107879638671875,
-0.0080413818359375,
-0.02008056640625,
-0.0303192138671875,
-0.043304443359375,
-0.003589630126953125,
0.003658294677734375,
0.0210418701171875,
-0.011322021484375,
0.04052734375,
-0.0151519775390625,
-0.04241943359375,
-0.0269775390625,
-0.0024089813232421875,
-0.001430511474609375,
-0.0260772705078125,
0.01506805419921875,
-0.032012939453125,
-0.01149749755859375,
0.0153961181640625,
-0.00786590576171875,
-0.016937255859375,
0.006587982177734375,
-0.034515380859375,
0.00638580322265625,
-0.0206298828125,
0.0105743408203125,
0.01435089111328125,
-0.0065155029296875,
-0.0205535888671875,
-0.002483367919921875,
-0.06103515625,
0.019256591796875,
0.0018100738525390625,
-0.0401611328125,
-0.033447265625,
0.01311492919921875,
-0.0216827392578125,
0.03564453125,
-0.0452880859375,
-0.01305389404296875,
0.00562286376953125,
0.004367828369140625,
-0.0279388427734375,
0.049072265625,
-0.031341552734375,
-0.01111602783203125,
-0.01222991943359375,
0.033843994140625,
-0.002529144287109375,
-0.0230560302734375,
0.00893402099609375,
0.01506805419921875,
0.0210723876953125,
-0.03515625,
-0.0258331298828125,
-0.036865234375,
0.0281219482421875,
-0.042877197265625,
-0.014892578125,
-0.020172119140625,
0.007061004638671875,
-0.006381988525390625,
0.04241943359375,
-0.0238189697265625,
-0.028472900390625,
0.024932861328125,
0.007720947265625,
-0.0271759033203125,
0.0230712890625,
-0.03515625,
-0.01178741455078125,
-0.054840087890625,
-0.0182342529296875,
0.0216827392578125,
-0.055145263671875,
-0.003692626953125,
0.02679443359375,
-0.049346923828125,
-0.01006317138671875,
0.0255279541015625,
-0.00710296630859375,
0.0229949951171875,
0.001468658447265625,
-0.02520751953125,
0.0189666748046875,
-0.0269012451171875,
-0.0180816650390625,
-0.1180419921875,
-0.016143798828125,
-0.035125732421875,
0.062347412109375,
0.0252838134765625,
-0.022430419921875,
-0.044189453125,
0.0445556640625,
0.0032100677490234375,
0.06365966796875,
0.0137481689453125,
0.0188140869140625,
0.0146636962890625,
-0.02862548828125,
0.0304718017578125,
-0.0400390625,
0.0369873046875,
0.02899169921875,
-0.03399658203125,
-0.018829345703125,
-0.050933837890625,
-0.03167724609375,
0.00788116455078125,
-0.05950927734375,
-0.044891357421875,
-0.0306549072265625,
-0.0091094970703125,
0.0026874542236328125,
-0.0140838623046875,
0.005931854248046875,
-0.007415771484375,
-0.02825927734375,
-0.01354217529296875,
-0.03564453125,
-0.0029544830322265625,
0.018341064453125,
0.0693359375,
0.03399658203125,
0.025360107421875,
0.0347900390625,
-0.01303863525390625,
0.0230712890625,
0.01418304443359375,
0.019317626953125,
-0.0147857666015625,
-0.0357666015625,
0.08941650390625,
-0.017120361328125,
0.02374267578125,
-0.03765869140625,
-0.003818511962890625,
-0.0286712646484375,
-0.062744140625,
0.035614013671875,
-0.0239715576171875,
0.03350830078125,
-0.0022945404052734375,
0.0014934539794921875,
0.015594482421875,
0.033111572265625,
-0.0252227783203125,
-0.0015850067138671875,
-0.015899658203125,
0.019195556640625,
-0.029144287109375,
-0.002063751220703125,
0.024078369140625,
0.0276641845703125,
0.0679931640625,
-0.00478363037109375,
0.0462646484375,
0.029083251953125,
-0.02130126953125,
0.0015783309936523438,
0.033599853515625,
-0.00867462158203125,
0.0028362274169921875,
0.0305023193359375,
-0.026397705078125,
-0.035675048828125,
-0.009613037109375,
0.040313720703125,
0.0022792816162109375,
-0.0242767333984375,
-0.04241943359375,
-0.0065460205078125,
0.0313720703125,
-0.0171356201171875,
0.01381683349609375,
0.03411865234375,
0.02471923828125,
-0.005489349365234375,
-0.00400543212890625,
0.022613525390625,
0.005218505859375,
-0.0274200439453125,
-0.00003993511199951172,
0.0010633468627929688,
0.00708770751953125,
0.0271148681640625,
0.046630859375,
0.01849365234375,
0.030242919921875,
-0.027679443359375,
0.00710296630859375,
0.00537872314453125,
0.0062713623046875,
0.02777099609375,
-0.0178985595703125,
0.0230560302734375,
-0.036468505859375,
0.0205078125,
-0.05987548828125,
-0.00453948974609375,
0.0021076202392578125,
0.040283203125,
-0.01568603515625,
-0.043731689453125,
0.04803466796875,
0.0028629302978515625,
-0.01450347900390625,
0.04010009765625,
0.0280609130859375,
-0.0450439453125,
-0.0274810791015625,
0.044097900390625,
0.056732177734375,
0.0018596649169921875,
0.00261688232421875,
0.06146240234375,
-0.0009007453918457031,
0.03900146484375,
-0.044921875,
-0.00836944580078125,
-0.013397216796875,
0.0194244384765625,
-0.0133209228515625,
-0.053070068359375,
-0.0196380615234375,
-0.049652099609375,
0.03765869140625,
-0.0211639404296875,
-0.0106964111328125,
0.04034423828125,
-0.0262603759765625,
0.0280303955078125,
-0.0270233154296875,
-0.00908660888671875,
-0.037506103515625,
0.0002200603485107422,
0.052215576171875,
0.0305938720703125,
-0.08514404296875,
0.01806640625,
-0.043914794921875,
-0.01102447509765625,
-0.052978515625,
-0.0272674560546875,
-0.056243896484375,
-0.002864837646484375,
-0.0248565673828125,
-0.01015472412109375,
-0.03045654296875,
0.00354766845703125,
-0.01175689697265625,
0.0418701171875,
0.0159454345703125,
-0.0096588134765625,
-0.01070404052734375,
0.039337158203125,
-0.008087158203125,
0.044769287109375,
0.01125335693359375,
0.011474609375,
-0.0055389404296875,
-0.015350341796875,
0.0202789306640625,
0.0030727386474609375,
-0.023681640625,
-0.045501708984375,
-0.0270233154296875,
-0.01184844970703125,
0.0849609375,
-0.0180816650390625,
0.029998779296875,
0.031097412109375,
0.009490966796875,
-0.01177215576171875,
-0.0361328125,
0.014801025390625,
-0.018585205078125,
0.0728759765625,
-0.0196075439453125,
-0.032501220703125,
0.00539398193359375,
0.00949859619140625,
0.0236358642578125,
-0.007534027099609375,
0.01422119140625,
-0.04132080078125,
-0.047119140625,
0.046539306640625,
0.045135498046875,
0.0073394775390625,
0.03704833984375,
-0.0017147064208984375,
0.01383209228515625,
0.0262451171875,
0.056854248046875,
-0.00733184814453125,
-0.0240325927734375,
0.09991455078125,
0.0250701904296875,
-0.034698486328125,
0.06365966796875,
-0.040252685546875,
0.05059814453125,
0.05828857421875,
0.07513427734375,
-0.1026611328125,
0.04156494140625,
-0.0025615692138671875,
-0.0074310302734375,
0.079345703125,
-0.013214111328125,
0.0174713134765625,
-0.0283660888671875,
0.062347412109375,
0.007244110107421875,
0.0018320083618164062,
0.021148681640625,
-0.033203125,
-0.0178070068359375,
-0.007659912109375,
0.0479736328125,
0.0230560302734375,
-0.03497314453125,
0.04559326171875,
0.027130126953125,
0.0302276611328125,
-0.0192413330078125,
0.043212890625,
-0.042205810546875,
-0.019317626953125,
-0.03277587890625,
-0.007381439208984375,
0.019378662109375,
-0.0186767578125,
0.043914794921875,
0.003925323486328125,
0.0060272216796875,
0.043426513671875,
-0.015045166015625,
0.039794921875,
-0.0016946792602539062,
0.021697998046875,
-0.0076446533203125,
-0.0227203369140625,
-0.00251007080078125,
0.06219482421875,
-0.076171875,
0.017822265625,
-0.018402099609375,
0.0213623046875,
-0.007061004638671875,
0.028472900390625,
0.0889892578125,
0.0240936279296875,
-0.06317138671875,
-0.00344085693359375,
-0.0033359527587890625,
0.003452301025390625,
-0.00861358642578125,
0.0027408599853515625,
-0.033416748046875,
0.015716552734375,
-0.0318603515625,
-0.016754150390625,
0.0177154541015625,
-0.034423828125,
-0.08123779296875,
0.10528564453125,
0.0131683349609375,
0.0022144317626953125,
-0.04510498046875,
0.06719970703125,
-0.02203369140625,
0.0228424072265625,
-0.049224853515625,
0.033447265625,
0.0146942138671875,
-0.0070343017578125,
-0.06719970703125,
0.006824493408203125,
-0.04296875,
-0.00371551513671875,
0.003765106201171875,
0.0003025531768798828,
0.0159759521484375,
0.002063751220703125,
0.0343017578125,
-0.022125244140625,
-0.029144287109375,
0.0187225341796875,
0.037353515625,
-0.0098876953125,
0.032073974609375,
-0.01160430908203125,
0.051483154296875,
-0.09027099609375,
0.037109375,
0.02740478515625,
-0.014404296875,
-0.0250244140625,
-0.03399658203125,
-0.030242919921875,
-0.033660888671875,
-0.01067352294921875,
-0.0104217529296875,
0.0206451416015625,
0.0374755859375,
-0.0015726089477539062,
0.04339599609375,
-0.00836181640625,
0.031768798828125,
-0.00733184814453125,
0.051605224609375,
0.0148162841796875,
0.0296783447265625,
0.023834228515625,
0.0027713775634765625,
0.047637939453125,
0.009613037109375,
0.0023059844970703125,
0.00482177734375,
0.0242767333984375,
-0.0277252197265625,
0.003810882568359375,
0.0239715576171875,
-0.0013675689697265625,
0.00618743896484375,
0.010986328125,
-0.0187835693359375,
0.00208282470703125,
0.0141754150390625,
0.00218963623046875,
-0.00522613525390625,
0.0018396377563476562,
-0.02935791015625,
0.0182342529296875,
-0.0035228729248046875,
-0.0167999267578125,
0.01142120361328125,
-0.0187530517578125,
-0.0139007568359375,
-0.00507354736328125,
0.00794219970703125,
0.03839111328125,
0.01424407958984375,
-0.006565093994140625,
-0.0123138427734375,
0.02447509765625,
-0.0190582275390625,
0.01078033447265625,
-0.0066986083984375,
0.0277557373046875,
-0.03521728515625,
0.00160980224609375,
-0.029388427734375,
0.007259368896484375,
0.016448974609375,
0.028228759765625,
-0.029052734375,
0.01180267333984375,
0.034576416015625,
0.0157012939453125,
-0.0032253265380859375,
0.047698974609375,
0.0197296142578125,
-0.001590728759765625,
-0.0156707763671875,
0.0162811279296875,
0.03564453125,
-0.037841796875,
-0.0245361328125,
-0.002056121826171875,
-0.0204315185546875,
0.0086212158203125,
-0.016937255859375,
0.01282501220703125,
0.0027008056640625,
0.0226898193359375,
-0.00878143310546875,
0.032806396484375,
-0.004718780517578125,
-0.03607177734375,
-0.0002923011779785156,
-0.007598876953125,
0.08355712890625,
0.016998291015625,
-0.017578125,
0.01204681396484375,
-0.046051025390625,
-0.02606201171875,
0.005298614501953125,
0.0267181396484375,
-0.0014162063598632812,
0.0268096923828125,
0.0126190185546875,
-0.007904052734375,
0.048095703125,
-0.020263671875,
-0.01849365234375,
0.050750732421875,
0.04376220703125,
0.003452301025390625,
-0.035736083984375,
-0.0224151611328125,
-0.03485107421875,
0.0496826171875,
0.0274658203125,
0.03790283203125,
-0.014190673828125,
0.046295166015625,
0.007312774658203125,
-0.0257720947265625,
0.027740478515625,
0.0032405853271484375,
0.054412841796875,
0.0039215087890625,
-0.0302276611328125,
-0.0234222412109375,
-0.006900787353515625,
0.045135498046875,
0.01708984375,
-0.0325927734375,
0.031646728515625,
0.003696441650390625,
-0.0033283233642578125,
-0.0122222900390625,
0.054779052734375,
-0.0173797607421875,
-0.045074462890625,
-0.01265716552734375,
0.0167388916015625,
0.01096343994140625,
0.06390380859375,
0.016448974609375,
0.01468658447265625,
0.00391387939453125,
0.006988525390625,
0.004425048828125,
0.0003292560577392578,
-0.01435089111328125,
0.03173828125,
-0.02862548828125,
-0.00738525390625,
0.0146942138671875,
-0.02777099609375,
0.0237884521484375,
0.0133056640625,
0.040069580078125,
-0.006053924560546875,
0.033416748046875,
0.0223541259765625,
0.028472900390625,
0.04107666015625,
-0.0286102294921875,
0.007678985595703125,
0.0200347900390625,
-0.0012426376342773438,
0.009674072265625,
0.023651123046875,
-0.02093505859375,
-0.005443572998046875,
-0.003429412841796875,
-0.006195068359375,
0.01526641845703125,
-0.041717529296875,
-0.016571044921875,
-0.0233917236328125,
0.040863037109375,
0.00482940673828125,
-0.04266357421875,
-0.035797119140625,
0.0021762847900390625,
0.07012939453125,
-0.012115478515625,
0.016265869140625,
-0.0276336669921875,
-0.0305328369140625,
-0.05828857421875,
-0.043670654296875,
-0.04974365234375,
0.04864501953125,
-0.03973388671875,
0.003116607666015625,
0.043487548828125,
-0.01415252685546875,
0.000035703182220458984,
-0.02581787109375,
-0.01354217529296875,
0.0303497314453125,
-0.04022216796875,
-0.0286865234375,
0.029693603515625,
-0.01178741455078125,
-0.02557373046875,
-0.0256195068359375,
0.004154205322265625,
-0.061309814453125,
-0.0010442733764648438,
-0.0008411407470703125,
-0.0301971435546875,
-0.0172576904296875,
-0.03125,
-0.03582763671875,
0.0389404296875,
0.01065826416015625,
-0.0121612548828125,
-0.004444122314453125,
-0.00397491455078125,
0.0092010498046875,
-0.0047607421875,
-0.0036983489990234375,
-0.01922607421875,
-0.0360107421875,
-0.0106201171875,
-0.0254364013671875,
-0.0166778564453125,
0.0283355712890625,
-0.044647216796875,
-0.038482666015625,
-0.0193634033203125,
0.00824737548828125,
-0.037841796875,
-0.0160064697265625,
-0.009307861328125,
0.038818359375,
0.053497314453125,
-0.0021114349365234375,
0.01201629638671875,
0.01459503173828125,
-0.025146484375,
0.002964019775390625,
0.018585205078125,
-0.03192138671875,
0.016754150390625,
0.08880615234375,
0.0670166015625,
0.031585693359375,
-0.06011962890625,
-0.0215606689453125,
-0.0248565673828125,
-0.0218505859375,
-0.02459716796875,
0.036712646484375,
-0.0831298828125,
-0.00778961181640625,
0.01003265380859375,
0.01004791259765625,
-0.00894927978515625,
-0.003734588623046875,
0.00946044921875,
-0.02813720703125,
0.0274658203125,
-0.00913238525390625,
0.0206756591796875,
-0.0657958984375,
0.00988006591796875,
-0.0179595947265625,
-0.037139892578125,
0.00991058349609375,
0.03668212890625,
-0.0379638671875,
0.0347900390625,
-0.01258087158203125,
0.00040459632873535156,
0.0028667449951171875,
0.021270751953125,
0.00450897216796875,
0.050323486328125,
-0.028717041015625,
-0.0190887451171875,
-0.0037841796875,
0.01043701171875,
-0.0050811767578125,
-0.0013828277587890625,
-0.0016660690307617188,
0.031646728515625,
-0.007755279541015625,
0.03948974609375,
-0.052001953125,
-0.05841064453125,
-0.007511138916015625,
-0.0084991455078125,
-0.03631591796875,
0.035858154296875,
0.043731689453125,
-0.04522705078125,
0.01055145263671875,
0.0198211669921875,
0.013214111328125,
-0.010833740234375,
-0.00220489501953125,
-0.0184326171875,
0.0123443603515625,
-0.0012683868408203125
]
|
9b2c03a1500e7453330eae20ee6c93c1e185c13c | Wordpress Stackexchange
Q: Could not insert term into the database I've spent a fair while reading about the "Could not insert term into the database" error, but the fixes I have read (changing theme, fresh WP install, disable plugins) simply are not working.
I tried a force DB upgrade, still no joy.
Looking at wp_terms there's a category with term_id of 0. This is mighty strange and if I delete it, I'm then able to add a category via wp-admin. However, subsequent categories then fail with the "Could not insert term into the database" message and re-checking wp_terms shows the freshly added category as id 0! This seems to suggest WP is assigning the cat a term_id of 0 every time.
Has anyone seen this? Any ideas on a fix? The database in question is pretty huge, so a rebuild would not be a pretty thing.
A: OK. There where multiple issues here;
wp_terms, wp_termmeta and wp_term_taxonomy all had their ID's set not to AUTO_INCREMENT.
Changing these and removing the 0 values from each table seems to have resolved this - very odd though.
Big thanks to @N00b for helping!
| Q: Could not insert term into the database I've spent a fair while reading about the "Could not insert term into the database" error, but the fixes I have read (changing theme, fresh WP install, disable plugins) simply are not working.
I tried a force DB upgrade, still no joy.
Looking at wp_terms there's a category with term_id of 0. This is mighty strange and if I delete it, I'm then able to add a category via wp-admin. However, subsequent categories then fail with the "Could not insert term into the database" message and re-checking wp_terms shows the freshly added category as id 0! This seems to suggest WP is assigning the cat a term_id of 0 every time.
Has anyone seen this? Any ideas on a fix? The database in question is pretty huge, so a rebuild would not be a pretty thing.
A: OK. There where multiple issues here;
wp_terms, wp_termmeta and wp_term_taxonomy all had their ID's set not to AUTO_INCREMENT.
Changing these and removing the 0 values from each table seems to have resolved this - very odd though.
Big thanks to @N00b for helping!
A: Today I found a new possibility for this error. I was trying to add the category Butter to a recipe site. After 5 tries, I tried an experiment. I went directly to the database and tried changing the name of an unused category to Butter.
My results were that it was a database issue, not either a software limit or a software problem. The database error was more specific in that it told me that the slug "butter" was already being used for a different type of taxonomy. In this particular case, my look at the database showed that a plugin is adding all kinds of taxonomy terms.
The fix was that instead of using the slug "butter", I used "butter-ingredient" and the Category was added with no problems.
| wordpress | {
"language": "en",
"length": 318,
"provenance": "stackexchange_00019.jsonl.gz:465351",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226245"
} | [
0.06689453125,
0.01094818115234375,
-0.03094482421875,
-0.0195770263671875,
0.0423583984375,
-0.0565185546875,
0.06494140625,
-0.01690673828125,
0.04913330078125,
0.022705078125,
-0.052093505859375,
-0.02813720703125,
-0.00457000732421875,
-0.00824737548828125,
-0.07366943359375,
-0.045135498046875,
-0.0011692047119140625,
-0.0111083984375,
-0.002277374267578125,
-0.020538330078125,
0.0196075439453125,
-0.0230712890625,
0.0012235641479492188,
-0.0230712890625,
0.02001953125,
0.0204620361328125,
0.031982421875,
-0.028472900390625,
0.029052734375,
-0.003154754638671875,
0.0252685546875,
-0.0184326171875,
0.00916290283203125,
0.0016803741455078125,
0.0029754638671875,
-0.0277252197265625,
0.006137847900390625,
-0.0023670196533203125,
-0.004413604736328125,
0.0306549072265625,
0.04144287109375,
-0.0255279541015625,
0.04046630859375,
0.047607421875,
0.005580902099609375,
-0.042144775390625,
0.0287933349609375,
-0.07275390625,
-0.01242828369140625,
-0.0850830078125,
0.0208282470703125,
0.0201263427734375,
0.06903076171875,
-0.05718994140625,
-0.00909423828125,
0.0160369873046875,
-0.017608642578125,
0.0290679931640625,
0.0166473388671875,
0.02386474609375,
-0.0029544830322265625,
0.006877899169921875,
0.00691986083984375,
-0.01526641845703125,
0.01537322998046875,
0.003452301025390625,
0.06591796875,
0.02728271484375,
-0.0193634033203125,
-0.002288818359375,
0.0029811859130859375,
-0.01079559326171875,
0.0019626617431640625,
0.00528717041015625,
0.016571044921875,
-0.0248565673828125,
0.05145263671875,
0.02020263671875,
-0.00518035888671875,
0.0377197265625,
0.037506103515625,
-0.0124359130859375,
0.0007028579711914062,
0.0024356842041015625,
0.0122222900390625,
0.01983642578125,
-0.0121612548828125,
-0.02227783203125,
-0.005157470703125,
-0.029510498046875,
0.0021228790283203125,
-0.01177978515625,
-0.0279541015625,
0.0152587890625,
-0.00818634033203125,
-0.0241241455078125,
0.00586700439453125,
0.06597900390625,
-0.031402587890625,
0.0159912109375,
-0.01480865478515625,
-0.01435089111328125,
0.01471710205078125,
-0.058746337890625,
0.010101318359375,
0.0195770263671875,
-0.033416748046875,
-0.0360107421875,
0.024139404296875,
0.012481689453125,
-0.005359649658203125,
-0.0159454345703125,
0.045135498046875,
-0.02996826171875,
-0.00943756103515625,
-0.0083160400390625,
0.014678955078125,
0.02001953125,
0.01306915283203125,
-0.004001617431640625,
-0.031707763671875,
0.01229095458984375,
-0.07977294921875,
-0.00402069091796875,
0.0014362335205078125,
-0.044036865234375,
0.0182037353515625,
0.042633056640625,
-0.07757568359375,
-0.03314208984375,
-0.044403076171875,
0.061859130859375,
0.1441650390625,
0.044830322265625,
0.01186370849609375,
0.0103912353515625,
0.0289306640625,
-0.0271759033203125,
-0.02191162109375,
0.0210723876953125,
0.0157012939453125,
-0.0113067626953125,
-0.00586700439453125,
-0.0157470703125,
0.0046539306640625,
0.026092529296875,
0.0273590087890625,
0.0255584716796875,
-0.025238037109375,
-0.052276611328125,
0.0243072509765625,
-0.009490966796875,
0.05645751953125,
0.0027370452880859375,
-0.0333251953125,
-0.03759765625,
0.007297515869140625,
-0.044281005859375,
-0.0191497802734375,
-0.0531005859375,
0.01160430908203125,
-0.0032482147216796875,
0.01074981689453125,
-0.02374267578125,
-0.0256500244140625,
-0.0196533203125,
-0.05511474609375,
-0.004878997802734375,
0.0202484130859375,
0.030120849609375,
-0.027069091796875,
0.008819580078125,
0.0201873779296875,
0.0181884765625,
-0.00679779052734375,
0.004085540771484375,
-0.0078125,
-0.03839111328125,
0.019927978515625,
0.04461669921875,
-0.010589599609375,
-0.0203704833984375,
0.00426483154296875,
-0.0042724609375,
0.01009368896484375,
0.011077880859375,
0.01428985595703125,
0.019805908203125,
-0.0031909942626953125,
0.01629638671875,
0.001979827880859375,
0.036773681640625,
-0.03045654296875,
0.0111541748046875,
0.0084075927734375,
-0.0214080810546875,
-0.0635986328125,
-0.013427734375,
-0.0300750732421875,
0.0014095306396484375,
-0.002941131591796875,
0.0304412841796875,
-0.016876220703125,
-0.002689361572265625,
-0.050384521484375,
0.0003058910369873047,
-0.01418304443359375,
0.0487060546875,
0.0200653076171875,
0.0258331298828125,
0.005489349365234375,
-0.00487518310546875,
-0.0086669921875,
-0.020660400390625,
-0.040008544921875,
-0.0077667236328125,
-0.028076171875,
0.0360107421875,
-0.0160064697265625,
0.040740966796875,
-0.032073974609375,
-0.019744873046875,
-0.022857666015625,
0.00861358642578125,
0.004047393798828125,
0.0159912109375,
-0.0306549072265625,
0.01038360595703125,
0.01113128662109375,
0.01641845703125,
0.00591278076171875,
0.01116180419921875,
0.03387451171875,
0.0294342041015625,
-0.0105438232421875,
-0.00920867919921875,
-0.00743865966796875,
-0.0992431640625,
0.01461029052734375,
0.055694580078125,
0.032562255859375,
-0.0294036865234375,
-0.048797607421875,
-0.03961181640625,
-0.00324249267578125,
-0.0821533203125,
-0.010284423828125,
-0.00847625732421875,
0.01373291015625,
0.052520751953125,
0.0245513916015625,
0.01273345947265625,
0.009307861328125,
-0.0224151611328125,
-0.0159759521484375,
0.043212890625,
-0.036712646484375,
-0.004669189453125,
0.00901031494140625,
-0.0250244140625,
0.007564544677734375,
-0.055877685546875,
-0.0031280517578125,
-0.03118896484375,
0.025390625,
0.0083465576171875,
0.040679931640625,
0.028717041015625,
0.01015472412109375,
0.005924224853515625,
-0.010589599609375,
-0.06256103515625,
0.0068817138671875,
-0.005947113037109375,
0.022552490234375,
0.05560302734375,
-0.0423583984375,
0.01091766357421875,
0.024078369140625,
0.0083770751953125,
-0.0009765625,
0.058868408203125,
0.02886962890625,
-0.0196075439453125,
-0.040008544921875,
-0.0521240234375,
0.02386474609375,
0.0146636962890625,
-0.0948486328125,
-0.043731689453125,
-0.0135955810546875,
0.042083740234375,
-0.02606201171875,
-0.01430511474609375,
-0.01251983642578125,
0.022979736328125,
0.00018489360809326172,
-0.013153076171875,
0.0288238525390625,
-0.0132904052734375,
-0.00466156005859375,
0.06048583984375,
0.01410675048828125,
-0.006378173828125,
0.007732391357421875,
-0.00038886070251464844,
0.019317626953125,
-0.0022907257080078125,
-0.0098114013671875,
0.00370025634765625,
-0.06121826171875,
-0.00017499923706054688,
0.03704833984375,
0.0643310546875,
0.02557373046875,
-0.020538330078125,
0.01335906982421875,
0.044830322265625,
-0.0050506591796875,
-0.041595458984375,
-0.054656982421875,
0.016387939453125,
0.00974273681640625,
-0.004085540771484375,
0.0258941650390625,
0.0142364501953125,
-0.02313232421875,
0.0196380615234375,
-0.003509521484375,
-0.06768798828125,
-0.0413818359375,
-0.07159423828125,
-0.062255859375,
-0.014678955078125,
0.01319122314453125,
0.005893707275390625,
0.0007500648498535156,
0.07513427734375,
-0.0022602081298828125,
-0.045166015625,
0.00042366981506347656,
-0.0294036865234375,
-0.005146026611328125,
0.036102294921875,
-0.004199981689453125,
-0.0161590576171875,
-0.0034694671630859375,
0.00823211669921875,
-0.028472900390625,
0.01959228515625,
0.0020294189453125,
-0.01824951171875,
0.01242828369140625,
0.006092071533203125,
0.02020263671875,
0.0085906982421875,
-0.018463134765625,
0.0087127685546875,
0.0248565673828125,
-0.0308990478515625,
0.01201629638671875,
0.00017189979553222656,
-0.0030307769775390625,
0.01361846923828125,
-0.028106689453125,
-0.007266998291015625,
-0.0120391845703125,
0.0137939453125,
-0.025421142578125,
0.01012420654296875,
-0.01200103759765625,
-0.013153076171875,
-0.00907135009765625,
-0.0099639892578125,
-0.046173095703125,
0.027740478515625,
0.03314208984375,
-0.027801513671875,
0.03582763671875,
0.0153656005859375,
-0.004119873046875,
-0.02117919921875,
-0.0018367767333984375,
-0.061737060546875,
-0.0743408203125,
0.00634002685546875,
-0.0718994140625,
0.04443359375,
-0.07159423828125,
-0.0020904541015625,
-0.0231781005859375,
0.08447265625,
-0.00034809112548828125,
-0.0240936279296875,
-0.0042572021484375,
0.0193939208984375,
-0.054473876953125,
-0.041473388671875,
-0.01058197021484375,
-0.01108551025390625,
0.059478759765625,
-0.015899658203125,
-0.0214996337890625,
0.0087127685546875,
-0.0210418701171875,
0.0196380615234375,
0.03521728515625,
-0.0009217262268066406,
0.046875,
-0.07904052734375,
0.040069580078125,
0.038299560546875,
0.0147857666015625,
-0.00493621826171875,
-0.03460693359375,
-0.03680419921875,
-0.11004638671875,
-0.00592803955078125,
-0.0205230712890625,
0.0311737060546875,
-0.010162353515625,
0.0089263916015625,
-0.0205535888671875,
0.043792724609375,
-0.0022411346435546875,
-0.01104736328125,
-0.0003230571746826172,
0.0255279541015625,
-0.04888916015625,
-0.0197906494140625,
-0.01207733154296875,
-0.032867431640625,
-0.0209197998046875,
-0.0261993408203125,
0.017578125,
0.059783935546875,
-0.0272216796875,
0.046478271484375,
-0.036834716796875,
0.0021190643310546875,
-0.01995849609375,
-0.033294677734375,
-0.0267333984375,
0.0269775390625,
-0.017730712890625,
0.017608642578125,
-0.04730224609375,
-0.0447998046875,
0.06640625,
-0.0269775390625,
0.016448974609375,
-0.003086090087890625,
0.10687255859375,
0.000507354736328125,
-0.020751953125,
-0.032562255859375,
0.03076171875,
0.0311431884765625,
0.00817108154296875,
-0.01058197021484375,
-0.0174407958984375,
-0.0259857177734375,
0.01554107666015625,
0.006534576416015625,
-0.0007038116455078125,
-0.0118560791015625,
0.051727294921875,
0.00839996337890625,
0.0003743171691894531,
-0.0038909912109375,
-0.01169586181640625,
0.0030307769775390625,
0.0175323486328125,
-0.023040771484375,
-0.0247039794921875,
-0.02252197265625,
0.06451416015625,
-0.0250396728515625,
0.0599365234375,
-0.045654296875,
-0.020843505859375,
0.01337432861328125,
-0.032135009765625,
0.0109405517578125,
0.004695892333984375,
0.0164794921875,
-0.0176239013671875,
-0.0172576904296875,
-0.01611328125,
-0.007053375244140625,
-0.0216827392578125,
-0.0057830810546875,
-0.00205230712890625,
0.0035190582275390625,
-0.017333984375,
0.0015134811401367188,
-0.0209197998046875,
0.0753173828125,
0.006725311279296875,
-0.0430908203125,
0.0237884521484375,
-0.01097869873046875,
-0.00811004638671875,
0.04034423828125,
0.03411865234375,
-0.004749298095703125,
0.0014638900756835938,
0.041015625,
0.0238189697265625,
-0.00792694091796875,
0.04180908203125,
0.022430419921875,
0.025146484375,
0.0114593505859375,
-0.01300811767578125,
0.022979736328125,
0.0180206298828125,
-0.0233306884765625,
0.022308349609375,
-0.0030193328857421875,
0.004730224609375,
-0.0003323554992675781,
0.052154541015625,
0.0076751708984375,
-0.01534271240234375,
0.014129638671875,
0.00936126708984375,
0.030029296875,
-0.058685302734375,
-0.01934814453125,
-0.0136871337890625,
0.04815673828125,
-0.03271484375,
-0.03741455078125,
0.0567626953125,
-0.0171661376953125,
0.00872802734375,
-0.00799560546875,
-0.06378173828125,
-0.04229736328125,
-0.01180267333984375,
-0.009552001953125,
0.033782958984375,
-0.03619384765625,
0.006359100341796875,
0.0010356903076171875,
-0.032257080078125,
0.036041259765625,
0.0240478515625,
0.05889892578125,
-0.045501708984375,
-0.063720703125,
-0.01326751708984375,
-0.045562744140625,
-0.0498046875,
0.0679931640625,
0.0311431884765625,
-0.0293731689453125,
-0.037322998046875,
0.0255889892578125,
0.01525115966796875,
0.0296630859375,
-0.00733184814453125,
-0.028594970703125,
0.0438232421875,
0.0013780593872070312,
0.0268402099609375,
-0.029998779296875,
0.0021610260009765625,
-0.03179931640625,
-0.033233642578125,
-0.01953125,
-0.006412506103515625,
-0.004497528076171875,
-0.00965118408203125,
0.0157928466796875,
-0.006649017333984375,
0.016265869140625,
-0.0256805419921875,
-0.035064697265625,
-0.0240631103515625,
0.00958251953125,
0.018524169921875,
-0.0104827880859375,
-0.005626678466796875,
-0.00710296630859375,
0.00405120849609375,
0.0159454345703125,
0.00749969482421875,
0.01324462890625,
0.029754638671875,
-0.043426513671875,
-0.0198211669921875,
-0.06048583984375,
0.01509857177734375,
-0.007694244384765625,
0.033172607421875,
0.02471923828125,
0.0157318115234375,
0.01065826416015625,
0.0105743408203125,
-0.01142120361328125,
0.0007729530334472656,
-0.01047515869140625,
0.024078369140625,
0.0030517578125,
-0.0022945404052734375,
0.031707763671875,
-0.05511474609375,
0.03326416015625,
0.000614166259765625,
0.030029296875,
-0.001277923583984375,
-0.0618896484375,
0.0052032470703125,
0.050567626953125,
-0.007648468017578125,
-0.00612640380859375,
0.0176849365234375,
0.024810791015625,
0.044525146484375,
-0.0205230712890625,
0.039947509765625,
0.00862884521484375,
0.0433349609375,
-0.049713134765625,
-0.0643310546875,
-0.00007510185241699219,
0.00882720947265625,
-0.0252532958984375,
-0.006481170654296875,
-0.01398468017578125,
0.0006113052368164062,
0.0306854248046875,
0.048980712890625,
-0.046356201171875,
0.01131439208984375,
0.030609130859375,
-0.024139404296875,
-0.0086517333984375,
0.005474090576171875,
0.004047393798828125,
-0.0185699462890625,
0.00988006591796875,
0.021759033203125,
-0.0125885009765625,
0.00030732154846191406,
0.007427215576171875,
-0.0211029052734375,
-0.01396942138671875,
0.0030117034912109375,
0.0068359375,
-0.00296783447265625,
0.00556182861328125,
-0.006992340087890625,
-0.002628326416015625,
-0.0203399658203125,
0.0195465087890625,
0.031463623046875,
-0.003055572509765625,
-0.061309814453125,
0.060455322265625,
-0.004878997802734375,
-0.005443572998046875,
-0.001392364501953125,
0.00807952880859375,
0.050445556640625,
0.021209716796875,
0.01497650146484375,
-0.0115509033203125,
0.01074981689453125,
0.00014638900756835938,
0.0243988037109375,
-0.006771087646484375,
-0.0012197494506835938,
0.017425537109375,
-0.0210723876953125,
-0.0011997222900390625,
-0.0163726806640625,
0.0026683807373046875,
-0.010101318359375,
-0.034576416015625,
0.027557373046875,
-0.05438232421875,
0.022552490234375,
0.0260162353515625,
0.0273590087890625,
0.0017938613891601562,
-0.0278167724609375,
-0.0004119873046875,
-0.02386474609375,
0.0267333984375,
-0.011199951171875,
0.0302276611328125,
0.0224609375,
0.0014858245849609375,
-0.06060791015625,
0.09149169921875,
0.0110321044921875,
0.008636474609375,
-0.004177093505859375,
0.024993896484375,
-0.03436279296875,
0.01195526123046875,
-0.035675048828125,
0.047576904296875,
-0.01593017578125,
0.019561767578125,
-0.0161590576171875,
0.00922393798828125,
0.0139312744140625,
0.0117034912109375,
0.0689697265625,
0.0127105712890625,
-0.005573272705078125,
0.01099395751953125,
0.077880859375,
0.0533447265625,
0.007457733154296875,
0.00930023193359375,
0.0023708343505859375,
-0.037445068359375,
0.04644775390625,
0.021087646484375,
0.02703857421875,
0.026031494140625,
-0.0213775634765625,
0.01019287109375,
0.0007920265197753906,
0.002170562744140625,
-0.0143585205078125,
0.008575439453125,
0.012115478515625,
-0.0240020751953125,
-0.014251708984375,
-0.0292510986328125,
0.0195770263671875,
0.034027099609375,
0.032989501953125,
-0.06402587890625,
0.00649261474609375,
-0.0457763671875,
0.06219482421875,
-0.021484375,
0.0172882080078125,
0.0122528076171875,
0.0064239501953125,
0.0711669921875,
-0.043304443359375,
-0.002719879150390625,
0.00901031494140625,
-0.01300048828125,
0.06011962890625,
0.00994110107421875,
0.0256500244140625,
-0.0701904296875,
0.00007051229476928711,
0.060791015625,
0.09539794921875,
-0.06298828125,
-0.043548583984375,
0.004852294921875,
0.00652313232421875,
-0.000926971435546875,
0.0263824462890625,
0.023529052734375,
0.059417724609375,
0.0816650390625,
-0.0146942138671875,
0.0024356842041015625,
0.0145111083984375,
0.0184173583984375,
0.00443267822265625,
0.0198822021484375,
-0.023956298828125,
-0.0138092041015625,
-0.0531005859375,
0.040802001953125,
-0.0032711029052734375,
0.041534423828125,
0.002582550048828125,
0.052490234375,
-0.004528045654296875,
-0.003665924072265625,
-0.00788116455078125,
0.0282745361328125,
0.006725311279296875,
-0.0009541511535644531,
-0.032684326171875,
-0.049041748046875,
0.0220184326171875,
0.0298309326171875,
-0.021026611328125,
0.043609619140625,
0.0369873046875,
0.051116943359375,
-0.00316619873046875,
-0.01947021484375,
0.01763916015625,
-0.0272369384765625,
-0.0867919921875,
-0.0260467529296875,
0.0193634033203125,
0.0509033203125,
0.038970947265625,
0.0254058837890625,
0.0888671875,
-0.00833892822265625,
-0.0051727294921875,
0.0118560791015625,
0.007076263427734375,
-0.0401611328125,
0.04736328125,
0.0233001708984375,
0.060791015625,
0.032745361328125,
-0.0802001953125,
-0.01129150390625,
-0.049652099609375,
-0.0020313262939453125,
0.006793975830078125,
0.022064208984375,
-0.00372314453125,
0.0264129638671875,
0.00019490718841552734,
-0.01004791259765625,
-0.0127105712890625,
0.00099945068359375,
0.0203704833984375,
-0.014434814453125,
0.0183258056640625,
-0.0033740997314453125,
-0.05517578125,
-0.0090789794921875,
0.0162811279296875,
-0.0020751953125,
-0.01180267333984375,
0.07781982421875,
-0.01178741455078125,
-0.00768280029296875,
-0.037445068359375,
0.0018663406372070312,
-0.03399658203125,
-0.0113525390625,
-0.005527496337890625,
-0.0035152435302734375,
-0.003925323486328125,
0.0030918121337890625,
-0.055694580078125,
0.032928466796875,
0.00489044189453125,
-0.0157470703125,
0.022308349609375,
-0.034332275390625,
0.015655517578125,
0.00536346435546875,
0.05816650390625,
-0.0058135986328125,
0.005870819091796875,
-0.027801513671875,
-0.03387451171875,
0.049896240234375,
0.019500732421875,
0.01812744140625,
-0.0009226799011230469,
-0.025054931640625,
-0.0435791015625,
0.0186309814453125,
-0.040435791015625,
0.009002685546875,
0.027679443359375,
0.00644683837890625,
-0.0194244384765625,
-0.00907135009765625,
-0.0194854736328125,
-0.012908935546875,
0.00897979736328125,
0.0137786865234375,
-0.010650634765625,
-0.051788330078125,
0.00007992982864379883,
0.0462646484375,
0.0439453125,
-0.01044464111328125,
0.02862548828125,
0.00897216796875,
-0.009918212890625,
0.0006403923034667969,
-0.01009368896484375,
-0.0279541015625,
-0.03167724609375,
-0.02178955078125,
0.0138397216796875,
-0.0111846923828125,
-0.037811279296875,
-0.04266357421875,
0.02178955078125,
0.06085205078125,
0.00479888916015625,
-0.029541015625,
0.0291290283203125,
-0.042938232421875,
0.035125732421875,
0.0263671875,
-0.035797119140625,
0.0292510986328125,
0.0582275390625,
-0.0277099609375,
-0.0251007080078125,
-0.012420654296875,
-0.00493621826171875,
-0.0223846435546875,
0.040313720703125,
0.016387939453125,
-0.0233154296875,
0.01157379150390625,
0.025115966796875,
0.0282440185546875,
0.07745361328125,
0.06439208984375,
-0.0214385986328125,
0.0240020751953125,
-0.01168060302734375,
-0.038055419921875,
-0.040618896484375,
0.031646728515625,
-0.063232421875,
-0.039398193359375,
-0.059844970703125,
0.041717529296875,
0.0323486328125,
-0.039154052734375,
-0.08447265625,
-0.04205322265625,
-0.00954437255859375,
-0.042938232421875,
-0.023590087890625,
-0.035247802734375,
-0.04119873046875,
0.0165557861328125,
-0.01149749755859375,
-0.005702972412109375,
-0.006656646728515625,
0.0843505859375,
0.01494598388671875,
0.00531005859375,
0.04473876953125,
-0.0192413330078125,
-0.04315185546875,
-0.01161956787109375,
-0.0095367431640625,
0.0276031494140625,
0.0293121337890625,
-0.0026187896728515625,
0.0166473388671875,
0.0606689453125,
-0.032501220703125,
-0.01007080078125,
-0.0421142578125,
-0.0374755859375,
-0.00600433349609375,
-0.040679931640625,
-0.00988006591796875,
-0.01076507568359375,
0.067626953125,
0.00811767578125,
0.01241302490234375,
-0.03143310546875,
-0.03155517578125,
-0.05224609375,
0.004604339599609375,
-0.002346038818359375,
0.006134033203125,
-0.05633544921875,
0.013885498046875,
0.01364898681640625,
0.0002351999282836914,
0.0137176513671875,
0.002105712890625,
0.003139495849609375,
-0.01088714599609375,
0.01413726806640625,
-0.03692626953125,
-0.0079345703125,
0.006656646728515625,
0.017425537109375,
-0.032989501953125,
-0.06689453125,
0.0021610260009765625,
0.00576019287109375,
-0.050567626953125,
-0.045501708984375,
-0.01094818115234375,
-0.019744873046875,
-0.01082611083984375,
0.0287628173828125,
-0.004669189453125,
0.007659912109375,
-0.01355743408203125,
-0.0169219970703125,
0.0211334228515625,
0.022003173828125,
-0.0283355712890625,
0.0191497802734375,
0.0069580078125,
0.072265625,
-0.0205078125,
0.0706787109375,
-0.0055694580078125,
-0.044158935546875,
-0.0183868408203125,
0.042755126953125,
-0.045074462890625,
-0.00821685791015625,
-0.040252685546875,
-0.0114288330078125,
0.0170440673828125,
0.0374755859375,
0.023651123046875,
0.0031070709228515625,
-0.004669189453125,
-0.005168914794921875,
0.0159149169921875,
0.001888275146484375
]
|
7dc285441c5d00b2f7c522ba18a6144bea709b6e | Wordpress Stackexchange
Q: Why did multiple line breaks stop working in text editor? # Adds ability to add break tags on posts
remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );
add_filter( 'the_content', 'nl2br' );
add_filter( 'the_excerpt', 'nl2br' );
We had the above code in our custom plugin for years and it made the break tag work.
Well it still works. Except multiple line breaks do not work. We can put 50 break tags in a row and the text will just go to the next line. Problem is we need to copy/paste a lot of straight html and spacing is done using break tags.
So why did this stop working when going from 4.4.latest to 4.5.latest? And more importantly what can I do to get tinymce to just read what is there!!?? Also I did try to use the Advanced TinyMCE widget and show paragraph/breaks... That works again but not for multiple. (yes I understand people can have a nonbreaking space in between to show the line - this will involve a lot of work on our part and is truly ghetto)
A: From the comments, problems seems to be related to some plugin misbehaving.
| Q: Why did multiple line breaks stop working in text editor? # Adds ability to add break tags on posts
remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );
add_filter( 'the_content', 'nl2br' );
add_filter( 'the_excerpt', 'nl2br' );
We had the above code in our custom plugin for years and it made the break tag work.
Well it still works. Except multiple line breaks do not work. We can put 50 break tags in a row and the text will just go to the next line. Problem is we need to copy/paste a lot of straight html and spacing is done using break tags.
So why did this stop working when going from 4.4.latest to 4.5.latest? And more importantly what can I do to get tinymce to just read what is there!!?? Also I did try to use the Advanced TinyMCE widget and show paragraph/breaks... That works again but not for multiple. (yes I understand people can have a nonbreaking space in between to show the line - this will involve a lot of work on our part and is truly ghetto)
A: From the comments, problems seems to be related to some plugin misbehaving.
A: When are you calling the code to remove and add the new filters? You can try calling them with a higher priority (if you're calling them from another hook).
Chances are it's due to another plugin or theme doing it's own replacement on the_content ... whether it be calling wpautop itself or removing the nl2br filter.
If it's removing the filter for nl2br you could just call your own function:
add_filter( 'the_content', 'myown_nl2br' );
add_filter( 'the_excerpt', 'myown_nl2br' );
function myown_nl2br($string) {
$string = str_replace(array("\r\n", "\r", "\n"), "<br />", $string);
return $string;
}
Linebreak Reference:
*
*windows = \r\n
*unix = \n
*osx/mac = \r
You could also just do a call to nl2br() in the function above, but with str_replace gives you an understanding of how it works, and technically nl2br() only inserts a <br/> in front of line break, doesn't actually remove the line break itself.
Tracking down the culprit:
Do a full search on your entire wp-content directory for the_content, and look for any matches where the filter is removed, added, etc. Also search for nl2br and wpautop, that should help track down the culprit.
If for some reason the plugin or theme you find has a callback to a class object's method, the standard remove_filter will not work, here's a response to another question where I posted code to remove a filter when you don't have access to the class object:
https://wordpress.stackexchange.com/a/239431/51201
| wordpress | {
"language": "en",
"length": 429,
"provenance": "stackexchange_00019.jsonl.gz:465352",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226252"
} | [
-0.01216888427734375,
-0.037078857421875,
0.00890350341796875,
0.0089569091796875,
-0.0347900390625,
-0.0002880096435546875,
0.0249481201171875,
0.007610321044921875,
0.024993896484375,
0.0238494873046875,
-0.00106048583984375,
-0.01396942138671875,
0.00917816162109375,
-0.0258026123046875,
-0.01861572265625,
-0.0255126953125,
0.0214080810546875,
-0.0635986328125,
-0.042510986328125,
-0.0239715576171875,
0.007762908935546875,
-0.0081634521484375,
-0.01922607421875,
0.005641937255859375,
-0.0137939453125,
0.02825927734375,
0.1070556640625,
-0.031707763671875,
-0.013824462890625,
-0.047607421875,
0.003917694091796875,
0.005401611328125,
0.00926971435546875,
0.080078125,
-0.09124755859375,
0.012451171875,
-0.0439453125,
0.03955078125,
-0.006046295166015625,
0.027618408203125,
-0.002025604248046875,
-0.0014257431030273438,
0.043670654296875,
0.0169525146484375,
-0.00336456298828125,
-0.037322998046875,
0.02227783203125,
-0.036041259765625,
-0.0168304443359375,
0.0005621910095214844,
-0.0138702392578125,
0.02667236328125,
-0.00701904296875,
-0.037841796875,
0.007236480712890625,
-0.005214691162109375,
0.002307891845703125,
-0.040008544921875,
0.01123809814453125,
0.022552490234375,
0.0218658447265625,
0.01407623291015625,
0.0126495361328125,
-0.0021762847900390625,
0.0168609619140625,
-0.00882720947265625,
-0.0308380126953125,
0.01152801513671875,
-0.01309967041015625,
0.0159759521484375,
0.02032470703125,
-0.05755615234375,
0.0190277099609375,
-0.039215087890625,
0.0328369140625,
0.00704193115234375,
-0.0240478515625,
0.0004925727844238281,
0.01406097412109375,
-0.001728057861328125,
0.029205322265625,
0.020538330078125,
-0.03387451171875,
-0.0167236328125,
0.0156097412109375,
-0.0172882080078125,
0.004314422607421875,
-0.01161956787109375,
-0.0751953125,
-0.0153961181640625,
-0.03802490234375,
-0.06707763671875,
-0.07977294921875,
0.00582122802734375,
0.006801605224609375,
-0.037750244140625,
0.002704620361328125,
-0.01947021484375,
-0.03131103515625,
-0.022552490234375,
0.01904296875,
-0.0479736328125,
0.047698974609375,
-0.0079803466796875,
0.01214599609375,
-0.02618408203125,
-0.01265716552734375,
0.058349609375,
0.0836181640625,
0.04180908203125,
-0.023193359375,
0.055145263671875,
0.0025615692138671875,
-0.044342041015625,
0.022857666015625,
0.00775909423828125,
-0.010467529296875,
0.03900146484375,
0.0171051025390625,
-0.0011758804321289062,
-0.0016431808471679688,
0.02044677734375,
-0.05450439453125,
0.016143798828125,
-0.01508331298828125,
-0.03240966796875,
0.0034351348876953125,
0.0219573974609375,
0.016265869140625,
0.0089569091796875,
0.01131439208984375,
-0.003078460693359375,
-0.04931640625,
0.01149749755859375,
-0.02008056640625,
0.00389862060546875,
0.0200958251953125,
0.00847625732421875,
-0.0149383544921875,
0.0092315673828125,
-0.04132080078125,
-0.0144500732421875,
-0.000023484230041503906,
-0.047515869140625,
-0.023193359375,
0.0150146484375,
0.039581298828125,
0.0272369384765625,
-0.026763916015625,
-0.0565185546875,
-0.004150390625,
0.0279541015625,
0.07452392578125,
-0.004436492919921875,
-0.05419921875,
-0.09600830078125,
0.038177490234375,
-0.0697021484375,
0.0056304931640625,
-0.1121826171875,
0.0203704833984375,
0.005462646484375,
0.04736328125,
-0.0802001953125,
-0.062744140625,
-0.0234222412109375,
-0.126953125,
-0.0248260498046875,
0.0306243896484375,
-0.01029205322265625,
-0.0462646484375,
0.0267486572265625,
0.07379150390625,
0.0198211669921875,
-0.006923675537109375,
0.033660888671875,
-0.008453369140625,
0.0285186767578125,
0.020843505859375,
-0.004161834716796875,
-0.01448822021484375,
-0.0399169921875,
0.052032470703125,
-0.00848388671875,
-0.0716552734375,
0.06103515625,
0.0019369125366210938,
0.10931396484375,
0.01502227783203125,
0.0286102294921875,
-0.02154541015625,
-0.00740814208984375,
-0.0027446746826171875,
-0.00274658203125,
0.042755126953125,
-0.033203125,
-0.039886474609375,
-0.027313232421875,
0.01378631591796875,
-0.0248260498046875,
0.054473876953125,
0.011749267578125,
0.01369476318359375,
-0.0242767333984375,
-0.042327880859375,
-0.00971221923828125,
-0.0065765380859375,
0.01332855224609375,
0.0316162109375,
-0.0032749176025390625,
-0.0006852149963378906,
-0.024261474609375,
0.00568389892578125,
-0.0107269287109375,
-0.036224365234375,
0.0027256011962890625,
-0.00501251220703125,
0.05047607421875,
0.0300445556640625,
-0.0161590576171875,
0.08001708984375,
-0.019683837890625,
0.08111572265625,
0.0401611328125,
0.008148193359375,
-0.0589599609375,
-0.0019702911376953125,
-0.03802490234375,
-0.036041259765625,
-0.0188446044921875,
-0.0222930908203125,
0.058807373046875,
0.059173583984375,
0.055389404296875,
-0.02349853515625,
-0.01056671142578125,
-0.007244110107421875,
-0.0287933349609375,
0.0036373138427734375,
0.0296630859375,
0.042236328125,
0.0458984375,
0.007328033447265625,
-0.056243896484375,
0.0204925537109375,
-0.10565185546875,
-0.00545501708984375,
-0.055694580078125,
-0.023681640625,
-0.00553131103515625,
-0.0008535385131835938,
0.0033721923828125,
0.038543701171875,
-0.032012939453125,
-0.000030517578125,
0.040802001953125,
0.00919342041015625,
0.0219573974609375,
-0.00405120849609375,
-0.00443267822265625,
0.01125335693359375,
-0.003826141357421875,
-0.01444244384765625,
-0.0125579833984375,
0.0014352798461914062,
0.0202178955078125,
0.038360595703125,
0.0452880859375,
-0.00383758544921875,
-0.0011892318725585938,
-0.0034122467041015625,
-0.0024127960205078125,
0.00806427001953125,
0.024566650390625,
-0.042633056640625,
0.0128021240234375,
-0.011566162109375,
0.01462554931640625,
-0.0080108642578125,
-0.0003695487976074219,
-0.019378662109375,
0.0151519775390625,
0.016510009765625,
-0.0186920166015625,
0.0233154296875,
-0.002391815185546875,
0.00882720947265625,
-0.051177978515625,
0.01263427734375,
-0.0281524658203125,
-0.0021228790283203125,
0.040069580078125,
-0.0013332366943359375,
0.03912353515625,
-0.0206146240234375,
-0.00989532470703125,
0.0194549560546875,
-0.020660400390625,
0.040771484375,
-0.0430908203125,
0.0452880859375,
0.053680419921875,
-0.03424072265625,
0.0186004638671875,
0.0230712890625,
0.01334381103515625,
0.0428466796875,
0.001781463623046875,
0.0015859603881835938,
0.04010009765625,
-0.08001708984375,
-0.006511688232421875,
0.0364990234375,
0.0259857177734375,
0.0330810546875,
-0.0101470947265625,
0.0036487579345703125,
0.038818359375,
-0.034515380859375,
0.003185272216796875,
0.01216888427734375,
-0.05853271484375,
-0.0269775390625,
0.022857666015625,
-0.051849365234375,
-0.001667022705078125,
0.06298828125,
-0.0137176513671875,
-0.049560546875,
0.00787353515625,
-0.036346435546875,
0.005687713623046875,
-0.0280303955078125,
0.081298828125,
-0.00909423828125,
0.0193328857421875,
0.0160369873046875,
0.10986328125,
0.0273284912109375,
-0.058197021484375,
0.02825927734375,
-0.0550537109375,
-0.03985595703125,
0.0458984375,
-0.006610870361328125,
-0.0220947265625,
0.0113525390625,
0.0037384033203125,
0.004024505615234375,
0.0120391845703125,
-0.0004322528839111328,
-0.019805908203125,
-0.018524169921875,
0.022308349609375,
0.032196044921875,
0.015289306640625,
-0.01224517822265625,
0.04180908203125,
0.04327392578125,
-0.01418304443359375,
-0.028411865234375,
0.0004897117614746094,
-0.02044677734375,
0.041259765625,
-0.01313018798828125,
-0.0022430419921875,
-0.00592041015625,
0.062286376953125,
-0.01085662841796875,
-0.006931304931640625,
0.0306396484375,
-0.03961181640625,
0.0672607421875,
-0.01271820068359375,
-0.0177459716796875,
-0.046661376953125,
-0.0022449493408203125,
-0.004634857177734375,
-0.01454925537109375,
-0.0372314453125,
0.036712646484375,
-0.031951904296875,
0.036102294921875,
-0.041961669921875,
0.0306854248046875,
0.0084686279296875,
-0.037506103515625,
0.01131439208984375,
-0.00397491455078125,
0.0077667236328125,
-0.0249176025390625,
-0.0013027191162109375,
-0.00972747802734375,
-0.0262298583984375,
0.00914764404296875,
0.0222320556640625,
-0.035491943359375,
-0.0399169921875,
-0.0157928466796875,
-0.0258636474609375,
-0.002758026123046875,
-0.0157318115234375,
-0.0462646484375,
0.0136566162109375,
-0.024017333984375,
-0.01044464111328125,
0.0254364013671875,
-0.035980224609375,
0.0423583984375,
-0.0255126953125,
-0.0014410018920898438,
0.0004901885986328125,
-0.023895263671875,
-0.037261962890625,
-0.0149383544921875,
-0.0114593505859375,
-0.032440185546875,
-0.004169464111328125,
-0.0443115234375,
0.033294677734375,
0.02923583984375,
-0.01561737060546875,
0.00847625732421875,
0.045166015625,
0.019287109375,
0.021759033203125,
-0.003673553466796875,
-0.006053924560546875,
0.0057373046875,
-0.024566650390625,
-0.005359649658203125,
-0.032501220703125,
-0.035797119140625,
-0.01435089111328125,
0.0132904052734375,
0.03851318359375,
-0.0108184814453125,
-0.0161285400390625,
-0.004314422607421875,
-0.005229949951171875,
-0.0259552001953125,
-0.01922607421875,
-0.033599853515625,
-0.01274871826171875,
-0.005138397216796875,
-0.033203125,
-0.02191162109375,
-0.03204345703125,
0.029876708984375,
-0.005229949951171875,
0.00251007080078125,
0.007030487060546875,
0.05169677734375,
0.004230499267578125,
-0.0038280487060546875,
-0.036163330078125,
0.007442474365234375,
0.03424072265625,
0.040069580078125,
0.0241546630859375,
-0.0087432861328125,
-0.038787841796875,
0.0538330078125,
0.0262298583984375,
0.011016845703125,
-0.045684814453125,
0.04608154296875,
-0.0062408447265625,
0.0032100677490234375,
0.01444244384765625,
-0.020172119140625,
0.04412841796875,
0.0065460205078125,
0.00799560546875,
-0.01461029052734375,
-0.013916015625,
0.036041259765625,
0.040374755859375,
-0.036102294921875,
-0.039947509765625,
-0.032470703125,
0.01064300537109375,
-0.0115966796875,
0.039154052734375,
0.02880859375,
-0.00879669189453125,
0.01556396484375,
0.0011320114135742188,
-0.03875732421875,
-0.01486968994140625,
-0.0018262863159179688,
-0.017486572265625,
0.03790283203125,
-0.06317138671875,
-0.047576904296875,
-0.012451171875,
-0.0007081031799316406,
0.044281005859375,
0.0023937225341796875,
-0.0272674560546875,
-0.0091400146484375,
-0.01556396484375,
-0.004230499267578125,
0.016876220703125,
0.018463134765625,
0.007434844970703125,
0.010986328125,
-0.007411956787109375,
0.0218353271484375,
0.036407470703125,
0.007724761962890625,
-0.0131072998046875,
0.006137847900390625,
-0.01654052734375,
0.003215789794921875,
-0.00909423828125,
0.0391845703125,
-0.01503753662109375,
0.01435089111328125,
-0.014556884765625,
0.00887298583984375,
-0.011505126953125,
0.040374755859375,
0.01380157470703125,
0.0009112358093261719,
-0.004669189453125,
0.0234832763671875,
-0.01241302490234375,
-0.03887939453125,
0.0015077590942382812,
0.02764892578125,
0.0179290771484375,
0.0247344970703125,
-0.0235595703125,
0.01070404052734375,
-0.0185394287109375,
-0.00821685791015625,
0.0189666748046875,
0.01141357421875,
-0.042205810546875,
-0.01267242431640625,
-0.0045013427734375,
0.01155853271484375,
-0.01329803466796875,
0.003284454345703125,
-0.0293121337890625,
-0.0169830322265625,
-0.0034942626953125,
-0.002132415771484375,
-0.043914794921875,
0.00778961181640625,
0.0220489501953125,
0.0134124755859375,
-0.0276947021484375,
-0.0469970703125,
0.0053863525390625,
-0.00199127197265625,
-0.006381988525390625,
-0.0223846435546875,
0.03973388671875,
-0.027862548828125,
-0.01111602783203125,
-0.01047515869140625,
0.027099609375,
-0.04376220703125,
0.021881103515625,
0.0389404296875,
0.033843994140625,
-0.03033447265625,
-0.002422332763671875,
-0.039337158203125,
-0.03125,
-0.01323699951171875,
-0.0257720947265625,
-0.056304931640625,
-0.0098114013671875,
0.03143310546875,
0.0307159423828125,
0.0025920867919921875,
-0.05743408203125,
0.00414276123046875,
-0.00730133056640625,
0.0213775634765625,
0.0546875,
-0.026153564453125,
0.04437255859375,
0.01517486572265625,
0.0435791015625,
-0.005245208740234375,
0.0151824951171875,
-0.00218963623046875,
-0.0179901123046875,
0.049072265625,
0.00731658935546875,
-0.046875,
-0.02142333984375,
-0.040771484375,
-0.04461669921875,
0.0083770751953125,
-0.0210723876953125,
0.0056610107421875,
0.00030875205993652344,
0.0095062255859375,
-0.01548004150390625,
0.0079803466796875,
0.01922607421875,
-0.0260162353515625,
0.0330810546875,
-0.030609130859375,
-0.0220489501953125,
0.00701904296875,
-0.0175933837890625,
0.037750244140625,
0.007556915283203125,
0.0219573974609375,
-0.0012693405151367188,
0.0169830322265625,
-0.02008056640625,
0.0030536651611328125,
-0.00910186767578125,
0.02374267578125,
0.01690673828125,
0.0207672119140625,
0.0124664306640625,
-0.0114593505859375,
0.02667236328125,
0.033905029296875,
-0.0197601318359375,
-0.05078125,
0.0199127197265625,
-0.0374755859375,
-0.01401519775390625,
0.0254058837890625,
0.019989013671875,
0.056365966796875,
-0.050933837890625,
0.00907135009765625,
0.009765625,
-0.01474761962890625,
0.024139404296875,
-0.015106201171875,
-0.01119232177734375,
-0.052520751953125,
0.07745361328125,
0.01239776611328125,
-0.0037326812744140625,
0.039947509765625,
0.01465606689453125,
-0.024871826171875,
-0.052215576171875,
0.019561767578125,
0.0166473388671875,
-0.05322265625,
0.052490234375,
0.0555419921875,
0.00821685791015625,
-0.02105712890625,
-0.0006709098815917969,
0.01110076904296875,
-0.045135498046875,
-0.04974365234375,
0.0204315185546875,
0.004421234130859375,
-0.0021266937255859375,
-0.0257110595703125,
0.0045928955078125,
-0.0008997917175292969,
0.062744140625,
-0.03790283203125,
0.0213775634765625,
0.045654296875,
-0.032196044921875,
-0.0438232421875,
-0.0223388671875,
0.01263427734375,
0.033416748046875,
-0.010009765625,
0.0304107666015625,
-0.00841522216796875,
-0.0240936279296875,
0.00751495361328125,
-0.0092620849609375,
0.0186767578125,
-0.0092926025390625,
-0.016357421875,
0.0233001708984375,
-0.0009293556213378906,
-0.0037860870361328125,
-0.00121307373046875,
-0.07037353515625,
-0.02203369140625,
0.0018377304077148438,
-0.043975830078125,
-0.054351806640625,
0.04656982421875,
-0.0180511474609375,
-0.06573486328125,
0.11871337890625,
-0.0013551712036132812,
0.04168701171875,
0.003566741943359375,
0.039825439453125,
-0.01323699951171875,
0.03948974609375,
-0.00757598876953125,
0.0203399658203125,
-0.053619384765625,
0.00864410400390625,
-0.03839111328125,
-0.0005230903625488281,
0.00908660888671875,
0.047698974609375,
-0.0037441253662109375,
-0.0038738250732421875,
-0.020538330078125,
0.0005846023559570312,
0.02484130859375,
0.038909912109375,
0.0017213821411132812,
0.0210418701171875,
0.005352020263671875,
-0.0543212890625,
-0.0250244140625,
0.01091766357421875,
0.04278564453125,
-0.08526611328125,
-0.0095062255859375,
0.0017290115356445312,
0.0008168220520019531,
-0.0162506103515625,
0.001773834228515625,
-0.0216522216796875,
-0.01415252685546875,
-0.00223541259765625,
0.006771087646484375,
-0.037261962890625,
-0.0230712890625,
0.03485107421875,
0.027069091796875,
-0.060638427734375,
-0.0260162353515625,
-0.031707763671875,
0.02752685546875,
-0.0017290115356445312,
0.0355224609375,
0.00537109375,
0.001987457275390625,
0.04595947265625,
-0.0195465087890625,
0.0074920654296875,
-0.003406524658203125,
0.00514984130859375,
-0.01456451416015625,
-0.0036754608154296875,
0.0026416778564453125,
-0.034271240234375,
0.0242767333984375,
0.041412353515625,
0.005405426025390625,
-0.019195556640625,
-0.028106689453125,
0.0016031265258789062,
-0.0006880760192871094,
-0.01068115234375,
-0.0275726318359375,
-0.044403076171875,
-0.0188446044921875,
0.041656494140625,
0.03271484375,
-0.040985107421875,
-0.03546142578125,
0.0224761962890625,
0.023468017578125,
0.0330810546875,
-0.0016193389892578125,
-0.041351318359375,
-0.0859375,
-0.0015392303466796875,
0.034698486328125,
0.0755615234375,
0.047607421875,
0.076171875,
0.02569580078125,
-0.0596923828125,
0.0038433074951171875,
0.03839111328125,
-0.02081298828125,
-0.015716552734375,
0.004817962646484375,
-0.046112060546875,
-0.01552581787109375,
0.00656890869140625,
0.041290283203125,
0.012451171875,
0.0186767578125,
-0.01043701171875,
-0.031646728515625,
0.0194549560546875,
0.0157928466796875,
-0.0240631103515625,
-0.0491943359375,
-0.050811767578125,
-0.0667724609375,
0.015045166015625,
-0.0118408203125,
0.04296875,
-0.052734375,
0.033721923828125,
0.0031414031982421875,
0.00887298583984375,
0.01291656494140625,
-0.019256591796875,
-0.031341552734375,
-0.01090240478515625,
-0.0106353759765625,
0.022125244140625,
-0.1033935546875,
-0.03509521484375,
0.035430908203125,
-0.040252685546875,
0.026336669921875,
0.048828125,
-0.03155517578125,
0.004955291748046875,
0.01148223876953125,
-0.030731201171875,
-0.015289306640625,
0.01293182373046875,
0.022308349609375,
-0.005115509033203125,
0.0023365020751953125,
-0.006603240966796875,
-0.04254150390625,
-0.0169219970703125,
-0.007022857666015625,
0.0209197998046875,
0.0264892578125,
0.01806640625,
0.0175018310546875,
0.0408935546875,
-0.01513671875,
0.008392333984375,
0.00824737548828125,
-0.0017042160034179688,
-0.034210205078125,
0.04156494140625,
0.033203125,
-0.01358795166015625,
-0.0110931396484375,
0.06317138671875,
0.04345703125,
-0.007297515869140625,
0.017822265625,
0.044921875,
-0.011962890625,
-0.0258026123046875,
0.00878143310546875,
-0.0167236328125,
-0.01027679443359375,
-0.034149169921875,
-0.0335693359375,
0.046417236328125,
0.0219573974609375,
-0.002262115478515625,
0.03424072265625,
0.030181884765625,
-0.0340576171875,
0.0129852294921875,
-0.044158935546875,
0.0116424560546875,
0.0310821533203125,
0.0443115234375,
-0.042724609375,
-0.031494140625,
-0.031585693359375,
-0.0274200439453125,
-0.006961822509765625,
0.00510406494140625,
-0.000759124755859375,
-0.00823211669921875,
0.049346923828125,
0.042388916015625,
0.07659912109375,
-0.0222320556640625,
0.02679443359375,
0.05877685546875,
0.00811004638671875,
0.0123443603515625,
0.00341033935546875,
-0.004108428955078125,
-0.00972747802734375,
-0.01392364501953125,
0.017059326171875,
-0.00934600830078125,
0.01258087158203125,
-0.049835205078125,
-0.051910400390625,
0.0202178955078125,
0.00772857666015625,
-0.047943115234375,
-0.002155303955078125,
-0.0027904510498046875,
-0.0018415451049804688,
-0.0218505859375,
0.0191802978515625,
-0.010223388671875,
0.0168914794921875,
-0.0225830078125,
-0.03717041015625,
-0.048004150390625,
0.04705810546875,
-0.0345458984375,
0.002040863037109375,
0.0153350830078125,
0.0019130706787109375,
-0.034088134765625,
0.007472991943359375,
-0.0133514404296875,
0.054046630859375,
0.01560211181640625,
-0.0106964111328125,
0.006717681884765625,
-0.0037784576416015625,
0.0009431838989257812,
-0.032806396484375,
0.009552001953125,
-0.01378631591796875,
-0.01433563232421875,
0.000053882598876953125,
-0.0109100341796875,
-0.00482177734375,
-0.057586669921875,
-0.09161376953125,
-0.0108795166015625,
0.00347900390625,
-0.0406494140625,
-0.0251007080078125,
-0.06243896484375,
-0.0236663818359375,
0.0028553009033203125,
-0.0145263671875,
-0.0026454925537109375,
-0.01531219482421875,
0.07562255859375,
-0.006511688232421875,
0.0767822265625,
-0.0110931396484375,
-0.009246826171875,
0.01535797119140625,
0.02069091796875,
0.00868988037109375,
-0.0032672882080078125,
-0.0158233642578125,
-0.01186370849609375,
0.01483917236328125,
0.025146484375,
-0.0132293701171875,
-0.073486328125,
0.0304412841796875,
-0.0273284912109375,
0.0136260986328125,
0.0029697418212890625,
-0.0227508544921875,
-0.010040283203125,
-0.01493072509765625,
0.049896240234375,
0.004425048828125,
-0.033172607421875,
0.071044921875,
-0.01123046875,
-0.04736328125,
0.0015707015991210938,
0.000713348388671875,
-0.0125579833984375,
-0.01166534423828125,
0.00394439697265625,
-0.01806640625,
0.03790283203125,
-0.0267791748046875,
-0.036590576171875,
-0.002964019775390625,
-0.023529052734375,
-0.007457733154296875,
-0.05352783203125,
-0.03839111328125,
0.05328369140625,
-0.04144287109375,
-0.042572021484375,
0.003955841064453125,
0.0215301513671875,
-0.00846099853515625,
0.00424957275390625,
-0.01617431640625,
-0.00913238525390625,
-0.016204833984375,
0.0235748291015625,
0.01050567626953125,
0.0198516845703125,
-0.0237274169921875,
-0.00212860107421875,
0.018402099609375,
-0.0022182464599609375,
-0.020294189453125,
-0.01611328125,
0.0191192626953125,
-0.01120758056640625,
-0.042938232421875,
0.0289459228515625,
-0.00797271728515625,
0.007335662841796875,
-0.051544189453125,
0.06463623046875,
0.003223419189453125,
-0.00887298583984375,
0.00655364990234375,
0.0027980804443359375,
0.00782012939453125,
0.042205810546875,
0.044525146484375,
-0.031890869140625,
0.036651611328125,
0.043914794921875,
0.04742431640625,
0.0100555419921875
]
|
45f8fdf3633ca1d105b2731783f40df5a160dac9 | Wordpress Stackexchange
Q: $wpdb Query Result not coming but in phpmyadmin it works Here is my query, when i run this in PHP file its returns NULL but same query in Phpmyadmin return row.
Even I tried with $wpdb->get_row() and $wpdb->get_col() but the result is same for all.
include 'wp-config.php';
global $wpdb;
$result = $wpdb->get_results("SELECT * FROM wp_order_transaction WHERE order_id=1431");
var_dump($result);
can any one tell me where is my mistake.
Thanks in advance!
A: You need to include the "wp-load.php" file at the top of the code
| Q: $wpdb Query Result not coming but in phpmyadmin it works Here is my query, when i run this in PHP file its returns NULL but same query in Phpmyadmin return row.
Even I tried with $wpdb->get_row() and $wpdb->get_col() but the result is same for all.
include 'wp-config.php';
global $wpdb;
$result = $wpdb->get_results("SELECT * FROM wp_order_transaction WHERE order_id=1431");
var_dump($result);
can any one tell me where is my mistake.
Thanks in advance!
A: You need to include the "wp-load.php" file at the top of the code
| wordpress | {
"language": "en",
"length": 85,
"provenance": "stackexchange_00019.jsonl.gz:465353",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226253"
} | [
0.04425048828125,
-0.00006884336471557617,
-0.01364898681640625,
-0.0206298828125,
0.0164031982421875,
-0.045318603515625,
0.04888916015625,
-0.0012350082397460938,
0.0274658203125,
0.0271759033203125,
-0.07098388671875,
0.00020599365234375,
-0.017730712890625,
-0.00449371337890625,
-0.04150390625,
-0.04058837890625,
0.0489501953125,
-0.043609619140625,
0.035369873046875,
0.023773193359375,
0.0010442733764648438,
0.062103271484375,
0.01947021484375,
-0.0305023193359375,
0.035797119140625,
-0.03265380859375,
0.06866455078125,
-0.0167999267578125,
0.057525634765625,
0.003173828125,
0.0364990234375,
-0.0457763671875,
0.0208282470703125,
0.01399993896484375,
-0.002590179443359375,
0.038360595703125,
0.0626220703125,
-0.0214996337890625,
0.0006756782531738281,
0.04644775390625,
0.0288848876953125,
-0.0160675048828125,
0.00878143310546875,
-0.01155853271484375,
-0.00283050537109375,
-0.0361328125,
0.049713134765625,
-0.0245208740234375,
0.01031494140625,
-0.0021114349365234375,
0.0037994384765625,
0.0667724609375,
0.00621795654296875,
-0.0264892578125,
0.007053375244140625,
0.0271148681640625,
-0.0675048828125,
0.0186767578125,
0.00157928466796875,
0.034454345703125,
0.0038852691650390625,
0.000598907470703125,
0.0026416778564453125,
-0.008453369140625,
-0.015655517578125,
0.0286102294921875,
0.04815673828125,
0.0063018798828125,
0.0120849609375,
-0.0263519287109375,
-0.01023101806640625,
0.00025272369384765625,
-0.0268402099609375,
0.006381988525390625,
-0.03173828125,
-0.0341796875,
0.055877685546875,
-0.046600341796875,
-0.0240936279296875,
0.053192138671875,
0.0018053054809570312,
-0.01262664794921875,
-0.08563232421875,
0.022216796875,
-0.0153656005859375,
0.0227508544921875,
-0.007045745849609375,
-0.0202789306640625,
-0.03009033203125,
-0.0199432373046875,
-0.01372528076171875,
-0.04791259765625,
-0.061676025390625,
0.023468017578125,
0.0256195068359375,
-0.05047607421875,
0.0044708251953125,
0.034454345703125,
-0.0256500244140625,
0.006061553955078125,
0.0118560791015625,
-0.026580810546875,
0.01519775390625,
-0.0202789306640625,
0.0037136077880859375,
0.01727294921875,
-0.01345062255859375,
0.01959228515625,
0.04583740234375,
0.038909912109375,
0.016571044921875,
0.037261962890625,
-0.034942626953125,
-0.04296875,
-0.01161956787109375,
0.015167236328125,
-0.0521240234375,
-0.0021419525146484375,
0.006908416748046875,
-0.038482666015625,
0.00568389892578125,
0.0198211669921875,
-0.022674560546875,
-0.004360198974609375,
-0.02685546875,
-0.0321044921875,
-0.0146484375,
-0.01148223876953125,
-0.021636962890625,
0.03155517578125,
-0.03045654296875,
0.007228851318359375,
0.027557373046875,
0.0230865478515625,
-0.007232666015625,
-0.0022258758544921875,
0.0015726089477539062,
0.016937255859375,
0.027069091796875,
-0.00848388671875,
0.05474853515625,
-0.025604248046875,
-0.0273284912109375,
0.038238525390625,
0.00792694091796875,
0.025177001953125,
0.028411865234375,
0.00402069091796875,
-0.0026035308837890625,
0.00812530517578125,
-0.04443359375,
0.039031982421875,
-0.022369384765625,
0.034393310546875,
0.014739990234375,
0.0123138427734375,
0.0155487060546875,
-0.0105743408203125,
-0.0015649795532226562,
-0.00582122802734375,
0.0221405029296875,
-0.021484375,
-0.0197906494140625,
-0.04638671875,
-0.03741455078125,
0.006622314453125,
-0.048431396484375,
0.00047016143798828125,
0.0279998779296875,
0.029144287109375,
0.01094818115234375,
0.007965087890625,
0.0706787109375,
0.01107025146484375,
-0.0167694091796875,
-0.005054473876953125,
0.01299285888671875,
-0.0158233642578125,
0.01003265380859375,
-0.005405426025390625,
-0.035125732421875,
-0.0303955078125,
-0.0025005340576171875,
-0.006069183349609375,
-0.0265960693359375,
0.06597900390625,
-0.0102386474609375,
0.0382080078125,
0.0009131431579589844,
0.0146026611328125,
-0.011474609375,
0.052734375,
-0.05047607421875,
0.057373046875,
0.0019989013671875,
-0.02947998046875,
-0.055877685546875,
-0.0012369155883789062,
-0.0173492431640625,
-0.0294647216796875,
0.0002837181091308594,
-0.00170135498046875,
-0.00621795654296875,
0.01000213623046875,
-0.0151824951171875,
-0.0045928955078125,
-0.00634765625,
0.01153564453125,
-0.00717926025390625,
-0.00414276123046875,
0.0313720703125,
0.037139892578125,
-0.0653076171875,
0.028533935546875,
-0.03448486328125,
0.0160675048828125,
-0.027587890625,
0.05938720703125,
0.004734039306640625,
0.042083740234375,
-0.0256195068359375,
-0.037017822265625,
-0.0078582763671875,
-0.0216217041015625,
-0.00691986083984375,
-0.00408172607421875,
-0.022216796875,
-0.0030975341796875,
0.037994384765625,
-0.00931549072265625,
0.049163818359375,
0.0004718303680419922,
-0.033203125,
0.0160369873046875,
-0.01082611083984375,
-0.018463134765625,
-0.032958984375,
-0.0545654296875,
0.03533935546875,
0.042999267578125,
0.03277587890625,
0.0207061767578125,
-0.033416748046875,
-0.00763702392578125,
0.0011138916015625,
-0.0513916015625,
-0.01117706298828125,
-0.006107330322265625,
0.00823974609375,
-0.0266876220703125,
0.042266845703125,
-0.050048828125,
0.02490234375,
-0.016937255859375,
0.020721435546875,
0.0006155967712402344,
-0.01517486572265625,
0.0406494140625,
0.006572723388671875,
0.02484130859375,
-0.034942626953125,
0.01494598388671875,
0.056060791015625,
-0.0282745361328125,
-0.0153961181640625,
0.030853271484375,
0.0214385986328125,
0.0194091796875,
-0.0248870849609375,
0.0194854736328125,
0.006191253662109375,
-0.0238800048828125,
-0.007259368896484375,
0.01934814453125,
-0.00801849365234375,
0.01030731201171875,
-0.031219482421875,
0.0008840560913085938,
-0.0035877227783203125,
0.01166534423828125,
0.0191497802734375,
0.032470703125,
0.00794219970703125,
-0.01024627685546875,
0.000762939453125,
-0.0487060546875,
0.0246429443359375,
0.03216552734375,
-0.007617950439453125,
0.0010433197021484375,
0.0288848876953125,
0.06072998046875,
-0.0025844573974609375,
0.051971435546875,
-0.0498046875,
0.0012502670288085938,
0.07330322265625,
-0.02239990234375,
0.013763427734375,
-0.01561737060546875,
0.076904296875,
0.07330322265625,
-0.01158905029296875,
0.007617950439453125,
-0.01032257080078125,
-0.00438690185546875,
0.024688720703125,
-0.022003173828125,
-0.0248260498046875,
0.0022716522216796875,
-0.078125,
-0.025787353515625,
0.0245208740234375,
0.04962158203125,
-0.01068878173828125,
-0.055633544921875,
0.01047515869140625,
0.0283966064453125,
-0.08770751953125,
-0.1363525390625,
-0.05035400390625,
-0.037109375,
0.0227203369140625,
-0.01654052734375,
-0.00315093994140625,
0.01192474365234375,
-0.01317596435546875,
0.0084686279296875,
0.02001953125,
-0.01369476318359375,
-0.083984375,
-0.05377197265625,
-0.0994873046875,
0.0180511474609375,
-0.00963592529296875,
0.040374755859375,
-0.020965576171875,
0.11236572265625,
0.01023101806640625,
-0.031982421875,
-0.0259552001953125,
0.00787353515625,
-0.018768310546875,
-0.0037364959716796875,
0.0196075439453125,
-0.0193328857421875,
-0.0007009506225585938,
0.0019369125366210938,
0.0323486328125,
0.010040283203125,
-0.007488250732421875,
-0.0193939208984375,
0.040130615234375,
0.0357666015625,
0.046112060546875,
-0.007633209228515625,
-0.061279296875,
0.0160369873046875,
0.01715087890625,
-0.047943115234375,
-0.005340576171875,
-0.00982666015625,
-0.017425537109375,
0.042816162109375,
-0.01360321044921875,
-0.0172882080078125,
0.0048980712890625,
0.03955078125,
0.0772705078125,
0.028533935546875,
-0.01629638671875,
-0.017730712890625,
0.0924072265625,
0.0276031494140625,
0.05780029296875,
-0.056915283203125,
0.043243408203125,
0.002445220947265625,
-0.017120361328125,
0.01213836669921875,
0.03863525390625,
-0.010040283203125,
-0.00763702392578125,
-0.0831298828125,
-0.062042236328125,
0.0516357421875,
-0.020751953125,
-0.01690673828125,
-0.025146484375,
-0.0260772705078125,
0.01294708251953125,
0.0797119140625,
0.041778564453125,
-0.036102294921875,
-0.006992340087890625,
0.0177154541015625,
-0.04351806640625,
-0.0372314453125,
0.0188140869140625,
0.003925323486328125,
-0.006023406982421875,
-0.01080322265625,
-0.01006317138671875,
-0.01593017578125,
0.0013904571533203125,
-0.0250244140625,
-0.01548004150390625,
-0.04052734375,
0.04864501953125,
0.00009846687316894531,
0.0179290771484375,
0.03570556640625,
-0.0224761962890625,
0.03875732421875,
-0.027587890625,
-0.0155029296875,
-0.063720703125,
-0.01261138916015625,
0.005954742431640625,
0.036376953125,
-0.0066070556640625,
0.01087188720703125,
0.0095672607421875,
0.038909912109375,
-0.01148223876953125,
0.038330078125,
0.01071929931640625,
0.042205810546875,
-0.0055694580078125,
-0.049560546875,
0.01303863525390625,
-0.058258056640625,
-0.00875091552734375,
-0.03155517578125,
-0.007549285888671875,
0.041839599609375,
-0.026702880859375,
0.037078857421875,
-0.0311279296875,
0.006320953369140625,
0.016265869140625,
-0.00855255126953125,
-0.024932861328125,
0.0308685302734375,
-0.0322265625,
-0.002349853515625,
-0.01276397705078125,
-0.0095367431640625,
0.03741455078125,
-0.00612640380859375,
-0.00013840198516845703,
0.005382537841796875,
0.006561279296875,
0.00395965576171875,
-0.0419921875,
-0.048431396484375,
-0.0174713134765625,
0.01611328125,
-0.0181884765625,
0.0047760009765625,
-0.00502777099609375,
-0.0214080810546875,
0.026275634765625,
-0.0124359130859375,
0.0252532958984375,
-0.016326904296875,
0.04559326171875,
0.004093170166015625,
-0.01666259765625,
0.039215087890625,
-0.00342559814453125,
-0.044647216796875,
0.042083740234375,
-0.0037250518798828125,
-0.0146636962890625,
0.01473236083984375,
0.03387451171875,
-0.030029296875,
0.020111083984375,
-0.00730133056640625,
-0.041015625,
0.00457000732421875,
-0.043426513671875,
0.0430908203125,
-0.0232391357421875,
0.0307769775390625,
0.011260986328125,
0.0202484130859375,
0.0129852294921875,
-0.002735137939453125,
0.031768798828125,
-0.01312255859375,
0.0347900390625,
0.032958984375,
0.00901031494140625,
-0.0240325927734375,
-0.019317626953125,
0.064208984375,
-0.0022296905517578125,
-0.02252197265625,
0.0188446044921875,
-0.036163330078125,
0.02001953125,
0.01226806640625,
-0.0182952880859375,
0.022979736328125,
0.044830322265625,
0.002941131591796875,
0.01343536376953125,
-0.015960693359375,
0.01207733154296875,
-0.0225677490234375,
0.02410888671875,
0.00922393798828125,
0.00836944580078125,
-0.0005464553833007812,
0.12060546875,
-0.05548095703125,
0.093505859375,
-0.00103759765625,
0.0158538818359375,
-0.00847625732421875,
0.060760498046875,
-0.01552581787109375,
-0.0261688232421875,
0.02581787109375,
0.044158935546875,
0.025115966796875,
-0.01477813720703125,
-0.0081939697265625,
-0.0127105712890625,
0.01175689697265625,
-0.0148468017578125,
-0.003124237060546875,
0.0533447265625,
-0.000560760498046875,
-0.0266265869140625,
0.047210693359375,
0.042205810546875,
-0.0184326171875,
-0.0484619140625,
-0.035491943359375,
0.0190582275390625,
0.0034542083740234375,
-0.005641937255859375,
0.006572723388671875,
-0.0176849365234375,
0.047454833984375,
-0.01320648193359375,
0.01441192626953125,
0.0053558349609375,
-0.021759033203125,
0.0025691986083984375,
-0.041656494140625,
-0.0733642578125,
0.0352783203125,
0.0276031494140625,
-0.003284454345703125,
-0.022491455078125,
0.004901885986328125,
-0.0421142578125,
-0.00823974609375,
-0.0263519287109375,
0.02056884765625,
-0.07562255859375,
0.01328277587890625,
0.06109619140625,
0.0701904296875,
0.00499725341796875,
-0.0027332305908203125,
-0.0254669189453125,
-0.01788330078125,
0.047454833984375,
-0.0010328292846679688,
-0.0157318115234375,
-0.03436279296875,
0.0248565673828125,
0.005474090576171875,
-0.002544403076171875,
-0.0618896484375,
-0.027099609375,
0.01465606689453125,
0.040008544921875,
-0.0191497802734375,
-0.046539306640625,
0.1094970703125,
-0.0008072853088378906,
0.07342529296875,
-0.0052032470703125,
0.027130126953125,
-0.031829833984375,
-0.00213623046875,
0.02496337890625,
-0.044342041015625,
-0.035247802734375,
-0.031219482421875,
-0.039337158203125,
-0.01068878173828125,
0.025054931640625,
-0.0191497802734375,
0.03729248046875,
0.0096588134765625,
0.0027942657470703125,
0.0072784423828125,
-0.01617431640625,
-0.0093536376953125,
0.01032257080078125,
0.03741455078125,
-0.026336669921875,
-0.0080718994140625,
-0.0240020751953125,
-0.001995086669921875,
0.01251983642578125,
-0.02996826171875,
-0.00901031494140625,
0.037261962890625,
-0.029144287109375,
0.048736572265625,
0.05224609375,
0.0179901123046875,
0.056182861328125,
-0.005420684814453125,
0.018341064453125,
-0.000021338462829589844,
0.037811279296875,
-0.020782470703125,
-0.027008056640625,
0.05975341796875,
0.01284027099609375,
-0.04205322265625,
0.0294189453125,
-0.03961181640625,
0.0309600830078125,
0.0670166015625,
0.1009521484375,
-0.072509765625,
0.00693511962890625,
0.037506103515625,
-0.059417724609375,
-0.021148681640625,
-0.01494598388671875,
-0.026885986328125,
-0.05322265625,
0.049224853515625,
0.032470703125,
-0.00014126300811767578,
0.019195556640625,
0.01483154296875,
0.01419830322265625,
-0.01904296875,
0.054718017578125,
0.0081329345703125,
-0.035888671875,
-0.002407073974609375,
0.0111236572265625,
0.01001739501953125,
0.013916015625,
0.004852294921875,
0.0180206298828125,
0.003887176513671875,
-0.022918701171875,
0.0269927978515625,
-0.0576171875,
0.01120758056640625,
-0.02484130859375,
0.004268646240234375,
0.03076171875,
0.0266876220703125,
-0.0098419189453125,
-0.00821685791015625,
0.00804901123046875,
0.02392578125,
-0.0266265869140625,
-0.00661468505859375,
0.01534271240234375,
0.059539794921875,
-0.046417236328125,
0.034820556640625,
-0.0247344970703125,
0.0120391845703125,
0.00023853778839111328,
-0.04803466796875,
0.013153076171875,
-0.01166534423828125,
0.007579803466796875,
0.03436279296875,
0.0185546875,
-0.00656890869140625,
0.010711669921875,
0.043426513671875,
-0.0181121826171875,
0.0283966064453125,
0.0308837890625,
0.0293121337890625,
-0.0246124267578125,
0.031524658203125,
-0.046142578125,
0.033203125,
-0.0110321044921875,
-0.0001455545425415039,
0.006999969482421875,
0.0233612060546875,
-0.005847930908203125,
-0.004268646240234375,
-0.05377197265625,
0.0191802978515625,
0.005664825439453125,
0.06671142578125,
-0.056854248046875,
-0.0179901123046875,
0.022064208984375,
0.040435791015625,
0.01282501220703125,
-0.0166015625,
-0.03558349609375,
-0.00865936279296875,
0.055572509765625,
0.04718017578125,
0.029937744140625,
0.028045654296875,
0.036834716796875,
0.03814697265625,
0.057891845703125,
-0.016937255859375,
0.046112060546875,
-0.0298919677734375,
0.00913238525390625,
0.041412353515625,
0.005176544189453125,
-0.01334381103515625,
0.0048980712890625,
0.03009033203125,
-0.01385498046875,
-0.00995635986328125,
0.0212860107421875,
-0.0394287109375,
-0.0142822265625,
0.04718017578125,
0.048736572265625,
-0.0660400390625,
-0.049652099609375,
-0.029449462890625,
0.0394287109375,
0.02532958984375,
0.0055694580078125,
-0.0177154541015625,
0.0017385482788085938,
0.054351806640625,
-0.03594970703125,
-0.0214080810546875,
0.01384735107421875,
-0.02203369140625,
0.02203369140625,
0.0011720657348632812,
0.01873779296875,
-0.0295867919921875,
-0.004039764404296875,
0.043121337890625,
0.034912109375,
-0.035552978515625,
-0.0143585205078125,
-0.001483917236328125,
-0.01493072509765625,
0.0026226043701171875,
-0.038360595703125,
-0.0135040283203125,
0.044708251953125,
0.03790283203125,
-0.01091766357421875,
-0.006317138671875,
0.010498046875,
-0.0238494873046875,
-0.0086669921875,
0.01343536376953125,
0.02178955078125,
-0.0054473876953125,
-0.0002582073211669922,
0.01523590087890625,
0.0347900390625,
0.03570556640625,
-0.04205322265625,
0.0484619140625,
-0.057373046875,
0.0030670166015625,
-0.01593017578125,
0.05133056640625,
-0.036041259765625,
0.045867919921875,
-0.057830810546875,
-0.05865478515625,
0.0161590576171875,
0.032257080078125,
-0.022430419921875,
-0.005176544189453125,
-0.0146636962890625,
0.007293701171875,
-0.0171966552734375,
-0.0162506103515625,
0.04412841796875,
-0.01812744140625,
-0.07696533203125,
-0.04296875,
-7.748603820800781e-7,
0.050994873046875,
0.0300140380859375,
0.034088134765625,
0.0312347412109375,
0.00872802734375,
-0.0220184326171875,
-0.00653839111328125,
0.00024378299713134766,
-0.045379638671875,
0.0139617919921875,
-0.020599365234375,
0.01515960693359375,
-0.0016422271728515625,
-0.0215606689453125,
-0.0280609130859375,
0.006191253662109375,
0.035797119140625,
-0.0093231201171875,
0.0294647216796875,
0.03302001953125,
0.004505157470703125,
0.01436614990234375,
0.00045299530029296875,
0.00432586669921875,
-0.00890350341796875,
0.0214691162109375,
-0.0181121826171875,
0.015869140625,
0.00797271728515625,
-0.084716796875,
-0.06341552734375,
-0.01140594482421875,
0.037628173828125,
-0.017333984375,
0.035064697265625,
-0.0020961761474609375,
0.012725830078125,
-0.009613037109375,
0.02923583984375,
-0.0294952392578125,
-0.0082855224609375,
0.0124969482421875,
-0.01214599609375,
-0.002197265625,
-0.00922393798828125,
0.0038318634033203125,
-0.0130157470703125,
0.03680419921875,
-0.048583984375,
-0.039031982421875,
-0.01433563232421875,
0.045196533203125,
0.01438140869140625,
0.0225830078125,
-0.0021266937255859375,
0.0217132568359375,
0.015045166015625,
-0.0010690689086914062,
0.060638427734375,
0.0673828125,
0.0032596588134765625,
0.07196044921875,
0.01517486572265625,
0.01110076904296875,
0.0399169921875,
-0.06707763671875,
0.06134033203125,
0.031829833984375,
-0.02374267578125,
0.0014734268188476562,
-0.0029392242431640625,
-0.0232696533203125,
0.0032215118408203125,
0.0007586479187011719,
0.00006937980651855469,
0.0075225830078125,
-0.0146942138671875,
-0.016693115234375,
0.00443267822265625,
0.0264129638671875,
-0.00536346435546875,
0.01250457763671875,
0.00177764892578125,
-0.011077880859375,
0.00945281982421875,
-0.0009212493896484375,
-0.007610321044921875,
0.033477783203125,
-0.0283355712890625,
0.005290985107421875,
0.0252838134765625,
-0.0235137939453125,
-0.00888824462890625,
-0.01953125,
0.0092315673828125,
0.009552001953125,
-0.04132080078125,
-0.0016813278198242188,
-0.0057525634765625,
0.0123291015625,
-0.0201873779296875,
-0.048095703125,
0.022003173828125,
0.04669189453125,
-0.0225677490234375,
-0.016265869140625,
-0.01355743408203125,
-0.012664794921875,
-0.028289794921875,
-0.003681182861328125,
0.01546478271484375,
-0.0040435791015625,
-0.0233306884765625,
-0.005596160888671875,
-0.00009441375732421875,
0.0305328369140625,
0.01104736328125,
-0.0241546630859375,
-0.0284576416015625,
0.0237579345703125,
-0.02337646484375,
-0.04473876953125,
0.043060302734375,
-0.05657958984375,
-0.01263427734375,
-0.025970458984375,
0.0269775390625,
0.0186614990234375,
-0.042388916015625,
-0.07269287109375,
-0.004657745361328125,
-0.010009765625,
-0.035308837890625,
-0.052734375,
-0.055938720703125,
0.007389068603515625,
0.0157623291015625,
-0.04339599609375,
0.00786590576171875,
-0.07421875,
0.051788330078125,
-0.006740570068359375,
-0.00012505054473876953,
0.01152801513671875,
0.0035343170166015625,
-0.059814453125,
-0.002986907958984375,
-0.0271759033203125,
-0.0166168212890625,
-0.017608642578125,
-0.004405975341796875,
0.0014677047729492188,
0.032257080078125,
-0.0175323486328125,
-0.01763916015625,
0.0178985595703125,
-0.0189971923828125,
0.0188140869140625,
-0.0239410400390625,
-0.0018396377563476562,
-0.0046844482421875,
0.002147674560546875,
0.022064208984375,
-0.008392333984375,
-0.01953125,
-0.047821044921875,
-0.004241943359375,
-0.0308990478515625,
-0.0272979736328125,
0.0283203125,
-0.0740966796875,
-0.00489044189453125,
-0.0237579345703125,
-0.01226806640625,
0.0056304931640625,
0.0211181640625,
-0.03350830078125,
0.005764007568359375,
0.023101806640625,
-0.01010894775390625,
-0.034149169921875,
-0.040435791015625,
0.040374755859375,
-0.036407470703125,
-0.037139892578125,
0.0034122467041015625,
0.0400390625,
-0.01727294921875,
-0.015960693359375,
0.0157318115234375,
-0.0009775161743164062,
0.00849151611328125,
0.0015344619750976562,
0.0177154541015625,
-0.01317596435546875,
0.0086517333984375,
-0.0200653076171875,
-0.01291656494140625,
0.00787353515625,
-0.027191162109375,
0.00518035888671875,
0.05133056640625,
0.006649017333984375,
-0.003658294677734375,
0.034881591796875,
0.01397705078125,
0.0029697418212890625,
0.00783538818359375,
0.049163818359375,
0.004924774169921875,
-0.031646728515625,
0.01141357421875,
-0.019683837890625,
0.004177093505859375,
-0.00788116455078125,
0.01194000244140625,
-0.0394287109375,
0.017578125,
-0.00429534912109375,
0.0047149658203125,
0.0199432373046875
]
|
ea23d7d934a910652a7d769a58ef0ff3f78af409 | Wordpress Stackexchange
Q: How to limit number of images being printer out in "Set Featured Image" pop up? I have wordpress web site which contains over 150 000 images and when you click on "Set Featured Image" whole server slows down. Another thing is that it take a really long time to load images.
Is there any filter/action/hook to add pager or to just show last 10 images.
Another question is how to optimize whole thing (maybe images sort by subfolders with some plugin) so it can work
A: Update 1:
After dived into core AJAX call, this filter will only happen on post.php page:
add_filter('ajax_query_attachments_args', function($query){
if ( isset($_POST['post_id']) && !empty($_POST['post_id']) ) {
$query['posts_per_page'] = 10; // output 10 images only.
}
return $query;
});
*
*You can use ajax_query_attachments_args filter:
add_filter('ajax_query_attachments_args', function($query){
$query['posts_per_page'] = 10; // output 10 images only.
return $query;
});
*Because of querying attachments happens in core and using AJAX, I don't think we can optimize the whole thing.
| Q: How to limit number of images being printer out in "Set Featured Image" pop up? I have wordpress web site which contains over 150 000 images and when you click on "Set Featured Image" whole server slows down. Another thing is that it take a really long time to load images.
Is there any filter/action/hook to add pager or to just show last 10 images.
Another question is how to optimize whole thing (maybe images sort by subfolders with some plugin) so it can work
A: Update 1:
After dived into core AJAX call, this filter will only happen on post.php page:
add_filter('ajax_query_attachments_args', function($query){
if ( isset($_POST['post_id']) && !empty($_POST['post_id']) ) {
$query['posts_per_page'] = 10; // output 10 images only.
}
return $query;
});
*
*You can use ajax_query_attachments_args filter:
add_filter('ajax_query_attachments_args', function($query){
$query['posts_per_page'] = 10; // output 10 images only.
return $query;
});
*Because of querying attachments happens in core and using AJAX, I don't think we can optimize the whole thing.
| wordpress | {
"language": "en",
"length": 162,
"provenance": "stackexchange_00019.jsonl.gz:465354",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226255"
} | [
0.08929443359375,
-0.004123687744140625,
0.036712646484375,
-0.032928466796875,
0.0389404296875,
-0.03411865234375,
0.09112548828125,
-0.0308074951171875,
0.01502227783203125,
-0.004058837890625,
-0.0281219482421875,
-0.010650634765625,
-0.0260009765625,
-0.03826904296875,
-0.004535675048828125,
-0.0411376953125,
0.0489501953125,
-0.01561737060546875,
0.0265655517578125,
0.0245513916015625,
-0.0090789794921875,
0.06512451171875,
0.00907135009765625,
0.0701904296875,
-0.0235595703125,
0.03277587890625,
0.042327880859375,
-0.0172882080078125,
-0.03570556640625,
-0.02557373046875,
-0.00989532470703125,
0.027801513671875,
0.0107574462890625,
0.030059814453125,
-0.0211334228515625,
-0.006496429443359375,
0.0047760009765625,
0.0009355545043945312,
0.0042724609375,
-0.00009179115295410156,
-0.0030117034912109375,
0.01462554931640625,
0.0455322265625,
-0.0096435546875,
0.0007662773132324219,
0.0035858154296875,
-0.0076141357421875,
-0.052001953125,
0.0308837890625,
-0.01238250732421875,
-0.0013151168823242188,
0.0266265869140625,
0.0147705078125,
-0.042724609375,
-0.01100921630859375,
0.003025054931640625,
-0.015533447265625,
0.04034423828125,
0.054931640625,
-0.054046630859375,
-0.05926513671875,
-0.03814697265625,
0.0389404296875,
-0.0173797607421875,
0.00384521484375,
-0.01038360595703125,
0.0011644363403320312,
0.019805908203125,
-0.0046539306640625,
-0.0146331787109375,
-0.0064849853515625,
-0.0059356689453125,
-0.0093994140625,
-0.0222320556640625,
-0.0009617805480957031,
0.019927978515625,
-0.01371002197265625,
-0.031341552734375,
0.0157623291015625,
0.01277923583984375,
-0.005718231201171875,
-0.035858154296875,
-0.031036376953125,
0.042938232421875,
-0.030670166015625,
0.0450439453125,
-0.0105743408203125,
-0.0016431808471679688,
-0.0345458984375,
-0.0206146240234375,
-0.01776123046875,
-0.03790283203125,
-0.0254669189453125,
0.0122528076171875,
-0.0035762786865234375,
-0.0164642333984375,
0.01050567626953125,
-0.004848480224609375,
0.0267181396484375,
0.00982666015625,
0.013824462890625,
-0.05242919921875,
0.0328369140625,
-0.02227783203125,
0.01441192626953125,
0.0277252197265625,
-0.00913238525390625,
0.01971435546875,
0.056121826171875,
0.03021240234375,
0.0162506103515625,
0.04376220703125,
0.0221710205078125,
0.0269775390625,
-0.03485107421875,
-0.050811767578125,
-0.04046630859375,
0.018829345703125,
-0.01126861572265625,
0.006290435791015625,
-0.014678955078125,
-0.021881103515625,
-0.00353240966796875,
0.0006494522094726562,
0.035247802734375,
-0.0097503662109375,
-0.03558349609375,
0.014251708984375,
0.006000518798828125,
0.03021240234375,
-0.0211029052734375,
0.01172637939453125,
0.012298583984375,
-0.003368377685546875,
-0.004840850830078125,
-0.0124053955078125,
0.04486083984375,
-0.02679443359375,
-0.0029850006103515625,
0.0165863037109375,
-0.0029087066650390625,
-0.0239715576171875,
-0.00287628173828125,
-0.01361083984375,
0.03216552734375,
0.017120361328125,
0.01438140869140625,
0.0219268798828125,
0.01515960693359375,
-0.045684814453125,
0.0232391357421875,
-0.006717681884765625,
0.046661376953125,
-0.005992889404296875,
-0.03314208984375,
-0.042816162109375,
0.042694091796875,
-0.046661376953125,
-0.005588531494140625,
-0.06573486328125,
0.041900634765625,
0.02484130859375,
0.010467529296875,
-0.0164794921875,
-0.00952911376953125,
-0.053436279296875,
-0.038299560546875,
0.0082550048828125,
0.0211029052734375,
0.0201416015625,
-0.00586700439453125,
-0.0286102294921875,
-0.0040283203125,
0.005252838134765625,
-0.01983642578125,
0.026611328125,
0.00868988037109375,
0.034759521484375,
0.045135498046875,
-0.01236724853515625,
-0.034759521484375,
-0.043182373046875,
0.11444091796875,
-0.056610107421875,
-0.05047607421875,
0.042755126953125,
0.0037784576416015625,
0.04071044921875,
0.00550079345703125,
0.0142974853515625,
0.032440185546875,
0.035888671875,
-0.0240020751953125,
0.00015854835510253906,
-0.02166748046875,
-0.0216064453125,
-0.0244140625,
-0.0097808837890625,
-0.0233612060546875,
0.036651611328125,
0.0452880859375,
-0.00768280029296875,
0.0162353515625,
-0.031402587890625,
-0.04351806640625,
-0.005290985107421875,
-0.016387939453125,
0.030609130859375,
-0.043731689453125,
0.045074462890625,
0.04473876953125,
0.04925537109375,
-0.056365966796875,
-0.0147552490234375,
0.0296630859375,
0.0108795166015625,
-0.01013946533203125,
0.010833740234375,
-0.0081939697265625,
0.0274810791015625,
-0.0251312255859375,
-0.0164031982421875,
-0.0255279541015625,
0.01248931884765625,
0.07568359375,
0.0263671875,
-0.0261077880859375,
-0.008880615234375,
0.03265380859375,
0.0300445556640625,
-0.06536865234375,
0.0328369140625,
0.0220794677734375,
0.049835205078125,
0.0062103271484375,
-0.019805908203125,
0.004619598388671875,
-0.08013916015625,
0.01611328125,
0.040985107421875,
0.028778076171875,
0.0386962890625,
-0.01120758056640625,
-0.00543975830078125,
0.036834716796875,
-0.02252197265625,
0.00873565673828125,
-0.0119171142578125,
-0.0096435546875,
-0.0164642333984375,
-0.0094451904296875,
-0.039794921875,
0.043243408203125,
-0.059814453125,
0.0214996337890625,
0.027679443359375,
-0.0044708251953125,
0.0043182373046875,
-0.03729248046875,
0.0171661376953125,
0.00839996337890625,
0.0307159423828125,
-0.01134490966796875,
0.016082763671875,
0.002590179443359375,
0.0200347900390625,
0.02911376953125,
0.03094482421875,
0.0038051605224609375,
-0.003353118896484375,
-0.00023412704467773438,
-0.04022216796875,
0.0001933574676513672,
-0.0200347900390625,
-0.0222930908203125,
-0.03118896484375,
-0.0214691162109375,
0.0263824462890625,
-0.00897216796875,
-0.04559326171875,
-0.011932373046875,
-0.00608062744140625,
-0.002170562744140625,
-0.0044403076171875,
-0.01045989990234375,
-0.0275726318359375,
0.026641845703125,
0.017059326171875,
-0.0018596649169921875,
0.00860595703125,
0.03167724609375,
0.0272979736328125,
0.00800323486328125,
0.0184326171875,
-0.01328277587890625,
-0.00733184814453125,
0.06744384765625,
-0.058197021484375,
0.04827880859375,
-0.037139892578125,
0.0980224609375,
0.06390380859375,
-0.023223876953125,
0.0252838134765625,
0.00408172607421875,
-0.0294342041015625,
-0.0013408660888671875,
0.0125885009765625,
-0.0196990966796875,
-0.005580902099609375,
-0.055633544921875,
0.032745361328125,
0.035064697265625,
0.060272216796875,
-0.03009033203125,
-0.044891357421875,
-0.0036602020263671875,
0.01198577880859375,
-0.08709716796875,
-0.10260009765625,
-0.018798828125,
-0.04833984375,
-0.0207977294921875,
0.0127716064453125,
-0.0157470703125,
-0.0006766319274902344,
0.0290374755859375,
-0.0012025833129882812,
-0.052337646484375,
0.0005078315734863281,
-0.03753662109375,
-0.0439453125,
-0.01058197021484375,
0.004119873046875,
-0.016693115234375,
-0.00293731689453125,
-0.001861572265625,
0.06793212890625,
0.002124786376953125,
-0.06829833984375,
-0.007373809814453125,
0.039215087890625,
-0.005855560302734375,
0.01373291015625,
0.038055419921875,
-0.015655517578125,
-0.050933837890625,
0.015045166015625,
0.0014553070068359375,
0.0171051025390625,
-0.04315185546875,
-0.005634307861328125,
-0.01361846923828125,
0.04888916015625,
-0.008880615234375,
0.052398681640625,
0.033294677734375,
0.044708251953125,
0.0306243896484375,
-0.01552581787109375,
-0.0204315185546875,
-0.042449951171875,
-0.054534912109375,
0.005512237548828125,
0.04052734375,
0.0202789306640625,
-0.0161895751953125,
-0.01312255859375,
0.018707275390625,
-0.01031494140625,
0.0031528472900390625,
-0.045684814453125,
0.07330322265625,
0.00804901123046875,
0.032989501953125,
-0.043121337890625,
0.050750732421875,
0.002109527587890625,
0.01885986328125,
0.03460693359375,
0.01157379150390625,
-0.0163116455078125,
0.005950927734375,
-0.035888671875,
-0.025634765625,
0.032470703125,
0.022613525390625,
0.005260467529296875,
-0.00801849365234375,
-0.030487060546875,
0.00643157958984375,
0.0560302734375,
-0.03619384765625,
-0.0208282470703125,
-0.0262603759765625,
0.0011949539184570312,
-0.005832672119140625,
-0.0396728515625,
-0.019561767578125,
-0.006103515625,
-0.056304931640625,
0.005786895751953125,
0.01398468017578125,
-0.046142578125,
-0.003284454345703125,
-0.0509033203125,
-0.043548583984375,
-0.029541015625,
0.0283660888671875,
-0.00879669189453125,
-0.020782470703125,
-0.00383758544921875,
-0.03564453125,
-0.0279693603515625,
-0.026763916015625,
-0.00791168212890625,
-0.12890625,
-0.021728515625,
-0.005191802978515625,
0.0648193359375,
-0.0176239013671875,
-0.00498199462890625,
-0.03802490234375,
0.060302734375,
0.032501220703125,
0.03485107421875,
0.006443023681640625,
-0.0125732421875,
0.01332855224609375,
-0.017822265625,
0.01201629638671875,
-0.02508544921875,
-0.01471710205078125,
-0.033111572265625,
-0.03192138671875,
-0.04327392578125,
-0.01171112060546875,
-0.0228118896484375,
0.0240936279296875,
-0.0039215087890625,
-0.07171630859375,
-0.04144287109375,
-0.0196685791015625,
0.03802490234375,
-0.004421234130859375,
-0.01568603515625,
-0.07049560546875,
-0.0865478515625,
0.015899658203125,
-0.0138702392578125,
-0.010711669921875,
0.0155181884765625,
0.07537841796875,
0.021392822265625,
-0.00698089599609375,
-0.061614990234375,
0.006069183349609375,
0.03582763671875,
0.01971435546875,
0.041229248046875,
-0.0030422210693359375,
-0.03326416015625,
0.07952880859375,
0.0110931396484375,
0.0019521713256835938,
-0.014190673828125,
0.0089263916015625,
0.0074920654296875,
-0.0149383544921875,
0.004291534423828125,
0.00823974609375,
0.031829833984375,
0.0278167724609375,
-0.0261383056640625,
-0.011077880859375,
-0.03912353515625,
0.01497650146484375,
0.0000362396240234375,
0.0263671875,
-0.018768310546875,
-0.0226593017578125,
0.00007897615432739258,
0.049224853515625,
0.0498046875,
0.0026912689208984375,
0.026123046875,
0.0290985107421875,
0.06732177734375,
0.007099151611328125,
0.057586669921875,
0.01206207275390625,
0.00200653076171875,
0.0235137939453125,
0.049774169921875,
0.0010814666748046875,
0.012298583984375,
0.01003265380859375,
-0.01096343994140625,
-0.050079345703125,
-0.03619384765625,
-0.07623291015625,
-0.004741668701171875,
0.047607421875,
0.016815185546875,
-0.0108489990234375,
0.0228424072265625,
0.00830078125,
-0.02313232421875,
-0.01605224609375,
-0.0121612548828125,
-0.0253448486328125,
-0.047271728515625,
0.0146636962890625,
0.01190185546875,
0.0003960132598876953,
0.035980224609375,
-0.003307342529296875,
-0.0212554931640625,
0.0151214599609375,
0.0002582073211669922,
0.035369873046875,
0.004322052001953125,
0.01470947265625,
-0.0059967041015625,
0.0283355712890625,
-0.0133514404296875,
0.02734375,
0.0216522216796875,
-0.00951385498046875,
0.035400390625,
0.00884246826171875,
0.02264404296875,
-0.01221466064453125,
-0.025115966796875,
0.01197052001953125,
-0.04241943359375,
-0.0251312255859375,
0.033966064453125,
-0.03533935546875,
-0.0350341796875,
-0.06048583984375,
-0.0196533203125,
0.05615234375,
-0.0015859603881835938,
-0.02325439453125,
0.00017702579498291016,
-0.003978729248046875,
0.0134124755859375,
-0.0207061767578125,
-0.042694091796875,
0.04541015625,
0.043426513671875,
-0.0421142578125,
-0.0125274658203125,
-0.019317626953125,
-0.01214599609375,
-0.025970458984375,
0.0064544677734375,
-0.006160736083984375,
0.03411865234375,
-0.00963592529296875,
0.030853271484375,
-0.0189361572265625,
-0.010711669921875,
-0.0189056396484375,
0.03070068359375,
-0.005680084228515625,
-0.01922607421875,
0.01433563232421875,
-0.0129852294921875,
-0.0380859375,
-0.023345947265625,
0.0391845703125,
-0.017059326171875,
-0.02740478515625,
-0.0279083251953125,
0.0257110595703125,
0.024566650390625,
-0.006591796875,
-0.042694091796875,
-0.0070953369140625,
-0.0007567405700683594,
0.0321044921875,
0.059173583984375,
-0.0260467529296875,
-0.004665374755859375,
-0.0066070556640625,
0.01206207275390625,
-0.0193634033203125,
-0.0465087890625,
0.004978179931640625,
-0.003688812255859375,
-0.03631591796875,
-0.053253173828125,
0.023284912109375,
0.065185546875,
-0.03680419921875,
0.0006265640258789062,
0.00299835205078125,
0.0214996337890625,
0.038909912109375,
-0.0213470458984375,
0.0020751953125,
-0.038238525390625,
-0.01082611083984375,
-0.058990478515625,
0.03326416015625,
-0.0031223297119140625,
-0.0201873779296875,
-0.007061004638671875,
0.0028667449951171875,
-0.01885986328125,
0.049713134765625,
-0.01739501953125,
0.0161285400390625,
0.01360321044921875,
0.055328369140625,
-0.027740478515625,
0.026611328125,
0.002140045166015625,
0.02789306640625,
0.048187255859375,
0.016754150390625,
-0.014678955078125,
0.036529541015625,
-0.0139007568359375,
-0.047760009765625,
0.061920166015625,
0.014617919921875,
-0.01422119140625,
0.040435791015625,
-0.0247650146484375,
-0.01947021484375,
-0.023956298828125,
0.0176849365234375,
0.01403045654296875,
0.007602691650390625,
-0.0169219970703125,
0.0024700164794921875,
0.0291595458984375,
-0.004291534423828125,
0.004856109619140625,
0.0023593902587890625,
0.056976318359375,
0.01617431640625,
-0.002330780029296875,
0.01483917236328125,
0.0005092620849609375,
0.0106353759765625,
0.0009617805480957031,
0.0130767822265625,
-0.01006317138671875,
-0.07733154296875,
-0.02972412109375,
0.0506591796875,
-0.04632568359375,
-0.0230560302734375,
0.027252197265625,
-0.0100250244140625,
-0.00469207763671875,
-0.04864501953125,
0.00919342041015625,
-0.01032257080078125,
-0.0166015625,
0.045928955078125,
-0.027587890625,
0.0261077880859375,
0.03192138671875,
-0.007411956787109375,
0.0157012939453125,
-0.0031566619873046875,
-0.0196533203125,
0.007659912109375,
-0.0186920166015625,
0.005130767822265625,
-0.00011026859283447266,
-0.04547119140625,
0.01517486572265625,
-0.024749755859375,
0.0098114013671875,
-0.004108428955078125,
0.0302276611328125,
0.04901123046875,
-0.0218353271484375,
-0.0115509033203125,
0.050201416015625,
0.031707763671875,
-0.03497314453125,
0.001232147216796875,
-0.0083465576171875,
-0.01873779296875,
-0.0232086181640625,
-0.0159454345703125,
-0.056640625,
0.0163421630859375,
-0.020721435546875,
-0.040252685546875,
0.08282470703125,
-0.04278564453125,
0.0167388916015625,
0.01171875,
0.049163818359375,
0.0099029541015625,
0.031646728515625,
-0.00360870361328125,
0.03173828125,
-0.05596923828125,
0.033782958984375,
-0.03411865234375,
0.022674560546875,
0.0033721923828125,
0.0014781951904296875,
0.030120849609375,
0.007717132568359375,
-0.027740478515625,
-0.02734375,
0.0226593017578125,
0.040191650390625,
0.0081024169921875,
0.0178680419921875,
-0.013580322265625,
0.0266571044921875,
0.050201416015625,
-0.037841796875,
0.0227813720703125,
0.0092620849609375,
-0.0199737548828125,
0.0254364013671875,
0.01141357421875,
0.0277862548828125,
0.035888671875,
0.0499267578125,
-0.04150390625,
0.0323486328125,
0.06866455078125,
-0.049346923828125,
0.00661468505859375,
0.027984619140625,
0.033905029296875,
-0.057525634765625,
-0.00865936279296875,
-0.0201568603515625,
0.04974365234375,
0.004833221435546875,
0.028717041015625,
0.023956298828125,
0.01026153564453125,
0.043853759765625,
0.004878997802734375,
0.01009368896484375,
0.033111572265625,
-0.008636474609375,
0.014373779296875,
0.0124359130859375,
0.027008056640625,
-0.05438232421875,
-0.067138671875,
0.07354736328125,
0.056732177734375,
-0.00820159912109375,
-0.04852294921875,
0.006816864013671875,
0.0164642333984375,
0.0131988525390625,
0.03570556640625,
0.0283966064453125,
0.00360870361328125,
0.0347900390625,
-0.015960693359375,
-0.0005660057067871094,
0.0263519287109375,
0.018402099609375,
-0.0012674331665039062,
-0.0010271072387695312,
-0.0135650634765625,
0.0094757080078125,
0.016143798828125,
-0.01526641845703125,
0.00799560546875,
-0.006587982177734375,
-0.0160675048828125,
0.020660400390625,
-0.00959014892578125,
0.0158843994140625,
-0.0227813720703125,
0.02471923828125,
-0.0126190185546875,
0.044403076171875,
-0.0408935546875,
-0.031036376953125,
-0.0228729248046875,
0.047393798828125,
0.0158843994140625,
0.005786895751953125,
0.024566650390625,
0.041534423828125,
-0.01055145263671875,
-0.002750396728515625,
0.03509521484375,
-0.020904541015625,
0.01519775390625,
-0.0211029052734375,
0.0072021484375,
0.00807952880859375,
-0.016021728515625,
0.004261016845703125,
0.006290435791015625,
0.0283050537109375,
-0.034576416015625,
0.0135955810546875,
-0.0162811279296875,
-0.033477783203125,
0.0128173828125,
-0.004535675048828125,
0.0293426513671875,
-0.0034885406494140625,
-0.08892822265625,
-0.00580596923828125,
-0.038818359375,
-0.080810546875,
0.05230712890625,
0.0465087890625,
-0.0357666015625,
0.01387786865234375,
-0.040435791015625,
-0.01369476318359375,
0.012481689453125,
-0.03399658203125,
0.0003619194030761719,
-0.0027904510498046875,
-0.00691986083984375,
-0.01294708251953125,
-0.00688934326171875,
0.0181732177734375,
-0.001262664794921875,
0.0015592575073242188,
-0.00614166259765625,
0.06634521484375,
-0.01180267333984375,
0.0167083740234375,
0.0273284912109375,
-0.0295257568359375,
0.041656494140625,
0.0250396728515625,
0.0419921875,
0.0020351409912109375,
-0.0159454345703125,
-0.03759765625,
-0.0229644775390625,
-0.03173828125,
0.034942626953125,
-0.049163818359375,
-0.0162811279296875,
-0.0194091796875,
0.0254364013671875,
-0.008087158203125,
0.029754638671875,
-0.0290985107421875,
-0.007671356201171875,
-0.044525146484375,
-0.05670166015625,
0.0277557373046875,
-0.0116119384765625,
0.0306549072265625,
0.030975341796875,
0.054962158203125,
0.0175933837890625,
0.03173828125,
-0.01166534423828125,
0.08660888671875,
0.055389404296875,
-0.03765869140625,
-0.0140380859375,
-0.0305328369140625,
-0.01422882080078125,
-0.0498046875,
0.0216217041015625,
-0.0213165283203125,
-0.0119781494140625,
-0.04962158203125,
-0.0277099609375,
0.012786865234375,
0.0065460205078125,
-0.0221405029296875,
0.00482177734375,
0.01284027099609375,
-0.026702880859375,
-0.0139617919921875,
0.0377197265625,
0.005939483642578125,
0.004550933837890625,
-0.0277862548828125,
-0.0163116455078125,
0.01117706298828125,
-0.0411376953125,
-0.0038967132568359375,
-0.020477294921875,
0.0389404296875,
0.05340576171875,
-0.08807373046875,
0.07037353515625,
-0.000018417835235595703,
-0.0276947021484375,
0.032989501953125,
-0.057891845703125,
-0.01328277587890625,
0.015838623046875,
-0.00739288330078125,
-0.0682373046875,
-0.05633544921875,
0.0240325927734375,
-0.06231689453125,
-0.01155853271484375,
0.02423095703125,
-0.000054836273193359375,
-0.021270751953125,
-0.041412353515625,
-0.031890869140625,
0.0262603759765625,
-0.058746337890625,
-0.0082550048828125,
-0.01137542724609375,
0.020843505859375,
-0.02825927734375,
-0.033538818359375,
0.0267486572265625,
-0.03057861328125,
-0.028350830078125,
-0.0538330078125,
0.007030487060546875,
0.002017974853515625,
-0.0377197265625,
-0.07476806640625,
0.0281982421875,
-0.0298614501953125,
-0.0212860107421875,
-0.07012939453125,
0.042938232421875,
0.0010194778442382812,
0.037872314453125,
-0.006565093994140625,
-0.02227783203125,
-0.023284912109375,
0.01861572265625,
0.018463134765625,
-0.0384521484375,
0.06219482421875,
-0.022735595703125,
-0.0238494873046875,
0.0206146240234375,
0.0313720703125,
0.01406097412109375,
0.0011959075927734375,
0.004840850830078125,
0.055206298828125,
0.0589599609375,
-0.0020732879638671875,
0.053558349609375,
0.007770538330078125,
-0.07537841796875,
-0.0230560302734375,
0.0276641845703125,
-0.0311279296875,
-0.0006237030029296875,
0.06842041015625,
0.062103271484375,
0.03399658203125,
-0.039520263671875,
0.021026611328125,
-0.0287933349609375,
0.00583648681640625,
-0.019805908203125,
0.006504058837890625,
-0.0374755859375,
-0.01012420654296875,
0.0022563934326171875,
-0.01947021484375,
0.0130767822265625,
-0.007167816162109375,
-0.0245361328125,
-0.010406494140625,
0.01102447509765625,
0.0189208984375,
-0.0576171875,
0.003185272216796875,
-0.0134124755859375,
-0.0006732940673828125,
-0.0120849609375,
-0.00016570091247558594,
-0.0035037994384765625,
-0.023712158203125,
0.0408935546875,
-0.0008869171142578125,
0.0526123046875,
-0.019622802734375,
0.005939483642578125,
0.0218048095703125,
-0.0254364013671875,
-0.0124969482421875,
0.0296478271484375,
-0.00042510032653808594,
0.0135040283203125,
0.00673675537109375,
0.00775146484375,
-0.00670623779296875,
-0.0007238388061523438,
-0.021087646484375,
0.032958984375,
-0.04730224609375,
0.0540771484375,
-0.00047516822814941406,
-0.0187225341796875,
-0.008392333984375,
0.0188140869140625,
0.06939697265625,
-0.032379150390625,
0.0127105712890625,
0.02032470703125,
-0.01346588134765625,
0.0198516845703125,
-0.0199737548828125,
-0.05035400390625,
-0.0203094482421875,
-0.0161590576171875
]
|
332211de013923666ea2ff37e8a37bd7d4d8963f | Wordpress Stackexchange
Q: Select menu should display categories and the item's depth I have a select menu of a custom post type in the header.php:
<?php
$selectloop = new WP_Query( array( 'post_type' => 'products', 'posts_per_page' => -1 ) );
echo '<form><select onchange="if (this.value) window.location.href=this.value">';
while ( $selectloop->have_posts() ) : $selectloop->the_post(); ?>
<option value="<?php the_permalink(); ?>" > <?php echo the_title(); ?></option> <?php
endwhile;
echo '</select></form>';
wp_reset_query();
}
?>
It works fine, but since there are several categories with 3 or 4 levels, I'd like to visualize this by indent (or a minus or whatever).
For this to work I would also need the categories to show in the menu.
I looked into some code to find the item's depth to start with but I can't even get the ID of the current item in the loop :(
I'm aware I could use a nav walker for this task but I don't think it's necessary. Also, like this I'll never have to touch the code again since it auto-updates if new items get added.
I'll also gladly use any advise on how to improve the code :)
| Q: Select menu should display categories and the item's depth I have a select menu of a custom post type in the header.php:
<?php
$selectloop = new WP_Query( array( 'post_type' => 'products', 'posts_per_page' => -1 ) );
echo '<form><select onchange="if (this.value) window.location.href=this.value">';
while ( $selectloop->have_posts() ) : $selectloop->the_post(); ?>
<option value="<?php the_permalink(); ?>" > <?php echo the_title(); ?></option> <?php
endwhile;
echo '</select></form>';
wp_reset_query();
}
?>
It works fine, but since there are several categories with 3 or 4 levels, I'd like to visualize this by indent (or a minus or whatever).
For this to work I would also need the categories to show in the menu.
I looked into some code to find the item's depth to start with but I can't even get the ID of the current item in the loop :(
I'm aware I could use a nav walker for this task but I don't think it's necessary. Also, like this I'll never have to touch the code again since it auto-updates if new items get added.
I'll also gladly use any advise on how to improve the code :)
| wordpress | {
"language": "en",
"length": 183,
"provenance": "stackexchange_00019.jsonl.gz:465369",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226304"
} | [
0.04339599609375,
0.006366729736328125,
0.01055908203125,
0.010528564453125,
0.03204345703125,
-0.03515625,
0.07147216796875,
-0.040802001953125,
0.0489501953125,
0.00046133995056152344,
-0.037750244140625,
-0.027069091796875,
-0.04876708984375,
-0.028961181640625,
-0.052276611328125,
-0.0472412109375,
0.051116943359375,
-0.020721435546875,
0.042633056640625,
0.01025390625,
0.0017671585083007812,
0.04766845703125,
0.021240234375,
0.06585693359375,
0.0372314453125,
-0.022674560546875,
0.023193359375,
-0.0487060546875,
0.016571044921875,
-0.0239105224609375,
0.01059722900390625,
0.0028171539306640625,
-0.01248931884765625,
-0.0228271484375,
0.10498046875,
0.06683349609375,
0.031646728515625,
-0.0031185150146484375,
0.057373046875,
0.0162200927734375,
0.01953125,
-0.004360198974609375,
0.00658416748046875,
-0.01441192626953125,
-0.0104827880859375,
-0.017242431640625,
-0.004192352294921875,
-0.03546142578125,
-0.01105499267578125,
-0.021636962890625,
0.03924560546875,
0.04241943359375,
0.060791015625,
-0.01078033447265625,
-0.00452423095703125,
0.0247802734375,
0.00193023681640625,
-0.0084991455078125,
0.04876708984375,
0.0146636962890625,
-0.037689208984375,
-0.0257568359375,
0.0171051025390625,
-0.038177490234375,
-0.0025634765625,
-0.008575439453125,
0.005779266357421875,
0.0435791015625,
-0.053131103515625,
-0.037933349609375,
0.025726318359375,
-0.0158233642578125,
0.00007587671279907227,
-0.006855010986328125,
-0.026092529296875,
-0.036529541015625,
0.0007948875427246094,
-0.045318603515625,
0.0084381103515625,
0.018280029296875,
-0.033203125,
0.031646728515625,
-0.03167724609375,
-0.0147552490234375,
-0.0174102783203125,
-0.01313018798828125,
-0.032196044921875,
0.0011739730834960938,
-0.038116455078125,
-0.02386474609375,
-0.024658203125,
0.0155181884765625,
-0.0338134765625,
-0.0220947265625,
-0.024261474609375,
-0.01200103759765625,
0.0007472038269042969,
0.024810791015625,
-0.00980377197265625,
0.047271728515625,
-0.02984619140625,
-0.0311279296875,
0.063720703125,
-0.043304443359375,
0.0299072265625,
0.0204925537109375,
-0.0129852294921875,
-0.031341552734375,
0.0653076171875,
0.0173492431640625,
0.00646209716796875,
0.08221435546875,
-0.0217742919921875,
-0.0139312744140625,
-0.00965118408203125,
0.00011116266250610352,
-0.04449462890625,
0.01268768310546875,
-0.0001875162124633789,
-0.0099029541015625,
-0.006450653076171875,
0.02459716796875,
-0.0029754638671875,
-0.006061553955078125,
-0.012237548828125,
-0.00655364990234375,
0.0184478759765625,
-0.04132080078125,
0.008270263671875,
-0.007595062255859375,
-0.0295562744140625,
0.0152740478515625,
0.06982421875,
0.02069091796875,
0.01123046875,
-0.0005841255187988281,
-0.018951416015625,
-0.0273590087890625,
0.0173187255859375,
-0.004039764404296875,
0.02435302734375,
-0.0261993408203125,
0.032073974609375,
0.030792236328125,
0.0024623870849609375,
0.0098114013671875,
0.021820068359375,
0.01210784912109375,
-0.00238800048828125,
-0.04193115234375,
0.0129852294921875,
-0.0281524658203125,
0.047760009765625,
-0.0153961181640625,
-0.0266571044921875,
-0.004627227783203125,
0.015625,
-0.0232086181640625,
-0.049560546875,
-0.04541015625,
-0.0166778564453125,
-0.004077911376953125,
0.039703369140625,
-0.08538818359375,
-0.07666015625,
0.0023860931396484375,
-0.0718994140625,
-0.01177215576171875,
0.03045654296875,
-0.0022411346435546875,
0.01476287841796875,
-0.00658416748046875,
0.04010009765625,
0.0195465087890625,
0.00022590160369873047,
0.031494140625,
0.00876617431640625,
0.00891876220703125,
0.0110626220703125,
-0.0022640228271484375,
-0.035614013671875,
-0.0513916015625,
0.0227203369140625,
-0.0219879150390625,
-0.0426025390625,
0.0689697265625,
0.009796142578125,
0.0709228515625,
-0.0254058837890625,
0.00975799560546875,
0.01837158203125,
0.0355224609375,
-0.04351806640625,
0.0159759521484375,
-0.03692626953125,
-0.019012451171875,
0.01153564453125,
0.019989013671875,
-0.025054931640625,
0.00034546852111816406,
-0.017059326171875,
0.01088714599609375,
-0.019073486328125,
0.0150299072265625,
-0.0239410400390625,
-0.012542724609375,
0.00757598876953125,
0.0254058837890625,
0.0186767578125,
0.00891876220703125,
0.01371002197265625,
0.023529052734375,
-0.018798828125,
-0.051483154296875,
-0.042083740234375,
0.04229736328125,
0.01080322265625,
-0.0031414031982421875,
-0.0157928466796875,
-0.0191802978515625,
-0.003971099853515625,
-0.017913818359375,
-0.0048370361328125,
0.07098388671875,
0.046295166015625,
-0.0178070068359375,
0.00569915771484375,
-0.0196380615234375,
0.053070068359375,
0.013397216796875,
-0.02197265625,
-0.0012617111206054688,
0.0231170654296875,
0.023040771484375,
-0.049957275390625,
-0.033050537109375,
-0.020843505859375,
-0.05230712890625,
0.018951416015625,
0.060699462890625,
0.0247650146484375,
0.06256103515625,
0.0008649826049804688,
0.00966644287109375,
0.05926513671875,
-0.053466796875,
0.0033512115478515625,
-0.00494384765625,
-0.031219482421875,
-0.002735137939453125,
0.04339599609375,
0.01001739501953125,
0.0176239013671875,
0.0191650390625,
0.0236358642578125,
0.017242431640625,
-0.01389312744140625,
0.0133209228515625,
0.0123748779296875,
-0.020233154296875,
-0.01531219482421875,
-0.0307769775390625,
0.0031490325927734375,
-0.020721435546875,
0.04754638671875,
-0.0114593505859375,
0.041778564453125,
0.026580810546875,
-0.00502777099609375,
-0.02886962890625,
0.0010957717895507812,
0.014434814453125,
-0.0162506103515625,
-0.00982666015625,
-0.0198974609375,
-0.028106689453125,
-0.031890869140625,
0.035858154296875,
-0.031524658203125,
-0.020477294921875,
-0.01146697998046875,
0.07086181640625,
-0.0188446044921875,
-0.0171051025390625,
-0.036102294921875,
-0.0672607421875,
-0.023651123046875,
0.006633758544921875,
0.022216796875,
0.03271484375,
0.061065673828125,
-0.0042266845703125,
-0.027923583984375,
0.046478271484375,
-0.04681396484375,
-0.01233673095703125,
0.06280517578125,
-0.00872039794921875,
0.0169525146484375,
0.00014019012451171875,
0.060394287109375,
0.05780029296875,
-0.0095672607421875,
0.02435302734375,
-0.0022525787353515625,
-0.00249481201171875,
-0.007843017578125,
0.0157623291015625,
-0.01505279541015625,
-0.030975341796875,
-0.001689910888671875,
0.023712158203125,
0.030792236328125,
0.01255035400390625,
0.044219970703125,
-0.0189361572265625,
0.0107421875,
0.0309906005859375,
-0.050323486328125,
-0.050567626953125,
0.0426025390625,
-0.076416015625,
0.0186004638671875,
-0.00591278076171875,
-0.038909912109375,
-0.04669189453125,
0.032318115234375,
0.00618743896484375,
-0.01117706298828125,
-0.02813720703125,
-0.0716552734375,
-0.07867431640625,
-0.06341552734375,
-0.020843505859375,
-0.0035858154296875,
0.01399993896484375,
0.0103912353515625,
0.06561279296875,
-0.0031948089599609375,
-0.08685302734375,
-0.0177001953125,
-0.0036182403564453125,
-0.0267791748046875,
0.0216064453125,
0.00449371337890625,
-0.025482177734375,
0.030181884765625,
0.0059967041015625,
-0.0287322998046875,
0.0022125244140625,
0.01439666748046875,
-0.0282135009765625,
-0.00595855712890625,
0.023040771484375,
0.0309600830078125,
-0.00237274169921875,
0.0018224716186523438,
0.072509765625,
0.051116943359375,
0.0039043426513671875,
-0.04315185546875,
-0.006839752197265625,
-0.042724609375,
-0.013641357421875,
0.032623291015625,
-0.01078033447265625,
-0.0382080078125,
0.01430511474609375,
-0.003757476806640625,
0.019927978515625,
0.007289886474609375,
-0.0147247314453125,
0.0297393798828125,
-0.007686614990234375,
-0.027679443359375,
-0.016021728515625,
0.02459716796875,
-0.036346435546875,
0.0298614501953125,
-0.002696990966796875,
-0.005645751953125,
0.0202484130859375,
-0.022430419921875,
0.02154541015625,
-0.07659912109375,
0.0302581787109375,
-0.02532958984375,
-0.037506103515625,
0.0008678436279296875,
-0.016693115234375,
0.034881591796875,
0.075927734375,
-0.0285797119140625,
-0.0136566162109375,
-0.00666046142578125,
0.003757476806640625,
-0.0041046142578125,
-0.012359619140625,
-0.042816162109375,
-0.0157928466796875,
-0.08929443359375,
-0.012451171875,
0.0004405975341796875,
-0.04266357421875,
-0.01403045654296875,
0.0391845703125,
-0.0682373046875,
-0.024627685546875,
0.0222625732421875,
-0.031768798828125,
-0.0020542144775390625,
-0.01085662841796875,
-0.032623291015625,
-0.0230255126953125,
-0.0056304931640625,
-0.031524658203125,
-0.05279541015625,
-0.03497314453125,
0.046051025390625,
0.0377197265625,
-0.017822265625,
-0.0004100799560546875,
-0.01263427734375,
0.06524658203125,
0.010986328125,
0.0322265625,
0.00609588623046875,
0.026092529296875,
-0.0261383056640625,
-0.04315185546875,
0.0106658935546875,
-0.052215576171875,
-0.0341796875,
-0.0430908203125,
-0.0003256797790527344,
0.006855010986328125,
-0.03155517578125,
-0.00315093994140625,
-0.054473876953125,
0.005702972412109375,
-0.092529296875,
-0.0243377685546875,
-0.01000213623046875,
-0.021087646484375,
-0.025787353515625,
0.0018491744995117188,
-0.0035266876220703125,
-0.07269287109375,
0.0198211669921875,
-0.01322174072265625,
-0.0097503662109375,
0.006458282470703125,
0.0268402099609375,
0.0033321380615234375,
-0.018096923828125,
-0.0228118896484375,
-0.01432037353515625,
0.02130126953125,
-0.038421630859375,
0.046722412109375,
0.00820159912109375,
-0.0094451904296875,
0.05255126953125,
-0.0182647705078125,
0.04693603515625,
-0.04034423828125,
0.021026611328125,
-0.004718780517578125,
0.00508880615234375,
0.0236358642578125,
0.015045166015625,
0.0027713775634765625,
0.0239715576171875,
-0.0266265869140625,
-0.007312774658203125,
-0.031768798828125,
0.03472900390625,
0.002101898193359375,
0.0181732177734375,
-0.0268402099609375,
-0.0018310546875,
0.009521484375,
-0.01207733154296875,
0.051788330078125,
0.0274505615234375,
0.0023326873779296875,
0.0120391845703125,
0.0200347900390625,
0.0312347412109375,
0.001636505126953125,
0.010650634765625,
-0.0115814208984375,
0.058624267578125,
-0.01776123046875,
0.024169921875,
0.0042572021484375,
-0.012786865234375,
0.0504150390625,
0.00724029541015625,
-0.021636962890625,
-0.0164031982421875,
0.0021686553955078125,
0.014984130859375,
0.001308441162109375,
-0.001781463623046875,
0.02801513671875,
0.0018625259399414062,
0.0153350830078125,
0.01343536376953125,
-0.016754150390625,
-0.0199737548828125,
-0.0199432373046875,
0.024688720703125,
0.00131988525390625,
-0.004291534423828125,
-0.019775390625,
0.052947998046875,
0.0182647705078125,
0.030517578125,
-0.0191802978515625,
-0.0075225830078125,
0.0178070068359375,
-0.0028743743896484375,
0.0303192138671875,
-0.008636474609375,
0.01018524169921875,
-0.0379638671875,
0.0548095703125,
-0.03814697265625,
-0.041656494140625,
0.00823211669921875,
0.042083740234375,
-0.02215576171875,
0.01029205322265625,
0.011505126953125,
0.007160186767578125,
-0.01369476318359375,
0.052886962890625,
-0.0041351318359375,
-0.05560302734375,
-0.0196380615234375,
0.02484130859375,
0.028076171875,
-0.04730224609375,
-0.01097869873046875,
0.0125732421875,
-0.004848480224609375,
0.007175445556640625,
-0.01071929931640625,
-0.03472900390625,
0.020843505859375,
0.0261688232421875,
-0.0556640625,
-0.0230560302734375,
0.016143798828125,
-0.059051513671875,
-0.01070404052734375,
-0.0024852752685546875,
-0.0249176025390625,
0.0125732421875,
-0.027923583984375,
0.0687255859375,
-0.0033359527587890625,
-0.03973388671875,
0.009124755859375,
0.0185546875,
0.00421142578125,
0.00814056396484375,
-0.0382080078125,
0.02264404296875,
-0.038665771484375,
-0.00959014892578125,
0.029296875,
-0.003662109375,
-0.02313232421875,
-0.03802490234375,
-0.0003447532653808594,
0.0018968582153320312,
0.019439697265625,
0.027862548828125,
-0.035491943359375,
0.0030307769775390625,
0.004436492919921875,
-0.0170440673828125,
-0.0293426513671875,
0.029571533203125,
0.03228759765625,
0.003955841064453125,
0.013092041015625,
-0.00383758544921875,
-0.0128326416015625,
0.0026187896728515625,
0.010009765625,
-0.0528564453125,
-0.024993896484375,
-0.01690673828125,
-0.0433349609375,
0.03033447265625,
0.0679931640625,
-0.00487518310546875,
0.03997802734375,
-0.0222015380859375,
0.00860595703125,
-0.007427215576171875,
-0.03857421875,
-0.054290771484375,
-0.035369873046875,
0.07342529296875,
-0.0081634521484375,
0.025299072265625,
-0.0101776123046875,
-0.0152435302734375,
-0.0004410743713378906,
-0.00643157958984375,
0.0030345916748046875,
0.0280914306640625,
-0.051177978515625,
0.01100921630859375,
0.0654296875,
0.0117645263671875,
0.03363037109375,
0.0156707763671875,
0.0016889572143554688,
0.014801025390625,
-0.002201080322265625,
0.003650665283203125,
-0.004932403564453125,
0.0528564453125,
0.0033893585205078125,
0.0028705596923828125,
0.045501708984375,
-0.02392578125,
-0.01450347900390625,
0.001697540283203125,
0.0509033203125,
0.00013327598571777344,
0.0001634359359741211,
0.0130767822265625,
-0.03656005859375,
-0.01299285888671875,
-0.0138092041015625,
0.0218353271484375,
0.01332855224609375,
-0.0278167724609375,
0.01153564453125,
-0.0487060546875,
-0.03338623046875,
-0.004703521728515625,
-0.007236480712890625,
-0.003948211669921875,
0.032989501953125,
0.015899658203125,
-0.05029296875,
-0.004955291748046875,
0.021240234375,
-0.0044403076171875,
-0.0300445556640625,
-0.0151519775390625,
-0.00284576416015625,
-0.0193634033203125,
-0.05535888671875,
0.035247802734375,
-0.01302337646484375,
0.013275146484375,
0.04095458984375,
-0.037933349609375,
0.0107574462890625,
0.05224609375,
-0.03729248046875,
0.044158935546875,
0.0193634033203125,
-0.0301361083984375,
0.03326416015625,
0.00022780895233154297,
0.0035228729248046875,
-0.003871917724609375,
-0.0504150390625,
-0.00750732421875,
-0.0330810546875,
0.0279998779296875,
-0.0088653564453125,
-0.01422882080078125,
0.06658935546875,
-0.01052093505859375,
-0.036529541015625,
0.019805908203125,
-0.02203369140625,
-0.00433349609375,
-0.0018472671508789062,
0.0352783203125,
-0.01436614990234375,
-0.0009698867797851562,
-0.004947662353515625,
-0.002712249755859375,
-0.001007080078125,
-0.0288543701171875,
-0.042327880859375,
0.044891357421875,
-0.025238037109375,
-0.0081787109375,
0.0071868896484375,
0.0267486572265625,
-0.011016845703125,
0.01318359375,
-0.037353515625,
0.0693359375,
0.024932861328125,
0.044708251953125,
-0.07879638671875,
-0.03753662109375,
0.01540374755859375,
0.06732177734375,
-0.0156707763671875,
-0.0111083984375,
0.0068206787109375,
0.0233612060546875,
0.046173095703125,
0.060699462890625,
0.03228759765625,
-0.021759033203125,
0.0022449493408203125,
0.04962158203125,
0.05615234375,
-0.0260162353515625,
0.03631591796875,
-0.004302978515625,
-0.025665283203125,
0.0306396484375,
0.0211334228515625,
0.04376220703125,
-0.020660400390625,
-0.004100799560546875,
-0.00939178466796875,
-0.0214691162109375,
0.0078277587890625,
0.0003705024719238281,
-0.006137847900390625,
0.048248291015625,
0.0345458984375,
-0.05902099609375,
0.0015916824340820312,
-0.052520751953125,
0.044921875,
-0.016815185546875,
0.004474639892578125,
0.045562744140625,
0.0251922607421875,
0.061004638671875,
-0.034423828125,
-0.00959014892578125,
-0.0135650634765625,
-0.00429534912109375,
0.0386962890625,
0.04095458984375,
0.0284576416015625,
-0.006580352783203125,
0.0178680419921875,
0.063720703125,
0.062255859375,
-0.041961669921875,
-0.052398681640625,
0.0021114349365234375,
0.02008056640625,
0.018829345703125,
0.0232391357421875,
0.07421875,
0.0333251953125,
0.057098388671875,
-0.0728759765625,
-0.031829833984375,
0.0174560546875,
0.0017633438110351562,
-0.005298614501953125,
-0.01239776611328125,
0.02001953125,
-0.0249481201171875,
-0.00885009765625,
-0.0086822509765625,
0.0183563232421875,
0.044830322265625,
-0.00013494491577148438,
0.0518798828125,
-0.029388427734375,
-0.021209716796875,
-0.0221405029296875,
0.05029296875,
0.01166534423828125,
0.0068817138671875,
-0.0025196075439453125,
-0.02313232421875,
-0.00002396106719970703,
0.00989532470703125,
0.01751708984375,
0.04205322265625,
0.05926513671875,
0.0186920166015625,
-0.01422119140625,
0.001361846923828125,
0.049560546875,
-0.031402587890625,
-0.032745361328125,
-0.0292816162109375,
0.03973388671875,
0.076171875,
0.043609619140625,
0.006988525390625,
0.0293731689453125,
0.059661865234375,
-0.021087646484375,
0.0352783203125,
-0.00847625732421875,
-0.006683349609375,
0.0008077621459960938,
-0.0007658004760742188,
0.03936767578125,
0.0166015625,
-0.059539794921875,
-0.033599853515625,
-0.0012645721435546875,
-0.0178375244140625,
0.048248291015625,
0.043212890625,
0.00873565673828125,
-0.00891876220703125,
0.00617218017578125,
-0.0248565673828125,
-0.0007371902465820312,
0.00386810302734375,
0.01213836669921875,
-0.0069427490234375,
0.0011425018310546875,
-0.0126800537109375,
-0.0401611328125,
-0.02716064453125,
0.0032501220703125,
0.004367828369140625,
0.02703857421875,
-0.0115509033203125,
0.038360595703125,
0.027099609375,
-0.022796630859375,
0.0222930908203125,
-0.03704833984375,
-0.046051025390625,
0.09259033203125,
-0.0177459716796875,
-0.01099395751953125,
-0.01273345947265625,
-0.0015659332275390625,
0.00473785400390625,
0.046051025390625,
-0.06439208984375,
-0.00897979736328125,
0.01506805419921875,
0.007049560546875,
-0.0494384765625,
0.00860595703125,
-0.0267333984375,
-0.002597808837890625,
-0.033050537109375,
-0.052276611328125,
0.054473876953125,
0.012542724609375,
0.01262664794921875,
0.01448822021484375,
-0.01235198974609375,
0.010833740234375,
0.01390838623046875,
0.005474090576171875,
0.0057830810546875,
0.03948974609375,
-0.028656005859375,
0.056915283203125,
0.042083740234375,
-0.02203369140625,
0.033721923828125,
0.035186767578125,
-0.049346923828125,
0.03814697265625,
0.010498046875,
0.043060302734375,
0.038726806640625,
0.058502197265625,
-0.0161285400390625,
0.00586700439453125,
0.029388427734375,
0.0024089813232421875,
-0.00203704833984375,
-0.00801849365234375,
-0.036102294921875,
-0.046142578125,
0.0224761962890625,
0.0032062530517578125,
-0.005405426025390625,
-0.040496826171875,
-0.032470703125,
-0.0216217041015625,
0.048004150390625,
0.0216522216796875,
-0.062103271484375,
0.0298004150390625,
-0.00762176513671875,
0.03656005859375,
-0.0241851806640625,
-0.0027217864990234375,
0.0108184814453125,
0.0296630859375,
-0.053192138671875,
0.029998779296875,
-0.0308990478515625,
-0.03515625,
-0.0181732177734375,
0.00142669677734375,
0.0018634796142578125,
-0.022674560546875,
-0.0287933349609375,
0.0023632049560546875,
0.0247344970703125,
0.0229339599609375,
0.0743408203125,
-0.0107421875,
0.00638580322265625,
0.018524169921875,
-0.044464111328125,
-0.0169219970703125,
0.0306549072265625,
-0.01412200927734375,
-0.035858154296875,
-0.0090179443359375,
0.0164031982421875,
0.0225830078125,
-0.03155517578125,
-0.08135986328125,
0.0258941650390625,
-0.0162353515625,
-0.0277862548828125,
0.004283905029296875,
-0.016326904296875,
-0.033172607421875,
0.10760498046875,
0.04046630859375,
-0.0452880859375,
-0.01306915283203125,
-0.0012798309326171875,
0.017242431640625,
0.035919189453125,
0.038055419921875,
0.03338623046875,
-0.045013427734375,
0.004619598388671875,
-0.0169677734375,
0.0160369873046875,
0.022857666015625,
-0.00228118896484375,
0.0203704833984375,
0.0389404296875,
-0.0396728515625,
-0.0242919921875,
-0.041015625,
0.00522613525390625,
0.01483154296875,
-0.01226043701171875,
-0.0787353515625,
-0.050018310546875,
0.05621337890625,
0.020599365234375,
0.0279998779296875,
0.0172882080078125,
-0.0085601806640625,
-0.032623291015625,
-0.02166748046875,
-0.0182342529296875,
0.007709503173828125,
-0.043304443359375,
0.01073455810546875,
-0.002719879150390625,
-0.0096435546875,
0.005947113037109375,
0.0021953582763671875,
-0.021728515625,
-0.01154327392578125,
-0.003116607666015625,
-0.0208892822265625,
-0.0261688232421875,
-0.01242828369140625,
0.01082611083984375,
-0.026153564453125,
-0.04986572265625,
0.00669097900390625,
0.0028629302978515625,
-0.03521728515625,
0.019134521484375,
-0.0297088623046875,
0.0279083251953125,
-0.016754150390625,
-0.00136566162109375,
0.00237274169921875,
0.05755615234375,
-0.01397705078125,
0.0192413330078125,
-0.043365478515625,
-0.0027923583984375,
0.0122833251953125,
-0.020843505859375,
-0.003936767578125,
0.0277099609375,
0.046356201171875,
0.0380859375,
0.0089263916015625,
0.048004150390625,
-0.0004131793975830078,
0.05035400390625,
0.01389312744140625,
-0.032806396484375,
0.04034423828125,
-0.048187255859375,
-0.0118560791015625,
-0.0330810546875,
-0.0413818359375,
-0.06103515625,
0.02020263671875,
0.07763671875,
-0.032928466796875,
0.03900146484375
]
|
9d666a91eedbe1ec280442f9a8958ac14b7d1cac | Wordpress Stackexchange
Q: Remove inline linking tool I'm not a big fan of the inline linking tool published with WP 4.5. Is there a way to disable it?
A: So, I may or may not go to hell for this, but I made a quickfix plugin that bypasses the inline part and just opens the link editor.
You can find it here.
I didn't spend much time testing it, if you find problems make issues in github and I will see if I can fix it.
The way it works is that I removed wplink as a plugin from tinyMCE, then added wplinkc, which I made by copying wplink and removing most of the code.
Edit: I was made aware of this other solution later today, and it looks a bit cleaner and definitely looks less hacky than mine.
https://github.com/2ndkauboy/restore-full-link-dialog
I havent tried it though.
Edit #2: An actual proper plugin exists now, found here, that gets the job done.
| Q: Remove inline linking tool I'm not a big fan of the inline linking tool published with WP 4.5. Is there a way to disable it?
A: So, I may or may not go to hell for this, but I made a quickfix plugin that bypasses the inline part and just opens the link editor.
You can find it here.
I didn't spend much time testing it, if you find problems make issues in github and I will see if I can fix it.
The way it works is that I removed wplink as a plugin from tinyMCE, then added wplinkc, which I made by copying wplink and removing most of the code.
Edit: I was made aware of this other solution later today, and it looks a bit cleaner and definitely looks less hacky than mine.
https://github.com/2ndkauboy/restore-full-link-dialog
I havent tried it though.
Edit #2: An actual proper plugin exists now, found here, that gets the job done.
A: This might help you in disabling this shortcuts. Try adding this on your functions.php file.
function disable_mce_wptextpattern( $opt ) {
if ( isset( $opt['plugins'] ) && $opt['plugins'] ) {
$opt['plugins'] = explode( ',', $opt['plugins'] );
$opt['plugins'] = array_diff( $opt['plugins'] , array( 'wptextpattern' ) );
$opt['plugins'] = implode( ',', $opt['plugins'] );
}
return $opt;
}
add_filter( 'tiny_mce_before_init', 'disable_mce_wptextpattern' );
Let me know if that help.
| wordpress | {
"language": "en",
"length": 223,
"provenance": "stackexchange_00019.jsonl.gz:465413",
"question_score": "16",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226485"
} | [
0.0161895751953125,
-0.0031909942626953125,
-0.026397705078125,
-0.01268768310546875,
0.026885986328125,
-0.040679931640625,
0.056732177734375,
0.00847625732421875,
0.0023326873779296875,
0.0167999267578125,
0.0322265625,
-0.04559326171875,
-0.030364990234375,
-0.03741455078125,
-0.0175323486328125,
-0.039337158203125,
0.0171966552734375,
0.0182647705078125,
0.034393310546875,
-0.01065826416015625,
0.0092620849609375,
-0.00943756103515625,
0.004638671875,
0.00968170166015625,
-0.00347900390625,
0.025726318359375,
0.06060791015625,
-0.02197265625,
-0.01309967041015625,
-0.0312347412109375,
0.008941650390625,
-0.0025424957275390625,
0.0223846435546875,
0.0482177734375,
-0.0770263671875,
-0.022216796875,
-0.0350341796875,
0.051422119140625,
0.00035572052001953125,
-0.01502227783203125,
-0.004119873046875,
-0.0014743804931640625,
-0.0814208984375,
0.0068206787109375,
-0.068603515625,
-0.033233642578125,
0.0229644775390625,
-0.0036525726318359375,
0.01049041748046875,
0.02392578125,
0.0163421630859375,
0.0207366943359375,
0.0276336669921875,
-0.01690673828125,
-0.01016998291015625,
-0.0023784637451171875,
-0.0232086181640625,
0.007808685302734375,
-0.0079803466796875,
0.055419921875,
0.0323486328125,
0.0228424072265625,
-0.02294921875,
-0.0272064208984375,
-0.0023670196533203125,
-0.0025768280029296875,
-0.03192138671875,
0.0199432373046875,
0.00537872314453125,
0.0184783935546875,
-0.01149749755859375,
-0.0131072998046875,
0.0004124641418457031,
-0.0158843994140625,
0.011688232421875,
0.01210784912109375,
-0.0106048583984375,
-0.00926971435546875,
0.032684326171875,
0.01412200927734375,
0.0037670135498046875,
0.01023101806640625,
-0.079833984375,
0.01285552978515625,
0.00250244140625,
0.0280914306640625,
-0.007843017578125,
-0.0224151611328125,
-0.017120361328125,
-0.015228271484375,
-0.0121612548828125,
-0.050567626953125,
0.0258331298828125,
0.0253753662109375,
-0.0292816162109375,
-0.010345458984375,
0.0333251953125,
0.00003170967102050781,
0.00537872314453125,
-0.0130462646484375,
0.01251983642578125,
-0.04998779296875,
-0.0002505779266357422,
-0.00620269775390625,
-0.00835418701171875,
-0.002170562744140625,
0.0214691162109375,
-0.01068115234375,
0.0166168212890625,
0.0159912109375,
-0.00885772705078125,
0.0176544189453125,
0.01378631591796875,
-0.0092926025390625,
0.0120086669921875,
-0.00569915771484375,
-0.028533935546875,
0.05889892578125,
-0.0032176971435546875,
0.061309814453125,
-0.00672149658203125,
0.004123687744140625,
-0.0227203369140625,
-0.0175018310546875,
0.00580596923828125,
-0.019927978515625,
0.005207061767578125,
0.002208709716796875,
0.00623321533203125,
-0.005138397216796875,
-0.028717041015625,
0.004322052001953125,
0.048309326171875,
0.05328369140625,
0.026824951171875,
-0.017852783203125,
0.00974273681640625,
0.0310821533203125,
0.033782958984375,
0.01088714599609375,
-0.01065826416015625,
-0.056671142578125,
-0.0007114410400390625,
0.022613525390625,
0.03021240234375,
0.0109710693359375,
0.0284881591796875,
0.0221099853515625,
0.02374267578125,
-0.0232391357421875,
0.003406524658203125,
-0.0106048583984375,
0.0455322265625,
0.009124755859375,
-0.022735595703125,
-0.06085205078125,
0.04541015625,
-0.054718017578125,
0.004520416259765625,
-0.07354736328125,
-0.007503509521484375,
0.018707275390625,
0.046722412109375,
-0.02838134765625,
-0.01007843017578125,
-0.055419921875,
-0.0340576171875,
0.0011644363403320312,
0.0310516357421875,
0.0679931640625,
0.0189056396484375,
-0.0167694091796875,
-0.022796630859375,
-0.01016998291015625,
-0.0174407958984375,
-0.017181396484375,
0.0198974609375,
0.0241851806640625,
0.0035381317138671875,
0.040679931640625,
-0.0120086669921875,
-0.0494384765625,
0.1016845703125,
-0.055084228515625,
-0.02978515625,
0.0002315044403076172,
0.019561767578125,
0.0418701171875,
-0.006988525390625,
0.01593017578125,
0.02459716796875,
-0.0013341903686523438,
0.0249786376953125,
0.01224517822265625,
0.01318359375,
-0.041473388671875,
-0.004337310791015625,
-0.005336761474609375,
0.00716400146484375,
-0.032623291015625,
0.0241851806640625,
0.0019369125366210938,
0.00557708740234375,
-0.0169830322265625,
-0.10333251953125,
0.029632568359375,
-0.04156494140625,
0.04229736328125,
-0.006191253662109375,
0.010772705078125,
0.0120849609375,
-0.00168609619140625,
-0.042236328125,
0.034210205078125,
-0.007549285888671875,
0.0160369873046875,
0.00954437255859375,
0.03594970703125,
0.0266876220703125,
0.0015392303466796875,
0.05096435546875,
-0.00719451904296875,
0.06219482421875,
0.00036215782165527344,
0.00013637542724609375,
-0.044219970703125,
-0.0196685791015625,
-0.022125244140625,
0.0035343170166015625,
-0.030731201171875,
0.0307769775390625,
0.055572509765625,
0.058319091796875,
0.082763671875,
0.0024471282958984375,
-0.01541900634765625,
-0.004932403564453125,
-0.10479736328125,
0.01061248779296875,
0.045867919921875,
0.03460693359375,
-0.004634857177734375,
-0.044036865234375,
-0.047210693359375,
0.009063720703125,
-0.02880859375,
0.0155029296875,
-0.03192138671875,
0.01361083984375,
0.045440673828125,
-0.00829315185546875,
0.0002815723419189453,
0.0201568603515625,
0.0419921875,
0.033782958984375,
0.022735595703125,
0.0225830078125,
0.0010776519775390625,
0.01287841796875,
-0.0008826255798339844,
-0.0006785392761230469,
0.0191192626953125,
-0.023712158203125,
0.00662994384765625,
0.02685546875,
-0.028839111328125,
0.03857421875,
0.0252532958984375,
0.00493621826171875,
-0.01215362548828125,
0.00030732154846191406,
-0.003253936767578125,
-0.03240966796875,
-0.006320953369140625,
0.091064453125,
-0.05169677734375,
-0.07110595703125,
0.0360107421875,
-0.029144287109375,
0.0011701583862304688,
-0.031005859375,
-0.004985809326171875,
0.0750732421875,
-0.0139007568359375,
0.0240020751953125,
-0.01189422607421875,
0.055206298828125,
-0.057220458984375,
-0.0248870849609375,
-0.016693115234375,
0.012237548828125,
0.0146026611328125,
0.01335906982421875,
0.0174102783203125,
-0.005496978759765625,
-0.01470184326171875,
0.0316162109375,
-0.00861358642578125,
0.0187225341796875,
-0.005092620849609375,
0.076171875,
0.05816650390625,
-0.036834716796875,
0.030609130859375,
0.018035888671875,
-0.0002601146697998047,
0.0200042724609375,
0.0002720355987548828,
0.0009484291076660156,
0.016204833984375,
-0.05352783203125,
0.0207977294921875,
0.017425537109375,
-0.0012969970703125,
-0.0114593505859375,
-0.0382080078125,
-0.034576416015625,
-0.0083770751953125,
-0.0804443359375,
-0.055938720703125,
-0.0133209228515625,
-0.06805419921875,
0.01102447509765625,
0.0648193359375,
-0.0411376953125,
-0.032196044921875,
0.1409912109375,
0.017608642578125,
0.0222625732421875,
-0.01277923583984375,
-0.043670654296875,
-0.028289794921875,
-0.04864501953125,
-0.006866455078125,
-0.0134429931640625,
-0.007038116455078125,
0.033447265625,
0.00890350341796875,
0.0325927734375,
-0.01383209228515625,
0.054840087890625,
-0.028717041015625,
-0.054656982421875,
0.0172119140625,
0.0152130126953125,
-0.01410675048828125,
-0.0070037841796875,
0.01148223876953125,
-0.00160980224609375,
0.0131683349609375,
0.0004401206970214844,
-0.0286712646484375,
0.01212310791015625,
0.033111572265625,
0.032867431640625,
0.0292205810546875,
-0.0244293212890625,
0.0171356201171875,
0.02880859375,
-0.039093017578125,
0.0007910728454589844,
0.003116607666015625,
-0.0144195556640625,
0.00878143310546875,
-0.031951904296875,
0.0007367134094238281,
0.0012359619140625,
0.047882080078125,
0.0233154296875,
0.003940582275390625,
0.0296783447265625,
-0.0213623046875,
0.0531005859375,
0.0047607421875,
0.0276336669921875,
-0.0474853515625,
0.04266357421875,
-0.01047515869140625,
0.03131103515625,
0.019378662109375,
-0.0017175674438476562,
-0.0009145736694335938,
-0.0194091796875,
-0.0298919677734375,
0.03155517578125,
0.0129241943359375,
-0.046051025390625,
0.01412200927734375,
0.0096588134765625,
0.00443267822265625,
0.0018510818481445312,
0.025115966796875,
-0.009552001953125,
-0.0042724609375,
0.00858306884765625,
-0.007419586181640625,
-0.0142974853515625,
-0.007808685302734375,
-0.050872802734375,
0.008392333984375,
-0.041046142578125,
0.0172882080078125,
-0.0027675628662109375,
-0.00390625,
-0.053741455078125,
0.0194549560546875,
-0.0211639404296875,
-0.0292510986328125,
0.0390625,
-0.00435638427734375,
-0.055511474609375,
0.051483154296875,
-0.0789794921875,
0.00787353515625,
-0.0675048828125,
0.019989013671875,
-0.0960693359375,
-0.008209228515625,
-0.054290771484375,
0.07806396484375,
0.0042724609375,
0.024658203125,
-0.045013427734375,
0.0290985107421875,
-0.0240478515625,
0.0066986083984375,
0.00794219970703125,
0.032501220703125,
-0.056304931640625,
0.027130126953125,
0.00971221923828125,
-0.0207672119140625,
0.016204833984375,
0.016448974609375,
-0.07330322265625,
0.03179931640625,
-0.0177001953125,
0.049072265625,
0.03204345703125,
-0.05194091796875,
-0.021026611328125,
-0.03021240234375,
-0.03887939453125,
0.032257080078125,
-0.0120849609375,
-0.013458251953125,
-0.053924560546875,
-0.080810546875,
0.054107666015625,
-0.034149169921875,
-0.0096435546875,
-0.01415252685546875,
0.0706787109375,
0.01580810546875,
-0.003864288330078125,
0.051483154296875,
0.0257720947265625,
0.03680419921875,
0.004650115966796875,
0.00019729137420654297,
0.0182647705078125,
-0.01482391357421875,
0.005435943603515625,
0.004673004150390625,
0.0039215087890625,
-0.038787841796875,
0.04693603515625,
0.0163421630859375,
0.0065155029296875,
0.0021686553955078125,
-0.00412750244140625,
0.0386962890625,
0.07647705078125,
0.051055908203125,
-0.01415252685546875,
0.04345703125,
0.00838470458984375,
0.0115509033203125,
-0.0894775390625,
-0.0248870849609375,
0.00006306171417236328,
-0.00989532470703125,
0.01800537109375,
0.026885986328125,
0.04669189453125,
-0.01427459716796875,
0.0123748779296875,
0.005405426025390625,
-0.02313232421875,
0.031341552734375,
-0.037200927734375,
0.000614166259765625,
0.0014543533325195312,
0.00937652587890625,
-0.034576416015625,
0.030364990234375,
-0.00860595703125,
0.042755126953125,
0.0093994140625,
-0.0271148681640625,
-0.03216552734375,
0.010223388671875,
-0.01120758056640625,
-0.0036182403564453125,
0.0222625732421875,
0.03094482421875,
-0.01187896728515625,
-0.0189361572265625,
0.009918212890625,
-0.00827789306640625,
-0.01788330078125,
-0.0076904296875,
0.0218353271484375,
0.0089263916015625,
-0.007038116455078125,
0.019256591796875,
0.043609619140625,
-0.035888671875,
0.045257568359375,
-0.0086822509765625,
-0.0016002655029296875,
-0.004703521728515625,
0.0241851806640625,
0.0155029296875,
-0.0029468536376953125,
-0.005352020263671875,
0.0061492919921875,
0.015228271484375,
-0.061309814453125,
0.0003998279571533203,
0.0302886962890625,
0.060028076171875,
0.002483367919921875,
-0.040069580078125,
0.01904296875,
-0.040252685546875,
-0.0178985595703125,
0.0712890625,
0.03631591796875,
-0.056884765625,
-0.041961669921875,
-0.01454925537109375,
0.00872802734375,
-0.0065460205078125,
0.00707244873046875,
-0.041015625,
0.01282501220703125,
-0.04034423828125,
0.0343017578125,
-0.09979248046875,
0.0160064697265625,
0.033721923828125,
0.055755615234375,
-0.01666259765625,
-0.041229248046875,
-0.03472900390625,
0.004032135009765625,
-0.02288818359375,
0.0159149169921875,
0.06500244140625,
-0.01284027099609375,
0.03863525390625,
-0.031219482421875,
-0.030548095703125,
-0.01396942138671875,
-0.000002384185791015625,
0.0236053466796875,
0.00823974609375,
-0.0299530029296875,
-0.00499725341796875,
-0.04296875,
-0.0355224609375,
-0.040191650390625,
-0.0276031494140625,
-0.042755126953125,
0.0164794921875,
0.0240020751953125,
0.0294189453125,
-0.003421783447265625,
0.0032444000244140625,
0.028839111328125,
0.01197052001953125,
-0.0164947509765625,
0.046417236328125,
0.017578125,
0.0018815994262695312,
0.01251220703125,
0.034332275390625,
0.037200927734375,
0.002048492431640625,
0.004119873046875,
-0.056915283203125,
0.0260162353515625,
-0.046142578125,
-0.05706787109375,
-0.0394287109375,
0.0183868408203125,
0.033203125,
-0.0108489990234375,
-0.0213470458984375,
-0.0006999969482421875,
-0.019500732421875,
0.00778961181640625,
-0.01690673828125,
0.0027904510498046875,
-0.004840850830078125,
-0.0016021728515625,
0.015960693359375,
-0.01006317138671875,
0.006046295166015625,
0.02105712890625,
0.01525115966796875,
-0.012420654296875,
0.0194549560546875,
-0.02447509765625,
-0.022247314453125,
0.0164337158203125,
0.00597381591796875,
0.03759765625,
-0.01412200927734375,
0.02813720703125,
0.00907135009765625,
-0.0028553009033203125,
0.00750732421875,
-0.00798797607421875,
0.009124755859375,
0.0232086181640625,
0.011199951171875,
-0.0273590087890625,
0.0195465087890625,
-0.023345947265625,
-0.004314422607421875,
0.0176239013671875,
0.0526123046875,
0.061614990234375,
-0.07000732421875,
-0.01197052001953125,
0.02227783203125,
-0.026275634765625,
0.0240478515625,
-0.02294921875,
0.01910400390625,
-0.01410675048828125,
0.0084381103515625,
-0.005340576171875,
-0.046722412109375,
-0.022003173828125,
-0.022216796875,
-0.0144500732421875,
-0.0008883476257324219,
0.04931640625,
0.01535797119140625,
-0.0286407470703125,
0.00959014892578125,
0.0123291015625,
0.0163116455078125,
-0.0209197998046875,
0.003070831298828125,
-0.0161285400390625,
-0.013519287109375,
-0.0270538330078125,
0.0076141357421875,
-0.005306243896484375,
-0.01293182373046875,
0.07366943359375,
-0.0149688720703125,
0.0008397102355957031,
0.0255584716796875,
-0.017333984375,
0.04388427734375,
-0.0208892822265625,
-0.0122833251953125,
-0.00621795654296875,
-0.03912353515625,
-0.0257415771484375,
0.0023403167724609375,
0.0230712890625,
0.01404571533203125,
0.0181732177734375,
-0.045928955078125,
0.02294921875,
0.081298828125,
0.07275390625,
-0.0293426513671875,
-0.0275115966796875,
0.038330078125,
-0.01995849609375,
-0.014312744140625,
-0.047515869140625,
0.0281219482421875,
-0.039764404296875,
-0.0186767578125,
-0.04937744140625,
-0.0369873046875,
-0.01436614990234375,
-0.086669921875,
-0.051025390625,
0.130615234375,
-0.0173797607421875,
0.040435791015625,
0.01461029052734375,
0.0443115234375,
-0.02947998046875,
0.0246124267578125,
-0.01212310791015625,
0.047821044921875,
0.01175689697265625,
0.022064208984375,
-0.01129150390625,
-0.007205963134765625,
0.01531219482421875,
0.049346923828125,
0.02734375,
0.004703521728515625,
-0.000812530517578125,
-0.024810791015625,
-0.0101165771484375,
-0.007717132568359375,
-0.034912109375,
0.037872314453125,
-0.008758544921875,
-0.0201263427734375,
0.01061248779296875,
-0.0017881393432617188,
0.0404052734375,
0.005069732666015625,
-0.048248291015625,
0.0041656494140625,
0.0204315185546875,
0.0272216796875,
-0.01568603515625,
0.031585693359375,
0.0013952255249023438,
-0.0176849365234375,
0.00870513916015625,
-0.00212860107421875,
0.003002166748046875,
0.0268707275390625,
-0.0147705078125,
-0.0157928466796875,
-0.03582763671875,
-0.006011962890625,
0.021881103515625,
-0.021270751953125,
-0.01953125,
0.01180267333984375,
0.01336669921875,
0.021575927734375,
-0.0732421875,
-0.037994384765625,
-0.023406982421875,
-0.008148193359375,
-0.0285491943359375,
-0.0283966064453125,
0.0227203369140625,
-0.054962158203125,
-0.033935546875,
0.0290985107421875,
0.0011730194091796875,
0.0292816162109375,
-0.04901123046875,
0.0161895751953125,
-0.019927978515625,
0.004669189453125,
0.00251007080078125,
-0.00823211669921875,
-0.037506103515625,
0.01200103759765625,
0.00748443603515625,
-0.006526947021484375,
-0.02740478515625,
-0.00499725341796875,
0.0007181167602539062,
0.038421630859375,
-0.00847625732421875,
0.00933837890625,
-0.00923919677734375,
-0.00452423095703125,
0.03729248046875,
0.007274627685546875,
-0.022186279296875,
0.0501708984375,
-0.001873016357421875,
0.01168060302734375,
-0.04632568359375,
0.0426025390625,
-0.00867462158203125,
0.045684814453125,
-0.034423828125,
-0.017730712890625,
0.004138946533203125,
0.033599853515625,
0.061614990234375,
0.008209228515625,
0.0268096923828125,
0.00754547119140625,
-0.002086639404296875,
0.0301361083984375,
-0.01181793212890625,
-0.01163482666015625,
-0.007293701171875,
-0.06060791015625,
0.0300140380859375,
0.03179931640625,
0.02093505859375,
0.0014123916625976562,
-0.007274627685546875,
0.0543212890625,
0.0035495758056640625,
-0.006183624267578125,
0.002307891845703125,
-0.017791748046875,
0.01593017578125,
-0.0101165771484375,
-0.004520416259765625,
0.02374267578125,
-0.01007080078125,
0.0038547515869140625,
0.0096435546875,
-0.00894927978515625,
-0.02252197265625,
0.022125244140625,
-0.02960205078125,
0.042083740234375,
-0.0119476318359375,
-0.005859375,
0.0041961669921875,
-0.026092529296875,
0.0200347900390625,
0.02008056640625,
-0.007076263427734375,
0.0135345458984375,
0.0014257431030273438,
0.0112152099609375,
0.01015472412109375,
0.018463134765625,
0.0194244384765625,
0.06317138671875,
-0.01242828369140625,
0.033447265625,
-0.0009908676147460938,
-0.044525146484375,
0.037567138671875,
0.00649261474609375,
-0.054962158203125,
-0.0113067626953125,
0.02703857421875,
-0.005306243896484375,
-0.03802490234375,
0.037628173828125,
0.0262298583984375,
-0.0140380859375,
0.0258026123046875,
-0.00007075071334838867,
0.01000213623046875,
0.00211334228515625,
0.00986480712890625,
-0.0318603515625,
-0.024078369140625,
-0.024505615234375,
-0.0160064697265625,
0.00984954833984375,
0.0293121337890625,
0.04583740234375,
0.01430511474609375,
0.0283050537109375,
-0.042022705078125,
0.027313232421875,
-0.0073089599609375,
0.0330810546875,
0.023040771484375,
0.052520751953125,
-0.0089111328125,
0.017608642578125,
-0.01285552978515625,
0.01024627685546875,
0.0213470458984375,
-0.0264129638671875,
0.0301971435546875,
-0.0711669921875,
-0.02630615234375,
0.00975799560546875,
0.0023040771484375,
-0.0294342041015625,
-0.011322021484375,
0.024322509765625,
-0.014556884765625,
-0.0299530029296875,
-0.023040771484375,
0.00563812255859375,
-0.01111602783203125,
-0.04388427734375,
0.00826263427734375,
-0.0323486328125,
-0.045196533203125,
-0.0286865234375,
-0.021087646484375,
0.050323486328125,
0.006496429443359375,
-0.058685302734375,
0.01305389404296875,
-0.026458740234375,
0.0245208740234375,
-0.01168060302734375,
0.0401611328125,
-0.0316162109375,
-0.019134521484375,
-0.062255859375,
-0.07293701171875,
-0.0511474609375,
0.087646484375,
-0.080078125,
0.0093994140625,
0.0256500244140625,
-0.015533447265625,
0.0018939971923828125,
0.04052734375,
0.0243072509765625,
0.07891845703125,
-0.042755126953125,
-0.0330810546875,
0.0269622802734375,
-0.01374053955078125,
0.0218505859375,
-0.019317626953125,
-0.0190887451171875,
-0.0218505859375,
-0.000354766845703125,
-0.037353515625,
-0.00446319580078125,
-0.0379638671875,
-0.0653076171875,
-0.1068115234375,
0.032196044921875,
-0.027435302734375,
-0.036163330078125,
-0.0093231201171875,
-0.00730133056640625,
0.003131866455078125,
-0.0166778564453125,
-0.01422119140625,
0.01727294921875,
-0.01641845703125,
0.0180816650390625,
0.007625579833984375,
0.048797607421875,
-0.0015592575073242188,
0.024505615234375,
0.028900146484375,
0.03326416015625,
0.0196533203125,
-0.02685546875,
-0.011077880859375,
0.0100555419921875,
0.031402587890625,
0.0283050537109375,
-0.0276641845703125,
0.043914794921875,
0.0024356842041015625,
-0.00015735626220703125,
-0.019561767578125,
-0.0192413330078125,
-0.0458984375,
-0.028411865234375,
0.057403564453125,
0.069091796875,
0.017578125,
-0.01322174072265625,
0.03143310546875,
-0.021331787109375,
-0.03790283203125,
-0.001514434814453125,
-0.0032444000244140625,
0.0010824203491210938,
0.007625579833984375,
-0.0009927749633789062,
0.007472991943359375,
0.004283905029296875,
-0.0237274169921875,
-0.0261383056640625,
-0.0284271240234375,
-0.0179595947265625,
0.030120849609375,
-0.06787109375,
0.080322265625,
0.035675048828125,
-0.035430908203125,
0.0174407958984375,
-0.01763916015625,
-0.035308837890625,
0.01508331298828125,
-0.050140380859375,
-0.0007066726684570312,
0.034393310546875,
-0.04205322265625,
0.020843505859375,
-0.004482269287109375,
0.004058837890625,
-0.06097412109375,
0.00981903076171875,
-0.0151214599609375,
0.003971099853515625,
-0.0211181640625,
0.003116607666015625,
0.0194091796875,
-0.0165252685546875,
-0.01418304443359375,
0.07708740234375,
-0.0211181640625,
-0.01317596435546875,
-0.0261688232421875,
0.01058197021484375,
-0.0340576171875,
0.019256591796875,
-0.0139007568359375,
-0.00008171796798706055,
-0.001819610595703125,
0.0535888671875,
-0.02703857421875,
-0.02056884765625,
0.0193328857421875,
-0.0513916015625,
0.00775909423828125,
-0.005275726318359375
]
|
2f138ca74a202a97ae8c31ee13520e8bcc371c8c | Wordpress Stackexchange
Q: get / list categories and counts filtered by custom taxonomy term In my post 'post type' besides "categories" I've a custom taxonomy called "product-types".
The category is actually more "manufactures" of the product types.
I've a product-types page where I list all products which has the selected product-type.
In my sidebar, I want a list showing all available manufactures under that prouduct-type, as an extra filtering function.
Example:
My product-type term 'SUV' has 'posts' ML320, X6, ASX, Outlander.
These are respectively categorised with the manufactura category: 'Mercedes', 'BMW', 'Mitsubishi', 'Mitsubishi'
I want a sidebar on my 'SUV' page which says something like:
Manufactura:
*
*Mercedes (1)
*BMW (1)
*Mitsubishi (2)
However, I've tried a bunch of things, among others these two answers https://wordpress.stackexchange.com/a/20359/6751 & https://wordpress.stackexchange.com/a/16795/6751 but I haven't manage to get it to work.
Any help or suggestions would be very appreciated.
| Q: get / list categories and counts filtered by custom taxonomy term In my post 'post type' besides "categories" I've a custom taxonomy called "product-types".
The category is actually more "manufactures" of the product types.
I've a product-types page where I list all products which has the selected product-type.
In my sidebar, I want a list showing all available manufactures under that prouduct-type, as an extra filtering function.
Example:
My product-type term 'SUV' has 'posts' ML320, X6, ASX, Outlander.
These are respectively categorised with the manufactura category: 'Mercedes', 'BMW', 'Mitsubishi', 'Mitsubishi'
I want a sidebar on my 'SUV' page which says something like:
Manufactura:
*
*Mercedes (1)
*BMW (1)
*Mitsubishi (2)
However, I've tried a bunch of things, among others these two answers https://wordpress.stackexchange.com/a/20359/6751 & https://wordpress.stackexchange.com/a/16795/6751 but I haven't manage to get it to work.
Any help or suggestions would be very appreciated.
| wordpress | {
"language": "en",
"length": 143,
"provenance": "stackexchange_00019.jsonl.gz:465421",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226523"
} | [
-0.00618743896484375,
0.0209503173828125,
-0.053314208984375,
0.002986907958984375,
0.04534912109375,
-0.038482666015625,
0.07440185546875,
-0.002460479736328125,
-0.040313720703125,
-0.000850677490234375,
-0.03277587890625,
0.004611968994140625,
-0.0654296875,
-0.025665283203125,
0.01166534423828125,
-0.08349609375,
0.007450103759765625,
-0.00852203369140625,
0.0066070556640625,
-0.0367431640625,
0.01226806640625,
-0.0265960693359375,
-0.0042724609375,
-0.021026611328125,
0.0006303787231445312,
0.0125274658203125,
-0.01006317138671875,
-0.01275634765625,
0.0113983154296875,
-0.00359344482421875,
0.0017766952514648438,
-0.0057220458984375,
0.0304412841796875,
-0.03009033203125,
0.04278564453125,
0.07733154296875,
0.005352020263671875,
0.005390167236328125,
0.03887939453125,
-0.004302978515625,
0.0258026123046875,
-0.01922607421875,
0.007137298583984375,
-0.01641845703125,
0.0110015869140625,
-0.042724609375,
0.03765869140625,
-0.04949951171875,
0.01666259765625,
-0.0250091552734375,
0.0207366943359375,
0.016448974609375,
0.0304412841796875,
-0.016845703125,
-0.018798828125,
0.0116119384765625,
-0.0214996337890625,
0.0316162109375,
0.034912109375,
0.00299072265625,
-0.0242919921875,
-0.01541900634765625,
0.016204833984375,
-0.0279388427734375,
-0.02276611328125,
-0.00424957275390625,
0.005283355712890625,
0.01287078857421875,
0.002674102783203125,
-0.022430419921875,
0.0038280487060546875,
0.002880096435546875,
0.003787994384765625,
0.022186279296875,
-0.00980377197265625,
-0.10614013671875,
0.0384521484375,
-0.0562744140625,
-0.007083892822265625,
0.05621337890625,
-0.016082763671875,
0.0172576904296875,
-0.05426025390625,
0.0108795166015625,
-0.037139892578125,
0.00226593017578125,
-0.022613525390625,
-0.0018243789672851562,
-0.0016965866088867188,
-0.007587432861328125,
0.009124755859375,
-0.048065185546875,
-0.0189971923828125,
0.06732177734375,
0.0277557373046875,
-0.022003173828125,
0.046173095703125,
0.05755615234375,
-0.004230499267578125,
-0.0068206787109375,
-0.01279449462890625,
-0.0540771484375,
-0.0017261505126953125,
-0.048431396484375,
0.0394287109375,
0.0350341796875,
-0.0335693359375,
0.0304412841796875,
0.09112548828125,
0.03582763671875,
0.037353515625,
0.036376953125,
-0.021331787109375,
-0.033935546875,
-0.035552978515625,
0.0229339599609375,
-0.01119232177734375,
-0.0303955078125,
0.0130157470703125,
-0.032928466796875,
0.01125335693359375,
0.03973388671875,
0.03192138671875,
-0.00904083251953125,
0.0207672119140625,
0.0294342041015625,
-0.0005960464477539062,
-0.06640625,
0.04931640625,
0.03515625,
-0.03961181640625,
-0.01922607421875,
-0.00894927978515625,
0.0013399124145507812,
-0.0060577392578125,
-0.0253143310546875,
0.0513916015625,
0.0027408599853515625,
0.020965576171875,
-0.006622314453125,
0.02398681640625,
-0.002445220947265625,
0.00447845458984375,
-0.0036220550537109375,
0.01654052734375,
-0.01404571533203125,
0.00928497314453125,
0.046600341796875,
0.0277557373046875,
0.0029201507568359375,
0.01549530029296875,
0.00420379638671875,
0.06500244140625,
-0.00604248046875,
-0.059173583984375,
-0.01276397705078125,
-0.0094146728515625,
-0.018798828125,
-0.039642333984375,
-0.052093505859375,
0.048553466796875,
-0.0031585693359375,
-0.028472900390625,
0.01035308837890625,
-0.0284881591796875,
0.0228118896484375,
-0.018157958984375,
-0.0085296630859375,
0.017974853515625,
-0.03082275390625,
0.0296630859375,
-0.0254974365234375,
-0.01486968994140625,
0.00716400146484375,
0.01904296875,
0.03094482421875,
-0.026885986328125,
-0.00220489501953125,
0.0207366943359375,
0.002288818359375,
-0.01332855224609375,
-0.0285797119140625,
0.0197601318359375,
0.00638580322265625,
-0.05926513671875,
-0.0035991668701171875,
0.039947509765625,
0.07550048828125,
-0.0024890899658203125,
0.032135009765625,
0.05853271484375,
0.000013709068298339844,
-0.0631103515625,
0.0273590087890625,
-0.0024509429931640625,
-0.02593994140625,
-0.020843505859375,
-0.02197265625,
-0.006439208984375,
0.017181396484375,
0.007305145263671875,
0.032318115234375,
-0.0020198822021484375,
-0.00803375244140625,
-0.054901123046875,
0.038909912109375,
-0.021820068359375,
0.0567626953125,
0.03277587890625,
0.0284881591796875,
0.004001617431640625,
0.01187896728515625,
-0.029327392578125,
-0.016571044921875,
-0.0360107421875,
-0.00951385498046875,
0.03094482421875,
0.01009368896484375,
-0.0205230712890625,
-0.0372314453125,
-0.0242156982421875,
-0.0249481201171875,
-0.0236968994140625,
0.086669921875,
0.021942138671875,
0.0419921875,
-0.0266571044921875,
0.0252227783203125,
0.0280914306640625,
0.0687255859375,
-0.0193939208984375,
-0.0367431640625,
0.041534423828125,
0.0214080810546875,
-0.05291748046875,
0.0029277801513671875,
0.0149688720703125,
-0.0027904510498046875,
-0.00560760498046875,
0.045623779296875,
0.0138092041015625,
0.0239410400390625,
-0.00804901123046875,
0.04864501953125,
0.051544189453125,
-0.0247802734375,
-0.0219268798828125,
0.023223876953125,
-0.0108489990234375,
0.01006317138671875,
0.01398468017578125,
0.0008974075317382812,
0.0312347412109375,
0.0340576171875,
0.03973388671875,
0.01611328125,
-0.002597808837890625,
0.0295562744140625,
-0.0360107421875,
-0.00670623779296875,
0.002071380615234375,
-0.0341796875,
-0.036102294921875,
-0.0087738037109375,
0.0799560546875,
-0.00817108154296875,
0.0535888671875,
0.0216064453125,
-0.044464111328125,
-0.0173492431640625,
0.02252197265625,
0.040771484375,
-0.010345458984375,
-0.0026149749755859375,
0.043487548828125,
-0.03900146484375,
-0.01995849609375,
-0.002105712890625,
-0.004978179931640625,
-0.0238494873046875,
-0.014862060546875,
-0.002727508544921875,
-0.0426025390625,
-0.0082244873046875,
-0.0217437744140625,
-0.060394287109375,
0.01126861572265625,
0.020111083984375,
-0.057769775390625,
-0.024139404296875,
-0.0103912353515625,
0.035369873046875,
0.0020656585693359375,
-0.016754150390625,
-0.0117645263671875,
0.007427215576171875,
0.0009307861328125,
-0.065673828125,
0.049041748046875,
-0.040191650390625,
0.04425048828125,
0.06671142578125,
-0.004077911376953125,
0.031402587890625,
0.0062103271484375,
0.0304412841796875,
0.025115966796875,
-0.004726409912109375,
-0.005832672119140625,
0.0016698837280273438,
-0.048614501953125,
-0.0198822021484375,
0.0194244384765625,
-0.0013933181762695312,
0.020782470703125,
-0.005298614501953125,
0.01317596435546875,
0.008331298828125,
-0.02484130859375,
0.0184478759765625,
0.034393310546875,
-0.020263671875,
-0.001483917236328125,
-0.0129241943359375,
-0.02001953125,
-0.016632080078125,
0.005340576171875,
-0.0021114349365234375,
-0.0170440673828125,
0.00438690185546875,
-0.0298004150390625,
-0.0345458984375,
-0.050994873046875,
-0.0135040283203125,
-0.0087127685546875,
0.00179290771484375,
0.0165863037109375,
0.0855712890625,
0.0300445556640625,
-0.08978271484375,
0.02093505859375,
0.043975830078125,
-0.039886474609375,
0.051177978515625,
-0.01336669921875,
-0.03021240234375,
-0.019378662109375,
-0.008026123046875,
0.009002685546875,
0.008636474609375,
-0.014801025390625,
0.0187225341796875,
0.00409698486328125,
0.01007843017578125,
0.0248870849609375,
-0.0187835693359375,
-0.0181884765625,
0.055633544921875,
0.0298614501953125,
-0.003543853759765625,
-0.0123443603515625,
0.01119232177734375,
-0.01087188720703125,
-0.0174560546875,
-0.0226898193359375,
-0.01302337646484375,
-0.019989013671875,
0.04437255859375,
0.004657745361328125,
0.01132965087890625,
-0.0195770263671875,
0.0062103271484375,
0.022003173828125,
-0.00011628866195678711,
0.0170135498046875,
0.01280975341796875,
-0.05474853515625,
-0.06719970703125,
0.06268310546875,
-0.029815673828125,
-0.00039649009704589844,
-0.00319671630859375,
0.038604736328125,
0.007015228271484375,
-0.0694580078125,
0.05224609375,
-0.00102996826171875,
-0.03057861328125,
0.00637054443359375,
-0.03277587890625,
0.044158935546875,
0.104248046875,
-0.044891357421875,
-0.01324462890625,
0.0040130615234375,
0.0135498046875,
-0.005931854248046875,
-0.036407470703125,
-0.0499267578125,
-0.0214080810546875,
-0.0689697265625,
0.0305328369140625,
0.0232086181640625,
-0.035491943359375,
-0.036895751953125,
0.0176849365234375,
-0.073486328125,
-0.019500732421875,
0.043121337890625,
-0.046783447265625,
0.0163116455078125,
-0.021942138671875,
-0.0232391357421875,
-0.0226593017578125,
-0.0244903564453125,
-0.0271759033203125,
-0.01107025146484375,
-0.006649017333984375,
0.03411865234375,
0.0001621246337890625,
-0.030792236328125,
0.019012451171875,
0.0002849102020263672,
0.042327880859375,
0.030517578125,
-0.004001617431640625,
-0.0016002655029296875,
-0.0157318115234375,
-0.028289794921875,
0.0092315673828125,
-0.0027713775634765625,
-0.00986480712890625,
-0.045684814453125,
-0.02886962890625,
0.024078369140625,
0.056488037109375,
0.0024394989013671875,
0.04345703125,
-0.01364898681640625,
0.0145721435546875,
-0.053741455078125,
-0.02227783203125,
-0.0006475448608398438,
-0.0157012939453125,
-0.0110626220703125,
-0.0070953369140625,
0.01132965087890625,
-0.034088134765625,
0.0218963623046875,
-0.006435394287109375,
-0.0179901123046875,
0.00873565673828125,
0.043731689453125,
0.010650634765625,
-0.01195526123046875,
0.0026226043701171875,
-0.0137176513671875,
0.024810791015625,
-0.0027675628662109375,
0.036041259765625,
0.0085601806640625,
-0.0083770751953125,
0.0262603759765625,
-0.01073455810546875,
0.0012340545654296875,
-0.0019350051879882812,
0.03839111328125,
-0.007354736328125,
0.016998291015625,
-0.0005578994750976562,
-0.020355224609375,
0.029510498046875,
0.031707763671875,
-0.026824951171875,
-0.0240325927734375,
0.0039215087890625,
0.053619384765625,
-0.0594482421875,
0.047515869140625,
-0.036102294921875,
0.03814697265625,
-0.0034885406494140625,
0.01605224609375,
0.0284881591796875,
0.04046630859375,
-0.0043487548828125,
-0.0253753662109375,
-0.0345458984375,
0.010528564453125,
0.0275726318359375,
-0.0025501251220703125,
-0.00719451904296875,
0.02557373046875,
0.03131103515625,
-0.00809478759765625,
0.02557373046875,
0.0079498291015625,
-0.058990478515625,
-0.007305145263671875,
-0.0467529296875,
0.0148773193359375,
0.01059722900390625,
-0.039581298828125,
0.03924560546875,
-0.0031528472900390625,
0.0220489501953125,
0.040679931640625,
-0.035186767578125,
0.004291534423828125,
-0.0224456787109375,
0.021209716796875,
-0.045867919921875,
0.0018358230590820312,
0.011077880859375,
-0.01139068603515625,
-0.0134124755859375,
0.045928955078125,
-0.0576171875,
0.032806396484375,
0.014373779296875,
0.04241943359375,
0.046905517578125,
0.029815673828125,
0.0203094482421875,
-0.02752685546875,
-0.01947021484375,
0.0096282958984375,
-0.00930023193359375,
-0.0217132568359375,
-0.041595458984375,
0.0111846923828125,
0.010467529296875,
-0.01523590087890625,
0.01922607421875,
0.01309967041015625,
0.010955810546875,
-0.021697998046875,
0.00989532470703125,
-0.017486572265625,
-0.01465606689453125,
-0.05267333984375,
0.006061553955078125,
0.056396484375,
0.0097503662109375,
-0.01427459716796875,
0.00794219970703125,
-0.01352691650390625,
0.0178985595703125,
-0.01526641845703125,
-0.00997161865234375,
0.004650115966796875,
0.003322601318359375,
-0.0455322265625,
0.00406646728515625,
0.03436279296875,
-0.084716796875,
-0.060150146484375,
0.016510009765625,
0.0024890899658203125,
0.01038360595703125,
-0.024139404296875,
0.033203125,
-0.005069732666015625,
-0.0181427001953125,
0.00820159912109375,
0.0193634033203125,
0.018341064453125,
0.00782012939453125,
0.0063934326171875,
-0.0382080078125,
0.008270263671875,
-0.04547119140625,
0.01163482666015625,
0.0142669677734375,
-0.028411865234375,
-0.0014734268188476562,
0.01134490966796875,
0.036468505859375,
-0.004238128662109375,
-0.042449951171875,
-0.033355712890625,
-0.00007468461990356445,
0.0310516357421875,
0.046356201171875,
-0.0161590576171875,
0.0140533447265625,
0.0300750732421875,
0.00762176513671875,
0.007259368896484375,
-0.006656646728515625,
-0.01103973388671875,
-0.014801025390625,
-0.02880859375,
-0.10595703125,
-0.0022106170654296875,
0.0200347900390625,
-0.033660888671875,
0.065673828125,
0.01374053955078125,
0.025421142578125,
0.0181121826171875,
-0.029510498046875,
-0.0080413818359375,
-0.00472259521484375,
0.020965576171875,
-0.01190185546875,
0.0306243896484375,
0.00438690185546875,
-0.0301361083984375,
0.0107879638671875,
0.015289306640625,
-0.04791259765625,
0.042327880859375,
-0.007537841796875,
0.027099609375,
0.0286865234375,
-0.0189208984375,
0.0145721435546875,
0.0244598388671875,
0.00205230712890625,
0.01486968994140625,
0.0178375244140625,
0.0164947509765625,
-0.01451873779296875,
0.02703857421875,
0.0225372314453125,
-0.02239990234375,
0.0190887451171875,
-0.022003173828125,
-0.0289306640625,
-0.0039215087890625,
-0.03155517578125,
-0.03875732421875,
0.00881195068359375,
0.00838470458984375,
-0.0105438232421875,
-0.019195556640625,
-0.00494384765625,
-0.01033782958984375,
-0.01360321044921875,
0.0229949951171875,
-0.052459716796875,
-0.031219482421875,
0.032196044921875,
-0.046844482421875,
-0.0287322998046875,
0.01166534423828125,
0.025726318359375,
0.0278472900390625,
0.01361083984375,
0.06402587890625,
-0.00826263427734375,
0.0255889892578125,
-0.10040283203125,
-0.012847900390625,
-0.0186767578125,
-0.01300811767578125,
-0.006977081298828125,
-0.0133514404296875,
0.0010919570922851562,
-0.038116455078125,
0.019866943359375,
-0.04718017578125,
0.0307159423828125,
0.005458831787109375,
-0.02484130859375,
0.0196990966796875,
0.02423095703125,
-0.029876708984375,
-0.00031948089599609375,
0.0073699951171875,
-0.068115234375,
0.0171966552734375,
0.02630615234375,
-0.0020008087158203125,
-0.004306793212890625,
-0.01313018798828125,
-0.01137542724609375,
-0.056121826171875,
0.0250396728515625,
-0.0220947265625,
-0.015716552734375,
0.04412841796875,
-0.007099151611328125,
-0.0223388671875,
0.0258331298828125,
0.03924560546875,
-0.0105133056640625,
0.0206451416015625,
-0.003017425537109375,
-0.04949951171875,
-0.0272979736328125,
0.0100250244140625,
-0.046356201171875,
0.008331298828125,
0.0195465087890625,
-0.0753173828125,
0.065673828125,
-0.0321044921875,
0.0709228515625,
0.01971435546875,
0.01279449462890625,
-0.00006210803985595703,
-0.01204681396484375,
-0.033294677734375,
0.01010894775390625,
0.01165008544921875,
0.0251312255859375,
-0.040618896484375,
-0.0278778076171875,
-0.01617431640625,
0.06146240234375,
0.050140380859375,
0.010650634765625,
-0.03558349609375,
-0.03509521484375,
0.0033512115478515625,
0.025482177734375,
-0.01050567626953125,
0.045745849609375,
0.006511688232421875,
0.0389404296875,
0.038177490234375,
-0.0340576171875,
0.0224609375,
0.03204345703125,
-0.0126495361328125,
0.030120849609375,
0.00872802734375,
0.0275726318359375,
-0.0243682861328125,
0.0158538818359375,
0.0098724365234375,
-0.0306854248046875,
0.000008821487426757812,
-0.0006961822509765625,
0.0160675048828125,
0.0452880859375,
0.049591064453125,
-0.08880615234375,
0.01016998291015625,
-0.04473876953125,
0.0618896484375,
-0.026214599609375,
0.027801513671875,
0.00719451904296875,
0.0097808837890625,
0.044036865234375,
-0.004138946533203125,
0.0169219970703125,
0.042388916015625,
-0.0139617919921875,
0.0340576171875,
-0.0204925537109375,
0.022552490234375,
-0.054107666015625,
0.0212554931640625,
0.01430511474609375,
0.0280303955078125,
-0.0243988037109375,
-0.08544921875,
-0.00396728515625,
0.0111236572265625,
0.027496337890625,
0.055267333984375,
0.0215606689453125,
0.06768798828125,
0.10870361328125,
-0.06695556640625,
0.0119781494140625,
0.023223876953125,
0.06085205078125,
-0.01297760009765625,
-0.03155517578125,
-0.05804443359375,
-0.022979736328125,
-0.051483154296875,
0.0207366943359375,
0.032989501953125,
0.10491943359375,
0.01403045654296875,
0.068359375,
-0.09771728515625,
-0.058135986328125,
-0.0034427642822265625,
-0.01331329345703125,
0.0087738037109375,
0.01531982421875,
-0.027587890625,
0.0035533905029296875,
0.01776123046875,
0.0263824462890625,
-0.01184844970703125,
-0.00923919677734375,
0.0156402587890625,
0.061309814453125,
0.004230499267578125,
-0.0207061767578125,
0.06280517578125,
-0.004749298095703125,
-0.025604248046875,
-0.01068878173828125,
0.0010995864868164062,
0.043701171875,
0.00862884521484375,
0.00791168212890625,
0.027923583984375,
0.052581787109375,
-0.0078582763671875,
0.026824951171875,
0.00484466552734375,
-0.0210418701171875,
0.04132080078125,
0.0015773773193359375,
0.055816650390625,
0.0306854248046875,
-0.0606689453125,
-0.00980377197265625,
-0.0271148681640625,
-0.019012451171875,
0.01953125,
0.0297698974609375,
-0.0252532958984375,
0.034515380859375,
0.03045654296875,
-0.0557861328125,
-0.00079345703125,
0.057586669921875,
0.00891876220703125,
0.01337432861328125,
0.007785797119140625,
-0.001674652099609375,
-0.033355712890625,
-0.0035839080810546875,
0.01873779296875,
0.006275177001953125,
0.01459503173828125,
0.044921875,
0.0188446044921875,
0.00467681884765625,
-0.0202178955078125,
0.0171356201171875,
-0.0462646484375,
-0.028656005859375,
0.0225830078125,
-0.01107025146484375,
-0.00214385986328125,
0.0023899078369140625,
-0.03387451171875,
-0.01395416259765625,
0.082763671875,
-0.042694091796875,
0.0163116455078125,
-0.00714111328125,
0.0198516845703125,
-0.0657958984375,
0.0196533203125,
-0.032623291015625,
0.001476287841796875,
-0.0130767822265625,
-0.043426513671875,
0.0233154296875,
-0.01885986328125,
0.0202178955078125,
0.0181732177734375,
0.0169677734375,
-0.00583648681640625,
0.0176239013671875,
-0.01605224609375,
0.031158447265625,
0.02923583984375,
0.0009412765502929688,
0.040008544921875,
0.04388427734375,
-0.01232147216796875,
0.03350830078125,
0.01215362548828125,
0.011077880859375,
0.0235137939453125,
-0.007358551025390625,
0.002956390380859375,
0.01309967041015625,
0.0489501953125,
-0.01157379150390625,
0.004077911376953125,
0.0062713623046875,
0.0020465850830078125,
-0.0158538818359375,
0.0343017578125,
-0.02862548828125,
-0.0214996337890625,
0.009307861328125,
-0.00415802001953125,
0.016326904296875,
-0.0184783935546875,
-0.027435302734375,
-0.0114593505859375,
0.0182037353515625,
-0.00521087646484375,
-0.034088134765625,
0.040252685546875,
-0.01538848876953125,
0.0158538818359375,
-0.0440673828125,
-0.0163116455078125,
0.0116424560546875,
0.0161285400390625,
-0.028564453125,
0.0036983489990234375,
-0.0141448974609375,
-0.00647735595703125,
-0.0033092498779296875,
0.00733184814453125,
0.023284912109375,
-0.0250396728515625,
-0.028717041015625,
0.0171356201171875,
0.0089111328125,
0.050048828125,
0.007663726806640625,
-0.004123687744140625,
0.01873779296875,
0.00975799560546875,
-0.0673828125,
-0.0416259765625,
0.055694580078125,
-0.0552978515625,
-0.033538818359375,
0.027313232421875,
-0.022705078125,
0.00786590576171875,
-0.0248565673828125,
-0.0221405029296875,
0.04132080078125,
0.022674560546875,
-0.033599853515625,
-0.0936279296875,
-0.0036773681640625,
-0.008819580078125,
0.03704833984375,
-0.02685546875,
-0.025482177734375,
-0.041168212890625,
0.0643310546875,
0.025054931640625,
0.01416778564453125,
0.0182952880859375,
0.037841796875,
-0.06915283203125,
-0.00732421875,
-0.041534423828125,
0.005584716796875,
-0.00005453824996948242,
-0.0089874267578125,
0.00440216064453125,
0.0177459716796875,
-0.0242156982421875,
-0.0167083740234375,
0.0158233642578125,
-0.0086212158203125,
0.045318603515625,
-0.052520751953125,
-0.0457763671875,
-0.09088134765625,
-0.031768798828125,
-0.01020050048828125,
0.006351470947265625,
0.05303955078125,
-0.032012939453125,
-0.0154571533203125,
-0.006755828857421875,
0.00817108154296875,
0.006099700927734375,
-0.038787841796875,
0.01119232177734375,
-0.006580352783203125,
0.0063323974609375,
0.01049041748046875,
0.0240478515625,
-0.01555633544921875,
-0.01512908935546875,
0.004749298095703125,
-0.01326751708984375,
-0.07489013671875,
0.052978515625,
-0.04986572265625,
-0.00983428955078125,
-0.05914306640625,
-0.00669097900390625,
-0.0250396728515625,
-0.06451416015625,
-0.0086669921875,
-0.030609130859375,
-0.0330810546875,
0.02813720703125,
0.0253448486328125,
0.0030460357666015625,
-0.011993408203125,
0.01477813720703125,
0.0230255126953125,
-0.00394439697265625,
0.0304412841796875,
-0.005672454833984375,
0.024200439453125,
-0.029876708984375,
0.07342529296875,
0.0147857666015625,
0.07763671875,
-0.029266357421875,
-0.006031036376953125,
-0.0227813720703125,
0.017425537109375,
0.005680084228515625,
-0.0012645721435546875,
0.05181884765625,
-0.01007843017578125,
0.006793975830078125,
-0.0178985595703125,
-0.041778564453125,
-0.0186767578125,
-0.0123138427734375,
0.03887939453125,
-0.035980224609375,
0.00518798828125
]
|
b1f77cfbcd7349d5f1b0974a915eead80f193bcb | Wordpress Stackexchange
Q: Script won't execute in the media manager I'm trying to execute a jquery script on the click of a button in a custom tab of the media manager, but it does not seem to work. I have been told this might be due to the button not being loaded before the script is.
The jquery script is some variation on this, currently (I tried a few different methods around it but with no success) :
jQuery( document ).on('click', '.upload_url_list_button', function()
{
console.log("test");
});
And the function loaded within the custom tab is
function custom_media_upload_tab_content()
{
?>
<form method="post">
Select file to upload:
<input type="file" name="fileToUpload" id="fileToUpload">
<input id="upload_url_list" name="upload_url_list" class="upload_url_list_button button" type="button" value="Upload Image" name="submit">
</form>
<?php
}
The script is loaded correctly when I try to click it, with no results. I have also tried to load the script during the generation of the page, with
wp_enqueue_script('upload_file_list', get_template_directory_uri().'/js/upload_file_list.js', array('jquery'), '1.0', true );
wp_localize_script('upload_file_list', 'file_list', array(
'ajax_url' => admin_url( 'admin-ajax.php' ),
));
moved to it, but then the script just doesn't load at all.
What method should I use to execute that script there?
| Q: Script won't execute in the media manager I'm trying to execute a jquery script on the click of a button in a custom tab of the media manager, but it does not seem to work. I have been told this might be due to the button not being loaded before the script is.
The jquery script is some variation on this, currently (I tried a few different methods around it but with no success) :
jQuery( document ).on('click', '.upload_url_list_button', function()
{
console.log("test");
});
And the function loaded within the custom tab is
function custom_media_upload_tab_content()
{
?>
<form method="post">
Select file to upload:
<input type="file" name="fileToUpload" id="fileToUpload">
<input id="upload_url_list" name="upload_url_list" class="upload_url_list_button button" type="button" value="Upload Image" name="submit">
</form>
<?php
}
The script is loaded correctly when I try to click it, with no results. I have also tried to load the script during the generation of the page, with
wp_enqueue_script('upload_file_list', get_template_directory_uri().'/js/upload_file_list.js', array('jquery'), '1.0', true );
wp_localize_script('upload_file_list', 'file_list', array(
'ajax_url' => admin_url( 'admin-ajax.php' ),
));
moved to it, but then the script just doesn't load at all.
What method should I use to execute that script there?
| wordpress | {
"language": "en",
"length": 185,
"provenance": "stackexchange_00019.jsonl.gz:465423",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226527"
} | [
0.0303497314453125,
-0.01230621337890625,
-0.0185699462890625,
-0.03997802734375,
0.023834228515625,
-0.02886962890625,
0.0225982666015625,
-0.0000718235969543457,
-0.043365478515625,
0.01837158203125,
0.004009246826171875,
0.01528167724609375,
-0.051513671875,
-0.0335693359375,
0.0082244873046875,
-0.0533447265625,
0.049041748046875,
-0.018157958984375,
0.0242462158203125,
-0.0023097991943359375,
0.0001417398452758789,
0.036651611328125,
0.0244903564453125,
0.045013427734375,
0.01496124267578125,
0.0013561248779296875,
0.04608154296875,
0.0099029541015625,
-0.009429931640625,
-0.0123138427734375,
0.0241851806640625,
-0.0054779052734375,
0.0252685546875,
-0.00982666015625,
0.0158843994140625,
0.01312255859375,
0.007022857666015625,
0.01285552978515625,
0.01280975341796875,
0.01306915283203125,
0.038299560546875,
-0.0235595703125,
0.01526641845703125,
0.03131103515625,
-0.00257110595703125,
-0.02178955078125,
0.0175933837890625,
-0.0382080078125,
0.016998291015625,
0.0496826171875,
0.003597259521484375,
-0.0211944580078125,
-0.004138946533203125,
0.0010995864868164062,
0.0009217262268066406,
0.02099609375,
-0.058685302734375,
0.0032672882080078125,
0.005504608154296875,
0.10516357421875,
0.03619384765625,
0.0200958251953125,
-0.0225372314453125,
-0.04974365234375,
-0.037200927734375,
0.0206146240234375,
-0.0076141357421875,
-0.01319122314453125,
-0.0211334228515625,
-0.047149658203125,
-0.00173187255859375,
-0.0323486328125,
0.013885498046875,
-0.01227569580078125,
-0.0212554931640625,
-0.0231170654296875,
0.032745361328125,
-0.00959014892578125,
-0.004230499267578125,
-0.01462554931640625,
0.032958984375,
0.00861358642578125,
-0.027587890625,
0.03265380859375,
0.01751708984375,
0.0733642578125,
-0.0119781494140625,
-0.055023193359375,
-0.00888824462890625,
-0.0081939697265625,
-0.019775390625,
-0.000980377197265625,
-0.005336761474609375,
-0.005466461181640625,
-0.015655517578125,
-0.017913818359375,
0.044586181640625,
0.047637939453125,
0.02825927734375,
-0.004512786865234375,
0.01419830322265625,
-0.04656982421875,
0.002841949462890625,
-0.02191162109375,
0.025848388671875,
0.0227203369140625,
-0.005176544189453125,
-0.0174102783203125,
0.0166778564453125,
-0.005828857421875,
-0.0245819091796875,
0.0174407958984375,
0.029541015625,
0.0132293701171875,
-0.004528045654296875,
-0.074462890625,
-0.051513671875,
0.0269927978515625,
-0.006694793701171875,
-0.0301666259765625,
-0.001705169677734375,
0.0283050537109375,
-0.0635986328125,
-0.0186920166015625,
0.037506103515625,
-0.0006842613220214844,
0.004268646240234375,
0.020050048828125,
0.0127105712890625,
0.016448974609375,
-0.029083251953125,
0.01496124267578125,
0.045562744140625,
0.0041961669921875,
-0.0042266845703125,
-0.00487518310546875,
0.022430419921875,
-0.021148681640625,
0.0211334228515625,
-0.0158843994140625,
0.026763916015625,
-0.0096893310546875,
0.01273345947265625,
0.0141143798828125,
0.011322021484375,
0.04864501953125,
0.0103607177734375,
-0.016448974609375,
-0.0018024444580078125,
-0.0511474609375,
0.0149078369140625,
-0.0027027130126953125,
0.041778564453125,
0.01509857177734375,
0.002147674560546875,
-0.0653076171875,
0.0718994140625,
-0.07073974609375,
0.0276031494140625,
-0.0733642578125,
0.0300750732421875,
0.0143280029296875,
-0.0231475830078125,
-0.03448486328125,
-0.03662109375,
-0.044891357421875,
-0.01861572265625,
-0.00125885009765625,
0.02362060546875,
0.033294677734375,
-0.035491943359375,
-0.025970458984375,
0.032318115234375,
0.00937652587890625,
-0.0054931640625,
0.030975341796875,
0.0029201507568359375,
0.0011377334594726562,
0.031829833984375,
0.004558563232421875,
0.0029296875,
-0.0188446044921875,
0.0675048828125,
-0.0199737548828125,
-0.040374755859375,
0.0293426513671875,
0.0203857421875,
0.049407958984375,
-0.01177978515625,
0.0108795166015625,
0.042938232421875,
0.0447998046875,
-0.022125244140625,
0.018157958984375,
-0.0201568603515625,
-0.01226043701171875,
-0.05743408203125,
0.0173187255859375,
-0.041015625,
0.01422119140625,
0.033416748046875,
0.0015735626220703125,
0.011199951171875,
-0.00415802001953125,
-0.0251617431640625,
-0.0008373260498046875,
-0.015350341796875,
0.026641845703125,
0.01201629638671875,
0.0053863525390625,
0.005619049072265625,
0.0199432373046875,
-0.0170745849609375,
-0.03472900390625,
-0.02386474609375,
0.01300048828125,
-0.01363372802734375,
0.06640625,
-0.02496337890625,
0.04034423828125,
-0.037078857421875,
-0.06640625,
-0.0220947265625,
-0.00726318359375,
-0.0028438568115234375,
0.0032958984375,
-0.022613525390625,
-0.0031909942626953125,
0.023773193359375,
-0.001499176025390625,
0.04052734375,
0.038482666015625,
0.0233917236328125,
0.01073455810546875,
-0.053619384765625,
-0.019561767578125,
-0.04498291015625,
-0.04388427734375,
0.004161834716796875,
0.053131103515625,
0.0099639892578125,
0.027252197265625,
0.0008063316345214844,
0.04852294921875,
0.0255279541015625,
0.004833221435546875,
0.02313232421875,
0.00911712646484375,
0.013885498046875,
0.0212249755859375,
-0.0347900390625,
-0.0165557861328125,
0.0267333984375,
-0.055908203125,
0.0147705078125,
0.042999267578125,
-0.01270294189453125,
-0.022796630859375,
0.0090179443359375,
0.01488494873046875,
0.01059722900390625,
0.0264129638671875,
-0.006061553955078125,
0.003505706787109375,
0.037139892578125,
0.01152801513671875,
0.01409149169921875,
0.01491546630859375,
-0.048980712890625,
0.039215087890625,
0.0188751220703125,
-0.047943115234375,
-0.00992584228515625,
0.05194091796875,
0.028228759765625,
0.0014476776123046875,
-0.020050048828125,
-0.0239105224609375,
0.00649261474609375,
0.040985107421875,
-0.0009822845458984375,
0.01039886474609375,
-0.040496826171875,
-0.01029205322265625,
0.02496337890625,
-0.02447509765625,
-0.0071563720703125,
0.03076171875,
0.004425048828125,
0.0019931793212890625,
0.04656982421875,
0.00461578369140625,
-0.00572967529296875,
0.0086212158203125,
-0.0009627342224121094,
-0.034149169921875,
0.062347412109375,
0.0014333724975585938,
0.0106353759765625,
-0.004665374755859375,
0.04229736328125,
0.05029296875,
-0.0025768280029296875,
-0.004695892333984375,
0.01849365234375,
-0.028900146484375,
0.01538848876953125,
0.020721435546875,
0.0110321044921875,
-0.023529052734375,
-0.030487060546875,
0.0008330345153808594,
0.022430419921875,
0.0232696533203125,
-0.0002875328063964844,
-0.039459228515625,
-0.01800537109375,
0.00577545166015625,
-0.1064453125,
-0.10821533203125,
0.0243072509765625,
-0.08251953125,
0.055389404296875,
-0.034332275390625,
-0.031280517578125,
-0.042236328125,
0.0186004638671875,
0.0176849365234375,
-0.031585693359375,
-0.0139923095703125,
0.010711669921875,
-0.0323486328125,
-0.00908660888671875,
0.007587432861328125,
0.004489898681640625,
-0.0129547119140625,
0.01399993896484375,
0.01983642578125,
0.00353240966796875,
-0.055328369140625,
0.0279083251953125,
-0.00159454345703125,
0.01161956787109375,
0.055145263671875,
0.07763671875,
-0.0243682861328125,
-0.005046844482421875,
0.0137939453125,
0.0186920166015625,
0.06402587890625,
-0.0645751953125,
-0.0308380126953125,
-0.0068817138671875,
-0.021697998046875,
-0.0023651123046875,
0.06329345703125,
0.01457977294921875,
-0.03265380859375,
0.01221466064453125,
-0.06304931640625,
0.00563812255859375,
-0.006542205810546875,
-0.0134124755859375,
0.006801605224609375,
-0.00514984130859375,
-0.01490020751953125,
-0.0033931732177734375,
0.0223236083984375,
0.05364990234375,
0.011810302734375,
-0.02081298828125,
0.0092620849609375,
-0.0011949539184570312,
0.0165252685546875,
0.07135009765625,
-0.0224761962890625,
0.08453369140625,
0.021759033203125,
-0.05224609375,
0.0173492431640625,
0.033233642578125,
0.01232147216796875,
-0.0251312255859375,
-0.0447998046875,
-0.031402587890625,
0.037384033203125,
0.00008875131607055664,
0.022369384765625,
-0.03466796875,
-0.0221405029296875,
-0.0166778564453125,
0.040771484375,
-0.022735595703125,
-0.006160736083984375,
-0.028564453125,
0.018157958984375,
-0.048980712890625,
-0.07275390625,
-0.0159149169921875,
0.0108489990234375,
-0.04559326171875,
0.01206207275390625,
-0.0093841552734375,
-0.02618408203125,
-0.020721435546875,
0.015869140625,
-0.036773681640625,
-0.0343017578125,
0.052520751953125,
-0.029541015625,
-0.0143890380859375,
0.01525115966796875,
0.008941650390625,
-0.053558349609375,
-0.027099609375,
-0.0002532005310058594,
-0.10076904296875,
0.00232696533203125,
-0.04473876953125,
0.05218505859375,
0.0146636962890625,
0.01690673828125,
-0.04400634765625,
0.04705810546875,
0.006702423095703125,
-0.0023899078369140625,
0.0022029876708984375,
-0.00030231475830078125,
0.0211944580078125,
-0.00959014892578125,
-0.012603759765625,
-0.0180206298828125,
-0.0013599395751953125,
-0.0223846435546875,
-0.047149658203125,
0.0017251968383789062,
-0.01306915283203125,
0.0024852752685546875,
0.0009431838989257812,
-0.015716552734375,
-0.040771484375,
-0.01224517822265625,
-0.036590576171875,
-0.02850341796875,
-0.016143798828125,
-0.01070404052734375,
-0.00861358642578125,
-0.0294189453125,
0.005840301513671875,
-0.042572021484375,
0.001125335693359375,
0.01293182373046875,
0.03179931640625,
0.019256591796875,
0.007732391357421875,
-0.03125,
0.00246429443359375,
0.007602691650390625,
0.0015325546264648438,
0.03460693359375,
0.0033054351806640625,
-0.0151214599609375,
0.04522705078125,
0.0002472400665283203,
0.0285797119140625,
-0.0050506591796875,
0.06689453125,
0.0169830322265625,
-0.0027618408203125,
0.02001953125,
0.032012939453125,
-0.09423828125,
0.0016832351684570312,
-0.01425933837890625,
0.01035308837890625,
-0.0031642913818359375,
0.010040283203125,
-0.01110076904296875,
0.005107879638671875,
-0.0245361328125,
-0.064453125,
0.0115203857421875,
-0.080322265625,
0.07171630859375,
-0.008270263671875,
0.0011034011840820312,
0.06036376953125,
0.040283203125,
0.01183319091796875,
0.03424072265625,
0.051544189453125,
-0.018890380859375,
0.024444580078125,
0.054931640625,
0.0003819465637207031,
-0.0219879150390625,
0.00807952880859375,
-0.054779052734375,
0.002437591552734375,
-0.01641845703125,
-0.0628662109375,
0.02264404296875,
0.00652313232421875,
-0.0347900390625,
0.01490020751953125,
0.0010385513305664062,
0.048828125,
0.0034618377685546875,
0.01367950439453125,
0.05914306640625,
0.0323486328125,
-0.01195526123046875,
0.0552978515625,
0.021942138671875,
-0.003604888916015625,
-0.0234527587890625,
0.040924072265625,
0.025360107421875,
-0.01263427734375,
-0.005641937255859375,
0.046844482421875,
0.026519775390625,
0.033660888671875,
0.0276947021484375,
-0.031402587890625,
0.0025730133056640625,
0.001613616943359375,
-0.034332275390625,
-0.033111572265625,
0.0176544189453125,
0.007373809814453125,
0.041534423828125,
-0.000545501708984375,
-0.0276947021484375,
0.01448822021484375,
-0.061126708984375,
-0.0273895263671875,
0.00852203369140625,
-0.021636962890625,
-0.02325439453125,
-0.0312042236328125,
-0.0303802490234375,
0.020599365234375,
0.01302337646484375,
0.0049896240234375,
0.050689697265625,
-0.009979248046875,
0.003787994384765625,
0.0287933349609375,
-0.0010004043579101562,
-0.0261077880859375,
-0.01763916015625,
0.0271759033203125,
0.01483154296875,
-0.010528564453125,
-0.050079345703125,
-0.040069580078125,
-0.0055999755859375,
0.0011463165283203125,
0.0350341796875,
0.01103973388671875,
-0.018585205078125,
-0.0367431640625,
0.021026611328125,
-0.06427001953125,
-0.0002505779266357422,
0.0400390625,
-0.007537841796875,
-0.0006861686706542969,
-0.01983642578125,
-0.06524658203125,
-0.03118896484375,
-0.0240936279296875,
-0.0227813720703125,
-0.027496337890625,
0.0019369125366210938,
-0.0037174224853515625,
0.01081085205078125,
-0.01253509521484375,
-0.0001971721649169922,
-0.005107879638671875,
0.0408935546875,
0.01617431640625,
0.0535888671875,
-0.03668212890625,
0.05194091796875,
0.049407958984375,
-0.01214599609375,
0.01415252685546875,
0.03265380859375,
-0.0197906494140625,
-0.006580352783203125,
-0.03277587890625,
-0.051849365234375,
0.0306243896484375,
0.0341796875,
-0.01654052734375,
0.01525115966796875,
0.046234130859375,
0.0245513916015625,
0.04449462890625,
-0.007476806640625,
-0.004642486572265625,
-0.0017528533935546875,
-0.0044097900390625,
0.0162353515625,
0.0279388427734375,
0.071044921875,
-0.0300750732421875,
0.0236663818359375,
0.016357421875,
-0.0126190185546875,
0.006565093994140625,
-0.0316162109375,
0.001377105712890625,
0.04632568359375,
-0.03790283203125,
0.0537109375,
0.0631103515625,
0.006816864013671875,
0.03558349609375,
0.01186370849609375,
-0.003147125244140625,
0.00705718994140625,
0.01506805419921875,
0.00536346435546875,
-0.049560546875,
0.01837158203125,
-0.0193939208984375,
-0.0150299072265625,
-0.0020389556884765625,
-0.01812744140625,
0.0190887451171875,
0.031524658203125,
0.05572509765625,
-0.032989501953125,
-0.01261138916015625,
-0.0007100105285644531,
-0.03985595703125,
0.0086669921875,
-0.033538818359375,
-0.0056610107421875,
-0.03582763671875,
0.05242919921875,
0.0266265869140625,
-0.0268402099609375,
0.01302337646484375,
0.01100921630859375,
-0.005771636962890625,
0.004913330078125,
0.02777099609375,
0.0237579345703125,
-0.0099334716796875,
-0.0158843994140625,
0.0006127357482910156,
-0.01059722900390625,
0.0012636184692382812,
0.00994873046875,
-0.021484375,
-0.00794219970703125,
-0.0257720947265625,
0.00887298583984375,
-0.042022705078125,
-0.0007567405700683594,
-0.01541900634765625,
0.011016845703125,
0.0386962890625,
0.043670654296875,
0.001995086669921875,
-0.016876220703125,
0.0200347900390625,
0.03570556640625,
-0.0023479461669921875,
-0.0328369140625,
0.003204345703125,
0.00682830810546875,
-0.054046630859375,
0.00414276123046875,
-0.029876708984375,
-0.00951385498046875,
0.014373779296875,
0.0161590576171875,
0.0426025390625,
-0.055084228515625,
-0.00754547119140625,
0.0252838134765625,
0.0198822021484375,
0.017974853515625,
0.0004892349243164062,
0.0157470703125,
-0.06414794921875,
-0.0183563232421875,
0.011688232421875,
-0.04559326171875,
-0.03424072265625,
-0.00885772705078125,
-0.03656005859375,
0.1029052734375,
-0.02587890625,
0.028167724609375,
0.033782958984375,
0.039306640625,
-0.006984710693359375,
0.03167724609375,
-0.033477783203125,
0.021636962890625,
-0.032440185546875,
-0.0093536376953125,
-0.07122802734375,
0.009796142578125,
-0.02886962890625,
0.0330810546875,
0.0009698867797851562,
-0.013702392578125,
0.0029392242431640625,
-0.0207977294921875,
0.0304412841796875,
0.08343505859375,
0.039794921875,
-0.0194091796875,
0.0289306640625,
0.01483154296875,
-0.01296234130859375,
-0.007293701171875,
0.013031005859375,
-0.01503753662109375,
-0.01654052734375,
0.0687255859375,
0.0247344970703125,
0.024169921875,
-0.0027523040771484375,
-0.00920867919921875,
-0.043182373046875,
0.0152435302734375,
0.0183258056640625,
0.0182342529296875,
-0.035491943359375,
0.076904296875,
-0.002185821533203125,
0.013580322265625,
-0.03564453125,
-0.023284912109375,
0.00833892822265625,
-0.0238800048828125,
-0.0136566162109375,
-0.029388427734375,
-0.00608062744140625,
-0.01189422607421875,
-0.023223876953125,
-0.038055419921875,
0.0156707763671875,
-0.01229095458984375,
0.0286865234375,
0.0003178119659423828,
0.00768280029296875,
-0.0421142578125,
-0.01214599609375,
0.05047607421875,
0.045440673828125,
-0.0310516357421875,
-0.00766754150390625,
0.017486572265625,
0.013427734375,
-0.035186767578125,
-0.01486968994140625,
-0.007694244384765625,
-0.00513458251953125,
0.034423828125,
-0.006023406982421875,
-0.016845703125,
-0.0007100105285644531,
0.0047454833984375,
0.007843017578125,
0.0216522216796875,
-0.0010118484497070312,
-0.0007920265197753906,
-0.0482177734375,
0.01007080078125,
0.0095672607421875,
0.0482177734375,
0.01448822021484375,
0.0311737060546875,
-0.03228759765625,
-0.0283966064453125,
-0.00350189208984375,
0.040679931640625,
-0.030487060546875,
0.020660400390625,
-0.053070068359375,
-0.05511474609375,
0.007404327392578125,
0.04461669921875,
0.0650634765625,
0.04547119140625,
0.05010986328125,
0.014617919921875,
0.034759521484375,
0.038543701171875,
0.0679931640625,
0.0087127685546875,
-0.0279541015625,
-0.00746917724609375,
0.025543212890625,
0.0265045166015625,
0.003536224365234375,
0.020751953125,
0.05535888671875,
0.018890380859375,
-0.049407958984375,
0.0482177734375,
-0.0149383544921875,
-0.0611572265625,
0.01727294921875,
-0.0108184814453125,
0.1436767578125,
-0.0267791748046875,
-0.00948333740234375,
0.012542724609375,
-0.0400390625,
-0.025909423828125,
0.0189208984375,
0.0321044921875,
-0.0235748291015625,
0.045501708984375,
-0.01020050048828125,
-0.023712158203125,
-0.002384185791015625,
0.00628662109375,
0.0274505615234375,
-0.01000213623046875,
-0.0007433891296386719,
-0.00212860107421875,
-0.00688934326171875,
0.01459503173828125,
0.004180908203125,
-0.0013704299926757812,
0.01373291015625,
0.048431396484375,
-0.0164947509765625,
0.011444091796875,
0.027099609375,
0.02191162109375,
-0.00478363037109375,
0.0228271484375,
0.0042877197265625,
-0.015167236328125,
0.01171875,
-0.0168304443359375,
-0.00836181640625,
0.04443359375,
-0.0131683349609375,
-0.008026123046875,
-0.0070648193359375,
-0.00025916099548339844,
0.00140380859375,
0.06268310546875,
0.013824462890625,
-0.0290069580078125,
-0.031219482421875,
-0.024078369140625,
0.0063934326171875,
0.027099609375,
0.02813720703125,
-0.00962066650390625,
0.006404876708984375,
-0.0312347412109375,
-0.03790283203125,
0.01287078857421875,
-0.0161590576171875,
0.007457733154296875,
0.02362060546875,
-0.0042572021484375,
-0.0233306884765625,
-0.00943756103515625,
-0.0084228515625,
-0.00690460205078125,
0.0250701904296875,
-0.0061798095703125,
0.00616455078125,
0.0030117034912109375,
-0.007625579833984375,
0.024749755859375,
0.0151824951171875,
-0.033905029296875,
0.0047454833984375,
0.035400390625,
-0.02301025390625,
-0.004573822021484375,
-0.057830810546875,
-0.0198974609375,
-0.0286102294921875,
0.0145111083984375,
0.046905517578125,
0.00395965576171875,
0.001781463623046875,
-0.03497314453125,
0.0103912353515625,
-0.01244354248046875,
0.0016651153564453125,
-0.07867431640625,
0.04827880859375,
-0.030487060546875,
0.027099609375,
-0.057647705078125,
0.0465087890625,
-0.03411865234375,
-0.0009775161743164062,
-0.05145263671875,
-0.06646728515625,
-0.0304718017578125,
0.074951171875,
-0.0297698974609375,
0.024688720703125,
0.016998291015625,
-0.0075531005859375,
-0.025848388671875,
0.04620361328125,
0.0207366943359375,
0.10015869140625,
0.00928497314453125,
-0.03155517578125,
0.00008851289749145508,
0.00847625732421875,
-0.006855010986328125,
-0.0284881591796875,
-0.01221466064453125,
-0.0303802490234375,
0.0131072998046875,
-0.020751953125,
0.0280914306640625,
0.024810791015625,
-0.035797119140625,
-0.0965576171875,
0.0037136077880859375,
-0.01377105712890625,
-0.046234130859375,
-0.031463623046875,
0.04119873046875,
0.0111083984375,
-0.00518798828125,
-0.01331329345703125,
-0.017242431640625,
-0.006511688232421875,
-0.0101470947265625,
-0.0063018798828125,
0.0034942626953125,
0.01080322265625,
-0.0136566162109375,
-0.070556640625,
-0.006481170654296875,
0.0030727386474609375,
-0.0012273788452148438,
0.00928497314453125,
-0.008026123046875,
0.039794921875,
0.045745849609375,
-0.00960540771484375,
0.0118255615234375,
0.005260467529296875,
-0.01287078857421875,
-0.016265869140625,
0.0126800537109375,
-0.05340576171875,
-0.003963470458984375,
0.079833984375,
0.09356689453125,
0.024383544921875,
-0.0258331298828125,
-0.0022830963134765625,
-0.027679443359375,
-0.007488250732421875,
-0.006145477294921875,
0.0218505859375,
-0.052703857421875,
-0.006008148193359375,
0.0269012451171875,
-0.0045166015625,
-0.033203125,
-0.00298309326171875,
-0.0333251953125,
-0.01285552978515625,
0.0093231201171875,
0.0006804466247558594,
-0.0021152496337890625,
-0.0237884521484375,
0.141357421875,
-0.0699462890625,
-0.0055084228515625,
0.04974365234375,
0.0161895751953125,
0.080322265625,
0.03009033203125,
-0.00237274169921875,
0.04815673828125,
-0.05126953125,
-0.0007557868957519531,
0.0157928466796875,
0.02728271484375,
-0.0219268798828125,
-0.0004630088806152344,
0.016204833984375,
0.01428985595703125,
-0.03802490234375,
0.0100555419921875,
0.03448486328125,
0.056854248046875,
-0.0270538330078125,
0.05267333984375,
-0.05462646484375,
0.0305328369140625,
-0.027252197265625,
0.00203704833984375,
0.01015472412109375,
0.0292816162109375,
0.093505859375,
-0.0161895751953125,
0.0082550048828125,
0.01477813720703125,
-0.04180908203125,
0.00004488229751586914,
-0.0249786376953125,
-0.039398193359375,
-0.0273284912109375,
-0.0029697418212890625
]
|
870826f9adcf6ae8c2bfed119ff6c462a27b7bdc | Wordpress Stackexchange
Q: Different customizer previewUrls per section For example if there is a Customizer section that focuses on Woocommerce options, I'd like the user to be on the shop page for that, to see all these changes, live.
I can do http://127.0.0.1/wp-admin/customize.php?url=http://127.0.0.1/shop&autofocus[section]=woocommerce as a link in the admin panel, which will put customizer on that URL, with the relevant section open, but that's not ideal.
I would like the customizer to automatically navigate to the specified url when the user clicks on any section.
Is there any way to have onSectionClick event and then set previewUrl to something?
A: You could use active_callback property to delegate section visibility depending on current preview screen.
$wp_customize->add_section( 'my-section',
array(
'title' => __( 'Section Title' ),
'active_callback' => 'is_shop',
) );
Or custom
$wp_customize->add_section( 'my-section',
array(
'title' => __( 'Section Title' ),
'active_callback' => 'is_custom_condition',
) );
function is_custom_condition(){
$condition_is_met = //Some boolean returning logic;
if( ! $condition_is_met ){
return false;
}
return true;
}
| Q: Different customizer previewUrls per section For example if there is a Customizer section that focuses on Woocommerce options, I'd like the user to be on the shop page for that, to see all these changes, live.
I can do http://127.0.0.1/wp-admin/customize.php?url=http://127.0.0.1/shop&autofocus[section]=woocommerce as a link in the admin panel, which will put customizer on that URL, with the relevant section open, but that's not ideal.
I would like the customizer to automatically navigate to the specified url when the user clicks on any section.
Is there any way to have onSectionClick event and then set previewUrl to something?
A: You could use active_callback property to delegate section visibility depending on current preview screen.
$wp_customize->add_section( 'my-section',
array(
'title' => __( 'Section Title' ),
'active_callback' => 'is_shop',
) );
Or custom
$wp_customize->add_section( 'my-section',
array(
'title' => __( 'Section Title' ),
'active_callback' => 'is_custom_condition',
) );
function is_custom_condition(){
$condition_is_met = //Some boolean returning logic;
if( ! $condition_is_met ){
return false;
}
return true;
}
| wordpress | {
"language": "en",
"length": 160,
"provenance": "stackexchange_00019.jsonl.gz:465424",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226529"
} | [
0.055816650390625,
0.0176849365234375,
0.01351165771484375,
-0.0986328125,
0.031707763671875,
-0.0015010833740234375,
-0.03790283203125,
-0.021575927734375,
-0.0144195556640625,
0.00775909423828125,
-0.0206146240234375,
0.004825592041015625,
-0.054290771484375,
-0.0160369873046875,
-0.007236480712890625,
-0.052734375,
0.03326416015625,
-0.0023021697998046875,
0.0259552001953125,
0.0043792724609375,
-0.01605224609375,
0.028717041015625,
0.017303466796875,
0.0296630859375,
0.025360107421875,
-0.013824462890625,
0.05010986328125,
-0.0029392242431640625,
0.032806396484375,
0.01397705078125,
0.03192138671875,
-0.058624267578125,
0.0278472900390625,
0.017242431640625,
0.0019092559814453125,
0.006000518798828125,
0.04052734375,
-0.017791748046875,
-0.00002777576446533203,
0.050567626953125,
0.02447509765625,
0.00028204917907714844,
-0.0271148681640625,
0.04156494140625,
-0.0382080078125,
-0.050750732421875,
0.01514434814453125,
-0.0380859375,
0.024505615234375,
0.005535125732421875,
0.007228851318359375,
0.005950927734375,
0.00521087646484375,
-0.0244903564453125,
-0.018463134765625,
0.004852294921875,
-0.046356201171875,
0.007236480712890625,
0.01221466064453125,
0.017333984375,
0.0113677978515625,
-0.0110626220703125,
-0.003673553466796875,
-0.01110076904296875,
-0.004253387451171875,
-0.00043964385986328125,
0.0029735565185546875,
0.0355224609375,
-0.0028858184814453125,
-0.025726318359375,
0.00768280029296875,
-0.0024585723876953125,
-0.0024967193603515625,
0.018768310546875,
-0.0458984375,
-0.037506103515625,
0.01107025146484375,
-0.0226593017578125,
0.022186279296875,
0.004138946533203125,
0.025421142578125,
-0.004665374755859375,
0.03851318359375,
-0.0275115966796875,
0.033477783203125,
-0.019012451171875,
-0.0057373046875,
-0.00530242919921875,
0.0372314453125,
-0.0311431884765625,
-0.005344390869140625,
0.00319671630859375,
0.0188751220703125,
0.00975799560546875,
-0.0274658203125,
-0.047821044921875,
0.0113372802734375,
0.03753662109375,
0.0233001708984375,
0.046356201171875,
0.021514892578125,
-0.0645751953125,
0.06988525390625,
-0.059539794921875,
-0.01377105712890625,
0.04022216796875,
0.0310516357421875,
0.049285888671875,
0.0372314453125,
0.0007901191711425781,
0.01157379150390625,
0.00792694091796875,
-0.0034961700439453125,
0.0008625984191894531,
-0.00601959228515625,
-0.045867919921875,
-0.0648193359375,
-0.01904296875,
-0.0272674560546875,
-0.056549072265625,
-0.0007801055908203125,
0.0163116455078125,
0.0240631103515625,
-0.00153350830078125,
-0.0159759521484375,
0.00594329833984375,
-0.016448974609375,
-0.04339599609375,
-0.0194549560546875,
0.00449371337890625,
-0.0136260986328125,
-0.000003635883331298828,
0.049652099609375,
0.0623779296875,
0.028594970703125,
-0.005535125732421875,
0.0261688232421875,
0.0279541015625,
0.0119171142578125,
-0.01030731201171875,
0.0130462646484375,
0.0119781494140625,
-0.00556182861328125,
-0.026153564453125,
-0.0009870529174804688,
0.0213470458984375,
0.01427459716796875,
-0.00308990478515625,
-0.001194000244140625,
-0.055267333984375,
0.024871826171875,
-0.0284271240234375,
0.035247802734375,
0.0111541748046875,
0.0009565353393554688,
-0.00047516822814941406,
0.052001953125,
-0.008819580078125,
-0.0278472900390625,
-0.0294189453125,
0.03228759765625,
0.0029201507568359375,
-0.01983642578125,
-0.04144287109375,
-0.0653076171875,
-0.0158538818359375,
-0.03912353515625,
0.0006608963012695312,
0.02484130859375,
0.058624267578125,
-0.03369140625,
0.019500732421875,
0.023529052734375,
0.040130615234375,
-0.0035343170166015625,
0.0128326416015625,
0.00279998779296875,
0.043121337890625,
0.002475738525390625,
0.0294189453125,
-0.00308990478515625,
-0.0235137939453125,
0.058197021484375,
-0.020416259765625,
-0.03887939453125,
0.04583740234375,
-0.009857177734375,
0.046722412109375,
0.042236328125,
0.0211334228515625,
0.0172271728515625,
0.01377105712890625,
-0.04595947265625,
0.0029926300048828125,
-0.049560546875,
-0.024017333984375,
0.034454345703125,
0.02044677734375,
-0.0286407470703125,
0.045562744140625,
-0.016632080078125,
-0.0292510986328125,
0.0266571044921875,
-0.031951904296875,
-0.014434814453125,
-0.0035533905029296875,
-0.0210418701171875,
0.0445556640625,
0.0110931396484375,
0.0309600830078125,
0.0019817352294921875,
0.0224761962890625,
-0.03167724609375,
0.01479339599609375,
-0.0022182464599609375,
-0.0025157928466796875,
-0.0294189453125,
0.09027099609375,
-0.003940582275390625,
0.053497314453125,
0.0023899078369140625,
-0.0269317626953125,
0.01087188720703125,
-0.0161285400390625,
0.04827880859375,
0.0251007080078125,
0.0034389495849609375,
-0.002803802490234375,
0.07171630859375,
0.035247802734375,
0.0120086669921875,
-0.005947113037109375,
0.060028076171875,
-0.0004343986511230469,
-0.05029296875,
-0.003383636474609375,
-0.0008730888366699219,
-0.0819091796875,
-0.00003266334533691406,
0.07525634765625,
0.033599853515625,
0.005550384521484375,
-0.00089263916015625,
0.0057373046875,
0.097412109375,
0.047760009765625,
0.0229034423828125,
-0.0207061767578125,
-0.0052032470703125,
0.00846099853515625,
-0.0166473388671875,
0.0259246826171875,
0.04278564453125,
-0.007080078125,
0.037353515625,
0.044830322265625,
-0.01947021484375,
-0.030059814453125,
-0.0185699462890625,
0.004154205322265625,
0.009552001953125,
0.040130615234375,
0.0174407958984375,
0.007785797119140625,
0.038787841796875,
0.0115509033203125,
0.043243408203125,
0.0166473388671875,
-0.006687164306640625,
0.0020809173583984375,
0.001186370849609375,
-0.037811279296875,
0.00907135009765625,
-0.006198883056640625,
0.04522705078125,
-0.00772857666015625,
-0.0216064453125,
-0.0067291259765625,
0.022918701171875,
-0.006000518798828125,
-0.010406494140625,
0.06988525390625,
-0.027313232421875,
-0.0305938720703125,
-0.01390838623046875,
-0.04107666015625,
-0.039947509765625,
-0.026336669921875,
-0.0020618438720703125,
-0.021148681640625,
0.039215087890625,
-0.00154876708984375,
-0.043731689453125,
0.04296875,
-0.0164337158203125,
-0.0379638671875,
0.025787353515625,
-0.0333251953125,
0.040313720703125,
-0.030517578125,
0.035400390625,
0.06341552734375,
-0.007213592529296875,
0.01001739501953125,
0.01409912109375,
-0.03375244140625,
0.01364898681640625,
0.005420684814453125,
-0.005565643310546875,
-0.006496429443359375,
-0.06866455078125,
0.0134124755859375,
0.0236968994140625,
0.0693359375,
-0.0113372802734375,
-0.0264892578125,
0.007442474365234375,
0.03076171875,
-0.0146484375,
-0.049652099609375,
-0.00150299072265625,
-0.0399169921875,
0.01641845703125,
-0.025177001953125,
-0.01055145263671875,
-0.012481689453125,
-0.0169830322265625,
0.0015840530395507812,
-0.0533447265625,
-0.0273590087890625,
-0.033721923828125,
-0.0716552734375,
-0.03985595703125,
0.0243377685546875,
0.003543853759765625,
0.01105499267578125,
-0.00608062744140625,
0.04638671875,
-0.0048828125,
-0.0157012939453125,
0.00878143310546875,
0.0067596435546875,
0.03009033203125,
0.009674072265625,
-0.01226043701171875,
0.0118560791015625,
0.0364990234375,
0.00960540771484375,
0.03033447265625,
0.0269012451171875,
-0.0257110595703125,
-0.016998291015625,
-0.0193634033203125,
0.049713134765625,
0.0099029541015625,
0.01273345947265625,
0.046905517578125,
0.0523681640625,
-0.013397216796875,
-0.020477294921875,
-0.03521728515625,
0.0001552104949951172,
-0.0628662109375,
0.012054443359375,
0.04833984375,
-0.036041259765625,
0.0013589859008789062,
-0.0204620361328125,
0.01355743408203125,
-0.006465911865234375,
0.002452850341796875,
-0.025421142578125,
0.038482666015625,
0.0178375244140625,
0.037384033203125,
-0.01047515869140625,
0.051055908203125,
-0.0015516281127929688,
0.03509521484375,
0.0299835205078125,
0.022491455078125,
0.015167236328125,
-0.03411865234375,
-0.05780029296875,
-0.0243072509765625,
0.0251312255859375,
-0.0192718505859375,
0.06793212890625,
-0.039825439453125,
-0.0208282470703125,
-0.0183868408203125,
0.10260009765625,
-0.06854248046875,
-0.0068511962890625,
0.0026149749755859375,
0.01739501953125,
-0.002254486083984375,
-0.0007143020629882812,
-0.04913330078125,
-0.004177093505859375,
-0.09405517578125,
0.01291656494140625,
-0.0170135498046875,
-0.03900146484375,
-0.0154266357421875,
-0.032928466796875,
-0.06756591796875,
-0.052398681640625,
0.009368896484375,
-0.01202392578125,
-0.00644683837890625,
0.0382080078125,
-0.00879669189453125,
0.0212249755859375,
0.021484375,
-0.049530029296875,
-0.050628662109375,
-0.0084381103515625,
0.0283355712890625,
0.018463134765625,
0.0010519027709960938,
-0.0231170654296875,
-0.021728515625,
0.03765869140625,
0.04290771484375,
0.0382080078125,
0.005992889404296875,
-0.01346588134765625,
-0.01055908203125,
-0.004764556884765625,
0.0171966552734375,
-0.0257568359375,
0.0140228271484375,
0.002048492431640625,
-0.07525634765625,
0.00757598876953125,
-0.005519866943359375,
0.031036376953125,
0.054290771484375,
-0.048614501953125,
-0.0858154296875,
-0.0022983551025390625,
0.0017595291137695312,
-0.0218353271484375,
-0.0193939208984375,
-0.01401519775390625,
0.022705078125,
-0.0770263671875,
-0.033477783203125,
-0.06866455078125,
-0.0032482147216796875,
0.01702880859375,
0.01275634765625,
0.039947509765625,
0.025909423828125,
0.0950927734375,
0.0038299560546875,
0.043212890625,
0.01416015625,
0.0066070556640625,
0.0108795166015625,
-0.0361328125,
0.0251922607421875,
0.0267333984375,
0.0099945068359375,
0.0159149169921875,
0.0166473388671875,
-0.01495361328125,
-0.0450439453125,
0.027252197265625,
-0.021087646484375,
-0.0229949951171875,
0.050201416015625,
-0.0084381103515625,
-0.0220794677734375,
-0.0294189453125,
0.036468505859375,
-0.0269622802734375,
0.00836944580078125,
-0.0311737060546875,
0.022796630859375,
-0.0022449493408203125,
0.068603515625,
0.049652099609375,
0.0214080810546875,
0.00606536865234375,
-0.005023956298828125,
-0.00762176513671875,
0.01885986328125,
-0.0169219970703125,
-0.01776123046875,
-0.028900146484375,
0.0007123947143554688,
0.025238037109375,
0.01282501220703125,
0.006015777587890625,
0.01104736328125,
0.00836944580078125,
-0.0291290283203125,
-0.048614501953125,
-0.0289154052734375,
-0.00632476806640625,
0.005619049072265625,
0.010894775390625,
0.0016231536865234375,
0.04144287109375,
-0.0256500244140625,
-0.0355224609375,
-0.00439453125,
-0.0292816162109375,
-0.0159912109375,
-0.05401611328125,
0.04364013671875,
-0.002735137939453125,
-0.003063201904296875,
-0.01221466064453125,
0.045745849609375,
0.046905517578125,
-0.015960693359375,
-0.01959228515625,
0.0007500648498535156,
0.04693603515625,
0.000461578369140625,
0.018280029296875,
0.0240936279296875,
-0.01235198974609375,
-0.0248260498046875,
0.051300048828125,
-0.005008697509765625,
-0.0165557861328125,
-0.0020580291748046875,
0.01244354248046875,
-0.0175018310546875,
0.0098876953125,
0.02520751953125,
0.01108551025390625,
-0.043487548828125,
0.028717041015625,
0.042938232421875,
-0.038726806640625,
-0.010986328125,
0.03704833984375,
0.01428985595703125,
0.0177764892578125,
-0.0218048095703125,
-0.01445770263671875,
-0.04656982421875,
-0.01544952392578125,
-0.01175689697265625,
-0.04412841796875,
0.01224517822265625,
0.0027332305908203125,
-0.028350830078125,
-0.001277923583984375,
0.03045654296875,
-0.09197998046875,
-0.01511383056640625,
-0.00713348388671875,
-0.0311126708984375,
0.0235137939453125,
-0.028564453125,
0.039093017578125,
-0.0345458984375,
-0.021514892578125,
-0.0596923828125,
0.0290069580078125,
0.02349853515625,
0.0200958251953125,
-0.03570556640625,
0.0018520355224609375,
-0.050262451171875,
-0.023681640625,
-0.0889892578125,
-0.069091796875,
-0.055145263671875,
-0.0005826950073242188,
0.03192138671875,
0.0183258056640625,
0.01104736328125,
-0.006351470947265625,
-0.032562255859375,
0.0380859375,
0.04132080078125,
0.08245849609375,
0.0013885498046875,
0.025146484375,
0.028564453125,
0.0885009765625,
0.02252197265625,
-0.036834716796875,
-0.023284912109375,
-0.0273895263671875,
-0.0002713203430175781,
-0.0085601806640625,
-0.0233612060546875,
-0.05169677734375,
0.0056610107421875,
0.048370361328125,
0.0693359375,
-0.01013946533203125,
0.0108184814453125,
-0.0174713134765625,
-0.002330780029296875,
-0.0165252685546875,
0.0010747909545898438,
-0.0277252197265625,
-0.004070281982421875,
-0.00864410400390625,
-0.005931854248046875,
0.0297698974609375,
-0.006000518798828125,
-0.0087127685546875,
0.005802154541015625,
-0.01983642578125,
0.0237274169921875,
-0.0034351348876953125,
-0.097412109375,
0.061126708984375,
0.060455322265625,
0.032379150390625,
0.05462646484375,
-0.036712646484375,
0.032806396484375,
0.03729248046875,
-0.0011653900146484375,
0.0303955078125,
0.0130157470703125,
0.030181884765625,
-0.01351165771484375,
-0.0010280609130859375,
0.006717681884765625,
-0.0055694580078125,
0.0002779960632324219,
0.04083251953125,
0.05157470703125,
-0.09820556640625,
-0.00017178058624267578,
-0.005855560302734375,
0.019195556640625,
0.02459716796875,
-0.0022106170654296875,
0.005687713623046875,
0.0200042724609375,
0.025360107421875,
-0.0007452964782714844,
-0.018890380859375,
0.034820556640625,
0.0023288726806640625,
0.01551055908203125,
0.0003199577331542969,
0.035614013671875,
-0.019134521484375,
-0.0180511474609375,
-0.05120849609375,
0.0020294189453125,
-0.045074462890625,
-0.0283966064453125,
-0.01241302490234375,
0.01174163818359375,
-0.0242767333984375,
-0.050262451171875,
0.0089874267578125,
-0.0220489501953125,
0.0184783935546875,
0.020751953125,
0.0185089111328125,
0.039093017578125,
0.059112548828125,
-0.0227508544921875,
0.034576416015625,
0.0033168792724609375,
0.058135986328125,
-0.0148162841796875,
-0.0005841255187988281,
0.0164794921875,
0.046844482421875,
-0.09136962890625,
0.0197906494140625,
-0.05596923828125,
0.0191650390625,
0.0036144256591796875,
0.0313720703125,
0.059814453125,
-0.037933349609375,
-0.020965576171875,
0.034027099609375,
-0.00635528564453125,
-0.0167083740234375,
-0.030029296875,
0.041107177734375,
-0.06793212890625,
-0.0377197265625,
-0.0023708343505859375,
-0.028045654296875,
-0.0271759033203125,
-0.0220184326171875,
-0.06903076171875,
0.03173828125,
-0.0180206298828125,
0.04888916015625,
0.00890350341796875,
-0.0001138448715209961,
0.0106201171875,
-0.0105743408203125,
-0.017333984375,
0.0251617431640625,
0.04547119140625,
0.03546142578125,
0.019561767578125,
-0.0021038055419921875,
0.039764404296875,
0.028900146484375,
0.00743865966796875,
0.0149383544921875,
0.00530242919921875,
0.03216552734375,
0.029266357421875,
0.0174713134765625,
-0.01378631591796875,
0.017181396484375,
-0.01016998291015625,
-0.018524169921875,
0.035430908203125,
-0.0166168212890625,
0.017669677734375,
0.021270751953125,
-0.0027904510498046875,
0.01474761962890625,
-0.01148223876953125,
0.0024471282958984375,
0.0019435882568359375,
0.06451416015625,
-0.056396484375,
0.0025157928466796875,
0.059844970703125,
-0.019989013671875,
-0.033172607421875,
0.0015840530395507812,
0.0094757080078125,
-0.0295867919921875,
0.0234375,
-0.037689208984375,
0.044586181640625,
0.0391845703125,
0.0267333984375,
-0.0255889892578125,
0.00435638427734375,
-0.01337432861328125,
-0.01123046875,
-0.003032684326171875,
0.040863037109375,
-0.05352783203125,
0.0261993408203125,
0.04534912109375,
0.025665283203125,
0.03875732421875,
0.044281005859375,
-0.0026531219482421875,
0.02691650390625,
-0.0252685546875,
-0.049285888671875,
0.009002685546875,
-0.006786346435546875,
0.006053924560546875,
0.018524169921875,
0.007411956787109375,
-0.01134490966796875,
0.0016870498657226562,
-0.07623291015625,
0.034210205078125,
0.055328369140625,
0.0293121337890625,
-0.0148162841796875,
0.022674560546875,
-0.084228515625,
0.01183319091796875,
-0.03546142578125,
0.006168365478515625,
-0.0228424072265625,
0.050323486328125,
0.03955078125,
0.041259765625,
-0.020416259765625,
-0.035888671875,
0.00032401084899902344,
0.0157470703125,
0.00406646728515625,
-0.0099029541015625,
-0.028045654296875,
-0.053680419921875,
0.01366424560546875,
0.03851318359375,
-0.00922393798828125,
-0.0008640289306640625,
-0.012725830078125,
0.0291595458984375,
0.0400390625,
-0.0006699562072753906,
0.0221099853515625,
0.0011844635009765625,
0.041015625,
-0.044647216796875,
0.0202484130859375,
-0.01255035400390625,
-0.007411956787109375,
-0.00628662109375,
-0.0162200927734375,
0.048492431640625,
-0.019195556640625,
0.0016145706176757812,
-0.0015039443969726562,
-0.036773681640625,
0.020660400390625,
0.03509521484375,
0.0570068359375,
0.0205078125,
-0.0088348388671875,
0.011810302734375,
-0.01337432861328125,
-0.060577392578125,
-0.01335906982421875,
0.0277252197265625,
-0.0382080078125,
0.054443359375,
0.0007734298706054688,
0.01020050048828125,
-0.0046234130859375,
-0.0203704833984375,
-0.0099334716796875,
-0.026092529296875,
0.022918701171875,
-0.01523590087890625,
-0.042083740234375,
-0.0189971923828125,
-0.027557373046875,
0.0098724365234375,
-0.003353118896484375,
0.062469482421875,
-0.00928497314453125,
0.03216552734375,
-0.0051422119140625,
-0.0235443115234375,
-0.006656646728515625,
-0.0249786376953125,
0.048858642578125,
-0.0145416259765625,
-0.029022216796875,
-0.0151519775390625,
0.002490997314453125,
-0.01145172119140625,
0.037750244140625,
-0.045257568359375,
-0.01416015625,
-0.0196990966796875,
0.026641845703125,
0.001110076904296875,
0.0025691986083984375,
-0.039276123046875,
-0.0426025390625,
-0.055023193359375,
-0.013641357421875,
0.0190582275390625,
-0.01212310791015625,
-0.008056640625,
0.004680633544921875,
0.0285186767578125,
-0.018035888671875,
0.027557373046875,
-0.01331329345703125,
0.04583740234375,
0.037322998046875,
0.004108428955078125,
0.046051025390625,
-0.01380157470703125,
-0.015625,
-0.00077056884765625,
0.035858154296875,
-0.07391357421875,
-0.00832366943359375,
0.0188140869140625,
0.0251007080078125,
0.057586669921875,
0.034423828125,
-0.04046630859375,
0.0161285400390625,
0.060150146484375,
-0.0012140274047851562,
0.014739990234375,
-0.035247802734375,
-0.0169219970703125,
-0.0166168212890625,
0.0115509033203125,
0.0202484130859375,
0.0230560302734375,
0.00495147705078125,
-0.0219879150390625,
0.027618408203125,
0.037567138671875,
-0.0254364013671875,
-0.0121002197265625,
0.0105133056640625,
-0.05682373046875,
0.053253173828125,
-0.0139007568359375,
0.0157623291015625,
-0.006191253662109375,
0.00775146484375,
-0.0162811279296875,
-0.0018854141235351562,
-0.034912109375,
0.0182952880859375,
-0.0099639892578125,
-0.0007944107055664062,
0.0400390625,
-0.01230621337890625,
-0.07928466796875,
-0.01861572265625,
-0.0122222900390625,
0.0250396728515625,
0.01153564453125,
-0.035125732421875,
0.005992889404296875,
-0.0038166046142578125,
0.023468017578125,
-0.007232666015625,
-0.0292205810546875,
0.0283203125,
-0.002964019775390625,
-0.00891876220703125,
-0.007678985595703125,
0.01398468017578125,
-0.0208892822265625,
-0.050750732421875,
0.02056884765625,
-0.004230499267578125,
-0.034912109375,
-0.0350341796875,
0.0227508544921875,
-0.0176239013671875,
0.0219268798828125,
-0.019073486328125,
-0.0035800933837890625,
-0.01409912109375,
0.01023101806640625,
0.0001747608184814453,
0.0009350776672363281,
0.005825042724609375,
0.02117919921875,
-0.0266571044921875,
0.0389404296875,
0.0205230712890625,
-0.023651123046875,
0.022125244140625,
-0.018585205078125,
-0.0009417533874511719,
-0.004367828369140625,
-0.0469970703125,
-0.0806884765625,
-0.008514404296875,
0.01314544677734375,
0.035369873046875,
-0.01085662841796875,
-0.033782958984375,
-0.0264892578125,
0.01019287109375,
0.0212554931640625,
0.00820159912109375,
-0.0035800933837890625,
0.00002199411392211914,
0.0009236335754394531,
-0.043670654296875,
0.01468658447265625,
0.0294647216796875,
-0.041595458984375,
0.00156402587890625,
0.028045654296875,
-0.0167999267578125,
0.006595611572265625,
0.030548095703125,
-0.04052734375,
-0.00897216796875,
0.0013227462768554688,
-0.0130767822265625,
-0.08544921875,
0.0022945404052734375,
0.0157623291015625,
-0.035308837890625,
-0.035919189453125,
0.0134735107421875,
0.01336669921875,
-0.0261383056640625,
-0.005054473876953125,
0.024871826171875,
0.036865234375,
-0.061737060546875,
-0.0175018310546875,
0.0185394287109375,
0.04888916015625,
-0.03314208984375,
-0.0232696533203125,
-0.036376953125,
0.010650634765625,
-0.013580322265625,
-0.0159759521484375,
-0.0015153884887695312,
0.0178375244140625,
0.0071258544921875,
0.0775146484375,
0.0036296844482421875,
0.0703125,
0.0110015869140625,
0.04644775390625,
0.0189361572265625,
-0.0275726318359375,
0.059326171875,
-0.063720703125,
-0.006427764892578125,
-0.0242767333984375,
-0.025054931640625,
-0.0711669921875,
0.005321502685546875,
-0.019744873046875,
-0.004486083984375,
0.016845703125
]
|
26a5c7a5230955c01f32a12c08ea1943437d097f | Wordpress Stackexchange
Q: Object gets unwanted width and height Is it possible to stop WordPress adding a width and height to an object when you pate it in to the source view?
When I paste in
<a href="#"><object data="grid-linked-in.svg" type="image/svg+xml"></object></a>
WP changes it to
<a href="#"><object width="300" height="150" type="image/svg+xml" data="grid-linked-in.svg"></object></a>
A: You can try this:
add_filter( 'media_send_to_editor', 'remove_width_height_attribute', 10 );
function remove_width_height_attribute( $html ) {
$html = preg_replace( '/(width|height)="\d*"\s/', "", $html );
return $html;
}
| Q: Object gets unwanted width and height Is it possible to stop WordPress adding a width and height to an object when you pate it in to the source view?
When I paste in
<a href="#"><object data="grid-linked-in.svg" type="image/svg+xml"></object></a>
WP changes it to
<a href="#"><object width="300" height="150" type="image/svg+xml" data="grid-linked-in.svg"></object></a>
A: You can try this:
add_filter( 'media_send_to_editor', 'remove_width_height_attribute', 10 );
function remove_width_height_attribute( $html ) {
$html = preg_replace( '/(width|height)="\d*"\s/', "", $html );
return $html;
}
A: You can use jQuery for this:
$('object').each(function(){
$(this).removeAttr('width height');
});
That should remove those attributes for you. You can even set attributes as well if need be. Put the following inside the function above (Obviously you can change the attributes as need be).
$(this).css('max-height',500);
| wordpress | {
"language": "en",
"length": 118,
"provenance": "stackexchange_00019.jsonl.gz:465426",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226533"
} | [
0.038177490234375,
-0.022735595703125,
-0.0188751220703125,
-0.003833770751953125,
0.00762176513671875,
-0.04241943359375,
0.03204345703125,
-0.0132904052734375,
-0.016998291015625,
0.019927978515625,
-0.0243377685546875,
0.00913238525390625,
0.0235137939453125,
-0.0263519287109375,
0.01123046875,
-0.01568603515625,
0.05474853515625,
-0.01739501953125,
0.0406494140625,
0.0034770965576171875,
0.0112152099609375,
0.051513671875,
0.0241851806640625,
0.0980224609375,
-0.00859832763671875,
-0.016632080078125,
0.07318115234375,
-0.021697998046875,
-0.00705718994140625,
-0.041778564453125,
0.0016679763793945312,
0.027557373046875,
0.04193115234375,
0.0474853515625,
-0.085693359375,
-0.00951385498046875,
-0.0021724700927734375,
0.006954193115234375,
-0.0296478271484375,
0.0274810791015625,
0.03240966796875,
-0.0126190185546875,
0.0177459716796875,
-0.016357421875,
-0.01800537109375,
-0.01412200927734375,
0.036956787109375,
-0.01300048828125,
0.0074920654296875,
0.007755279541015625,
0.0106658935546875,
0.01084136962890625,
0.033355712890625,
0.00453948974609375,
-0.029083251953125,
-0.01088714599609375,
0.0019969940185546875,
0.032257080078125,
0.02850341796875,
0.021209716796875,
-0.03424072265625,
0.0168609619140625,
-0.0107574462890625,
-0.07025146484375,
0.0023593902587890625,
-0.0088043212890625,
0.01299285888671875,
0.005802154541015625,
-0.03271484375,
-0.004520416259765625,
0.0325927734375,
-0.0276641845703125,
-0.029327392578125,
-0.038116455078125,
-0.0099334716796875,
0.001399993896484375,
-0.019927978515625,
-0.0584716796875,
0.00026035308837890625,
-0.00600433349609375,
0.01410675048828125,
0.003017425537109375,
-0.0284271240234375,
0.0017137527465820312,
0.0355224609375,
0.05047607421875,
-0.0157012939453125,
-0.036041259765625,
-0.00296783447265625,
-0.039886474609375,
-0.01355743408203125,
0.0252838134765625,
-0.0280303955078125,
-0.049072265625,
-0.04986572265625,
-0.04345703125,
0.004772186279296875,
-0.016876220703125,
-0.009368896484375,
0.03765869140625,
0.00033783912658691406,
-0.045379638671875,
0.0772705078125,
-0.04168701171875,
0.01302337646484375,
0.043609619140625,
-0.021484375,
0.0269317626953125,
0.0645751953125,
0.030853271484375,
0.034271240234375,
0.015380859375,
-0.015289306640625,
0.01204681396484375,
-0.023529052734375,
0.0280609130859375,
-0.0220489501953125,
0.0018100738525390625,
-0.039764404296875,
0.03192138671875,
-0.035308837890625,
-0.01047515869140625,
0.0240631103515625,
0.01202392578125,
0.038330078125,
0.027191162109375,
-0.0004992485046386719,
-0.0227508544921875,
0.003681182861328125,
0.0234375,
-0.0357666015625,
-0.00656890869140625,
0.083984375,
0.0217437744140625,
0.0170135498046875,
-0.02154541015625,
-0.003246307373046875,
-0.02532958984375,
-0.034393310546875,
0.02685546875,
0.0123138427734375,
-0.0265960693359375,
0.0097503662109375,
-0.02484130859375,
-0.0242156982421875,
0.002277374267578125,
0.0026226043701171875,
0.0290985107421875,
-0.007537841796875,
-0.05218505859375,
0.0219268798828125,
-0.037261962890625,
0.0318603515625,
-0.0031490325927734375,
0.026092529296875,
-0.04376220703125,
0.07598876953125,
-0.0550537109375,
-0.015899658203125,
-0.054779052734375,
-0.03955078125,
-0.005664825439453125,
0.034637451171875,
-0.057708740234375,
-0.0506591796875,
0.00673675537109375,
-0.03955078125,
-0.0029659271240234375,
0.0286407470703125,
0.06536865234375,
-0.0006279945373535156,
0.0045928955078125,
0.0103759765625,
0.016632080078125,
-0.0146484375,
-0.00972747802734375,
-0.017974853515625,
0.0017547607421875,
0.014739990234375,
0.0125885009765625,
-0.00954437255859375,
-0.03533935546875,
0.031097412109375,
-0.014404296875,
-0.0173492431640625,
-0.004505157470703125,
0.0098724365234375,
-0.028839111328125,
0.005603790283203125,
-0.01294708251953125,
0.07904052734375,
0.049346923828125,
-0.013336181640625,
0.021026611328125,
0.0181427001953125,
-0.0235748291015625,
-0.017120361328125,
-0.01715087890625,
-0.00030875205993652344,
-0.007152557373046875,
0.0445556640625,
-0.00450897216796875,
0.004444122314453125,
-0.040679931640625,
-0.0584716796875,
-0.0021495819091796875,
-0.0274810791015625,
0.036712646484375,
-0.07659912109375,
0.030426025390625,
0.043426513671875,
-0.0146942138671875,
-0.04144287109375,
0.0535888671875,
0.046722412109375,
-0.04473876953125,
0.026580810546875,
0.02423095703125,
0.016448974609375,
-0.007175445556640625,
-0.0025539398193359375,
0.0055999755859375,
-0.005321502685546875,
0.01229095458984375,
0.0058135986328125,
0.0023193359375,
-0.0023193359375,
-0.0004749298095703125,
0.0127410888671875,
0.00786590576171875,
0.024017333984375,
0.0148773193359375,
0.0117950439453125,
0.060699462890625,
0.005611419677734375,
-0.01904296875,
0.00016307830810546875,
-0.0877685546875,
0.0244598388671875,
0.049468994140625,
0.029937744140625,
0.01323699951171875,
0.0006961822509765625,
0.0308380126953125,
0.0297088623046875,
0.00936126708984375,
0.0227203369140625,
-0.0112152099609375,
-0.0130767822265625,
-0.01329803466796875,
-0.0017147064208984375,
-0.004055023193359375,
0.035125732421875,
-0.037689208984375,
0.021820068359375,
0.0284423828125,
-0.03265380859375,
-0.0266265869140625,
-0.0011501312255859375,
0.0249176025390625,
-0.0009918212890625,
0.06280517578125,
0.0298919677734375,
0.00013208389282226562,
0.0202178955078125,
-0.015838623046875,
0.006134033203125,
-0.0007619857788085938,
-0.01546478271484375,
0.0003712177276611328,
0.028167724609375,
-0.004474639892578125,
-0.004833221435546875,
0.0025882720947265625,
0.0160064697265625,
-0.0364990234375,
-0.0361328125,
0.01107025146484375,
-0.0014276504516601562,
-0.02374267578125,
-0.020416259765625,
-0.01617431640625,
-0.0186920166015625,
-0.0213775634765625,
0.004169464111328125,
-0.06488037109375,
0.01294708251953125,
-0.0159454345703125,
0.01337432861328125,
0.0160980224609375,
0.00489044189453125,
0.07867431640625,
0.03533935546875,
0.046539306640625,
-0.01812744140625,
0.0305938720703125,
0.0187835693359375,
-0.0153350830078125,
0.0255889892578125,
-0.0017995834350585938,
0.0733642578125,
0.0831298828125,
0.00516510009765625,
0.01387786865234375,
-0.0122222900390625,
-0.016693115234375,
-0.027252197265625,
0.006725311279296875,
-0.025146484375,
-0.0169219970703125,
-0.05035400390625,
0.013763427734375,
0.02911376953125,
-0.01081085205078125,
0.038909912109375,
-0.0093231201171875,
-0.005718231201171875,
0.0237274169921875,
-0.03900146484375,
-0.006195068359375,
0.0626220703125,
-0.074462890625,
-0.06500244140625,
0.03106689453125,
-0.08148193359375,
0.0055694580078125,
0.07568359375,
-0.02020263671875,
0.0199432373046875,
-0.033050537109375,
-0.048858642578125,
-0.037078857421875,
-0.054718017578125,
-0.016082763671875,
0.00009769201278686523,
0.004634857177734375,
0.0117340087890625,
-0.0030765533447265625,
-0.0011091232299804688,
-0.030670166015625,
0.004497528076171875,
-0.006633758544921875,
-0.016937255859375,
-0.020782470703125,
0.038848876953125,
-0.036773681640625,
-0.0218658447265625,
0.0027942657470703125,
0.01103973388671875,
0.020751953125,
-0.0262603759765625,
0.00012350082397460938,
-0.0013523101806640625,
-0.043701171875,
0.0007104873657226562,
0.04962158203125,
0.00804901123046875,
-0.018829345703125,
0.029296875,
-0.05682373046875,
-0.0168304443359375,
-0.005863189697265625,
-0.01812744140625,
0.0570068359375,
0.007526397705078125,
-0.037200927734375,
0.007434844970703125,
0.0289459228515625,
0.0231475830078125,
0.00971221923828125,
0.033294677734375,
-0.00785064697265625,
0.01019287109375,
-0.01238250732421875,
-0.005825042724609375,
-0.046661376953125,
-0.0121917724609375,
-0.054534912109375,
0.0330810546875,
-0.01322174072265625,
-0.031341552734375,
0.0011615753173828125,
-0.0576171875,
0.02203369140625,
0.0285797119140625,
0.034210205078125,
0.02484130859375,
0.05401611328125,
0.0136566162109375,
-0.037872314453125,
-0.01145172119140625,
0.033233642578125,
-0.03887939453125,
-0.01428985595703125,
-0.01220703125,
0.0159454345703125,
-0.03680419921875,
-0.059478759765625,
-0.038482666015625,
-0.0026035308837890625,
-0.03814697265625,
-0.013885498046875,
-0.0135498046875,
-0.022796630859375,
-0.022430419921875,
0.07171630859375,
-0.043975830078125,
-0.01396942138671875,
0.0304718017578125,
0.05517578125,
-0.02923583984375,
0.0147552490234375,
-0.015960693359375,
0.01340484619140625,
-0.028900146484375,
0.0277099609375,
-0.10247802734375,
-0.0272216796875,
-0.0042572021484375,
0.0706787109375,
-0.045745849609375,
0.059539794921875,
-0.05889892578125,
0.0506591796875,
0.005359649658203125,
0.0009870529174804688,
0.00569915771484375,
0.01519012451171875,
-0.0298614501953125,
0.0012636184692382812,
0.00966644287109375,
-0.034912109375,
-0.00968170166015625,
-0.0200347900390625,
-0.00540924072265625,
0.012237548828125,
-0.0139007568359375,
-0.0121307373046875,
0.01168060302734375,
-0.01088714599609375,
-0.0234375,
-0.0204925537109375,
-0.00836944580078125,
0.052947998046875,
0.0089569091796875,
-0.00011140108108520508,
-0.06573486328125,
-0.045623779296875,
0.024993896484375,
0.073486328125,
-0.02410888671875,
-0.00804901123046875,
0.0247039794921875,
0.0246429443359375,
-0.0457763671875,
-0.037872314453125,
0.0123138427734375,
0.032379150390625,
0.0017757415771484375,
0.05303955078125,
0.049530029296875,
0.00011944770812988281,
-0.0240325927734375,
0.0223541259765625,
0.0345458984375,
-0.038970947265625,
0.052642822265625,
-0.0153656005859375,
-0.0286712646484375,
0.042694091796875,
-0.00128173828125,
-0.025177001953125,
-0.0022640228271484375,
0.01352691650390625,
0.00583648681640625,
0.06976318359375,
-0.0156707763671875,
-0.0106964111328125,
-0.0294189453125,
0.040740966796875,
-0.0308380126953125,
0.00406646728515625,
0.03070068359375,
0.039886474609375,
0.027374267578125,
-0.00479888916015625,
0.013885498046875,
0.00017261505126953125,
0.00989532470703125,
0.0012865066528320312,
0.0000032782554626464844,
-0.0182647705078125,
0.03961181640625,
-0.03839111328125,
-0.0092620849609375,
-0.0006237030029296875,
0.012725830078125,
-0.033905029296875,
0.00273895263671875,
0.00007367134094238281,
-0.0283660888671875,
0.0220184326171875,
-0.00461578369140625,
0.00027108192443847656,
0.0155487060546875,
0.041046142578125,
0.022796630859375,
-0.0144805908203125,
-0.0128021240234375,
0.0031375885009765625,
-0.01241302490234375,
-0.040313720703125,
-0.0168914794921875,
-0.02166748046875,
-0.01229095458984375,
0.0200958251953125,
-0.04388427734375,
0.04034423828125,
-0.042144775390625,
-0.01476287841796875,
0.0169677734375,
0.021484375,
-0.00878143310546875,
0.0077667236328125,
0.0224761962890625,
-0.00852203369140625,
-0.0048828125,
0.0307769775390625,
-0.041351318359375,
-0.00991058349609375,
0.009368896484375,
0.0679931640625,
-0.05120849609375,
-0.042724609375,
0.0300750732421875,
-0.040374755859375,
-0.0052947998046875,
0.01551055908203125,
-0.006214141845703125,
-0.0655517578125,
0.01300048828125,
0.04779052734375,
0.004589080810546875,
-0.0294952392578125,
0.009674072265625,
-0.00408172607421875,
0.0061492919921875,
-0.025146484375,
0.0009374618530273438,
-0.042388916015625,
-0.0226287841796875,
-0.00301361083984375,
-0.074462890625,
-0.0236053466796875,
-0.00751495361328125,
-0.0465087890625,
-0.038665771484375,
0.0017833709716796875,
0.0045318603515625,
0.002834320068359375,
-0.034942626953125,
0.01535797119140625,
-0.0011997222900390625,
0.016082763671875,
-0.0266876220703125,
0.01959228515625,
0.01296234130859375,
0.0055084228515625,
0.00437164306640625,
-0.0223541259765625,
-0.058441162109375,
-0.0233612060546875,
-0.007549285888671875,
-0.047576904296875,
0.00786590576171875,
-0.00852203369140625,
-0.031005859375,
0.01337432861328125,
-0.01105499267578125,
0.02655029296875,
0.01497650146484375,
0.030303955078125,
-0.03216552734375,
0.036529541015625,
-0.022003173828125,
0.0386962890625,
-0.01261138916015625,
0.0244140625,
-0.00727081298828125,
0.0187530517578125,
-0.000782012939453125,
-0.005603790283203125,
0.0330810546875,
0.00337982177734375,
-0.032958984375,
-0.00894927978515625,
-0.050384521484375,
-0.06756591796875,
0.0175628662109375,
-0.0173187255859375,
0.01438140869140625,
-0.059356689453125,
-0.0125579833984375,
-0.04791259765625,
0.0859375,
-0.08660888671875,
0.0226898193359375,
-0.031524658203125,
-0.00792694091796875,
0.0347900390625,
-0.0003452301025390625,
-0.01073455810546875,
0.0188140869140625,
0.0000788569450378418,
0.00673675537109375,
0.01251983642578125,
0.0391845703125,
-0.03900146484375,
0.0229339599609375,
0.01678466796875,
0.05975341796875,
0.039947509765625,
0.06488037109375,
0.03460693359375,
0.0166473388671875,
0.01486968994140625,
-0.045684814453125,
0.042388916015625,
0.0010366439819335938,
0.0118255615234375,
0.039520263671875,
-0.01525115966796875,
0.06036376953125,
0.032501220703125,
0.0745849609375,
-0.043670654296875,
0.022247314453125,
0.00174713134765625,
-0.037109375,
0.10687255859375,
-0.0028553009033203125,
-0.014678955078125,
-0.043701171875,
-0.0029163360595703125,
0.0667724609375,
-0.04229736328125,
-0.015960693359375,
0.04119873046875,
-0.01076507568359375,
0.0036678314208984375,
-0.0164794921875,
-0.003025054931640625,
-0.0222320556640625,
-0.0281829833984375,
0.0162200927734375,
-0.0201568603515625,
-0.019866943359375,
0.054931640625,
-0.01708984375,
-0.0010766983032226562,
-0.04486083984375,
0.0127410888671875,
0.033935546875,
-0.033050537109375,
0.03070068359375,
-0.0040130615234375,
0.019012451171875,
0.03662109375,
-0.0252227783203125,
0.01715087890625,
0.01509857177734375,
-0.040069580078125,
0.05267333984375,
-0.0026493072509765625,
-0.0085296630859375,
0.021148681640625,
-0.03424072265625,
-0.007781982421875,
-0.00916290283203125,
0.031005859375,
-0.0001404285430908203,
0.022491455078125,
0.035400390625,
0.0193939208984375,
-0.033050537109375,
0.07659912109375,
-0.00502777099609375,
-0.050384521484375,
-0.007793426513671875,
0.035400390625,
-0.0174713134765625,
-0.0105743408203125,
-0.0013332366943359375,
-0.0191802978515625,
-0.006465911865234375,
-0.041961669921875,
-0.08148193359375,
0.059417724609375,
0.0188140869140625,
0.0170440673828125,
-0.0211639404296875,
0.0111541748046875,
-0.00982666015625,
-0.01291656494140625,
-0.0186767578125,
0.04302978515625,
-0.013824462890625,
0.004085540771484375,
-0.0259857177734375,
-0.004222869873046875,
-0.004909515380859375,
0.0200958251953125,
0.0123291015625,
-0.005954742431640625,
-0.005130767822265625,
-0.01678466796875,
0.04327392578125,
0.0484619140625,
0.0270233154296875,
-0.0117645263671875,
-0.01177215576171875,
0.01357269287109375,
0.0128021240234375,
-0.0694580078125,
0.01079559326171875,
-0.03790283203125,
-0.00545501708984375,
0.00821685791015625,
0.0115203857421875,
-0.0038318634033203125,
-0.01123046875,
0.027496337890625,
-0.022186279296875,
0.0097503662109375,
0.00829315185546875,
0.016937255859375,
0.0220489501953125,
-0.006328582763671875,
0.0090179443359375,
-0.04248046875,
-0.0191802978515625,
-0.0169677734375,
0.0382080078125,
-0.007793426513671875,
-0.010345458984375,
0.002254486083984375,
-0.007160186767578125,
0.028839111328125,
-0.0183563232421875,
-0.0240936279296875,
0.0272369384765625,
0.0038089752197265625,
-0.0125579833984375,
-0.0099029541015625,
0.0198822021484375,
-0.038116455078125,
-0.0130767822265625,
0.04034423828125,
0.01175689697265625,
-0.01538848876953125,
0.004291534423828125,
0.00841522216796875,
0.00879669189453125,
-0.0034847259521484375,
-0.0151214599609375,
0.01509857177734375,
-0.059112548828125,
-0.0171051025390625,
-0.039642333984375,
0.01348876953125,
0.030120849609375,
0.045196533203125,
-0.00738525390625,
-0.0161590576171875,
-0.062744140625,
-0.007488250732421875,
-0.031585693359375,
-0.031341552734375,
0.01001739501953125,
0.0738525390625,
0.054473876953125,
0.0421142578125,
-0.008941650390625,
-0.0289306640625,
-0.041534423828125,
0.01544952392578125,
-0.006977081298828125,
0.0482177734375,
-0.0201263427734375,
0.0200653076171875,
-0.041534423828125,
0.034454345703125,
0.0038661956787109375,
0.01070404052734375,
0.052703857421875,
-0.014556884765625,
-0.1072998046875,
0.0024356842041015625,
0.040008544921875,
-0.058502197265625,
-0.0304107666015625,
-0.03289794921875,
0.0127716064453125,
0.041717529296875,
0.0013170242309570312,
0.0186614990234375,
-0.0294342041015625,
0.06646728515625,
-0.035247802734375,
0.0217742919921875,
-0.002185821533203125,
-0.0181732177734375,
0.0112457275390625,
-0.0076751708984375,
0.0201568603515625,
0.00507354736328125,
-0.0670166015625,
-0.00440216064453125,
-0.01800537109375,
-0.0191802978515625,
0.0172119140625,
0.0153656005859375,
-0.04766845703125,
0.07220458984375,
0.005428314208984375,
-0.018096923828125,
-0.0399169921875,
0.023681640625,
0.029693603515625,
0.0295257568359375,
0.016021728515625,
0.032135009765625,
-0.034637451171875,
-0.0234527587890625,
-0.0167236328125,
0.0186309814453125,
-0.00702667236328125,
0.0859375,
-0.0205535888671875,
0.0048980712890625,
-0.0232391357421875,
-0.04266357421875,
0.0277252197265625,
-0.0299835205078125,
0.0185089111328125,
0.00323486328125,
-0.0276947021484375,
-0.0213470458984375,
-0.0037326812744140625,
0.01348114013671875,
0.0255126953125,
-0.014312744140625,
0.031402587890625,
-0.039215087890625,
0.0076904296875,
-0.010986328125,
0.0379638671875,
-0.021820068359375,
-0.01377105712890625,
-0.016998291015625,
-0.01043701171875,
0.0229034423828125,
-0.007480621337890625,
0.0005998611450195312,
0.057464599609375,
0.0306243896484375,
0.005046844482421875,
0.047821044921875,
-0.059234619140625,
0.0687255859375,
0.03619384765625,
-0.002483367919921875,
-0.032501220703125,
0.055328369140625,
-0.00797271728515625,
-0.00353240966796875,
0.023193359375,
0.05657958984375,
0.0274810791015625,
-0.047119140625,
0.04052734375,
0.01486968994140625,
0.05230712890625,
-0.0180206298828125,
0.00441741943359375,
0.01500701904296875,
0.016571044921875,
-0.033233642578125,
-0.0090789794921875,
-0.0218505859375,
-0.043609619140625,
-0.00133514404296875,
0.002452850341796875,
-0.006420135498046875,
-0.0516357421875,
-0.0018339157104492188,
-0.021636962890625,
0.033782958984375,
0.0218658447265625,
-0.09716796875,
0.049774169921875,
-0.0089111328125,
0.0274658203125,
-0.01053619384765625,
0.00046253204345703125,
-0.005664825439453125,
0.0176849365234375,
-0.01372528076171875,
-0.0576171875,
-0.02056884765625,
0.07489013671875,
-0.0215301513671875,
0.0260467529296875,
0.038543701171875,
-0.028564453125,
0.0322265625,
-0.02325439453125,
0.04058837890625,
0.0269317626953125,
-0.0038299560546875,
-0.0229644775390625,
-0.0207672119140625,
0.023773193359375,
0.016143798828125,
0.0057830810546875,
-0.006183624267578125,
0.002521514892578125,
0.004665374755859375,
-0.007328033447265625,
-0.02215576171875,
-0.033355712890625,
-0.058929443359375,
-0.091796875,
0.010986328125,
0.006961822509765625,
-0.048370361328125,
0.0225677490234375,
-0.04473876953125,
-0.0204315185546875,
0.0682373046875,
0.0237579345703125,
-0.02142333984375,
-0.019744873046875,
0.0203094482421875,
-0.0246124267578125,
-0.01134490966796875,
0.006649017333984375,
-0.0640869140625,
-0.026824951171875,
0.0200042724609375,
0.045379638671875,
-0.016204833984375,
-0.05889892578125,
0.0270538330078125,
0.0201568603515625,
0.0238800048828125,
0.006496429443359375,
0.064208984375,
0.04217529296875,
0.0194549560546875,
-0.01995849609375,
0.0128936767578125,
-0.002567291259765625,
0.029144287109375,
0.061126708984375,
0.05859375,
0.0046844482421875,
-0.0526123046875,
0.0160064697265625,
-0.0083160400390625,
-0.0014705657958984375,
-0.002346038818359375,
-0.00934600830078125,
-0.049560546875,
-0.037567138671875,
0.026611328125,
-0.006153106689453125,
0.0018396377563476562,
-0.0333251953125,
-0.03546142578125,
0.0044403076171875,
0.0262908935546875,
0.0501708984375,
-0.04437255859375,
0.06524658203125,
-0.01520538330078125,
-0.01342010498046875,
0.007598876953125,
-0.0295562744140625,
-0.027374267578125,
0.007122039794921875,
-0.01044464111328125,
-0.0305938720703125,
-0.010711669921875,
-0.0224456787109375,
0.0204925537109375,
-0.00992584228515625,
0.0149078369140625,
-0.03497314453125,
0.0068359375,
-0.02935791015625,
0.005340576171875,
0.019256591796875,
0.007244110107421875,
0.00027942657470703125,
-0.036865234375,
0.00901031494140625,
-0.0202484130859375,
-0.017852783203125,
0.0036106109619140625,
-0.044281005859375,
0.039459228515625,
0.0087738037109375,
-0.0229339599609375,
0.04107666015625,
0.01995849609375,
0.000038504600524902344,
0.01219940185546875,
-0.03948974609375,
-0.05902099609375,
0.0147857666015625,
-0.0115203857421875,
0.0010433197021484375,
0.0249786376953125
]
|
765361b603e031d01bd9ca179a936c23cbc66500 | Wordpress Stackexchange
Q: What is "all" in isset($wp_filter['all']) I'm a newbie in WordPress. I'm trying to understand how it generates the XHTML pages. I guess it's the function of do_action( 'hook-name' ) , but I'm stuck with the understanding of the instruction isset( $wp_filter['all] ) when reading the function do_action because I don't understand what is the meaning of the word all.
Is it a PHP feature or a WordPress one?
A: all is just a string the WordPress developers picked to behave differently than any other hook. When you attach to all, your callback will fire for all other hooks.
I wouldn't spend too much time looking at the source of do_action, just know that:
*
*add_action( 'x', 'whatever' ) will mean whatever fires for do_action( 'x' )
*add_action( 'all', 'whatever' ) will mean whatever fires for every do_action, regardless of the name of the hook.
| Q: What is "all" in isset($wp_filter['all']) I'm a newbie in WordPress. I'm trying to understand how it generates the XHTML pages. I guess it's the function of do_action( 'hook-name' ) , but I'm stuck with the understanding of the instruction isset( $wp_filter['all] ) when reading the function do_action because I don't understand what is the meaning of the word all.
Is it a PHP feature or a WordPress one?
A: all is just a string the WordPress developers picked to behave differently than any other hook. When you attach to all, your callback will fire for all other hooks.
I wouldn't spend too much time looking at the source of do_action, just know that:
*
*add_action( 'x', 'whatever' ) will mean whatever fires for do_action( 'x' )
*add_action( 'all', 'whatever' ) will mean whatever fires for every do_action, regardless of the name of the hook.
A: Conditional if ( isset($wp_filter['all']) ) { you can find right in these hook creating functions:
*
*apply_filters
*apply_filters_ref_array
*do_action
*do_action_ref_array
The difference between these are in number of arguments sent. Either we need multiple arguments, thus ref_array or single argument. The other difference "action vs. filter" is simple, action can do any function/action, and filter name is typically reserved for functions that take string data and return that data filtered.
OK, these are how you create hooks. And hooks do have names, and you can fish multiple function names on the same hook name (read: tag).
But once you define all functions associated with specific hooks, you need to store somewhere all the hook names and associated function names. This is why we ave the global $wp_filter in WordPress. If you output that variable you will get something like...
Array
(
[pre_term_name] => Array
(
[10] => Array
(
[sanitize_text_field] => Array
(
[function] => sanitize_text_field
[accepted_args] => 1
)
[wp_filter_kses] => Array
(
[function] => wp_filter_kses
[accepted_args] => 1
)
)
[30] => Array
(
[_wp_specialchars] => Array
(
[function] => _wp_specialchars
[accepted_args] => 1
)
)
)
Well, let us not argue on the name of this variable. Personally, I would call it different, probable $wp_hooks since this name is not taken. However, if we get back in the history we will find do_action is since @since 1.2.0 and apply_filters is @since 0.71 (released June 9, 2003.). That gives you pretty good explanation why it is called $wp_filter. It is most probable because filters were introduced first in WordPress. Later they introduced actions.
Just building on being said from @TheDeadMedic...
add_action( 'all', 'whatever' ) will mean whatever fires for every do_action, regardless of the name of the hook.
I raised the question why do we need $wp_filter['all']? Just few examples. Introspection, tests, and probable more of system internal features in the future WordPress versions.
| wordpress | {
"language": "en",
"length": 462,
"provenance": "stackexchange_00019.jsonl.gz:465431",
"question_score": "10",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226552"
} | [
0.042449951171875,
-0.0139923095703125,
-0.028717041015625,
-0.07122802734375,
0.01084136962890625,
-0.03265380859375,
0.03546142578125,
0.04290771484375,
-0.004192352294921875,
0.0062255859375,
-0.038970947265625,
0.036468505859375,
-0.021148681640625,
-0.0152435302734375,
0.0306854248046875,
-0.01537322998046875,
0.0391845703125,
-0.0150299072265625,
0.036224365234375,
0.0012454986572265625,
0.026214599609375,
0.027191162109375,
0.002201080322265625,
0.041259765625,
0.0275115966796875,
-0.022674560546875,
0.0171966552734375,
-0.046112060546875,
0.031494140625,
-0.0033130645751953125,
0.0069732666015625,
-0.01690673828125,
0.02349853515625,
0.051513671875,
-0.072265625,
0.032623291015625,
0.0029773712158203125,
0.01073455810546875,
-0.0227508544921875,
0.057525634765625,
0.058074951171875,
-0.04376220703125,
-0.0103302001953125,
0.0179290771484375,
-0.0238037109375,
-0.0126495361328125,
0.05810546875,
0.01364898681640625,
0.057464599609375,
-0.0304412841796875,
-0.00426483154296875,
0.01873779296875,
0.004314422607421875,
0.023193359375,
-0.0260009765625,
0.0036067962646484375,
-0.0108642578125,
0.01512908935546875,
0.03424072265625,
0.01385498046875,
-0.0229034423828125,
0.000029861927032470703,
0.007358551025390625,
-0.0596923828125,
0.028167724609375,
0.004833221435546875,
-0.0007138252258300781,
0.01318359375,
-0.04864501953125,
0.0439453125,
0.04296875,
-0.041168212890625,
-0.007659912109375,
-0.004657745361328125,
0.028778076171875,
-0.02294921875,
-0.0223846435546875,
-0.00531005859375,
0.039031982421875,
0.02862548828125,
0.01885986328125,
-0.04296875,
-0.042755126953125,
0.0241546630859375,
-0.050079345703125,
-0.00855255126953125,
-0.0006394386291503906,
0.0091552734375,
-0.0222625732421875,
-0.055938720703125,
-0.030731201171875,
0.01629638671875,
-0.058502197265625,
-0.05322265625,
-0.023101806640625,
-0.040985107421875,
-0.0007596015930175781,
0.0207977294921875,
0.00035309791564941406,
0.027679443359375,
-0.025054931640625,
-0.0247039794921875,
0.015411376953125,
-0.03082275390625,
0.0033893585205078125,
0.0298309326171875,
0.00989532470703125,
0.0396728515625,
0.031982421875,
0.0026569366455078125,
0.0036163330078125,
0.0010347366333007812,
-0.015838623046875,
0.032501220703125,
-0.02001953125,
-0.04632568359375,
-0.08770751953125,
0.044769287109375,
-0.0258941650390625,
0.0203094482421875,
0.0243682861328125,
-0.0009121894836425781,
0.032012939453125,
-0.01125335693359375,
-0.00923919677734375,
-0.0242767333984375,
-0.041534423828125,
-0.03167724609375,
-0.002346038818359375,
0.00518035888671875,
-0.008392333984375,
0.045623779296875,
-0.00859832763671875,
-0.03924560546875,
-0.055572509765625,
-0.013916015625,
0.03192138671875,
0.0161895751953125,
0.00868988037109375,
0.042816162109375,
-0.01332855224609375,
-0.07275390625,
-0.0276641845703125,
0.038543701171875,
-0.0044708251953125,
-0.031463623046875,
0.0184478759765625,
0.052093505859375,
-0.008880615234375,
-0.0165557861328125,
0.050506591796875,
-0.0269622802734375,
0.020599365234375,
-0.004215240478515625,
-0.00792694091796875,
0.00811767578125,
-0.00022149085998535156,
-0.01047515869140625,
-0.01050567626953125,
-0.005504608154296875,
-0.0189361572265625,
-0.005794525146484375,
0.0198822021484375,
-0.013458251953125,
-0.01300048828125,
-0.01203155517578125,
0.007244110107421875,
-0.00330352783203125,
0.0238189697265625,
0.013153076171875,
-0.03607177734375,
0.0248870849609375,
0.04669189453125,
0.004302978515625,
-0.01300811767578125,
0.017425537109375,
-0.02752685546875,
-0.004436492919921875,
0.031341552734375,
-0.01067352294921875,
-0.00513458251953125,
-0.017822265625,
0.0178680419921875,
0.0012035369873046875,
-0.08837890625,
0.03326416015625,
-0.0011301040649414062,
0.05645751953125,
0.04046630859375,
-0.0036373138427734375,
0.05950927734375,
0.0012607574462890625,
0.0034542083740234375,
-0.01146697998046875,
0.0205841064453125,
-0.01812744140625,
0.002651214599609375,
-0.00746917724609375,
0.0020618438720703125,
-0.00797271728515625,
0.08349609375,
-0.00569915771484375,
0.0462646484375,
-0.042755126953125,
-0.0277557373046875,
0.01169586181640625,
-0.026336669921875,
0.031707763671875,
0.000156402587890625,
0.00604248046875,
0.0247955322265625,
0.01329803466796875,
-0.046142578125,
0.0229949951171875,
-0.03582763671875,
0.026763916015625,
-0.0220947265625,
0.01000213623046875,
-0.0092620849609375,
0.003887176513671875,
-0.010833740234375,
-0.0394287109375,
-0.031036376953125,
-0.0019168853759765625,
0.09124755859375,
-0.005268096923828125,
-0.013427734375,
-0.04083251953125,
0.052276611328125,
0.003387451171875,
-0.06500244140625,
0.05438232421875,
0.03900146484375,
0.06439208984375,
-0.036590576171875,
-0.022247314453125,
-0.040313720703125,
-0.040283203125,
0.0011148452758789062,
0.0489501953125,
0.026885986328125,
0.044708251953125,
0.00943756103515625,
0.01386260986328125,
0.06805419921875,
-0.041961669921875,
0.0189056396484375,
-0.014617919921875,
-0.01190185546875,
0.039794921875,
-0.017364501953125,
0.0263671875,
0.004680633544921875,
-0.0655517578125,
-0.00678253173828125,
0.04693603515625,
0.0036907196044921875,
-0.01117706298828125,
-0.040618896484375,
0.01739501953125,
0.00809478759765625,
-0.036407470703125,
-0.04058837890625,
-0.0002484321594238281,
0.01416778564453125,
-0.005100250244140625,
0.00829315185546875,
0.005008697509765625,
0.00870513916015625,
-0.00948333740234375,
0.033233642578125,
-0.0216522216796875,
-0.00777435302734375,
0.04901123046875,
0.01351165771484375,
-0.0274505615234375,
-0.01079559326171875,
-0.005329132080078125,
-0.041290283203125,
0.0016279220581054688,
-0.022216796875,
0.0202484130859375,
0.008209228515625,
-0.013641357421875,
0.03399658203125,
-0.045440673828125,
-0.0001556873321533203,
-0.05816650390625,
0.0005998611450195312,
0.002960205078125,
0.0252838134765625,
0.0183868408203125,
0.003620147705078125,
0.0140380859375,
0.01297760009765625,
-0.016571044921875,
-0.031524658203125,
-0.008697509765625,
0.014801025390625,
-0.027923583984375,
0.000606536865234375,
0.061248779296875,
-0.00942230224609375,
0.003345489501953125,
-0.006786346435546875,
-0.004291534423828125,
0.0070037841796875,
-0.03759765625,
-0.041656494140625,
0.022979736328125,
-0.0904541015625,
0.0240478515625,
0.0078887939453125,
0.058074951171875,
-0.04412841796875,
-0.055694580078125,
-0.0267333984375,
0.0142669677734375,
-0.06768798828125,
-0.023956298828125,
0.027008056640625,
-0.04608154296875,
0.00299835205078125,
-0.039093017578125,
-0.02752685546875,
0.0006322860717773438,
-0.0186004638671875,
0.00493621826171875,
0.01201629638671875,
-0.0026340484619140625,
-0.008056640625,
0.0021991729736328125,
-0.00907135009765625,
0.0265350341796875,
0.0021572113037109375,
-0.0128326416015625,
0.007625579833984375,
0.049346923828125,
0.0127716064453125,
0.0025920867919921875,
0.021484375,
0.00231170654296875,
-0.029632568359375,
-0.032928466796875,
-0.0469970703125,
-0.01476287841796875,
0.027862548828125,
-0.0180511474609375,
-0.0287017822265625,
0.00814056396484375,
0.024261474609375,
0.0003170967102050781,
-0.042572021484375,
-0.03558349609375,
-0.0169525146484375,
0.032073974609375,
0.039764404296875,
-0.0244903564453125,
0.021484375,
-0.061676025390625,
0.034088134765625,
0.00414276123046875,
-0.003509521484375,
0.04779052734375,
0.047332763671875,
-0.058746337890625,
0.016845703125,
-0.0279998779296875,
0.00391387939453125,
-0.00887298583984375,
0.05560302734375,
-0.004825592041015625,
-0.0171356201171875,
-0.0243682861328125,
-0.0108795166015625,
-0.043609619140625,
0.057220458984375,
0.00629425048828125,
0.00820159912109375,
0.037261962890625,
0.005908966064453125,
-0.00469207763671875,
0.00417327880859375,
-0.030120849609375,
-0.01355743408203125,
0.0069732666015625,
-0.0266265869140625,
0.008758544921875,
-0.0052490234375,
-0.00861358642578125,
0.00001728534698486328,
0.046905517578125,
-0.02923583984375,
-0.00893402099609375,
0.0002760887145996094,
0.01235198974609375,
-0.022247314453125,
-0.053070068359375,
-0.0262908935546875,
-0.01300811767578125,
-0.0447998046875,
0.042694091796875,
0.021148681640625,
-0.012939453125,
-0.033233642578125,
0.0152740478515625,
-0.048492431640625,
-0.007236480712890625,
0.02398681640625,
-0.004833221435546875,
-0.0198822021484375,
0.027252197265625,
-0.0394287109375,
0.0134429931640625,
-0.023223876953125,
-0.0059661865234375,
-0.046478271484375,
0.006626129150390625,
-0.05859375,
0.0517578125,
0.05706787109375,
-0.02392578125,
0.006244659423828125,
0.0163421630859375,
0.01092529296875,
0.0567626953125,
-0.039031982421875,
-0.01386260986328125,
-0.0210418701171875,
-0.0228729248046875,
-0.0242919921875,
-0.0188446044921875,
-0.03948974609375,
-0.01401519775390625,
-0.0037555694580078125,
0.0005021095275878906,
-0.001926422119140625,
-0.0176239013671875,
0.01019287109375,
-0.0084991455078125,
-0.03741455078125,
-0.049591064453125,
-0.03509521484375,
0.02716064453125,
-0.0255889892578125,
-0.0036373138427734375,
-0.059478759765625,
-0.07977294921875,
0.0004723072052001953,
-0.0212860107421875,
-0.0164642333984375,
0.024139404296875,
0.0584716796875,
0.0167388916015625,
-0.006298065185546875,
-0.036956787109375,
-0.0159759521484375,
0.049957275390625,
0.01248931884765625,
0.0164947509765625,
0.01543426513671875,
-0.0135040283203125,
0.0023784637451171875,
0.034027099609375,
0.01678466796875,
-0.0201416015625,
0.058563232421875,
-0.0015125274658203125,
0.0112762451171875,
-0.01152801513671875,
0.00688934326171875,
0.0007863044738769531,
-0.005374908447265625,
-0.026611328125,
0.0340576171875,
0.018829345703125,
-0.01032257080078125,
-0.0097198486328125,
0.0045166015625,
0.0018301010131835938,
0.0203857421875,
0.0029125213623046875,
0.004779815673828125,
0.0770263671875,
0.029876708984375,
0.0072021484375,
-0.00034928321838378906,
-0.00324249267578125,
-0.00501251220703125,
-0.005157470703125,
0.0194244384765625,
-0.0047454833984375,
0.03472900390625,
-0.002819061279296875,
0.0006103515625,
-0.030853271484375,
-0.0263824462890625,
0.03045654296875,
-0.014892578125,
-0.06732177734375,
0.04681396484375,
-0.01873779296875,
0.0389404296875,
0.0421142578125,
0.031982421875,
-0.00653076171875,
0.029815673828125,
-0.007579803466796875,
0.0005116462707519531,
0.057403564453125,
0.02105712890625,
-0.01065826416015625,
0.0078582763671875,
0.020782470703125,
-0.02587890625,
0.074462890625,
-0.033660888671875,
0.006160736083984375,
-0.00001627206802368164,
-0.021209716796875,
-0.0259857177734375,
0.015167236328125,
0.04248046875,
0.04217529296875,
-0.0650634765625,
-0.0250244140625,
0.041015625,
-0.00153350830078125,
-0.059417724609375,
0.0034008026123046875,
0.055999755859375,
0.053131103515625,
0.022308349609375,
-0.0247344970703125,
-0.0025177001953125,
0.0036468505859375,
-0.019195556640625,
0.07965087890625,
0.053314208984375,
-0.043609619140625,
-0.04534912109375,
-0.0231781005859375,
0.0175323486328125,
-0.00310516357421875,
0.0011854171752929688,
0.006984710693359375,
0.035369873046875,
0.0292816162109375,
0.0033931732177734375,
-0.02294921875,
0.01702880859375,
0.01215362548828125,
-0.044769287109375,
-0.0111541748046875,
0.01177215576171875,
-0.047821044921875,
-0.033966064453125,
-0.00020325183868408203,
-0.034210205078125,
0.058624267578125,
-0.04876708984375,
0.041534423828125,
0.0016813278198242188,
-0.0312042236328125,
0.018280029296875,
0.024688720703125,
0.054534912109375,
0.05523681640625,
-0.039581298828125,
0.007419586181640625,
-0.0200042724609375,
-0.017913818359375,
-0.040557861328125,
-0.0194549560546875,
-0.04779052734375,
-0.00405120849609375,
-0.033172607421875,
0.01556396484375,
0.001499176025390625,
0.045928955078125,
0.0211334228515625,
0.005157470703125,
-0.038330078125,
0.0310516357421875,
-0.015869140625,
0.057769775390625,
-0.0548095703125,
0.0026035308837890625,
-0.0433349609375,
0.02105712890625,
0.010498046875,
0.0197296142578125,
0.00041484832763671875,
-0.0252685546875,
-0.00732421875,
0.0025539398193359375,
-0.05718994140625,
-0.00933074951171875,
0.043914794921875,
-0.00385284423828125,
-0.00662994384765625,
-0.01021575927734375,
-0.0031032562255859375,
-0.022064208984375,
0.031402587890625,
0.0105438232421875,
0.01218414306640625,
-0.005634307861328125,
-0.03985595703125,
-0.0201416015625,
-0.00592041015625,
0.01177215576171875,
0.05914306640625,
-0.051239013671875,
0.046722412109375,
0.004276275634765625,
-0.0236053466796875,
0.0430908203125,
0.035675048828125,
-0.013946533203125,
0.0236053466796875,
0.001171112060546875,
0.000652313232421875,
0.03143310546875,
0.030548095703125,
-0.020172119140625,
-0.0689697265625,
0.0291748046875,
0.0023174285888671875,
-0.0163421630859375,
0.036346435546875,
-0.018402099609375,
0.0182342529296875,
0.043487548828125,
0.07891845703125,
-0.07501220703125,
0.0206298828125,
0.0504150390625,
-0.038299560546875,
-0.0352783203125,
-0.00910186767578125,
-0.0013484954833984375,
-0.0159149169921875,
0.0018720626831054688,
0.0031719207763671875,
-0.042144775390625,
-0.00998687744140625,
0.017059326171875,
0.01397705078125,
0.0267333984375,
0.00975799560546875,
0.01084136962890625,
-0.00514984130859375,
-0.023651123046875,
0.0074005126953125,
0.0241851806640625,
-0.0024089813232421875,
0.005741119384765625,
0.0040435791015625,
-0.0221099853515625,
-0.0034122467041015625,
0.0199737548828125,
-0.04119873046875,
-0.0020885467529296875,
-0.003643035888671875,
-0.042144775390625,
-0.01110076904296875,
0.039520263671875,
-0.06512451171875,
0.050323486328125,
0.00804901123046875,
-0.01116943359375,
-0.09661865234375,
-0.03497314453125,
-0.011871337890625,
0.052215576171875,
-0.004367828369140625,
0.0379638671875,
-0.03076171875,
-0.00027060508728027344,
0.00046825408935546875,
-0.0307464599609375,
0.03265380859375,
-0.024444580078125,
-0.0185089111328125,
0.019683837890625,
-0.051239013671875,
0.007602691650390625,
0.01763916015625,
-0.02197265625,
-0.07177734375,
-0.034820556640625,
0.0218658447265625,
-0.005046844482421875,
0.0230560302734375,
0.065185546875,
-0.0172882080078125,
0.06256103515625,
-0.0198211669921875,
-0.0015497207641601562,
0.03411865234375,
0.016571044921875,
-0.0269622802734375,
-0.002201080322265625,
-0.05255126953125,
0.07269287109375,
0.026885986328125,
0.0164031982421875,
-0.024932861328125,
0.01390838623046875,
-0.0016918182373046875,
-0.0175323486328125,
0.0340576171875,
0.0022411346435546875,
-0.022857666015625,
-0.0035228729248046875,
0.034881591796875,
0.0190582275390625,
-0.0209197998046875,
0.026092529296875,
0.0026340484619140625,
-0.0193939208984375,
0.0099334716796875,
-0.03656005859375,
-0.005420684814453125,
-0.007061004638671875,
0.0216064453125,
0.0194091796875,
-0.0086822509765625,
-0.00861358642578125,
-0.007648468017578125,
0.01552581787109375,
-0.04547119140625,
-0.0017681121826171875,
0.01320648193359375,
0.004077911376953125,
-0.006076812744140625,
0.0194549560546875,
0.00298309326171875,
-0.055816650390625,
0.011962890625,
-0.040557861328125,
0.04473876953125,
-0.0156402587890625,
0.03564453125,
0.03631591796875,
0.01415252685546875,
0.01557159423828125,
-0.0034008026123046875,
0.018218994140625,
0.0029430389404296875,
-0.013885498046875,
0.0301513671875,
0.0004100799560546875,
0.007724761962890625,
-0.046539306640625,
-0.0008854866027832031,
0.0137786865234375,
0.037841796875,
-0.030242919921875,
-0.0635986328125,
0.008026123046875,
0.01226043701171875,
0.00897979736328125,
0.051116943359375,
0.037200927734375,
-0.037109375,
0.04718017578125,
-0.023773193359375,
0.007091522216796875,
0.01134490966796875,
0.03662109375,
0.006641387939453125,
0.01519775390625,
-0.04132080078125,
0.01947021484375,
-0.052825927734375,
0.0145111083984375,
0.0408935546875,
0.0799560546875,
-0.0150299072265625,
0.078369140625,
-0.004669189453125,
-0.03076171875,
-0.023681640625,
0.0220489501953125,
0.0011568069458007812,
0.032318115234375,
-0.0601806640625,
-0.0183868408203125,
0.038787841796875,
0.044677734375,
0.056182861328125,
0.053070068359375,
0.045257568359375,
-0.01555633544921875,
-0.0181884765625,
0.0294647216796875,
0.030670166015625,
-0.0372314453125,
-0.0233306884765625,
-0.01898193359375,
-0.0057525634765625,
0.0294952392578125,
-0.0042572021484375,
-0.020843505859375,
0.0242156982421875,
0.0310211181640625,
-0.0250244140625,
0.007274627685546875,
-0.01605224609375,
-0.0548095703125,
0.073486328125,
-0.0055389404296875,
0.10400390625,
-0.0109405517578125,
-0.03692626953125,
-0.0181732177734375,
-0.034942626953125,
-0.0167083740234375,
0.0511474609375,
0.037353515625,
-0.028106689453125,
0.043975830078125,
0.01416015625,
-0.0096282958984375,
0.015380859375,
0.00652313232421875,
0.004444122314453125,
0.03570556640625,
0.0251617431640625,
0.00904083251953125,
0.015838623046875,
0.050506591796875,
0.022216796875,
-0.01436614990234375,
0.00954437255859375,
0.0287933349609375,
-0.0023746490478515625,
0.0018892288208007812,
0.041412353515625,
0.018096923828125,
0.025787353515625,
-0.0171661376953125,
0.1004638671875,
0.0023975372314453125,
-0.00013840198516845703,
-0.034942626953125,
-0.02838134765625,
-0.015777587890625,
0.04949951171875,
-0.043914794921875,
0.00926971435546875,
-0.01030731201171875,
0.0257568359375,
-0.04241943359375,
0.0721435546875,
-0.00853729248046875,
-0.034942626953125,
-0.04791259765625,
-0.0167388916015625,
0.0498046875,
0.074951171875,
0.040557861328125,
0.0302886962890625,
0.00972747802734375,
-0.005645751953125,
-0.00844573974609375,
-0.0142669677734375,
-0.0028018951416015625,
0.018096923828125,
0.007122039794921875,
-0.0305023193359375,
-0.01318359375,
-0.0236358642578125,
-0.01256561279296875,
0.001361846923828125,
0.006561279296875,
-0.0010194778442382812,
-0.0005736351013183594,
-0.05108642578125,
0.047515869140625,
0.05572509765625,
0.010650634765625,
0.04254150390625,
-0.03839111328125,
-0.0153045654296875,
0.0206298828125,
0.01512908935546875,
-0.0211181640625,
-0.01094818115234375,
-0.04388427734375,
-0.02008056640625,
-0.0297088623046875,
-0.0911865234375,
-0.04644775390625,
-0.0171966552734375,
0.03619384765625,
0.0005984306335449219,
-0.00995635986328125,
-0.0010061264038085938,
-0.01464080810546875,
0.01027679443359375,
0.0061492919921875,
0.0268096923828125,
-0.0129241943359375,
0.059844970703125,
-0.014617919921875,
-0.0300140380859375,
-0.006649017333984375,
0.051025390625,
-0.0252685546875,
0.0099029541015625,
0.010650634765625,
-0.01239013671875,
-0.038421630859375,
-0.0014429092407226562,
0.011383056640625,
0.042388916015625,
-0.016204833984375,
-0.0241851806640625,
-0.007366180419921875,
0.03936767578125,
-0.0115203857421875,
-0.04962158203125,
0.00789642333984375,
-0.0008306503295898438,
0.020965576171875,
0.0299072265625,
-0.0171661376953125,
0.01513671875,
-0.022186279296875,
-0.058258056640625,
0.08868408203125,
0.0008702278137207031,
-0.02447509765625,
-0.07257080078125,
0.02117919921875,
0.0228424072265625,
-0.01513671875,
-0.042877197265625,
-0.0005784034729003906,
-0.044677734375,
0.0209503173828125,
-0.0018100738525390625,
-0.0037631988525390625,
0.029876708984375,
0.007381439208984375,
-0.0404052734375,
-0.002521514892578125,
-0.0137481689453125,
-0.0263519287109375,
0.0220794677734375,
-0.042205810546875,
0.0650634765625,
0.035125732421875,
-0.0190277099609375,
0.02374267578125,
0.01146697998046875,
-0.039276123046875,
0.00592803955078125,
-0.003662109375,
-0.044158935546875,
-0.020599365234375,
0.07586669921875,
0.005458831787109375,
0.0280914306640625,
-0.007633209228515625,
0.003719329833984375,
0.01320648193359375,
-0.04486083984375,
-0.032684326171875,
0.01776123046875,
-0.033447265625,
-0.023345947265625,
-0.046478271484375,
-0.039154052734375,
0.0217437744140625,
-0.01393890380859375,
-0.0477294921875,
0.0057373046875,
-0.0277862548828125,
-0.04150390625,
0.0261688232421875,
-0.04302978515625,
0.04962158203125,
-0.03424072265625,
-0.0274810791015625,
-0.00492095947265625,
0.03900146484375,
-0.01161956787109375,
-0.0265960693359375,
-0.04205322265625,
-0.00948333740234375,
0.0205230712890625,
0.01161956787109375,
0.001216888427734375,
0.039276123046875,
0.031280517578125,
0.006275177001953125,
-0.022216796875,
0.0224609375,
0.01360321044921875,
0.0231781005859375,
0.0110931396484375,
0.02313232421875,
0.0189666748046875,
0.052459716796875,
-0.0211639404296875,
0.1173095703125,
-0.003681182861328125,
0.04718017578125,
0.01055908203125,
-0.0256195068359375,
0.055267333984375,
-0.037750244140625,
-0.01448822021484375,
0.0198211669921875,
0.017791748046875,
-0.04681396484375,
0.0173797607421875,
0.0001627206802368164,
0.0308685302734375,
0.0177001953125
]
|
c0ed6129a3d2308de9f659c0aa7f8c79332a00e6 | Wordpress Stackexchange
Q: Difference between update_user_meta and update_user_option Can anyone explain what is the difference between update_user_meta and update_user_option and in which scenarios the both can be used?
A: Both write their data in the “usermeta” table. User options stored in the usermeta table retain the wordpress table prefix e.g. wp_ whereas the user meta also stored in the usermeta table doesn't.
User options support blog-specific options, useful in multisite. The user meta is based on the user id specific meta data like profile information.
The parameters are quite different in fact. User option has $user_id, $option_name, $newvalue, $global and user meta has $user_id, $meta_key, $meta_value, $prev_value.
Here are some values for both options and user usermeta.
Options
*
*wp_user_level
*wp_user-settings
*wp_capabilities
*wp_user-settings-time
User
*
*first_name
*last_name
*nickname
*rich_editing
*show_admin_bar_front
*admin_color
https://codex.wordpress.org/Function_Reference/update_user_option#Parameters
https://codex.wordpress.org/Function_Reference/update_user_meta#Parameters
The codex pages examples provide real world use.
| Q: Difference between update_user_meta and update_user_option Can anyone explain what is the difference between update_user_meta and update_user_option and in which scenarios the both can be used?
A: Both write their data in the “usermeta” table. User options stored in the usermeta table retain the wordpress table prefix e.g. wp_ whereas the user meta also stored in the usermeta table doesn't.
User options support blog-specific options, useful in multisite. The user meta is based on the user id specific meta data like profile information.
The parameters are quite different in fact. User option has $user_id, $option_name, $newvalue, $global and user meta has $user_id, $meta_key, $meta_value, $prev_value.
Here are some values for both options and user usermeta.
Options
*
*wp_user_level
*wp_user-settings
*wp_capabilities
*wp_user-settings-time
User
*
*first_name
*last_name
*nickname
*rich_editing
*show_admin_bar_front
*admin_color
https://codex.wordpress.org/Function_Reference/update_user_option#Parameters
https://codex.wordpress.org/Function_Reference/update_user_meta#Parameters
The codex pages examples provide real world use.
A: In layman terms there is no major difference! update_user_option() uses update_user_meta() internally. The only difference is update_user_option() prefix the option name with database table prefix + blog ID if you are in multisite and just table prefix if you are in single site installation.
Take a look at the code of update_user_option()
/**
* Update user option with global blog capability.
*
* User options are just like user metadata except that they have support for
* global blog options. If the 'global' parameter is false, which it is by default
* it will prepend the WordPress table prefix to the option name.
*
* Deletes the user option if $newvalue is empty.
*
* @since 2.0.0
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $user_id User ID.
* @param string $option_name User option name.
* @param mixed $newvalue User option value.
* @param bool $global Optional. Whether option name is global or blog specific.
* Default false (blog specific).
* @return int|bool User meta ID if the option didn't exist, true on successful update,
* false on failure.
*/
function update_user_option( $user_id, $option_name, $newvalue, $global = false ) {
global $wpdb;
if ( !$global )
$option_name = $wpdb->get_blog_prefix() . $option_name;
return update_user_meta( $user_id, $option_name, $newvalue );
}
Your option name is prefixed with table prefix + blog ID (Only when ID is other than 1 and 0).
If you set the last parameter $global to true it has no difference with update_user_meta().
Purpose of update_user_option() function
Unlike other tables, WordPress does not create separate table for usermeta for each site. It saves user information in one usermeta table for all of the blogs (in multisite). It just prefix the key name for each site with blog prefix e.g. for blog ID 4 wp_capabilities is stored as wp_4_capabilities.
So whatever information you will save using update_user_option(), for example key_name_abc will become wp_key_name_abc for main site in multisite or in single site installation. In future if you convert your single site to multisite the information will be available only in main site.
Use this function when you think some information is depended on site + user as well. Not like name, email etc because these information belongs to user and site independent.
| wordpress | {
"language": "en",
"length": 516,
"provenance": "stackexchange_00019.jsonl.gz:465440",
"question_score": "14",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226581"
} | [
0.0634765625,
-0.040802001953125,
0.0212249755859375,
-0.023223876953125,
-0.0228118896484375,
-0.031341552734375,
0.0246124267578125,
-0.0228271484375,
0.01690673828125,
0.0406494140625,
-0.006061553955078125,
-0.021270751953125,
0.051971435546875,
-0.01323699951171875,
-0.01580810546875,
-0.0117645263671875,
0.035491943359375,
0.0077667236328125,
0.007549285888671875,
-0.00714874267578125,
0.01025390625,
0.023345947265625,
-0.03765869140625,
0.04974365234375,
0.02862548828125,
-0.08013916015625,
-0.00949859619140625,
-0.00447845458984375,
0.0175323486328125,
0.000988006591796875,
0.00958251953125,
0.031951904296875,
0.0220947265625,
0.004138946533203125,
-0.01904296875,
-0.0144500732421875,
0.019866943359375,
-0.00540924072265625,
-0.004161834716796875,
0.0158843994140625,
0.00640869140625,
0.005901336669921875,
-0.0280609130859375,
0.0115966796875,
-0.0262603759765625,
-0.07525634765625,
0.05517578125,
0.004909515380859375,
0.00431060791015625,
0.0019779205322265625,
0.0054168701171875,
-0.0037899017333984375,
0.022369384765625,
0.00879669189453125,
0.004138946533203125,
0.002071380615234375,
-0.00439453125,
-0.005428314208984375,
0.0270233154296875,
0.0036869049072265625,
-0.005878448486328125,
0.01006317138671875,
0.0166168212890625,
0.002147674560546875,
0.0266876220703125,
-0.038055419921875,
-0.0025081634521484375,
0.0498046875,
-0.040924072265625,
0.0211029052734375,
0.037109375,
-0.0187530517578125,
0.00299835205078125,
-0.0261993408203125,
-0.023284912109375,
0.0302734375,
0.0197296142578125,
0.012664794921875,
0.00179290771484375,
-0.0008687973022460938,
-0.00927734375,
0.0133514404296875,
-0.0212554931640625,
-0.024688720703125,
0.0224609375,
0.0033111572265625,
-0.01346588134765625,
-0.01242828369140625,
-0.0250244140625,
-0.00951385498046875,
-0.005458831787109375,
-0.08624267578125,
-0.03253173828125,
0.052032470703125,
0.0093841552734375,
-0.0174102783203125,
0.025909423828125,
0.04718017578125,
-0.0265350341796875,
-0.0203094482421875,
0.02337646484375,
-0.040191650390625,
-0.0011014938354492188,
-0.0216064453125,
0.00254058837890625,
0.05938720703125,
0.028106689453125,
0.045166015625,
0.0028476715087890625,
-0.00716400146484375,
0.00021982192993164062,
-0.0072784423828125,
-0.0161590576171875,
-0.041839599609375,
0.00811767578125,
0.004451751708984375,
-0.044403076171875,
0.0428466796875,
0.00762939453125,
0.0161285400390625,
-0.0007748603820800781,
0.0258331298828125,
0.0218505859375,
-0.054901123046875,
0.006374359130859375,
-0.0077972412109375,
-0.032073974609375,
-0.02410888671875,
-0.072265625,
0.0543212890625,
-0.05291748046875,
-0.0061187744140625,
0.0736083984375,
0.03436279296875,
0.00763702392578125,
-0.038360595703125,
-0.029541015625,
-0.01389312744140625,
-0.035797119140625,
0.053863525390625,
-0.013763427734375,
-0.086181640625,
-0.0177459716796875,
0.004795074462890625,
-0.0265655517578125,
0.0391845703125,
0.0272369384765625,
-0.007785797119140625,
-0.01531219482421875,
-0.06805419921875,
-0.0269012451171875,
-0.0054779052734375,
-0.018280029296875,
0.016143798828125,
0.000553131103515625,
-0.000006020069122314453,
0.00634002685546875,
-0.015655517578125,
0.00424957275390625,
-0.01113128662109375,
-0.04266357421875,
-0.010955810546875,
0.045166015625,
0.0213775634765625,
-0.00417327880859375,
0.0285797119140625,
0.006595611572265625,
-0.01407623291015625,
0.0229949951171875,
0.036651611328125,
0.0265960693359375,
0.014373779296875,
0.0239715576171875,
0.0022411346435546875,
-0.0054168701171875,
-0.01922607421875,
-0.035675048828125,
0.019378662109375,
0.035919189453125,
-0.053009033203125,
-0.040313720703125,
-0.034332275390625,
0.0384521484375,
-0.0037479400634765625,
-0.034332275390625,
0.00450897216796875,
-0.00518035888671875,
0.03082275390625,
0.033966064453125,
0.00539398193359375,
0.01238250732421875,
0.002101898193359375,
0.023834228515625,
0.0307464599609375,
0.0169525146484375,
-0.0440673828125,
-0.00295257568359375,
-0.006103515625,
-0.01509857177734375,
-0.037841796875,
0.01219940185546875,
0.0295562744140625,
-0.0190277099609375,
-0.01361846923828125,
-0.116943359375,
0.02325439453125,
-0.04681396484375,
0.060821533203125,
-0.04052734375,
0.017913818359375,
0.01197052001953125,
-0.03814697265625,
-0.020233154296875,
0.042327880859375,
0.03143310546875,
-0.0167694091796875,
-0.0268402099609375,
0.036895751953125,
0.005767822265625,
0.0472412109375,
0.0035190582275390625,
-0.00848388671875,
-0.0014190673828125,
-0.019500732421875,
0.052520751953125,
-0.01354217529296875,
0.004497528076171875,
-0.02166748046875,
0.071044921875,
-0.00824737548828125,
0.021514892578125,
0.0190582275390625,
0.00482940673828125,
0.00014960765838623047,
-0.03521728515625,
0.0161590576171875,
-0.0156707763671875,
-0.04986572265625,
-0.0001933574676513672,
0.041473388671875,
0.034881591796875,
-0.0081939697265625,
-0.0222320556640625,
0.006763458251953125,
0.05780029296875,
0.0121002197265625,
0.017608642578125,
-0.0015459060668945312,
-0.0038909912109375,
0.02813720703125,
0.04486083984375,
-0.0032634735107421875,
-0.0043487548828125,
-0.0477294921875,
0.0031490325927734375,
0.0202789306640625,
-0.068603515625,
0.005443572998046875,
0.0078582763671875,
-0.023284912109375,
-0.0145263671875,
-0.037933349609375,
0.049713134765625,
-0.0416259765625,
0.031280517578125,
-0.01422882080078125,
0.023834228515625,
0.0035305023193359375,
-0.028350830078125,
0.0027942657470703125,
0.0161895751953125,
0.0218353271484375,
0.0086212158203125,
0.0181427001953125,
0.004070281982421875,
0.037750244140625,
-0.0016069412231445312,
-0.0141448974609375,
-0.00597381591796875,
0.00939178466796875,
-0.01213836669921875,
-0.00911712646484375,
-0.03717041015625,
0.004383087158203125,
0.007762908935546875,
-0.0198516845703125,
0.01253509521484375,
0.044342041015625,
-0.0142364501953125,
-0.0042724609375,
0.04058837890625,
-0.042022705078125,
-0.048309326171875,
0.00562286376953125,
0.01137542724609375,
-0.047119140625,
-0.0011301040649414062,
-0.01453399658203125,
0.004428863525390625,
-0.013702392578125,
0.034576416015625,
0.052459716796875,
-0.0174560546875,
-0.00974273681640625,
0.01169586181640625,
-0.035247802734375,
-0.047576904296875,
0.054840087890625,
0.0306854248046875,
-0.0487060546875,
0.0257415771484375,
0.08758544921875,
0.0028839111328125,
-0.0173187255859375,
0.0189361572265625,
-0.0023670196533203125,
-0.01302337646484375,
-0.007747650146484375,
-0.0321044921875,
-0.022247314453125,
-0.0155792236328125,
-0.09100341796875,
0.01824951171875,
-0.035125732421875,
-0.04229736328125,
-0.006198883056640625,
0.00949859619140625,
0.0225830078125,
0.0080108642578125,
-0.0286407470703125,
-0.022186279296875,
-0.0309600830078125,
-0.040496826171875,
-0.01355743408203125,
0.0085601806640625,
0.0014696121215820312,
-0.0179443359375,
0.05078125,
-0.0186309814453125,
-0.03350830078125,
-0.036346435546875,
-0.045440673828125,
0.0003066062927246094,
-0.033233642578125,
0.036529541015625,
-0.036376953125,
0.0018987655639648438,
-0.0037746429443359375,
0.075439453125,
0.0447998046875,
-0.054351806640625,
0.00724029541015625,
0.026397705078125,
-0.042236328125,
0.035400390625,
-0.017120361328125,
-0.0513916015625,
0.0158233642578125,
0.04510498046875,
-0.032989501953125,
-0.0189056396484375,
0.00836181640625,
-0.0297088623046875,
0.04119873046875,
0.0182342529296875,
0.004077911376953125,
0.0221710205078125,
0.01439666748046875,
0.00659942626953125,
0.038604736328125,
0.0013875961303710938,
-0.005901336669921875,
-0.00702667236328125,
-0.0246124267578125,
-0.0205230712890625,
0.00395965576171875,
-0.043609619140625,
-0.049285888671875,
0.01186370849609375,
-0.042083740234375,
-0.00811767578125,
-0.01047515869140625,
0.01026153564453125,
0.022308349609375,
-0.06048583984375,
0.03643798828125,
-0.055267333984375,
-0.000713348388671875,
-0.07232666015625,
-0.01050567626953125,
-0.04022216796875,
0.08221435546875,
0.040557861328125,
-0.0172882080078125,
0.0186767578125,
0.0161285400390625,
-0.0721435546875,
0.023468017578125,
-0.03106689453125,
0.0172882080078125,
-0.05865478515625,
-0.0266571044921875,
0.018768310546875,
-0.03424072265625,
-0.031951904296875,
0.05645751953125,
-0.06591796875,
-0.009307861328125,
0.021636962890625,
-0.0022640228271484375,
-0.0010166168212890625,
-0.00403594970703125,
-0.01143646240234375,
-0.00888824462890625,
0.00229644775390625,
-0.018585205078125,
-0.0226593017578125,
-0.024383544921875,
0.00814056396484375,
0.035736083984375,
0.035980224609375,
-0.049591064453125,
0.005718231201171875,
0.0307464599609375,
-0.0043182373046875,
0.040008544921875,
-0.0169677734375,
-0.005279541015625,
0.01715087890625,
-0.0110015869140625,
-0.0013399124145507812,
-0.0117340087890625,
-0.006923675537109375,
-0.05194091796875,
-0.0267486572265625,
-0.01708984375,
-0.035308837890625,
0.0628662109375,
-0.034820556640625,
-0.0008015632629394531,
-0.039337158203125,
-0.019439697265625,
-0.04315185546875,
-0.0031108856201171875,
-0.01873779296875,
-0.00940704345703125,
-0.0238494873046875,
-0.0660400390625,
0.032257080078125,
0.002902984619140625,
0.0007004737854003906,
0.011199951171875,
0.056854248046875,
0.0128631591796875,
-0.01476287841796875,
-0.00803375244140625,
-0.02838134765625,
0.005245208740234375,
0.00365447998046875,
0.005039215087890625,
0.0018444061279296875,
-0.002887725830078125,
0.0021457672119140625,
-0.0084991455078125,
0.06268310546875,
-0.054595947265625,
0.038787841796875,
-0.0139923095703125,
0.01050567626953125,
0.01329803466796875,
0.00585174560546875,
-0.01355743408203125,
-0.004077911376953125,
-0.01555633544921875,
-0.00196075439453125,
-0.038787841796875,
0.025146484375,
0.041107177734375,
-0.023101806640625,
-0.046844482421875,
-0.0183868408203125,
0.004405975341796875,
-0.051849365234375,
0.04132080078125,
0.0072784423828125,
-0.0035343170166015625,
-0.016571044921875,
-0.003170013427734375,
0.0018177032470703125,
-0.0038890838623046875,
-0.006153106689453125,
-0.007781982421875,
0.015899658203125,
-0.0035991668701171875,
-0.005588531494140625,
-0.0400390625,
-0.00630950927734375,
0.0689697265625,
-0.017303466796875,
-0.051910400390625,
-0.01971435546875,
-0.00592803955078125,
0.055450439453125,
0.038726806640625,
0.047637939453125,
0.054107666015625,
-0.0160675048828125,
-0.003856658935546875,
-0.016021728515625,
0.0018291473388671875,
-0.0024890899658203125,
-0.035400390625,
-0.00011849403381347656,
-0.006465911865234375,
-0.00540924072265625,
0.004634857177734375,
0.0859375,
-0.02996826171875,
0.056488037109375,
-0.0310516357421875,
0.0199127197265625,
0.02911376953125,
0.0155181884765625,
0.0158538818359375,
0.010650634765625,
-0.021026611328125,
0.01335906982421875,
0.005702972412109375,
0.0019245147705078125,
0.02349853515625,
0.02520751953125,
0.0036182403564453125,
0.04461669921875,
0.0174102783203125,
-0.03448486328125,
-0.0296783447265625,
-0.0138397216796875,
0.0258026123046875,
-0.030487060546875,
-0.0635986328125,
-0.01146697998046875,
0.0103607177734375,
0.0016231536865234375,
-0.048828125,
0.0091552734375,
-0.0219879150390625,
-0.0221405029296875,
0.0181427001953125,
-0.028900146484375,
0.0237884521484375,
-0.0232391357421875,
-0.0219573974609375,
-0.005680084228515625,
0.0228424072265625,
0.016387939453125,
-0.037872314453125,
-0.0205535888671875,
-0.0095672607421875,
-0.0248565673828125,
0.0482177734375,
0.0058441162109375,
0.02227783203125,
-0.04052734375,
0.01654052734375,
-0.03973388671875,
-0.003936767578125,
0.0161285400390625,
-0.017822265625,
-0.040985107421875,
0.0029926300048828125,
-0.0251312255859375,
0.006622314453125,
-0.0114898681640625,
-0.038421630859375,
-0.01479339599609375,
-0.007305145263671875,
-0.01006317138671875,
0.0230560302734375,
-0.004650115966796875,
0.0372314453125,
-0.017547607421875,
0.0146026611328125,
0.001644134521484375,
0.06878662109375,
-0.003650665283203125,
0.0261077880859375,
-0.00794219970703125,
0.0284271240234375,
0.0253143310546875,
0.037750244140625,
-0.00142669677734375,
-0.032501220703125,
0.0023193359375,
-0.0261077880859375,
-0.00447845458984375,
-0.011383056640625,
0.0005679130554199219,
-0.011138916015625,
0.0299835205078125,
-0.00115966796875,
0.007053375244140625,
-0.007080078125,
0.01227569580078125,
-0.017791748046875,
-0.0015621185302734375,
-0.008880615234375,
-0.022247314453125,
0.04296875,
-0.015777587890625,
0.012359619140625,
-0.0172119140625,
-0.01534271240234375,
0.0095062255859375,
-0.00942230224609375,
0.01349639892578125,
0.0233917236328125,
-0.077392578125,
0.054718017578125,
0.08587646484375,
-0.002185821533203125,
0.040985107421875,
-0.0003094673156738281,
-0.00015246868133544922,
0.04681396484375,
-0.03466796875,
0.010162353515625,
0.048614501953125,
0.060791015625,
-0.005779266357421875,
-0.0183868408203125,
0.04937744140625,
-0.03436279296875,
0.02618408203125,
0.061370849609375,
0.09100341796875,
-0.0853271484375,
0.01140594482421875,
0.00205230712890625,
-0.0102996826171875,
0.041778564453125,
0.00902557373046875,
-0.038238525390625,
-0.07354736328125,
0.044403076171875,
-0.0194549560546875,
-0.014190673828125,
0.0196685791015625,
0.005916595458984375,
-0.046478271484375,
-0.041107177734375,
-0.03326416015625,
0.02020263671875,
0.05694580078125,
0.027435302734375,
-0.046234130859375,
0.0179901123046875,
-0.00026917457580566406,
-0.01233673095703125,
-0.00801849365234375,
-0.03564453125,
-0.06304931640625,
-0.0280914306640625,
-0.0281982421875,
-0.033721923828125,
0.0058746337890625,
0.0312347412109375,
0.0618896484375,
0.007137298583984375,
0.031768798828125,
-0.050323486328125,
-0.0034313201904296875,
0.020660400390625,
-0.033966064453125,
-0.02716064453125,
-0.011474609375,
0.01194000244140625,
0.0013933181762695312,
0.0201416015625,
-0.00920867919921875,
-0.0246734619140625,
-0.0228424072265625,
-0.06396484375,
0.06005859375,
-0.0303955078125,
-0.00013494491577148438,
0.0188140869140625,
0.025909423828125,
-0.006076812744140625,
0.0350341796875,
0.0021381378173828125,
-0.0164947509765625,
-0.032257080078125,
0.016265869140625,
-0.08636474609375,
-0.01163482666015625,
0.03564453125,
-0.07421875,
0.06488037109375,
0.0340576171875,
0.022735595703125,
-0.015960693359375,
0.0247344970703125,
-0.0169525146484375,
-0.0024280548095703125,
-0.04705810546875,
0.03314208984375,
-0.00901031494140625,
0.034027099609375,
-0.0484619140625,
0.01197052001953125,
-0.01800537109375,
-0.0107879638671875,
0.07501220703125,
0.03302001953125,
-0.061004638671875,
-0.040191650390625,
-0.004734039306640625,
0.0091552734375,
-0.0159454345703125,
0.060455322265625,
0.00389862060546875,
0.03955078125,
0.05645751953125,
-0.0216827392578125,
0.033660888671875,
-0.0159454345703125,
-0.02691650390625,
0.01056671142578125,
0.011627197265625,
0.0158538818359375,
-0.0158843994140625,
0.0675048828125,
0.006763458251953125,
-0.032257080078125,
-0.0011730194091796875,
-0.026824951171875,
-0.026763916015625,
0.015869140625,
-0.00925445556640625,
0.0129241943359375,
0.025634765625,
-0.0300750732421875,
0.03466796875,
0.0150909423828125,
0.023406982421875,
0.0216522216796875,
0.017913818359375,
0.0233306884765625,
0.022613525390625,
0.01422119140625,
0.033416748046875,
0.001094818115234375,
0.0721435546875,
0.019439697265625,
0.006992340087890625,
-0.037689208984375,
0.0653076171875,
0.039398193359375,
0.072265625,
-0.06842041015625,
-0.024383544921875,
0.005100250244140625,
-0.0186920166015625,
-0.017791748046875,
-0.005405426025390625,
-0.0087890625,
-0.049163818359375,
-0.00754547119140625,
-0.066162109375,
0.032440185546875,
0.01050567626953125,
-0.01806640625,
-0.025115966796875,
0.01261138916015625,
-0.0088043212890625,
0.052886962890625,
-0.0421142578125,
0.00582122802734375,
0.021148681640625,
0.0209503173828125,
0.025482177734375,
0.018829345703125,
0.05206298828125,
-0.004520416259765625,
-0.0305023193359375,
0.0177154541015625,
-0.02203369140625,
0.032379150390625,
-0.054351806640625,
-0.0484619140625,
0.043212890625,
0.05401611328125,
0.01119232177734375,
0.006053924560546875,
0.0297698974609375,
0.031280517578125,
-0.034912109375,
-0.0019159317016601562,
0.06298828125,
-0.0195770263671875,
0.0180816650390625,
-0.0015954971313476562,
0.05316162109375,
0.0021305084228515625,
0.01093292236328125,
-0.052947998046875,
0.0865478515625,
-0.0034999847412109375,
0.0174560546875,
0.04144287109375,
0.0210723876953125,
0.011505126953125,
0.03546142578125,
0.0345458984375,
0.055999755859375,
0.05224609375,
0.033477783203125,
0.00421905517578125,
-0.0081939697265625,
0.007381439208984375,
-0.01241302490234375,
0.026153564453125,
0.0136260986328125,
0.01541900634765625,
-0.07891845703125,
-0.015472412109375,
0.025787353515625,
-0.00562286376953125,
-0.0066986083984375,
0.054046630859375,
0.013916015625,
-0.02325439453125,
-0.040924072265625,
-0.0020160675048828125,
-0.00424957275390625,
-0.0015735626220703125,
-0.03228759765625,
0.1005859375,
-0.025299072265625,
-0.008758544921875,
-0.01445770263671875,
0.013427734375,
-0.010589599609375,
-0.04583740234375,
0.055877685546875,
-0.006076812744140625,
-0.00653839111328125,
0.0014123916625976562,
-0.02105712890625,
0.0207977294921875,
0.061004638671875,
-0.00634002685546875,
-0.006977081298828125,
0.047637939453125,
0.006389617919921875,
-0.0399169921875,
-0.0229339599609375,
-0.0210723876953125,
-0.0002512931823730469,
0.0032672882080078125,
-0.00534820556640625,
0.035003662109375,
0.01042938232421875,
-0.0181884765625,
-0.0020198822021484375,
0.027130126953125,
0.006298065185546875,
0.0025424957275390625,
0.051910400390625,
0.0078582763671875,
0.0166778564453125,
-0.0238189697265625,
0.041046142578125,
0.0555419921875,
-0.0080108642578125,
0.0286102294921875,
0.0212554931640625,
0.007343292236328125,
0.03594970703125,
-0.025146484375,
0.0291290283203125,
0.0399169921875,
0.044586181640625,
-0.007678985595703125,
0.0030727386474609375,
0.018768310546875,
-0.0226898193359375,
0.025604248046875,
-0.0198822021484375,
-0.03436279296875,
-0.046905517578125,
0.01033782958984375,
0.02374267578125,
-0.019744873046875,
0.00390625,
-0.0543212890625,
-0.002925872802734375,
0.02117919921875,
0.00933074951171875,
-0.060028076171875,
0.0279083251953125,
-0.0106658935546875,
0.01922607421875,
-0.0181427001953125,
-0.07037353515625,
0.00757598876953125,
0.0333251953125,
-0.0012884140014648438,
0.002315521240234375,
-0.037506103515625,
-0.0254669189453125,
-0.012054443359375,
0.0014123916625976562,
0.0007262229919433594,
0.0164947509765625,
-0.0150604248046875,
0.0396728515625,
-0.026824951171875,
0.089599609375,
-0.016937255859375,
-0.030059814453125,
0.011474609375,
0.01114654541015625,
0.01241302490234375,
-0.07476806640625,
-0.0213775634765625,
-0.040435791015625,
0.033172607421875,
0.024017333984375,
-0.0205078125,
0.0047760009765625,
-0.0428466796875,
-0.07574462890625,
0.035247802734375,
0.0039005279541015625,
-0.045135498046875,
0.024017333984375,
-0.042633056640625,
-0.00632476806640625,
0.0382080078125,
0.0224151611328125,
-0.052001953125,
-0.056671142578125,
0.0076751708984375,
0.017669677734375,
-0.01001739501953125,
0.0135650634765625,
-0.0009050369262695312,
-0.030242919921875,
0.033172607421875,
0.040069580078125,
0.0019168853759765625,
-0.001880645751953125,
0.02264404296875,
0.0159759521484375,
0.047454833984375,
-0.005634307861328125,
0.017486572265625,
-0.005039215087890625,
-0.034332275390625,
-0.033416748046875,
-0.033966064453125,
-0.0313720703125,
0.01261138916015625,
0.1087646484375,
0.057525634765625,
0.0261688232421875,
-0.0657958984375,
0.0077056884765625,
-0.00785064697265625,
0.00986480712890625,
-0.0196533203125,
0.0129852294921875,
-0.061920166015625,
-0.0297393798828125,
0.0224151611328125,
-0.0303497314453125,
0.006561279296875,
0.0283203125,
-0.0224761962890625,
0.013671875,
0.061279296875,
-0.00963592529296875,
-0.0323486328125,
-0.04083251953125,
0.0211181640625,
-0.02105712890625,
-0.028076171875,
0.010528564453125,
0.0229644775390625,
-0.01947021484375,
0.04522705078125,
-0.0013914108276367188,
-0.0009627342224121094,
-0.02105712890625,
0.02642822265625,
0.0017681121826171875,
0.036041259765625,
-0.0255126953125,
-0.019500732421875,
0.01373291015625,
0.01080322265625,
0.0038127899169921875,
-0.018707275390625,
-0.043670654296875,
0.07818603515625,
0.004116058349609375,
0.01605224609375,
-0.0205535888671875,
0.00269317626953125,
-0.023284912109375,
0.0335693359375,
0.007007598876953125,
0.0020503997802734375,
0.041717529296875,
-0.0054473876953125,
-0.005535125732421875,
-0.018829345703125,
0.0079803466796875,
-0.06304931640625,
0.023193359375,
0.0169525146484375,
-0.00673675537109375,
0.04058837890625
]
|
3152ff7e4f7ecd72850ba41de5c8bc482f9fee01 | Wordpress Stackexchange
Q: What WP folder can I use to write files to? I am working on a theme that uses dynamic in head CSS and gives admin an option to also place the same in a file. Problem is that I am not sure what WP folder is always writable. I originally added the CSS file creation to themename/css/ dir but since WP deletes the theme on update this has become an issue.
What do you think is the best way to approach this and what is the safest writable WP folder that I could use for this feature?
A: Best place is the uploads directory - it'll be writable by the server, and it's the defacto directory for storing any user-generated/uploaded files:
$dirs = wp_upload_dir();
$path = $dirs['basedir']; // /path/to/wordpress/wp-content/uploads
| Q: What WP folder can I use to write files to? I am working on a theme that uses dynamic in head CSS and gives admin an option to also place the same in a file. Problem is that I am not sure what WP folder is always writable. I originally added the CSS file creation to themename/css/ dir but since WP deletes the theme on update this has become an issue.
What do you think is the best way to approach this and what is the safest writable WP folder that I could use for this feature?
A: Best place is the uploads directory - it'll be writable by the server, and it's the defacto directory for storing any user-generated/uploaded files:
$dirs = wp_upload_dir();
$path = $dirs['basedir']; // /path/to/wordpress/wp-content/uploads
A: The only directory with guaranteed write access is the upload directory. Everything else might be protected.
Nowadays, we deploy sites with Composer, keep everything under version control and create completely new sites with each deploy in order to be able to roll back the deployed site. That means that the directory will be created completely new with each deploy.
Use the uploads directory if you have to write files, becase that's the only one that is kept (outside of the other directories).
A: One alternative approach us to have a PHP file that gets the theme options and outputs the CSS and enqueue that directly instead. eg.
wp_enqueue_style('custom-css',trailingslashit(get_template_directory_uri()).'styles.php');
This may seem like a strange thing to do at first, but since actually writing a new file should be done via the WP Filesystem for correct owner/group permissions, this is one way around that problem.
// send CSS Header
header("Content-type: text/css; charset: UTF-8");
// faster load by reducing memory with SHORTINIT
define('SHORTINIT', true);
// recursively find WordPress load
function find_require($file,$folder=null) {
if ($folder === null) {$folder = dirname(__FILE__);}
$path = $folder.DIRECTORY_SEPARATOR.$file;
if (file_exists($path)) {require($path); return $folder;}
else {
$upfolder = find_require($file,dirname($folder));
if ($upfolder != '') {return $upfolder;}
}
}
// load WordPress core (minimal)
$wp_root_path = find_require('wp-load.php');
define('ABSPATH', $wp_root_path);
define('WPINC', 'wp-includes');
At this point you will need to include whatever other wp-includes files you need to get the theme options, which may vary depending on your how you are saving those. (You will probably need to add more so you do not get fatal errors.) eg.
include(ABSPATH.WPINC.DIRECTORY_SEPARATOR.'version.php');
include(ABSPATH.WPINC.DIRECTORY_SEPARATOR.'general-template.php');
include(ABSPATH.WPINC.DIRECTORY_SEPARATOR.'link-template.php');
Then just output the CSS options... eg.
echo 'body {color:' . get_theme_mod('body_color') . ';}';
echo 'body {backgroundcolor:' . get_theme_mod('body_background_color') . ';}';
exit;
A: I think the best place to write to is to add a folder in the wp-content folder. Here you can write your css files without it is being overwritten when you have a theme update or have a WP update.
| wordpress | {
"language": "en",
"length": 452,
"provenance": "stackexchange_00019.jsonl.gz:465447",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226605"
} | [
-0.00846099853515625,
-0.0149688720703125,
-0.0147552490234375,
0.01145172119140625,
-0.0261383056640625,
-0.02215576171875,
0.010589599609375,
-0.022918701171875,
0.004184722900390625,
0.0029621124267578125,
-0.023529052734375,
0.0158538818359375,
-0.0016956329345703125,
-0.0178680419921875,
0.0027790069580078125,
-0.00934600830078125,
0.035003662109375,
0.006317138671875,
0.04486083984375,
0.00704193115234375,
-0.01041412353515625,
0.046295166015625,
0.0299835205078125,
0.027008056640625,
0.005138397216796875,
0.018157958984375,
0.0029735565185546875,
-0.0256805419921875,
0.01397705078125,
-0.014862060546875,
0.007617950439453125,
0.00989532470703125,
0.02484130859375,
-0.0009255409240722656,
0.0034027099609375,
0.037139892578125,
0.006000518798828125,
-0.006412506103515625,
0.01183319091796875,
0.004253387451171875,
0.005756378173828125,
-0.006748199462890625,
0.016143798828125,
0.0146331787109375,
-0.0026149749755859375,
-0.052276611328125,
0.0229034423828125,
-0.03448486328125,
0.0231475830078125,
0.03167724609375,
-0.01425933837890625,
0.024017333984375,
-0.01528167724609375,
0.0010280609130859375,
0.0017375946044921875,
0.001811981201171875,
0.0160675048828125,
0.01551055908203125,
0.0243988037109375,
-0.07122802734375,
-0.05889892578125,
-0.003910064697265625,
0.053131103515625,
0.0482177734375,
-0.0051116943359375,
0.007236480712890625,
0.0174560546875,
0.01285552978515625,
-0.043975830078125,
-0.025482177734375,
0.0172576904296875,
-0.0382080078125,
0.014373779296875,
-0.059234619140625,
0.00695037841796875,
0.0247039794921875,
-0.0150299072265625,
-0.00872802734375,
0.0216217041015625,
-0.01312255859375,
0.0031681060791015625,
-0.02337646484375,
-0.0266571044921875,
-0.040863037109375,
0.04644775390625,
0.01218414306640625,
0.0008845329284667969,
-0.0196685791015625,
-0.0170745849609375,
0.028778076171875,
-0.019927978515625,
0.035736083984375,
0.0261993408203125,
-0.0013723373413085938,
-0.0166168212890625,
-0.0177764892578125,
-0.0016393661499023438,
0.0304107666015625,
-0.002086639404296875,
0.03521728515625,
-0.013031005859375,
-0.03851318359375,
0.021636962890625,
-0.044097900390625,
0.023529052734375,
0.03717041015625,
-0.0372314453125,
-0.02728271484375,
0.0428466796875,
0.028411865234375,
0.0014543533325195312,
-0.00994873046875,
0.010162353515625,
-0.049072265625,
0.0009264945983886719,
0.05230712890625,
0.0024585723876953125,
0.03277587890625,
0.0254974365234375,
0.010772705078125,
-0.001811981201171875,
0.00682830810546875,
-0.03936767578125,
-0.01142120361328125,
0.011016845703125,
-0.025970458984375,
-0.030914306640625,
0.045166015625,
0.018096923828125,
0.03314208984375,
-0.0249786376953125,
-0.00200653076171875,
0.04541015625,
0.0116729736328125,
-0.006626129150390625,
-0.0214080810546875,
0.0214691162109375,
-0.0126190185546875,
-0.005672454833984375,
0.0033779144287109375,
0.0074462890625,
-0.02093505859375,
0.00943756103515625,
-0.0156707763671875,
0.01690673828125,
0.0289306640625,
0.0208587646484375,
0.02520751953125,
-0.0177764892578125,
-0.0723876953125,
0.06640625,
-0.01412200927734375,
0.051727294921875,
-0.0184326171875,
0.0023517608642578125,
-0.05218505859375,
0.0260162353515625,
-0.05474853515625,
0.010650634765625,
-0.057861328125,
0.00838470458984375,
0.0192413330078125,
0.04620361328125,
-0.003948211669921875,
0.02056884765625,
-0.041656494140625,
-0.05096435546875,
0.00278472900390625,
0.0296630859375,
0.005046844482421875,
0.00547027587890625,
-0.034637451171875,
0.007305145263671875,
0.024444580078125,
0.0079345703125,
0.040771484375,
0.00164794921875,
-0.014251708984375,
0.0213623046875,
0.047637939453125,
0.006641387939453125,
-0.013946533203125,
0.049530029296875,
-0.002483367919921875,
-0.0004870891571044922,
-0.017608642578125,
0.01690673828125,
0.00949859619140625,
-0.002925872802734375,
0.0164947509765625,
0.0014848709106445312,
-0.000995635986328125,
-0.029205322265625,
0.02191162109375,
-0.01203155517578125,
-0.0049591064453125,
-0.037200927734375,
0.005428314208984375,
-0.0162811279296875,
-0.00562286376953125,
-0.005908966064453125,
-0.00273895263671875,
0.020233154296875,
-0.02337646484375,
-0.0216064453125,
0.003414154052734375,
-0.007549285888671875,
0.02362060546875,
0.004024505615234375,
0.0172271728515625,
0.007305145263671875,
0.001056671142578125,
0.004241943359375,
-0.084228515625,
-0.050018310546875,
0.026519775390625,
-0.0421142578125,
0.021209716796875,
0.00696563720703125,
0.038299560546875,
0.03125,
-0.0304107666015625,
0.01508331298828125,
-0.004180908203125,
-0.002811431884765625,
-0.0028400421142578125,
-0.025543212890625,
-0.005863189697265625,
0.00806427001953125,
0.01357269287109375,
0.01271820068359375,
0.0025539398193359375,
0.01837158203125,
0.037872314453125,
-0.0118865966796875,
-0.029205322265625,
-0.010986328125,
-0.097412109375,
0.015380859375,
0.06878662109375,
0.038543701171875,
0.0360107421875,
0.01343536376953125,
0.005985260009765625,
0.0887451171875,
-0.005733489990234375,
0.01377105712890625,
-0.020782470703125,
0.0009636878967285156,
0.03717041015625,
0.050567626953125,
-0.0168304443359375,
-0.004993438720703125,
-0.06353759765625,
-0.00675201416015625,
0.0174407958984375,
-0.0306854248046875,
-0.011962890625,
0.0165557861328125,
0.0222320556640625,
-0.00605010986328125,
0.01555633544921875,
0.02886962890625,
-0.0198211669921875,
0.01456451416015625,
0.01415252685546875,
-0.0016307830810546875,
-0.01003265380859375,
-0.0294036865234375,
0.031890869140625,
0.0188446044921875,
-0.06085205078125,
0.01299285888671875,
0.057281494140625,
0.055633544921875,
0.00878143310546875,
-0.0022602081298828125,
-0.0550537109375,
0.044281005859375,
0.05157470703125,
-0.03863525390625,
0.0028018951416015625,
-0.042724609375,
-0.018402099609375,
-0.025421142578125,
-0.0457763671875,
0.0150604248046875,
-0.0175933837890625,
0.0272064208984375,
0.033050537109375,
0.034149169921875,
0.038421630859375,
-0.0135345458984375,
0.05914306640625,
-0.0056304931640625,
0.0008158683776855469,
0.044219970703125,
0.0190277099609375,
0.01336669921875,
0.01444244384765625,
0.01514434814453125,
0.041839599609375,
0.0066680908203125,
0.0014858245849609375,
-0.0037097930908203125,
0.0198211669921875,
-0.0017681121826171875,
0.015777587890625,
-0.00921630859375,
-0.033172607421875,
-0.03021240234375,
-0.031036376953125,
0.0159149169921875,
-0.01459503173828125,
0.0249176025390625,
-0.0200347900390625,
0.0053253173828125,
-0.0025539398193359375,
-0.08575439453125,
-0.081787109375,
0.01910400390625,
-0.0714111328125,
0.0099639892578125,
0.004688262939453125,
-0.0406494140625,
-0.022003173828125,
0.037445068359375,
-0.00010639429092407227,
-0.0238494873046875,
-0.01104736328125,
0.006214141845703125,
-0.02630615234375,
-0.035369873046875,
-0.0284271240234375,
0.003665924072265625,
-0.004993438720703125,
-0.0223236083984375,
0.07159423828125,
-0.01654052734375,
-0.0499267578125,
-0.050933837890625,
0.0479736328125,
0.0110015869140625,
-0.0181121826171875,
0.0034332275390625,
-0.0259552001953125,
-0.0195770263671875,
-0.01445770263671875,
0.033966064453125,
0.0103607177734375,
-0.008544921875,
-0.001522064208984375,
-0.02191162109375,
-0.0179901123046875,
-0.036956787109375,
0.05999755859375,
0.043548583984375,
-0.05841064453125,
-0.0181121826171875,
-0.0733642578125,
-0.0198822021484375,
0.0023670196533203125,
-0.0302886962890625,
0.0157012939453125,
0.001010894775390625,
-0.0005421638488769531,
0.0102996826171875,
0.0307159423828125,
0.035064697265625,
0.0479736328125,
0.0263671875,
-0.0160675048828125,
0.0287017822265625,
-0.0019969940185546875,
0.017364501953125,
-0.05419921875,
0.05291748046875,
-0.004108428955078125,
0.0251312255859375,
0.032379150390625,
-0.01445770263671875,
-0.040740966796875,
0.01288604736328125,
-0.06805419921875,
-0.08087158203125,
0.034820556640625,
-0.059417724609375,
0.00954437255859375,
-0.05072021484375,
-0.007419586181640625,
-0.00783538818359375,
0.08758544921875,
-0.031646728515625,
-0.026763916015625,
-0.00528717041015625,
0.033599853515625,
-0.0582275390625,
-0.051544189453125,
-0.02001953125,
0.002536773681640625,
-0.06298828125,
-0.005367279052734375,
-0.0265655517578125,
-0.0186004638671875,
-0.00969696044921875,
-0.053375244140625,
-0.0181732177734375,
-0.06402587890625,
0.0186767578125,
-0.029205322265625,
0.00975799560546875,
0.0244903564453125,
0.006603240966796875,
0.0006632804870605469,
0.01241302490234375,
-0.04266357421875,
-0.1195068359375,
-0.0034999847412109375,
-0.0548095703125,
0.07318115234375,
0.00250244140625,
0.0206756591796875,
-0.0333251953125,
0.046295166015625,
-0.011810302734375,
0.043212890625,
-0.00829315185546875,
0.0187835693359375,
-0.0115814208984375,
-0.006282806396484375,
0.0115509033203125,
-0.0189208984375,
-0.0077056884765625,
-0.02667236328125,
-0.050567626953125,
0.016937255859375,
-0.00960540771484375,
0.028411865234375,
0.0225067138671875,
-0.020111083984375,
0.0075531005859375,
-0.01763916015625,
-0.03375244140625,
0.010894775390625,
-0.0269317626953125,
-0.002941131591796875,
-0.0189666748046875,
-0.00567626953125,
0.05548095703125,
-0.0234527587890625,
0.039642333984375,
0.0002751350402832031,
0.1182861328125,
-0.005657196044921875,
-0.0184173583984375,
-0.0677490234375,
0.019134521484375,
0.054901123046875,
0.0158233642578125,
0.033782958984375,
0.03216552734375,
-0.034393310546875,
0.020904541015625,
0.03753662109375,
-0.01568603515625,
-0.0002294778823852539,
0.02716064453125,
0.0012254714965820312,
-0.01580810546875,
-0.008544921875,
-0.0182647705078125,
0.047271728515625,
0.0162353515625,
-0.0006074905395507812,
-0.00838470458984375,
-0.01274871826171875,
0.0460205078125,
0.0297698974609375,
-0.0301666259765625,
-0.0557861328125,
-0.060089111328125,
0.003696441650390625,
-0.03643798828125,
0.08099365234375,
0.0236358642578125,
-0.006717681884765625,
0.093017578125,
0.061065673828125,
0.0039215087890625,
0.022735595703125,
0.0027484893798828125,
0.0182647705078125,
0.0017004013061523438,
0.06732177734375,
-0.0006303787231445312,
-0.004970550537109375,
0.0027713775634765625,
0.0206146240234375,
0.010284423828125,
-0.034088134765625,
-0.0010442733764648438,
-0.0138702392578125,
-0.003612518310546875,
0.0015478134155273438,
-0.02545166015625,
0.0172576904296875,
-0.00916290283203125,
-0.030792236328125,
0.00991058349609375,
-0.050537109375,
-0.041107177734375,
-0.0458984375,
0.0133819580078125,
0.0079803466796875,
-0.0186614990234375,
0.02191162109375,
0.0052490234375,
-0.003940582275390625,
0.0229339599609375,
-0.0018463134765625,
0.016510009765625,
0.030029296875,
0.006763458251953125,
-0.005588531494140625,
0.0013875961303710938,
0.02313232421875,
-0.022430419921875,
0.046173095703125,
-0.06494140625,
-0.00244903564453125,
0.02081298828125,
0.0743408203125,
-0.047760009765625,
-0.0704345703125,
0.046630859375,
-0.034088134765625,
0.009063720703125,
-0.036956787109375,
-0.0509033203125,
-0.024810791015625,
0.031890869140625,
0.0166015625,
-0.0139007568359375,
-0.0308074951171875,
0.0243988037109375,
-0.00795745849609375,
-0.0270233154296875,
-0.030059814453125,
0.04925537109375,
-0.0240631103515625,
-0.044830322265625,
-0.04022216796875,
-0.021728515625,
0.001506805419921875,
0.0268707275390625,
-0.06536865234375,
-0.033172607421875,
-0.009307861328125,
-0.01439666748046875,
0.006656646728515625,
-0.04644775390625,
0.022430419921875,
-0.01258087158203125,
-0.00848388671875,
-0.00226593017578125,
0.013275146484375,
0.039794921875,
0.0433349609375,
-0.07861328125,
0.0120697021484375,
-0.030914306640625,
0.011871337890625,
0.0208740234375,
-0.042510986328125,
-0.027801513671875,
-0.0280303955078125,
-0.00921630859375,
0.0025691986083984375,
-0.0011196136474609375,
-0.0093841552734375,
-0.0281982421875,
0.038787841796875,
0.03363037109375,
0.009033203125,
-0.0222625732421875,
0.02947998046875,
0.0105133056640625,
0.003936767578125,
0.00177001953125,
0.0013065338134765625,
0.005619049072265625,
-0.01432037353515625,
-0.002315521240234375,
-0.01398468017578125,
0.0003991127014160156,
-0.052886962890625,
0.05999755859375,
0.04052734375,
0.0714111328125,
0.0008454322814941406,
0.04608154296875,
-0.0261077880859375,
0.0038318634033203125,
-0.01541900634765625,
-0.0008549690246582031,
-0.057098388671875,
-0.00902557373046875,
0.010894775390625,
0.0183563232421875,
0.05548095703125,
-0.0147857666015625,
-0.044647216796875,
0.0321044921875,
0.0032482147216796875,
0.03594970703125,
0.0110321044921875,
-0.024078369140625,
0.059295654296875,
0.05035400390625,
0.011505126953125,
0.0615234375,
0.01062774658203125,
0.0377197265625,
0.035491943359375,
0.041595458984375,
0.01464080810546875,
-0.0003445148468017578,
0.0799560546875,
0.024383544921875,
-0.0196533203125,
0.034393310546875,
-0.034149169921875,
0.0173797607421875,
0.048065185546875,
0.056732177734375,
-0.0438232421875,
-0.006847381591796875,
-0.001537322998046875,
-0.015289306640625,
0.0589599609375,
0.005329132080078125,
-0.01110076904296875,
-0.01299285888671875,
0.02728271484375,
-0.010284423828125,
-0.0086212158203125,
0.0194854736328125,
0.0010404586791992188,
0.0010023117065429688,
0.00012004375457763672,
0.01505279541015625,
-0.0008325576782226562,
-0.042236328125,
-0.03570556640625,
0.0618896484375,
-0.038970947265625,
-0.0021820068359375,
-0.016357421875,
-0.004268646240234375,
-0.0203857421875,
-0.0238037109375,
0.0198211669921875,
-0.05584716796875,
0.02899169921875,
-0.0016326904296875,
-0.00600433349609375,
0.059906005859375,
0.0294189453125,
0.0039520263671875,
0.006256103515625,
-0.0002359151840209961,
0.03753662109375,
-0.0255126953125,
-0.0021991729736328125,
0.060272216796875,
0.00823211669921875,
-0.068115234375,
0.01430511474609375,
-0.04327392578125,
-0.0036296844482421875,
-0.0113525390625,
-0.01397705078125,
0.055877685546875,
-0.044219970703125,
-0.0079345703125,
0.01282501220703125,
0.01355743408203125,
0.01242828369140625,
-0.0163421630859375,
0.048614501953125,
-0.08819580078125,
-0.031646728515625,
-0.00018358230590820312,
-0.01033782958984375,
-0.006809234619140625,
-0.00702667236328125,
-0.021636962890625,
0.0684814453125,
-0.0305938720703125,
-0.00911712646484375,
0.0498046875,
0.02838134765625,
-0.0281219482421875,
0.01068878173828125,
-0.0260009765625,
0.0186767578125,
-0.0279693603515625,
0.0069732666015625,
-0.045196533203125,
0.015350341796875,
-0.0178680419921875,
0.01023101806640625,
0.041656494140625,
0.006465911865234375,
-0.0200653076171875,
-0.0023784637451171875,
0.0626220703125,
0.049102783203125,
0.00914764404296875,
0.025543212890625,
-0.01300048828125,
-0.035858154296875,
0.003658294677734375,
-0.0013599395751953125,
0.010711669921875,
0.0109405517578125,
-0.04339599609375,
0.016204833984375,
-0.00908660888671875,
-0.03643798828125,
-0.00807952880859375,
-0.0007829666137695312,
-0.074462890625,
0.010009765625,
0.028564453125,
0.026153564453125,
-0.0010929107666015625,
0.013214111328125,
0.03302001953125,
-0.06976318359375,
-0.022064208984375,
-0.01325225830078125,
0.043792724609375,
0.0083465576171875,
0.005878448486328125,
-0.0117034912109375,
0.0021762847900390625,
-0.02655029296875,
0.01490020751953125,
-0.004119873046875,
0.03466796875,
-0.0148773193359375,
0.032501220703125,
0.0229034423828125,
0.015899658203125,
-0.0184783935546875,
0.0215301513671875,
0.0098724365234375,
0.01751708984375,
-0.04119873046875,
-0.004367828369140625,
0.01065826416015625,
-0.0050811767578125,
0.0052642822265625,
-0.006427764892578125,
0.020599365234375,
-0.00634765625,
-0.00907135009765625,
-0.050689697265625,
-0.008758544921875,
0.04119873046875,
0.0024623870849609375,
-0.00566864013671875,
-0.005939483642578125,
0.00669097900390625,
-0.003345489501953125,
0.0122222900390625,
-0.04547119140625,
-0.006511688232421875,
-0.01041412353515625,
0.023529052734375,
-0.009002685546875,
0.0222015380859375,
0.00949859619140625,
0.006916046142578125,
0.05120849609375,
0.0042266845703125,
-0.004199981689453125,
-0.019195556640625,
-0.05169677734375,
0.03173828125,
0.0207672119140625,
0.03619384765625,
0.03997802734375,
0.06451416015625,
0.05059814453125,
-0.01052093505859375,
-0.006877899169921875,
-0.0202178955078125,
-0.02294921875,
0.013458251953125,
0.0009350776672363281,
0.0184478759765625,
0.02978515625,
-0.005466461181640625,
-0.040740966796875,
0.027252197265625,
0.056304931640625,
-0.01184844970703125,
0.0242919921875,
-0.004055023193359375,
-0.00711822509765625,
0.0219268798828125,
-0.0235443115234375,
0.00995635986328125,
0.0101776123046875,
-0.025054931640625,
-0.00482177734375,
0.004238128662109375,
0.0022182464599609375,
-0.004856109619140625,
0.025970458984375,
-0.0082244873046875,
0.0251617431640625,
0.02117919921875,
-0.001293182373046875,
0.005725860595703125,
0.01226043701171875,
-0.004436492919921875,
0.00255584716796875,
0.03985595703125,
0.0147247314453125,
-0.087646484375,
-0.048492431640625,
-0.060150146484375,
0.057769775390625,
0.0242767333984375,
0.125,
-0.035308837890625,
0.032989501953125,
-0.0036106109619140625,
0.0101165771484375,
-0.02532958984375,
-0.0179290771484375,
0.04852294921875,
-0.01364898681640625,
-0.002109527587890625,
-0.0117645263671875,
-0.0308685302734375,
0.005176544189453125,
0.0212860107421875,
-0.039398193359375,
-0.022796630859375,
-0.01157379150390625,
0.03472900390625,
0.0224151611328125,
-0.00859832763671875,
-0.0296478271484375,
-0.01983642578125,
-0.015777587890625,
0.019134521484375,
0.0161590576171875,
-0.034210205078125,
-0.064208984375,
0.03961181640625,
0.01522064208984375,
0.001865386962890625,
0.045806884765625,
-0.03546142578125,
0.07086181640625,
0.03656005859375,
-0.007598876953125,
-0.06109619140625,
-0.013153076171875,
-0.015594482421875,
-0.0276641845703125,
-0.00568389892578125,
0.058135986328125,
-0.0215911865234375,
-0.0293426513671875,
-0.028961181640625,
0.01299285888671875,
0.03546142578125,
-0.0222320556640625,
0.0237274169921875,
-0.033203125,
0.00472259521484375,
0.05328369140625,
-0.03839111328125,
-0.0178680419921875,
-0.0196075439453125,
-0.004322052001953125,
0.046722412109375,
-0.025848388671875,
0.0170440673828125,
-0.056640625,
0.010162353515625,
0.037200927734375,
0.006565093994140625,
-0.04656982421875,
0.026611328125,
-0.03375244140625,
0.038848876953125,
0.007183074951171875,
0.07568359375,
-0.035675048828125,
0.00974273681640625,
-0.04913330078125,
-0.05657958984375,
-0.0281829833984375,
0.0836181640625,
-0.031585693359375,
0.0181732177734375,
0.028045654296875,
-0.0216522216796875,
0.05108642578125,
0.0367431640625,
0.0235595703125,
0.088134765625,
-0.02496337890625,
-0.0017786026000976562,
0.0292205810546875,
-0.007171630859375,
-0.038848876953125,
-0.060272216796875,
0.0006313323974609375,
0.0019092559814453125,
-0.01224517822265625,
-0.022705078125,
0.004909515380859375,
0.01139068603515625,
-0.03692626953125,
-0.07366943359375,
-0.01068878173828125,
0.003971099853515625,
-0.0386962890625,
-0.0211029052734375,
0.004016876220703125,
-0.006320953369140625,
-0.01238250732421875,
-0.0104827880859375,
-0.026763916015625,
0.0135955810546875,
0.043853759765625,
0.02740478515625,
0.0012722015380859375,
0.03466796875,
0.01206207275390625,
-0.059417724609375,
-0.006591796875,
-0.0188751220703125,
0.043182373046875,
0.002140045166015625,
-0.00982666015625,
0.032135009765625,
0.06195068359375,
0.00319671630859375,
0.01641845703125,
0.0166473388671875,
-0.05316162109375,
-0.011627197265625,
0.0024051666259765625,
-0.035491943359375,
-0.00390625,
0.049072265625,
0.056671142578125,
0.012664794921875,
-0.0244140625,
-0.0268096923828125,
-0.054229736328125,
-0.0430908203125,
0.005870819091796875,
0.01198577880859375,
-0.03173828125,
0.045989990234375,
0.00498199462890625,
0.01171875,
-0.0299072265625,
0.01148223876953125,
-0.00975799560546875,
-0.0211334228515625,
0.01134490966796875,
-0.0024890899658203125,
-0.0090179443359375,
-0.01090240478515625,
0.039154052734375,
0.00007402896881103516,
0.06536865234375,
-0.031707763671875,
0.023040771484375,
0.061920166015625,
0.0304412841796875,
0.0169525146484375,
0.03936767578125,
-0.0574951171875,
0.0011758804321289062,
-0.01309967041015625,
0.03704833984375,
-0.055145263671875,
-0.009857177734375,
0.007694244384765625,
0.00775146484375,
-0.017791748046875,
-0.0150299072265625,
0.012786865234375,
0.061798095703125,
-0.01016998291015625,
0.06561279296875,
0.00687408447265625,
0.00432586669921875,
-0.0289306640625,
0.0487060546875,
-0.0234527587890625,
-0.0115814208984375,
-0.00969696044921875,
-0.0269927978515625,
0.006103515625,
-0.014892578125,
0.009246826171875,
-0.04083251953125,
0.0181884765625,
-0.007526397705078125,
0.0078125,
0.0230255126953125
]
|
543cdca89ac71f6c23c9f3cb370dbbe2066c708d | Wordpress Stackexchange
Q: My child theme doesn't work Error: "The parent theme is missing. Please install your parent theme" I am using the Pricerr theme. In my parent theme I have a CSS folder with a few css files in it, a rtl.css and a style.css.
What should be the code to put in the functions folder so that I can pull the info from the parents theme? And am i on the right track for identifying this as the error when they say "The parent theme is missing. Please install your parent theme?"
I've checked and my parent theme is under Appearance > Themes hence it is definitely loaded.
A: This question has long been answered, but since I stumbled here and this did not solve my problem, I thought I would add another solution.
In my case, the template was set correctly in both the parent and the child theme, but the parent theme's folder was not named what it expected. Despite all of the files themselves being correct, this can be a parent folder name issue.
| Q: My child theme doesn't work Error: "The parent theme is missing. Please install your parent theme" I am using the Pricerr theme. In my parent theme I have a CSS folder with a few css files in it, a rtl.css and a style.css.
What should be the code to put in the functions folder so that I can pull the info from the parents theme? And am i on the right track for identifying this as the error when they say "The parent theme is missing. Please install your parent theme?"
I've checked and my parent theme is under Appearance > Themes hence it is definitely loaded.
A: This question has long been answered, but since I stumbled here and this did not solve my problem, I thought I would add another solution.
In my case, the template was set correctly in both the parent and the child theme, but the parent theme's folder was not named what it expected. Despite all of the files themselves being correct, this can be a parent folder name issue.
A: There are three things to check:
*
*Is your parent theme complete and what is the exact spelling of the parent theme's name in its style.css. Uppercase and lowercase are important.
*Is the child theme directory named parentname-child. It should be in the themes directory, not in a subdirectory of the parent theme.
*Does the child theme's style.css have the line Template: parentname in its header. Beware: NOT Template: parentname-child.
Strictly speaking you don't need a functions.php file for your child theme, but you will probably want to load the parent theme's style.css as well. Read more about that here.
A: The Template Name in the Child Theme Should be Parent theme's Folder name., If you give the Parent theme Name or something else It won't work.
Is your theme "pricerr" provided by 'sitemile' ?
then the template name should be like
Template: PricerrTheme
| wordpress | {
"language": "en",
"length": 322,
"provenance": "stackexchange_00019.jsonl.gz:465460",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226666"
} | [
-0.035064697265625,
-0.00664520263671875,
-0.023162841796875,
0.0009474754333496094,
-0.030059814453125,
-0.0035572052001953125,
-0.020843505859375,
-0.0287628173828125,
0.00223541259765625,
0.003093719482421875,
-0.025787353515625,
0.003917694091796875,
-0.033660888671875,
-0.041015625,
-0.01336669921875,
-0.039764404296875,
0.0428466796875,
-0.02972412109375,
0.0069580078125,
-0.007686614990234375,
-0.0251617431640625,
0.0264739990234375,
0.0245513916015625,
0.056549072265625,
0.04071044921875,
-0.0022373199462890625,
0.039703369140625,
-0.0521240234375,
0.0281829833984375,
-0.036041259765625,
0.027008056640625,
0.01525115966796875,
0.0180816650390625,
0.007114410400390625,
0.0076904296875,
-0.039154052734375,
0.007801055908203125,
-0.00921630859375,
0.005214691162109375,
0.01091766357421875,
-0.00933837890625,
0.01036834716796875,
0.00223541259765625,
0.036865234375,
-0.0302734375,
-0.05841064453125,
0.00122833251953125,
-0.03271484375,
0.00643157958984375,
-0.0213775634765625,
-0.0010538101196289062,
-0.0162200927734375,
0.01076507568359375,
-0.02520751953125,
-0.0159149169921875,
-0.01873779296875,
-0.009002685546875,
0.04278564453125,
0.01453399658203125,
-0.038116455078125,
-0.0443115234375,
0.022979736328125,
0.0184173583984375,
0.01374053955078125,
0.01447296142578125,
0.018585205078125,
0.00406646728515625,
0.007389068603515625,
-0.058990478515625,
0.0274200439453125,
0.02630615234375,
-0.052886962890625,
-0.00009417533874511719,
-0.041290283203125,
-0.00750732421875,
-0.02069091796875,
-0.0131988525390625,
-0.06256103515625,
0.0094757080078125,
0.0014772415161132812,
-0.031707763671875,
0.0272369384765625,
-0.07452392578125,
-0.021270751953125,
-0.00009453296661376953,
-0.0035037994384765625,
-0.02362060546875,
0.0023345947265625,
-0.050872802734375,
-0.0123138427734375,
-0.036163330078125,
-0.033477783203125,
-0.050262451171875,
0.02667236328125,
0.01763916015625,
0.004608154296875,
0.0491943359375,
0.1016845703125,
-0.046417236328125,
0.01015472412109375,
-0.0416259765625,
-0.009552001953125,
-0.00563812255859375,
-0.0452880859375,
0.002750396728515625,
0.036834716796875,
-0.01068115234375,
0.039031982421875,
0.05535888671875,
0.04248046875,
0.0357666015625,
0.0258026123046875,
-0.0152130126953125,
-0.0400390625,
-0.0191650390625,
0.05621337890625,
-0.0092010498046875,
-0.0085296630859375,
0.002910614013671875,
0.011138916015625,
-0.00342559814453125,
0.0232696533203125,
-0.0268707275390625,
-0.03363037109375,
-0.0178375244140625,
-0.045257568359375,
-0.027984619140625,
0.021881103515625,
0.03900146484375,
0.031158447265625,
-0.051116943359375,
-0.013885498046875,
0.07861328125,
0.033233642578125,
0.0291595458984375,
-0.034912109375,
0.01250457763671875,
0.0209503173828125,
0.01139068603515625,
-0.02008056640625,
0.053955078125,
-0.02398681640625,
-0.0258636474609375,
0.025177001953125,
-0.00525665283203125,
0.00661468505859375,
0.0211944580078125,
0.019561767578125,
-0.0077056884765625,
-0.02191162109375,
0.01468658447265625,
-0.023040771484375,
0.04248046875,
0.0018129348754882812,
-0.007762908935546875,
-0.030181884765625,
-0.0032215118408203125,
-0.0304718017578125,
-0.00704193115234375,
-0.034332275390625,
-0.010986328125,
-0.0067291259765625,
0.034423828125,
-0.0142822265625,
-0.038665771484375,
-0.00516510009765625,
0.0046844482421875,
-0.01131439208984375,
0.0276336669921875,
0.01248931884765625,
-0.01120758056640625,
-0.041107177734375,
-0.019195556640625,
0.003849029541015625,
-0.0064239501953125,
0.041229248046875,
0.00392913818359375,
0.006107330322265625,
0.026458740234375,
0.0164794921875,
-0.00787353515625,
-0.0229644775390625,
0.04364013671875,
-0.022003173828125,
-0.041961669921875,
-0.0148468017578125,
0.0298919677734375,
0.033294677734375,
0.01085662841796875,
0.0252532958984375,
0.0188140869140625,
0.01543426513671875,
-0.007099151611328125,
0.0112762451171875,
0.004077911376953125,
-0.017303466796875,
-0.03973388671875,
-0.00860595703125,
-0.02154541015625,
0.0102691650390625,
-0.021209716796875,
0.007843017578125,
0.006103515625,
-0.02001953125,
-0.015838623046875,
-0.01416778564453125,
-0.006656646728515625,
0.034637451171875,
-0.034515380859375,
0.007568359375,
0.0357666015625,
-0.009918212890625,
-0.01334381103515625,
-0.050933837890625,
-0.01157379150390625,
0.0236053466796875,
-0.0298309326171875,
0.064208984375,
0.0038547515869140625,
0.0447998046875,
0.0116424560546875,
-0.037841796875,
0.042877197265625,
-0.0060882568359375,
0.0023651123046875,
0.05023193359375,
-0.035980224609375,
0.0227508544921875,
0.0015859603881835938,
0.04779052734375,
-0.005336761474609375,
-0.0032100677490234375,
0.0019388198852539062,
0.0048675537109375,
-0.052032470703125,
-0.01369476318359375,
-0.034576416015625,
0.0034008026123046875,
0.0010442733764648438,
0.046142578125,
0.02398681640625,
0.015869140625,
-0.03656005859375,
-0.0193023681640625,
0.0841064453125,
-0.057281494140625,
-0.054229736328125,
0.025177001953125,
0.0041046142578125,
0.018707275390625,
0.051177978515625,
-0.0167083740234375,
0.0026950836181640625,
-0.0345458984375,
0.0241851806640625,
-0.006191253662109375,
-0.0357666015625,
-0.0389404296875,
-0.01141357421875,
0.018707275390625,
0.0198516845703125,
-0.0165557861328125,
-0.0309906005859375,
0.0014286041259765625,
-0.0251007080078125,
0.04876708984375,
0.0008687973022460938,
0.0018634796142578125,
-0.0023193359375,
0.0084991455078125,
0.007049560546875,
-0.029266357421875,
0.00844573974609375,
0.041839599609375,
-0.01325225830078125,
0.0205535888671875,
-0.0106964111328125,
-0.017120361328125,
-0.01491546630859375,
0.0232696533203125,
-0.0029754638671875,
0.004360198974609375,
-0.059661865234375,
-0.0013751983642578125,
-0.006046295166015625,
-0.03607177734375,
0.002117156982421875,
0.048126220703125,
0.003337860107421875,
-0.007297515869140625,
0.0196533203125,
0.0183563232421875,
-0.00872039794921875,
0.02410888671875,
-0.0010700225830078125,
-0.0169830322265625,
0.047332763671875,
0.027679443359375,
0.00972747802734375,
-0.0020923614501953125,
-0.01096343994140625,
0.01433563232421875,
-0.01064300537109375,
-0.017333984375,
0.024688720703125,
-0.00244140625,
0.03485107421875,
0.012298583984375,
0.0135345458984375,
0.005420684814453125,
-0.04998779296875,
-0.01025390625,
0.04339599609375,
0.029083251953125,
0.016448974609375,
-0.01094818115234375,
-0.0224609375,
0.03570556640625,
-0.059783935546875,
-0.06634521484375,
-0.0567626953125,
-0.0211639404296875,
-0.03662109375,
-0.00196075439453125,
-0.000705718994140625,
0.0198974609375,
-0.0223846435546875,
0.0081329345703125,
0.034759521484375,
-0.09765625,
-0.0399169921875,
-0.0965576171875,
-0.08013916015625,
-0.015899658203125,
0.0311279296875,
-0.0035228729248046875,
-0.0074005126953125,
0.072265625,
-0.00262451171875,
-0.06231689453125,
-0.033782958984375,
0.023162841796875,
0.0007977485656738281,
-0.00001627206802368164,
-0.0102691650390625,
-0.023101806640625,
0.007354736328125,
-0.0056610107421875,
0.01384735107421875,
0.01071929931640625,
-0.013427734375,
-0.0052032470703125,
-0.0531005859375,
-0.0224609375,
-0.03997802734375,
0.050750732421875,
0.08050537109375,
-0.045562744140625,
-0.0012121200561523438,
-0.05572509765625,
-0.07464599609375,
-0.016326904296875,
-0.08538818359375,
0.0537109375,
0.07763671875,
0.0037212371826171875,
-0.00824737548828125,
0.007755279541015625,
-0.0014162063598632812,
0.0029125213623046875,
0.0145416259765625,
-0.007526397705078125,
0.0728759765625,
-0.0190277099609375,
-0.00885009765625,
-0.041015625,
0.02001953125,
-0.0222015380859375,
0.0296478271484375,
0.00820159912109375,
0.00275421142578125,
-0.00933074951171875,
0.003879547119140625,
-0.02392578125,
-0.05255126953125,
0.039764404296875,
0.005207061767578125,
0.0458984375,
-0.049530029296875,
-0.043670654296875,
-0.0302734375,
0.08612060546875,
-0.0328369140625,
-0.0177459716796875,
-0.0095062255859375,
0.01111602783203125,
-0.05096435546875,
-0.032318115234375,
-0.032257080078125,
0.0118255615234375,
-0.0361328125,
-0.024169921875,
-0.0037937164306640625,
-0.032806396484375,
0.015899658203125,
-0.0187225341796875,
0.0010805130004882812,
-0.039794921875,
0.02496337890625,
-0.0003998279571533203,
-0.008544921875,
0.0078887939453125,
-0.0269622802734375,
-0.006031036376953125,
-0.015350341796875,
-0.004970550537109375,
-0.05810546875,
-0.0149383544921875,
-0.02227783203125,
0.041900634765625,
0.0200653076171875,
-0.007068634033203125,
-0.004383087158203125,
0.033721923828125,
0.0200347900390625,
0.08441162109375,
-0.00997161865234375,
-0.01739501953125,
0.00739288330078125,
-0.006591796875,
0.0216064453125,
-0.0113525390625,
-0.0006651878356933594,
0.005207061767578125,
-0.06524658203125,
0.03509521484375,
-0.01256561279296875,
0.02410888671875,
0.031524658203125,
-0.050872802734375,
0.00405120849609375,
-0.00504302978515625,
-0.026611328125,
0.0037384033203125,
0.0002351999282836914,
-0.0200958251953125,
0.00159454345703125,
-0.0206298828125,
-0.0009632110595703125,
-0.0460205078125,
0.01204681396484375,
0.0181884765625,
0.051605224609375,
0.01337432861328125,
-0.01038360595703125,
-0.01068878173828125,
0.01117706298828125,
0.026702880859375,
0.051971435546875,
-0.0003266334533691406,
-0.042938232421875,
-0.028289794921875,
0.032470703125,
0.0179901123046875,
0.0019273757934570312,
0.01312255859375,
0.05780029296875,
-0.007476806640625,
-0.0328369140625,
0.03009033203125,
-0.004482269287109375,
-0.0262298583984375,
0.024810791015625,
0.0026531219482421875,
-0.01325225830078125,
-0.01416778564453125,
0.027679443359375,
0.0026798248291015625,
-0.001674652099609375,
-0.051239013671875,
-0.006893157958984375,
-0.012725830078125,
0.0012445449829101562,
0.016876220703125,
0.031005859375,
0.00400543212890625,
-0.0040283203125,
-0.0225067138671875,
0.0027561187744140625,
-0.0235443115234375,
0.05108642578125,
-0.0232391357421875,
0.032958984375,
-0.0179290771484375,
-0.0200958251953125,
-0.036651611328125,
-0.00354766845703125,
0.04754638671875,
0.033935546875,
-0.0255126953125,
-0.0029544830322265625,
0.004550933837890625,
-0.009490966796875,
-0.0092926025390625,
0.0253448486328125,
0.002246856689453125,
0.0033130645751953125,
-0.0147552490234375,
-0.0031185150146484375,
0.0198516845703125,
0.0117034912109375,
-0.022613525390625,
-0.0384521484375,
0.011383056640625,
-0.030120849609375,
-0.0062408447265625,
-0.0048980712890625,
0.00014150142669677734,
-0.0191497802734375,
-0.005077362060546875,
-0.058135986328125,
-0.063720703125,
0.038818359375,
0.0211334228515625,
-0.03271484375,
0.047698974609375,
-0.01538848876953125,
0.10205078125,
-0.03302001953125,
0.0036869049072265625,
0.008941650390625,
0.06396484375,
0.00238037109375,
-0.0236053466796875,
0.01222991943359375,
-0.04473876953125,
-0.0108795166015625,
-0.019561767578125,
-0.03216552734375,
-0.00821685791015625,
-0.00665283203125,
-0.00545501708984375,
0.005985260009765625,
0.00664520263671875,
-0.0077972412109375,
0.00836944580078125,
-0.0135498046875,
0.00693511962890625,
0.06915283203125,
-0.054473876953125,
0.0153350830078125,
0.0110626220703125,
-0.01641845703125,
-0.00757598876953125,
0.00536346435546875,
-0.040863037109375,
-0.02984619140625,
-0.02532958984375,
-0.00995635986328125,
0.064453125,
-0.019287109375,
0.00494384765625,
-0.006748199462890625,
-0.0194091796875,
-0.01453399658203125,
0.006710052490234375,
0.04766845703125,
0.035675048828125,
-0.053802490234375,
0.004940032958984375,
-0.0504150390625,
-0.0198822021484375,
-0.039337158203125,
-0.0278472900390625,
-0.07745361328125,
0.01380157470703125,
-0.039093017578125,
-0.0014400482177734375,
-0.0311279296875,
-0.019073486328125,
-0.035064697265625,
0.04888916015625,
0.02471923828125,
0.004405975341796875,
-0.0163116455078125,
0.05401611328125,
-0.01366424560546875,
0.024749755859375,
0.0156707763671875,
0.03131103515625,
0.0021381378173828125,
-0.0205535888671875,
0.014617919921875,
0.0003256797790527344,
-0.0164031982421875,
-0.02484130859375,
0.014404296875,
-0.0087738037109375,
0.056427001953125,
-0.0032672882080078125,
0.020263671875,
-0.03704833984375,
-0.0166168212890625,
-0.0155181884765625,
0.0701904296875,
-0.038330078125,
0.004741668701171875,
0.016937255859375,
-0.04559326171875,
0.0058135986328125,
0.0278167724609375,
0.0009469985961914062,
0.0416259765625,
-0.0214691162109375,
0.0215911865234375,
0.046722412109375,
-0.03076171875,
0.057769775390625,
0.06341552734375,
0.003040313720703125,
0.047698974609375,
-0.0111541748046875,
0.0118865966796875,
0.0003237724304199219,
0.046173095703125,
-0.011932373046875,
-0.007183074951171875,
0.050537109375,
0.01593017578125,
-0.0009508132934570312,
0.0150909423828125,
-0.0236053466796875,
-0.025970458984375,
0.054901123046875,
0.025909423828125,
-0.0302734375,
-0.04791259765625,
-0.017913818359375,
-0.038299560546875,
-0.006504058837890625,
0.00572967529296875,
0.0151519775390625,
0.0037708282470703125,
0.0070953369140625,
-0.007022857666015625,
-0.0015230178833007812,
0.0210418701171875,
-0.021148681640625,
-0.0063018798828125,
-0.0137481689453125,
0.0303802490234375,
-0.0038661956787109375,
-0.0645751953125,
-0.01552581787109375,
0.056488037109375,
-0.0491943359375,
-0.007213592529296875,
0.0250091552734375,
-0.029937744140625,
-0.0138092041015625,
-0.036590576171875,
-0.021240234375,
-0.0231475830078125,
-0.005649566650390625,
-0.01812744140625,
-0.015777587890625,
-0.0009975433349609375,
0.034423828125,
-0.041778564453125,
0.00640106201171875,
0.00428009033203125,
0.01349639892578125,
0.058380126953125,
0.00466156005859375,
0.04156494140625,
-0.0352783203125,
-0.042022705078125,
-0.005832672119140625,
-0.04315185546875,
-0.0201568603515625,
0.0009794235229492188,
0.00054168701171875,
0.006412506103515625,
0.01226806640625,
-0.021728515625,
0.061553955078125,
0.029815673828125,
-0.0292205810546875,
-0.0027751922607421875,
0.04498291015625,
-0.020263671875,
0.019012451171875,
0.006824493408203125,
0.036834716796875,
-0.034515380859375,
-0.0110321044921875,
-0.01495361328125,
0.10284423828125,
-0.0645751953125,
0.028472900390625,
0.05133056640625,
0.040283203125,
-0.01189422607421875,
0.0292816162109375,
-0.01076507568359375,
0.04486083984375,
0.036468505859375,
-0.0081329345703125,
-0.0341796875,
-0.023834228515625,
-0.0251312255859375,
0.050689697265625,
0.01800537109375,
-0.0014371871948242188,
-0.054840087890625,
0.0035953521728515625,
0.057159423828125,
0.0291900634765625,
0.00911712646484375,
0.046783447265625,
-0.045501708984375,
-0.054290771484375,
-0.0149993896484375,
0.0025386810302734375,
0.0181884765625,
-0.00986480712890625,
-0.055328369140625,
-0.0232391357421875,
0.005939483642578125,
-0.01922607421875,
0.016204833984375,
-0.02935791015625,
-0.04681396484375,
0.00873565673828125,
0.0258026123046875,
-0.039794921875,
0.0157470703125,
-0.0011739730834960938,
0.0008444786071777344,
-0.0279998779296875,
-0.054473876953125,
0.004604339599609375,
0.0202789306640625,
-0.0079498291015625,
-0.014862060546875,
-0.0531005859375,
0.0024738311767578125,
-0.0377197265625,
-0.0258636474609375,
-0.0223541259765625,
0.056854248046875,
-0.049163818359375,
0.0012540817260742188,
0.03570556640625,
0.020416259765625,
0.00655364990234375,
0.03448486328125,
0.00864410400390625,
0.005157470703125,
-0.032562255859375,
-0.021636962890625,
0.02459716796875,
0.0009021759033203125,
-0.0228271484375,
-0.0202178955078125,
-0.050933837890625,
-0.0226593017578125,
0.007167816162109375,
-0.03436279296875,
-0.0285797119140625,
0.0032958984375,
0.037017822265625,
-0.0003991127014160156,
0.00044918060302734375,
0.00839996337890625,
-0.0369873046875,
0.039886474609375,
-0.02960205078125,
0.0018787384033203125,
0.0084686279296875,
-0.01490020751953125,
0.0261383056640625,
-0.07135009765625,
0.00951385498046875,
-0.00670623779296875,
0.0241546630859375,
0.00970458984375,
0.00563812255859375,
-0.0163421630859375,
-0.006366729736328125,
-0.00516510009765625,
0.01149749755859375,
0.004055023193359375,
-0.00022494792938232422,
0.022186279296875,
0.05035400390625,
-0.01070404052734375,
-0.031890869140625,
0.00753021240234375,
-0.0143280029296875,
-0.0256500244140625,
0.0160980224609375,
-0.00888824462890625,
0.0296173095703125,
-0.01427459716796875,
-0.018402099609375,
0.04437255859375,
0.0235443115234375,
-0.004444122314453125,
-0.004150390625,
-0.00432586669921875,
-0.01004791259765625,
0.018646240234375,
0.041748046875,
0.005214691162109375,
0.03985595703125,
-0.0210113525390625,
-0.01727294921875,
-0.016510009765625,
-0.025299072265625,
0.01406097412109375,
0.038421630859375,
0.03167724609375,
-0.01261138916015625,
0.0304412841796875,
-0.028717041015625,
-0.013916015625,
0.0162811279296875,
0.029296875,
-0.001071929931640625,
-0.00989532470703125,
0.0144500732421875,
0.0137786865234375,
-0.0024776458740234375,
0.021148681640625,
0.023651123046875,
0.0117645263671875,
0.0899658203125,
-0.045654296875,
0.01140594482421875,
0.004207611083984375,
0.046173095703125,
-0.0283966064453125,
-0.032806396484375,
0.07281494140625,
-0.01235198974609375,
0.005527496337890625,
-0.01580810546875,
-0.09478759765625,
0.003948211669921875,
0.0229339599609375,
-0.0212860107421875,
0.0054779052734375,
0.0019483566284179688,
0.015167236328125,
-0.018951416015625,
0.0159759521484375,
-0.01099395751953125,
-0.05474853515625,
-0.049896240234375,
0.004123687744140625,
0.0256500244140625,
0.0262298583984375,
-0.044921875,
0.0032444000244140625,
0.0428466796875,
-0.032440185546875,
0.030853271484375,
-0.018646240234375,
0.046844482421875,
0.02410888671875,
0.00745391845703125,
-0.0909423828125,
-0.0038776397705078125,
-0.00931549072265625,
0.005359649658203125,
0.006595611572265625,
0.07196044921875,
0.011932373046875,
-0.005428314208984375,
0.0526123046875,
0.07574462890625,
0.054443359375,
-0.0645751953125,
0.0195770263671875,
0.10205078125,
-0.0199432373046875,
0.04852294921875,
0.006458282470703125,
-0.022064208984375,
-0.0287628173828125,
0.00499725341796875,
0.0018548965454101562,
-0.0008549690246582031,
-0.016876220703125,
-0.003376007080078125,
0.017181396484375,
0.047821044921875,
0.01453399658203125,
-0.06268310546875,
0.0147552490234375,
-0.0206451416015625,
0.07208251953125,
-0.00414276123046875,
-0.0299224853515625,
0.0236968994140625,
0.00429534912109375,
-0.0239410400390625,
-0.007843017578125,
-0.0172271728515625,
-0.01265716552734375,
-0.007221221923828125,
0.035888671875,
0.037322998046875,
-0.02215576171875,
0.026214599609375,
0.06060791015625,
0.03302001953125,
0.09820556640625,
-0.0043487548828125,
-0.028594970703125,
-0.0221099853515625,
0.005218505859375,
-0.0018749237060546875,
-0.019195556640625,
0.020751953125,
-0.0477294921875,
-0.03814697265625,
-0.06689453125,
0.026947021484375,
0.02362060546875,
-0.040740966796875,
-0.067626953125,
0.033355712890625,
-0.021209716796875,
-0.025604248046875,
-0.0300445556640625,
0.0033054351806640625,
-0.0147247314453125,
0.032623291015625,
0.0018787384033203125,
-0.01361083984375,
0.0152740478515625,
0.056793212890625,
0.01354217529296875,
-0.027374267578125,
0.0148468017578125,
-0.00238800048828125,
-0.07037353515625,
0.01129150390625,
0.00823974609375,
-0.0092620849609375,
-0.0148162841796875,
0.01044464111328125,
-0.0019702911376953125,
0.0364990234375,
-0.02838134765625,
-0.05322265625,
-0.02239990234375,
-0.0017690658569335938,
-0.0015478134155273438,
-0.03204345703125,
-0.003147125244140625,
-0.04034423828125,
0.0301513671875,
-0.0121307373046875,
-0.004367828369140625,
0.016876220703125,
-0.054229736328125,
-0.09307861328125,
-0.021209716796875,
-0.01458740234375,
0.0162811279296875,
-0.07989501953125,
0.02813720703125,
0.041046142578125,
-0.0164642333984375,
0.027191162109375,
-0.0181121826171875,
-0.040069580078125,
-0.0010766983032226562,
-0.03369140625,
-0.01424407958984375,
-0.033447265625,
-0.040924072265625,
0.06744384765625,
-0.01184844970703125,
0.032623291015625,
-0.00650787353515625,
0.0263824462890625,
0.0611572265625,
0.047637939453125,
0.0068359375,
0.04034423828125,
-0.036529541015625,
-0.0017709732055664062,
0.0114288330078125,
0.035614013671875,
-0.024200439453125,
-0.01067352294921875,
0.0198822021484375,
0.0028324127197265625,
-0.0290069580078125,
-0.01348876953125,
0.0232696533203125,
0.065673828125,
-0.034423828125,
0.11175537109375,
-0.012847900390625,
0.0457763671875,
-0.033599853515625,
0.064697265625,
-0.006633758544921875,
-0.00592803955078125,
0.00225067138671875,
0.004131317138671875,
0.0045623779296875,
-0.0296173095703125,
0.0528564453125,
-0.05145263671875,
0.042449951171875,
-0.01471710205078125,
0.00566864013671875,
0.0297393798828125
]
|
bff54a7b8a3ad4c12b96f2145cb1bb22d660c698 | Wordpress Stackexchange
Q: Multiple custom post types under one admin menu I'm not sure where to start with this one.
I want to have 4 custom post types (Gigs, Venues, Holidays and Potentials) listed under a main heading of Events Manager, but don't want Events Manager to be a custom post type.
Thanks in advance to anyone who can help.
A: Just create a "placeholder" menu that you can then assign all your post types to:
function wpse_226690_admin_menu() {
add_menu_page(
'Events Manager',
'Events Manager',
'read',
'events-manager',
'', // Callback, leave empty
'dashicons-calendar',
1 // Position
);
}
add_action( 'admin_menu', 'wpse_226690_admin_menu' );
And then in your register_post_type calls:
'show_in_menu' => 'events-manager',
Tada!
| Q: Multiple custom post types under one admin menu I'm not sure where to start with this one.
I want to have 4 custom post types (Gigs, Venues, Holidays and Potentials) listed under a main heading of Events Manager, but don't want Events Manager to be a custom post type.
Thanks in advance to anyone who can help.
A: Just create a "placeholder" menu that you can then assign all your post types to:
function wpse_226690_admin_menu() {
add_menu_page(
'Events Manager',
'Events Manager',
'read',
'events-manager',
'', // Callback, leave empty
'dashicons-calendar',
1 // Position
);
}
add_action( 'admin_menu', 'wpse_226690_admin_menu' );
And then in your register_post_type calls:
'show_in_menu' => 'events-manager',
Tada!
| wordpress | {
"language": "en",
"length": 109,
"provenance": "stackexchange_00019.jsonl.gz:465467",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226690"
} | [
0.07415771484375,
-0.003993988037109375,
0.0219573974609375,
-0.051605224609375,
0.0156707763671875,
-0.017364501953125,
0.03656005859375,
-0.0364990234375,
-0.0182952880859375,
-0.007633209228515625,
0.038787841796875,
0.0015869140625,
-0.05029296875,
-0.06097412109375,
0.00783538818359375,
-0.032806396484375,
0.02825927734375,
-0.0209503173828125,
0.006317138671875,
-0.02923583984375,
0.026214599609375,
-0.016204833984375,
0.006744384765625,
0.02264404296875,
0.0255279541015625,
-0.033905029296875,
0.046295166015625,
-0.007129669189453125,
0.0185699462890625,
0.007556915283203125,
0.0194854736328125,
-0.02923583984375,
0.019439697265625,
-0.0225982666015625,
0.0435791015625,
0.0389404296875,
0.006793975830078125,
-0.00650787353515625,
0.0330810546875,
-0.0064849853515625,
-0.0137786865234375,
0.0107421875,
0.047210693359375,
0.059326171875,
0.0011625289916992188,
-0.025665283203125,
-0.017242431640625,
-0.0562744140625,
0.01424407958984375,
-0.041839599609375,
0.01239776611328125,
-0.0115203857421875,
0.03607177734375,
-0.07269287109375,
-0.02734375,
-0.0019016265869140625,
-0.0018091201782226562,
-0.021881103515625,
0.034820556640625,
0.0206146240234375,
-0.0097198486328125,
-0.0226898193359375,
0.01239776611328125,
-0.0396728515625,
-0.0191650390625,
0.019683837890625,
0.033203125,
-0.01308441162109375,
-0.03607177734375,
-0.046478271484375,
0.0167388916015625,
-0.00792694091796875,
0.0222015380859375,
-0.01235198974609375,
-0.0011577606201171875,
-0.03399658203125,
0.00826263427734375,
-0.035186767578125,
0.0097503662109375,
0.01435089111328125,
0.01233673095703125,
0.0245513916015625,
0.005970001220703125,
-0.019500732421875,
-0.00527191162109375,
0.0034961700439453125,
-0.02166748046875,
-0.0228118896484375,
0.009033203125,
-0.01378631591796875,
-0.0070343017578125,
-0.0535888671875,
0.0018644332885742188,
0.06561279296875,
0.005741119384765625,
-0.0169830322265625,
0.0665283203125,
0.04681396484375,
-0.0101165771484375,
-0.0215301513671875,
0.006328582763671875,
-0.03125,
0.004154205322265625,
-0.0093994140625,
0.0355224609375,
0.0379638671875,
-0.0246734619140625,
-0.00711822509765625,
0.06805419921875,
0.0199432373046875,
0.01000213623046875,
0.033416748046875,
0.0276947021484375,
0.0006918907165527344,
-0.023345947265625,
-0.0033054351806640625,
0.0142669677734375,
0.016510009765625,
0.00179290771484375,
0.01456451416015625,
-0.0157623291015625,
0.01154327392578125,
0.04083251953125,
-0.0263214111328125,
0.003597259521484375,
0.015472412109375,
-0.00740814208984375,
-0.059326171875,
-0.01031494140625,
0.05364990234375,
-0.0196990966796875,
-0.0236663818359375,
0.0193328857421875,
0.030364990234375,
0.0092010498046875,
-0.022430419921875,
0.0153961181640625,
-0.01207733154296875,
-0.0162353515625,
0.030181884765625,
0.0147552490234375,
-0.050567626953125,
-0.042724609375,
0.0244140625,
0.0277862548828125,
0.0270233154296875,
0.01451873779296875,
0.0108642578125,
0.01727294921875,
-0.0268402099609375,
-0.0035839080810546875,
-0.0140838623046875,
0.01446533203125,
0.009429931640625,
-0.01541900634765625,
0.01409912109375,
0.0166473388671875,
-0.0056915283203125,
-0.0225830078125,
-0.016754150390625,
-0.01111602783203125,
0.005756378173828125,
0.046295166015625,
-0.0582275390625,
-0.042083740234375,
0.006191253662109375,
-0.08160400390625,
-0.0115966796875,
0.0191192626953125,
-0.03460693359375,
0.0267181396484375,
0.0218353271484375,
0.035919189453125,
0.00876617431640625,
0.00400543212890625,
0.0116424560546875,
0.024566650390625,
-0.0277557373046875,
0.0017328262329101562,
0.0295562744140625,
-0.0118255615234375,
-0.0301666259765625,
0.0079803466796875,
-0.02569580078125,
-0.08868408203125,
0.050567626953125,
0.0076904296875,
0.083251953125,
0.0296783447265625,
0.00763702392578125,
0.053009033203125,
0.003139495849609375,
0.025665283203125,
-0.062469482421875,
-0.0246124267578125,
-0.0019130706787109375,
0.01204681396484375,
0.01413726806640625,
-0.0081024169921875,
0.0250396728515625,
-0.03216552734375,
0.0117645263671875,
-0.011688232421875,
0.03741455078125,
0.0053863525390625,
0.01043701171875,
-0.00031065940856933594,
0.0309295654296875,
0.0164642333984375,
0.01555633544921875,
-0.0007534027099609375,
0.0155181884765625,
-0.00502777099609375,
-0.07275390625,
-0.041473388671875,
0.020111083984375,
0.0098114013671875,
0.021820068359375,
-0.0294189453125,
0.0193634033203125,
-0.039398193359375,
-0.0322265625,
-0.048858642578125,
0.03765869140625,
0.0675048828125,
0.0069732666015625,
-0.019073486328125,
-0.00830841064453125,
0.07733154296875,
0.02008056640625,
-0.024444580078125,
0.0123291015625,
0.0159149169921875,
-0.001171112060546875,
-0.025787353515625,
0.0004200935363769531,
0.0338134765625,
-0.031158447265625,
-0.0029296875,
0.04302978515625,
0.0151824951171875,
0.04150390625,
-0.01104736328125,
0.0302581787109375,
0.07086181640625,
-0.034454345703125,
-0.007198333740234375,
0.0153961181640625,
-0.0023975372314453125,
0.040985107421875,
-0.01549530029296875,
0.0244140625,
0.022247314453125,
0.0084686279296875,
0.00788116455078125,
0.03350830078125,
-0.003063201904296875,
-0.04779052734375,
0.037811279296875,
-0.00384521484375,
0.0189361572265625,
-0.041534423828125,
-0.054229736328125,
0.00034999847412109375,
0.0257568359375,
0.0051422119140625,
0.041046142578125,
0.023162841796875,
-0.0322265625,
-0.0179901123046875,
0.0247039794921875,
0.038726806640625,
-0.0180511474609375,
-0.0167694091796875,
0.044677734375,
-0.01318359375,
-0.04296875,
0.01629638671875,
0.00362396240234375,
-0.016937255859375,
-0.0132904052734375,
0.023101806640625,
-0.058349609375,
-0.017120361328125,
0.003078460693359375,
-0.05853271484375,
-0.01434326171875,
0.00183868408203125,
0.0007534027099609375,
-0.06378173828125,
-0.0230712890625,
0.0038776397705078125,
-0.039031982421875,
0.0423583984375,
-0.0006113052368164062,
-0.0506591796875,
-0.0029544830322265625,
-0.0220489501953125,
0.0249786376953125,
-0.032196044921875,
0.0170745849609375,
0.052978515625,
-0.002960205078125,
0.002849578857421875,
-0.01373291015625,
-0.00597381591796875,
-0.0135040283203125,
0.020050048828125,
-0.00982666015625,
-0.056884765625,
0.0163116455078125,
0.032989501953125,
0.03021240234375,
0.03424072265625,
0.007785797119140625,
-0.025390625,
0.00799560546875,
0.03753662109375,
-0.0291290283203125,
-0.0130767822265625,
0.01122283935546875,
-0.00803375244140625,
0.023162841796875,
-0.0199737548828125,
0.0069122314453125,
-0.0295562744140625,
-0.028839111328125,
0.00789642333984375,
-0.01102447509765625,
0.0275115966796875,
0.0140533447265625,
-0.003253936767578125,
-0.0206146240234375,
-0.0276947021484375,
0.0006437301635742188,
-0.00173187255859375,
0.01036834716796875,
0.06268310546875,
0.0288238525390625,
-0.03741455078125,
0.031890869140625,
0.035614013671875,
-0.0179901123046875,
0.0186920166015625,
0.0174407958984375,
-0.00432586669921875,
0.052978515625,
0.006145477294921875,
0.00461578369140625,
0.061859130859375,
-0.0443115234375,
-0.03521728515625,
-0.031494140625,
0.0215301513671875,
0.0223236083984375,
-0.00444793701171875,
0.0308074951171875,
0.06317138671875,
0.033203125,
-0.006847381591796875,
0.002735137939453125,
-0.00801849365234375,
-0.0299072265625,
-0.0230255126953125,
0.011199951171875,
-0.014068603515625,
-0.010009765625,
-0.0005307197570800781,
0.003101348876953125,
0.0239410400390625,
0.01399993896484375,
-0.0164947509765625,
0.03515625,
0.0020656585693359375,
0.001598358154296875,
-0.03204345703125,
-0.0299072265625,
-0.029693603515625,
0.0433349609375,
-0.01488494873046875,
0.020477294921875,
0.005596160888671875,
0.02410888671875,
-0.0002639293670654297,
-0.0814208984375,
0.04888916015625,
-0.063232421875,
0.0018291473388671875,
-0.058685302734375,
-0.022674560546875,
-0.0008673667907714844,
0.114501953125,
-0.0318603515625,
-0.000010013580322265625,
-0.01537322998046875,
-0.006500244140625,
-0.0234832763671875,
-0.048858642578125,
-0.0521240234375,
0.0016460418701171875,
-0.055206298828125,
0.00547027587890625,
0.0019931793212890625,
-0.0102386474609375,
-0.0404052734375,
0.048431396484375,
-0.03961181640625,
-0.032440185546875,
0.036468505859375,
-0.040557861328125,
-0.00989532470703125,
0.006072998046875,
-0.0233917236328125,
-0.02911376953125,
-0.0333251953125,
-0.01267242431640625,
-0.07867431640625,
-0.023529052734375,
-0.0215911865234375,
0.068115234375,
0.0171051025390625,
-0.04144287109375,
0.004444122314453125,
0.04522705078125,
0.0408935546875,
0.0026569366455078125,
-0.0023632049560546875,
-0.02862548828125,
-0.0201873779296875,
-0.034027099609375,
-0.0028228759765625,
-0.033935546875,
-0.02703857421875,
-0.0104522705078125,
-0.018310546875,
0.037384033203125,
-0.00417327880859375,
-0.0071258544921875,
0.02593994140625,
-0.020965576171875,
-0.0142669677734375,
0.0028514862060546875,
-0.00702667236328125,
0.00606536865234375,
-0.0139312744140625,
-0.0202789306640625,
0.00547027587890625,
-0.004039764404296875,
0.0119781494140625,
-0.052215576171875,
-0.00472259521484375,
0.02734375,
0.07159423828125,
0.006198883056640625,
0.01531219482421875,
-0.05535888671875,
0.00965118408203125,
0.022979736328125,
-0.01145172119140625,
-0.00264739990234375,
-0.0170135498046875,
-0.0085906982421875,
0.0148773193359375,
-0.03973388671875,
-0.01325225830078125,
-0.0207061767578125,
0.039398193359375,
0.0179901123046875,
0.0092315673828125,
-0.00905609130859375,
-0.0142669677734375,
0.04046630859375,
0.03497314453125,
0.01033782958984375,
-0.05743408203125,
-0.01378631591796875,
0.076904296875,
0.0018310546875,
0.005992889404296875,
-0.0609130859375,
0.008575439453125,
-0.014312744140625,
-0.0014810562133789062,
0.01947021484375,
0.047332763671875,
-0.0216217041015625,
0.0023479461669921875,
0.0055694580078125,
-0.0017995834350585938,
0.03912353515625,
0.00832366943359375,
0.016143798828125,
0.01424407958984375,
0.04052734375,
-0.0091705322265625,
0.00911712646484375,
0.007904052734375,
-0.0139923095703125,
-0.0121307373046875,
-0.044342041015625,
-0.036956787109375,
0.00879669189453125,
0.0219879150390625,
0.0018587112426757812,
-0.030120849609375,
0.02520751953125,
0.05657958984375,
0.0003592967987060547,
0.0037784576416015625,
-0.015289306640625,
0.02349853515625,
-0.0298919677734375,
-0.0234832763671875,
0.025634765625,
-0.0175628662109375,
0.018798828125,
0.00547027587890625,
0.0059967041015625,
0.00885009765625,
-0.01416778564453125,
0.0684814453125,
0.0626220703125,
0.0200042724609375,
0.01947021484375,
-0.01404571533203125,
-0.022857666015625,
-0.0021266937255859375,
-0.040069580078125,
-0.0176544189453125,
-0.0016021728515625,
0.03973388671875,
0.018463134765625,
0.019195556640625,
0.005725860595703125,
-0.010528564453125,
0.01122283935546875,
-0.01497650146484375,
0.01495361328125,
0.002956390380859375,
-0.041412353515625,
-0.0122222900390625,
0.0228729248046875,
0.02093505859375,
-0.00968170166015625,
-0.0306549072265625,
0.0290069580078125,
-0.014739990234375,
0.0286407470703125,
-0.00749969482421875,
-0.05743408203125,
0.039886474609375,
0.053680419921875,
-0.0249481201171875,
0.0165252685546875,
0.0261688232421875,
-0.1334228515625,
-0.08258056640625,
0.026214599609375,
0.01239013671875,
-0.0008406639099121094,
-0.03485107421875,
-0.007625579833984375,
-0.01053619384765625,
0.0179290771484375,
0.0002180337905883789,
0.0069122314453125,
0.059417724609375,
0.01104736328125,
-0.037811279296875,
0.006298065185546875,
-0.040740966796875,
-0.025787353515625,
-0.03350830078125,
-0.00312042236328125,
-0.04388427734375,
0.0137939453125,
0.0101318359375,
0.0192413330078125,
0.006519317626953125,
-0.015045166015625,
-0.031768798828125,
0.02001953125,
0.013092041015625,
0.03387451171875,
-0.023834228515625,
0.041534423828125,
-0.007762908935546875,
0.03692626953125,
-0.0122833251953125,
0.0011186599731445312,
-0.0083770751953125,
0.00128936767578125,
-0.00750732421875,
-0.0716552734375,
-0.0252227783203125,
-0.00449371337890625,
-0.050201416015625,
0.045684814453125,
0.035736083984375,
-0.0037326812744140625,
0.0186004638671875,
-0.02679443359375,
0.00010609626770019531,
-0.023468017578125,
0.0299530029296875,
-0.039520263671875,
-0.016143798828125,
0.02252197265625,
-0.01318359375,
0.053924560546875,
-0.0005154609680175781,
-0.0104522705078125,
0.024993896484375,
-0.031646728515625,
0.03839111328125,
0.037109375,
-0.00936126708984375,
0.0206451416015625,
0.041900634765625,
-0.01511383056640625,
0.0316162109375,
-0.00749969482421875,
0.0000330805778503418,
0.040069580078125,
-0.0173187255859375,
0.0220489501953125,
0.0017709732055664062,
0.032745361328125,
-0.0156402587890625,
-0.002300262451171875,
0.0195465087890625,
-0.0170745849609375,
0.01194000244140625,
0.052703857421875,
0.050994873046875,
-0.08197021484375,
0.00519561767578125,
-0.006134033203125,
0.0013055801391601562,
0.055145263671875,
0.005985260009765625,
-0.019989013671875,
0.0026874542236328125,
-0.0261383056640625,
-0.01447296142578125,
-0.033782958984375,
-0.0086212158203125,
0.0260162353515625,
-0.00893402099609375,
0.0112762451171875,
0.040283203125,
0.011077880859375,
-0.00009369850158691406,
-0.0221099853515625,
-0.01885986328125,
0.01436614990234375,
-0.00879669189453125,
0.033966064453125,
-0.00846099853515625,
-0.01085662841796875,
-0.057861328125,
0.0127410888671875,
-0.01331329345703125,
-0.035736083984375,
0.017578125,
0.006591796875,
0.01306915283203125,
0.044921875,
-0.020416259765625,
0.0191192626953125,
-0.0046844482421875,
0.0008344650268554688,
-0.032867431640625,
-0.022430419921875,
0.014617919921875,
0.038116455078125,
-0.01557159423828125,
0.028839111328125,
-0.0163421630859375,
-0.0284271240234375,
-0.01064300537109375,
-0.006801605224609375,
0.11529541015625,
-0.0219573974609375,
-0.0278472900390625,
0.030548095703125,
0.000013768672943115234,
-0.0294647216796875,
0.042236328125,
0.033538818359375,
-0.033660888671875,
-0.043731689453125,
0.032623291015625,
-0.046600341796875,
-0.037750244140625,
0.024871826171875,
-0.057342529296875,
0.1343994140625,
-0.0253448486328125,
0.041046142578125,
0.03216552734375,
0.044952392578125,
-0.0220947265625,
0.032562255859375,
-0.06494140625,
0.043121337890625,
-0.020263671875,
0.054351806640625,
-0.0516357421875,
-0.0018024444580078125,
-0.0084075927734375,
0.005474090576171875,
0.03173828125,
0.00878143310546875,
-0.0226593017578125,
0.021484375,
0.07733154296875,
0.012054443359375,
-0.00689697265625,
0.03863525390625,
-0.0084228515625,
-0.033538818359375,
0.02349853515625,
0.06878662109375,
0.06689453125,
-0.00484466552734375,
-0.050262451171875,
-0.0011072158813476562,
-0.002655029296875,
0.00797271728515625,
-0.0094451904296875,
-0.04901123046875,
0.023681640625,
-0.025848388671875,
-0.03326416015625,
0.0123291015625,
0.01023101806640625,
0.0157470703125,
0.01849365234375,
-0.0168304443359375,
0.0296173095703125,
-0.034576416015625,
0.044769287109375,
0.00371551513671875,
0.006946563720703125,
0.0213470458984375,
0.019317626953125,
-0.0340576171875,
0.00505828857421875,
0.0099945068359375,
0.012451171875,
-0.018585205078125,
0.0311126708984375,
-0.0034732818603515625,
0.01422119140625,
-0.081298828125,
-0.005901336669921875,
0.039459228515625,
0.06671142578125,
-0.040130615234375,
-0.0628662109375,
0.01157379150390625,
0.01285552978515625,
0.0165863037109375,
0.0179595947265625,
0.00574493408203125,
-0.0165252685546875,
0.029205322265625,
-0.00707244873046875,
0.01226043701171875,
0.0157012939453125,
0.0013055801391601562,
0.00835418701171875,
0.037750244140625,
-0.05194091796875,
0.01412200927734375,
-0.06793212890625,
0.033050537109375,
0.045379638671875,
0.06304931640625,
0.017242431640625,
0.0430908203125,
0.038299560546875,
-0.01259613037109375,
0.021575927734375,
0.0338134765625,
-0.012176513671875,
-0.03863525390625,
-0.045166015625,
-0.08587646484375,
-0.0004303455352783203,
0.04345703125,
0.0091400146484375,
-0.01082611083984375,
0.0211029052734375,
0.05133056640625,
0.01085662841796875,
-0.0263214111328125,
0.04119873046875,
0.007343292236328125,
-0.0416259765625,
-0.0174560546875,
-0.037200927734375,
0.007572174072265625,
-0.01404571533203125,
0.0284576416015625,
0.0299072265625,
-0.01416015625,
-0.002956390380859375,
-0.016693115234375,
0.006435394287109375,
-0.0477294921875,
-0.0026149749755859375,
0.0034198760986328125,
0.0291748046875,
0.03045654296875,
-0.1361083984375,
-0.04046630859375,
-0.026824951171875,
-0.04388427734375,
0.06280517578125,
0.06658935546875,
-0.012298583984375,
-0.00997161865234375,
-0.00948333740234375,
0.02447509765625,
-0.013427734375,
-0.0278167724609375,
0.035247802734375,
0.0259246826171875,
0.00312042236328125,
0.029327392578125,
-0.056976318359375,
-0.047882080078125,
-0.0178985595703125,
0.039642333984375,
0.0006966590881347656,
0.037078857421875,
0.0022182464599609375,
0.0190277099609375,
-0.01529693603515625,
0.0212554931640625,
-0.014251708984375,
-0.005054473876953125,
-0.01148223876953125,
0.01160430908203125,
0.021484375,
-0.0042572021484375,
-0.01873779296875,
-0.0217132568359375,
0.051727294921875,
-0.06036376953125,
-0.01297760009765625,
0.00983428955078125,
0.0228118896484375,
-0.045654296875,
0.049774169921875,
-0.0093231201171875,
0.01513671875,
-0.002544403076171875,
-0.024688720703125,
0.040069580078125,
0.02783203125,
-0.005706787109375,
0.0172271728515625,
0.0251617431640625,
-0.017730712890625,
0.0201263427734375,
-0.01259613037109375,
0.009124755859375,
0.02056884765625,
0.04827880859375,
-0.031341552734375,
0.041534423828125,
-0.0025787353515625,
0.0162200927734375,
0.0225372314453125,
0.044403076171875,
0.035919189453125,
0.0033512115478515625,
0.0305328369140625,
-0.004833221435546875,
0.01419830322265625,
-0.0192413330078125,
-0.01580810546875,
0.0181884765625,
-0.0118560791015625,
-0.0183868408203125,
-0.03692626953125,
-0.0284423828125,
-0.057952880859375,
0.00917816162109375,
0.021148681640625,
-0.0277099609375,
-0.01904296875,
-0.0634765625,
-0.009521484375,
0.04901123046875,
-0.00750732421875,
0.0006113052368164062,
0.019927978515625,
-0.06768798828125,
-0.002422332763671875,
0.0197601318359375,
-0.0185546875,
0.0262908935546875,
0.043060302734375,
-0.003795623779296875,
-0.0027904510498046875,
-0.008026123046875,
0.00347137451171875,
-0.01204681396484375,
-0.0164794921875,
0.01255035400390625,
-0.002941131591796875,
-0.039642333984375,
0.007171630859375,
-0.01061248779296875,
0.048492431640625,
0.01302337646484375,
-0.0101318359375,
0.01531982421875,
0.0013322830200195312,
-0.05145263671875,
-0.034423828125,
0.042205810546875,
-0.057159423828125,
-0.055419921875,
0.009368896484375,
-0.0012826919555664062,
0.0201568603515625,
-0.0318603515625,
-0.07080078125,
0.0946044921875,
-0.019073486328125,
-0.019073486328125,
-0.058258056640625,
0.01465606689453125,
-0.0154876708984375,
0.015899658203125,
-0.00878143310546875,
-0.0311126708984375,
-0.000051915645599365234,
0.03271484375,
-0.004474639892578125,
0.00923919677734375,
0.0058746337890625,
0.00632476806640625,
-0.0675048828125,
-0.0075836181640625,
-0.026336669921875,
-0.0401611328125,
0.0328369140625,
-0.0227813720703125,
0.005489349365234375,
0.00926971435546875,
-0.052703857421875,
-0.06829833984375,
-0.0261077880859375,
-0.00624847412109375,
-0.01461029052734375,
-0.038238525390625,
-0.044921875,
-0.00811767578125,
0.07025146484375,
0.0931396484375,
0.0303497314453125,
-0.06884765625,
0.0261688232421875,
-0.050994873046875,
-0.05877685546875,
-0.0166015625,
0.00524139404296875,
-0.02154541015625,
0.0127105712890625,
-0.00601959228515625,
-0.004848480224609375,
-0.00772857666015625,
0.045745849609375,
-0.0145111083984375,
-0.01534271240234375,
0.037384033203125,
-0.01068878173828125,
-0.0743408203125,
0.045379638671875,
0.0230560302734375,
-0.035736083984375,
-0.0207061767578125,
-0.006046295166015625,
-0.01552581787109375,
0.00553131103515625,
-0.021514892578125,
-0.041168212890625,
-0.032196044921875,
-0.008575439453125,
0.0267333984375,
-0.031982421875,
0.034271240234375,
-0.04205322265625,
0.01507568359375,
-0.0189971923828125,
0.026214599609375,
0.005992889404296875,
0.0296630859375,
-0.0139617919921875,
0.05181884765625,
0.021026611328125,
0.0215301513671875,
0.01329803466796875,
0.046722412109375,
0.00045943260192871094,
0.041473388671875,
-0.00146484375,
-0.026275634765625,
0.0178985595703125,
-0.01320648193359375,
-0.006626129150390625,
0.0310821533203125,
-0.03668212890625,
-0.044097900390625,
0.00371551513671875,
0.0168914794921875,
0.01229095458984375,
0.00696563720703125
]
|
78119972fd1f671af147de951362d6f477f299d2 | Wordpress Stackexchange
Q: Is there a way to read or list wp_head() contents? I am working on a CSS and JS compiler and need to find a way to list the contents of wp_head()
I am trying to get a list of all CSS/JS files and inline CSS on any give page.
Hooking on the wp_head action does not do anything
I was hoping that something like this would work
function head_content($list){
print_r($list);
}
add_action('wp_head', 'head_content');
any help is appreciated.
UPDATE:
got something working
function head_content($list){
print_r($list);
return $list;
}
add_filter('print_styles_array', 'head_content');
add_filter('print_script_array', 'head_content');
this lists all css/js files handles
A: I wanted to search-and-replace in the header, but Neither @majick or @Samuel Elh answers worked for me directly. So, combining their answers I got what eventually works:
function start_wp_head_buffer() {
ob_start();
}
add_action('wp_head','start_wp_head_buffer',0);
function end_wp_head_buffer() {
$in = ob_get_clean();
// here do whatever you want with the header code
echo $in; // output the result unless you want to remove it
}
add_action('wp_head','end_wp_head_buffer', PHP_INT_MAX); //PHP_INT_MAX will ensure this action is called after all other actions that can modify head
It was added to functions.php of my child theme.
| Q: Is there a way to read or list wp_head() contents? I am working on a CSS and JS compiler and need to find a way to list the contents of wp_head()
I am trying to get a list of all CSS/JS files and inline CSS on any give page.
Hooking on the wp_head action does not do anything
I was hoping that something like this would work
function head_content($list){
print_r($list);
}
add_action('wp_head', 'head_content');
any help is appreciated.
UPDATE:
got something working
function head_content($list){
print_r($list);
return $list;
}
add_filter('print_styles_array', 'head_content');
add_filter('print_script_array', 'head_content');
this lists all css/js files handles
A: I wanted to search-and-replace in the header, but Neither @majick or @Samuel Elh answers worked for me directly. So, combining their answers I got what eventually works:
function start_wp_head_buffer() {
ob_start();
}
add_action('wp_head','start_wp_head_buffer',0);
function end_wp_head_buffer() {
$in = ob_get_clean();
// here do whatever you want with the header code
echo $in; // output the result unless you want to remove it
}
add_action('wp_head','end_wp_head_buffer', PHP_INT_MAX); //PHP_INT_MAX will ensure this action is called after all other actions that can modify head
It was added to functions.php of my child theme.
A: Simple solution is to listen for wp_head in a custom function, just like WordPress does in wp-includes/general-template.php for wp_head() function.
I mean something like:
function head_content() {
ob_start();
do_action('wp_head');
return ob_get_clean();
}
// contents
var_dump( head_content() );
Later, use regex or other tool to filter the contents you are targeting..
Hope that helps.
A: You could buffer the wp_head output by adding some wrapper actions to it:
add_action('wp_head','start_wp_head_buffer',0);
function start_wp_head_buffer() {ob_start;}
add_action('wp_head','end_wp_head_buffer',99);
function end_wp_head_buffer() {global $wpheadcontents; $wpheadcontents = ob_get_flush();}
You can then call global $wpheadcontents; elsewhere to access the content and process it.
But, in this case, it may be simpler to just get the information you are looking for directly from the global $wp_styles and $wp_scripts variables.
function print_global_arrays() {
global $wp_styles, $wp_scripts;
echo "Styles Array:"; print_r($wp_styles);
echo "Scripts Array:"; print_r($wp_scripts);
}
add_action('wp_enqueue_scripts','print_global_arrays',999);
| wordpress | {
"language": "en",
"length": 322,
"provenance": "stackexchange_00019.jsonl.gz:465469",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226696"
} | [
0.0273590087890625,
0.002422332763671875,
-0.0435791015625,
-0.055389404296875,
0.0263671875,
-0.029510498046875,
0.01116943359375,
0.0190887451171875,
-0.01953125,
0.010772705078125,
-0.0364990234375,
0.01212310791015625,
-0.04974365234375,
-0.0263519287109375,
-0.004276275634765625,
-0.0517578125,
0.07574462890625,
-0.059295654296875,
0.005107879638671875,
0.01222991943359375,
-0.0233917236328125,
0.051513671875,
0.03106689453125,
0.0765380859375,
0.007022857666015625,
-0.051605224609375,
0.0338134765625,
-0.031524658203125,
0.0034275054931640625,
-0.042022705078125,
-0.006610870361328125,
0.054290771484375,
0.0194244384765625,
0.03082275390625,
-0.037139892578125,
0.0200042724609375,
0.0087127685546875,
0.006572723388671875,
0.002864837646484375,
0.029693603515625,
0.0158538818359375,
-0.0127410888671875,
-0.0033206939697265625,
-0.0020351409912109375,
-0.03204345703125,
-0.0129547119140625,
0.007537841796875,
0.0113677978515625,
0.03656005859375,
-0.0037670135498046875,
-0.0308837890625,
0.00007176399230957031,
-0.00859832763671875,
-0.0302276611328125,
-0.0201873779296875,
0.005573272705078125,
0.00024175643920898438,
-0.012542724609375,
0.033233642578125,
0.022247314453125,
-0.02587890625,
-0.00035691261291503906,
0.00421905517578125,
-0.04412841796875,
-0.017425537109375,
0.0230255126953125,
0.038238525390625,
-0.01003265380859375,
-0.0275726318359375,
-0.0189666748046875,
0.0200347900390625,
-0.01538848876953125,
-0.0157470703125,
-0.0174407958984375,
-0.0238037109375,
-0.003932952880859375,
-0.039642333984375,
-0.0550537109375,
0.030364990234375,
0.0072021484375,
-0.0207977294921875,
-0.0192108154296875,
-0.046173095703125,
-0.005153656005859375,
-0.00015103816986083984,
0.0271453857421875,
-0.0196685791015625,
-0.01453399658203125,
0.0081024169921875,
-0.004978179931640625,
-0.01605224609375,
0.0018444061279296875,
0.0523681640625,
-0.048553466796875,
-0.01456451416015625,
-0.06915283203125,
-0.0270233154296875,
0.01018524169921875,
-0.01493072509765625,
0.0189056396484375,
-0.0189666748046875,
-0.00836181640625,
0.018646240234375,
-0.03204345703125,
0.0230560302734375,
0.048248291015625,
-0.0188751220703125,
-0.0166015625,
0.038909912109375,
0.019744873046875,
0.005199432373046875,
0.003818511962890625,
0.001312255859375,
0.0011453628540039062,
-0.0030364990234375,
0.002872467041015625,
-0.040252685546875,
0.0131683349609375,
-0.01459503173828125,
0.000896453857421875,
0.0280914306640625,
0.033203125,
0.0089111328125,
-0.01934814453125,
0.0037670135498046875,
-0.0003483295440673828,
-0.01271820068359375,
-0.04583740234375,
0.00971221923828125,
0.0016450881958007812,
0.0087432861328125,
0.0113525390625,
-0.0175933837890625,
-0.0033664703369140625,
-0.0151214599609375,
0.003108978271484375,
0.052337646484375,
0.0361328125,
0.00350189208984375,
-0.002292633056640625,
0.020660400390625,
-0.033599853515625,
-0.025421142578125,
0.0171356201171875,
0.03533935546875,
-0.007720947265625,
0.01531219482421875,
0.028717041015625,
0.004852294921875,
-0.0254058837890625,
0.045379638671875,
-0.0014629364013671875,
0.0462646484375,
-0.013214111328125,
-0.034637451171875,
-0.0643310546875,
0.01050567626953125,
-0.049285888671875,
0.00534820556640625,
-0.060516357421875,
-0.018890380859375,
-0.016754150390625,
0.01204681396484375,
-0.03485107421875,
-0.020263671875,
-0.0005702972412109375,
-0.0231170654296875,
0.00099945068359375,
0.026702880859375,
0.0115966796875,
0.0131072998046875,
-0.026611328125,
0.060638427734375,
-0.0061492919921875,
-0.0227203369140625,
0.0222625732421875,
-0.0249176025390625,
0.0110015869140625,
0.0277099609375,
0.005222320556640625,
-0.0159149169921875,
-0.032318115234375,
0.046630859375,
-0.023590087890625,
-0.053436279296875,
0.0175323486328125,
-0.003986358642578125,
0.042877197265625,
0.03790283203125,
0.002323150634765625,
0.049468994140625,
-0.0159912109375,
-0.044342041015625,
-0.00701904296875,
-0.01172637939453125,
-0.01177978515625,
0.030853271484375,
-0.0018262863159179688,
-0.0029735565185546875,
0.0343017578125,
0.00817108154296875,
-0.0173797607421875,
0.02130126953125,
-0.0297393798828125,
-0.11236572265625,
0.006256103515625,
-0.0538330078125,
0.047698974609375,
0.0110015869140625,
0.0303955078125,
-0.00827789306640625,
-0.00815582275390625,
0.0075225830078125,
-0.0181732177734375,
-0.0059967041015625,
0.0357666015625,
-0.027862548828125,
0.0283660888671875,
0.017425537109375,
0.04119873046875,
0.0244903564453125,
-0.008758544921875,
0.016876220703125,
-0.016143798828125,
0.050201416015625,
0.0031032562255859375,
-0.0214996337890625,
-0.01131439208984375,
0.041748046875,
0.0213470458984375,
-0.0269775390625,
0.0160369873046875,
0.0545654296875,
0.08905029296875,
-0.005931854248046875,
-0.0242156982421875,
-0.01473236083984375,
-0.07672119140625,
0.005161285400390625,
0.06036376953125,
0.050811767578125,
0.0244293212890625,
0.0138702392578125,
-0.00231170654296875,
0.1055908203125,
0.0020885467529296875,
0.0179443359375,
-0.0153350830078125,
0.00379180908203125,
0.037109375,
-0.0214385986328125,
-0.0164031982421875,
0.027618408203125,
-0.040069580078125,
-0.00971221923828125,
0.038970947265625,
-0.0033416748046875,
-0.034515380859375,
-0.00800323486328125,
0.00824737548828125,
0.0179443359375,
-0.030731201171875,
-0.035736083984375,
0.00791168212890625,
0.04986572265625,
0.01522064208984375,
0.0209197998046875,
0.00635528564453125,
-0.034515380859375,
0.030975341796875,
0.023956298828125,
-0.01751708984375,
0.014678955078125,
0.05126953125,
-0.036102294921875,
-0.0294342041015625,
0.032440185546875,
-0.0041961669921875,
-0.0225982666015625,
-0.0013246536254882812,
-0.0085906982421875,
0.0057830810546875,
-0.00794219970703125,
-0.0020046234130859375,
0.01081085205078125,
-0.0032711029052734375,
0.00238800048828125,
0.01580810546875,
0.0156097412109375,
0.04144287109375,
0.0198211669921875,
0.05670166015625,
-0.0172271728515625,
0.06427001953125,
-0.0036716461181640625,
0.0103302001953125,
0.06024169921875,
-0.03863525390625,
0.0237884521484375,
0.01129150390625,
0.0926513671875,
0.0584716796875,
-0.0038814544677734375,
0.0197601318359375,
-0.0038585662841796875,
-0.020538330078125,
0.01267242431640625,
0.0086822509765625,
-0.02886962890625,
-0.0209197998046875,
-0.052459716796875,
-0.012451171875,
0.0364990234375,
0.0253753662109375,
0.035675048828125,
-0.01763916015625,
-0.0034008026123046875,
0.0265960693359375,
-0.068115234375,
-0.07684326171875,
-0.00650787353515625,
-0.0667724609375,
-0.0361328125,
-0.00875091552734375,
-0.04144287109375,
0.01284027099609375,
0.014251708984375,
-0.007801055908203125,
-0.00896453857421875,
-0.00464630126953125,
-0.002422332763671875,
-0.0247650146484375,
-0.04217529296875,
-0.0202789306640625,
-0.007061004638671875,
-0.01030731201171875,
-0.0117950439453125,
0.032867431640625,
-0.0013875961303710938,
-0.04693603515625,
-0.0233154296875,
0.023345947265625,
-0.0002758502960205078,
-0.00872802734375,
-0.01018524169921875,
-0.0133514404296875,
-0.026824951171875,
-0.005229949951171875,
-0.04595947265625,
0.0029354095458984375,
0.0005173683166503906,
0.0011014938354492188,
-0.0469970703125,
-0.003337860107421875,
-0.0221710205078125,
0.06451416015625,
0.06396484375,
-0.03887939453125,
0.0210113525390625,
-0.043365478515625,
-0.01070404052734375,
0.00408935546875,
-0.02227783203125,
0.001483917236328125,
0.0335693359375,
-0.0174713134765625,
0.005634307861328125,
-0.0165557861328125,
0.040374755859375,
0.018707275390625,
0.01018524169921875,
-0.00838470458984375,
0.052093505859375,
-0.004245758056640625,
0.0264739990234375,
-0.044342041015625,
0.05267333984375,
0.01303863525390625,
-0.00028514862060546875,
0.03173828125,
0.011993408203125,
0.0047454833984375,
-0.0082244873046875,
-0.049530029296875,
0.004100799560546875,
0.0272674560546875,
0.0021209716796875,
0.060211181640625,
-0.01727294921875,
-0.035430908203125,
-0.020233154296875,
0.06988525390625,
-0.0204315185546875,
-0.0333251953125,
0.005191802978515625,
0.0306549072265625,
-0.050262451171875,
-0.059814453125,
-0.01049041748046875,
-0.0053863525390625,
-0.11279296875,
0.002735137939453125,
-0.01200103759765625,
-0.03900146484375,
-0.0196990966796875,
-0.0023193359375,
-0.059295654296875,
-0.05419921875,
0.0055999755859375,
0.052032470703125,
-0.0189208984375,
0.00852203369140625,
-0.0167236328125,
-0.01393890380859375,
-0.000044405460357666016,
0.021209716796875,
-0.13671875,
-0.0069427490234375,
-0.0556640625,
0.09259033203125,
0.0290985107421875,
0.0025043487548828125,
-0.0220947265625,
0.062408447265625,
-0.0010938644409179688,
0.041717529296875,
0.013031005859375,
0.032196044921875,
0.01849365234375,
-0.0526123046875,
0.00750732421875,
-0.046295166015625,
-0.025634765625,
-0.011749267578125,
0.00745391845703125,
0.01409149169921875,
-0.020721435546875,
-0.0325927734375,
0.001575469970703125,
-0.0054931640625,
-0.05706787109375,
-0.009429931640625,
0.00818634033203125,
0.026611328125,
-0.01049041748046875,
0.0010137557983398438,
-0.03289794921875,
-0.045806884765625,
0.0216064453125,
0.0030956268310546875,
-0.01153564453125,
-0.0020465850830078125,
0.04193115234375,
0.0316162109375,
-0.022613525390625,
0.010223388671875,
0.05328369140625,
0.0258941650390625,
-0.0252227783203125,
0.05712890625,
0.00400543212890625,
-0.0218353271484375,
0.081298828125,
-0.0133209228515625,
0.016082763671875,
0.00344085693359375,
0.00710296630859375,
0.02728271484375,
0.0199432373046875,
-0.0165863037109375,
0.034515380859375,
0.0019779205322265625,
0.01045989990234375,
-0.003276824951171875,
0.006542205810546875,
0.03668212890625,
0.01861572265625,
-0.019805908203125,
0.0009064674377441406,
-0.0124359130859375,
0.0031185150146484375,
-0.00809478759765625,
-0.0185546875,
0.0966796875,
0.06640625,
-0.0272979736328125,
0.046295166015625,
0.0234832763671875,
0.041778564453125,
0.0197601318359375,
0.032470703125,
-0.040863037109375,
0.039337158203125,
0.031463623046875,
-0.0078125,
0.0008172988891601562,
-0.0041046142578125,
0.0010080337524414062,
-0.00957489013671875,
-0.056671142578125,
0.00972747802734375,
0.0006551742553710938,
0.026336669921875,
0.0191192626953125,
0.01428985595703125,
0.02325439453125,
0.020477294921875,
-0.023468017578125,
-0.012176513671875,
0.0242919921875,
0.0003764629364013672,
-0.04608154296875,
-0.0165557861328125,
-0.033203125,
-0.00908660888671875,
0.0153656005859375,
0.0227813720703125,
-0.02166748046875,
0.0229644775390625,
-0.01280975341796875,
0.053070068359375,
0.027618408203125,
0.0210113525390625,
-0.0175933837890625,
0.01160430908203125,
0.031463623046875,
-0.0172271728515625,
0.021392822265625,
-0.0233001708984375,
-0.03558349609375,
0.025848388671875,
0.032867431640625,
-0.0184478759765625,
0.035125732421875,
-0.0008516311645507812,
0.01522064208984375,
-0.017578125,
0.0261688232421875,
0.01511383056640625,
-0.0048980712890625,
-0.0164642333984375,
-0.006076812744140625,
0.023529052734375,
0.018524169921875,
0.0054473876953125,
0.019866943359375,
-0.002838134765625,
-0.01313018798828125,
0.0216827392578125,
-0.0567626953125,
-0.00559234619140625,
0.0225372314453125,
-0.01149749755859375,
-0.0220184326171875,
0.03607177734375,
-0.093017578125,
-0.0250091552734375,
-0.0206146240234375,
0.004016876220703125,
0.06292724609375,
-0.031829833984375,
-0.01175689697265625,
-0.01149749755859375,
0.0026988983154296875,
-0.0362548828125,
0.0010557174682617188,
0.0750732421875,
0.056549072265625,
-0.058135986328125,
0.0035381317138671875,
-0.023773193359375,
0.0007386207580566406,
-0.0267333984375,
-0.062255859375,
-0.038482666015625,
-0.00861358642578125,
-0.0225982666015625,
0.0035762786865234375,
-0.00867462158203125,
0.031463623046875,
0.004302978515625,
0.050262451171875,
-0.01236724853515625,
0.07464599609375,
-0.0189208984375,
0.0673828125,
-0.00870513916015625,
0.0357666015625,
0.019805908203125,
0.03680419921875,
0.0027904510498046875,
-0.0129852294921875,
0.0224761962890625,
-0.02349853515625,
-0.0306243896484375,
-0.07086181640625,
0.0345458984375,
0.03057861328125,
0.0595703125,
-0.0133209228515625,
-0.0252227783203125,
-0.007144927978515625,
-0.0016918182373046875,
-0.032745361328125,
0.0210723876953125,
0.01446533203125,
-0.01690673828125,
-0.0023956298828125,
0.04266357421875,
0.007659912109375,
-0.047637939453125,
-0.0274810791015625,
0.031982421875,
0.035308837890625,
0.030914306640625,
-0.06427001953125,
-0.0282440185546875,
0.044891357421875,
0.0721435546875,
0.00199127197265625,
0.042633056640625,
0.01873779296875,
0.00337982177734375,
0.0232086181640625,
0.0364990234375,
0.044830322265625,
-0.02435302734375,
0.054595947265625,
0.010345458984375,
0.02001953125,
0.04803466796875,
-0.0172271728515625,
0.002628326416015625,
0.021942138671875,
0.0298309326171875,
-0.035369873046875,
0.0034008026123046875,
0.004924774169921875,
-0.00949859619140625,
0.036468505859375,
0.01102447509765625,
-0.0163421630859375,
-0.003932952880859375,
0.0165252685546875,
0.007564544677734375,
-0.0284881591796875,
0.0166015625,
0.0304107666015625,
0.007053375244140625,
-0.032196044921875,
0.02288818359375,
-0.0182342529296875,
-0.05340576171875,
-0.0208892822265625,
0.0660400390625,
-0.04730224609375,
-0.04425048828125,
0.032989501953125,
-0.016571044921875,
0.003910064697265625,
-0.0282745361328125,
0.049407958984375,
-0.003971099853515625,
0.00576019287109375,
0.0241241455078125,
-0.0171661376953125,
0.00125885009765625,
0.048919677734375,
-0.0265960693359375,
0.03240966796875,
0.01544952392578125,
-0.03546142578125,
-0.046234130859375,
-0.00342559814453125,
0.01096343994140625,
0.040496826171875,
-0.005199432373046875,
0.0231170654296875,
-0.01357269287109375,
0.0010328292846679688,
-0.007106781005859375,
0.01036834716796875,
0.07000732421875,
-0.01346588134765625,
-0.025299072265625,
0.0268096923828125,
-0.0130157470703125,
-0.0123291015625,
0.00786590576171875,
0.05780029296875,
-0.032867431640625,
0.0013217926025390625,
0.026519775390625,
-0.00911712646484375,
-0.0233917236328125,
-0.0011348724365234375,
-0.03973388671875,
0.087890625,
-0.002086639404296875,
0.0244140625,
0.0289154052734375,
0.0235137939453125,
-0.050445556640625,
-0.019927978515625,
-0.06048583984375,
0.08697509765625,
0.034820556640625,
0.023101806640625,
-0.0850830078125,
-0.01461029052734375,
0.001544952392578125,
0.024444580078125,
-0.01094818115234375,
-0.01497650146484375,
0.0022335052490234375,
-0.01320648193359375,
0.03704833984375,
0.0035247802734375,
-0.01416778564453125,
0.00876617431640625,
0.0032749176025390625,
-0.01459503173828125,
0.006816864013671875,
-0.051666259765625,
0.032745361328125,
-0.0743408203125,
0.00011926889419555664,
0.0010194778442382812,
0.0052337646484375,
-0.00983428955078125,
-0.0307464599609375,
0.00560760498046875,
-0.06884765625,
-0.005664825439453125,
0.03778076171875,
-0.0230560302734375,
-0.0298004150390625,
0.037811279296875,
-0.001857757568359375,
-0.041168212890625,
-0.025909423828125,
-0.0265655517578125,
0.038970947265625,
-0.0012683868408203125,
0.00798797607421875,
0.01277923583984375,
0.0070037841796875,
0.032012939453125,
-0.0246429443359375,
-0.0224456787109375,
-0.0108795166015625,
0.0198211669921875,
0.049713134765625,
0.01287841796875,
0.0302581787109375,
-0.016265869140625,
0.01007080078125,
0.0164337158203125,
0.0330810546875,
-0.0251922607421875,
-0.0791015625,
-0.0111846923828125,
0.005096435546875,
0.031768798828125,
0.03802490234375,
0.0479736328125,
-0.043060302734375,
0.0248870849609375,
-0.0018262863159179688,
-0.026580810546875,
0.0007634162902832031,
-0.0108642578125,
0.00879669189453125,
0.04986572265625,
0.026031494140625,
-0.0226898193359375,
-0.0185699462890625,
0.0107421875,
0.00510406494140625,
0.002544403076171875,
0.00799560546875,
0.028564453125,
-0.01189422607421875,
0.0009450912475585938,
-0.043182373046875,
0.040802001953125,
-0.0076751708984375,
0.04608154296875,
-0.0421142578125,
0.00623321533203125,
-0.023712158203125,
0.035247802734375,
0.032440185546875,
0.0251007080078125,
0.01934814453125,
-0.0267486572265625,
-0.055938720703125,
0.0254669189453125,
0.0711669921875,
-0.0288238525390625,
-0.0350341796875,
-0.0054168701171875,
0.0123443603515625,
0.0247344970703125,
0.013427734375,
0.0204620361328125,
0.052886962890625,
0.008331298828125,
-0.0179443359375,
0.002048492431640625,
-0.0010671615600585938,
0.0035400390625,
0.009613037109375,
0.00714111328125,
-0.018218994140625,
0.00804901123046875,
-0.051116943359375,
-0.007122039794921875,
-0.0297088623046875,
0.0004949569702148438,
0.0308685302734375,
0.03668212890625,
-0.0019159317016601562,
0.0239105224609375,
0.01812744140625,
-0.025146484375,
0.0274810791015625,
-0.0020427703857421875,
-0.0022754669189453125,
0.04229736328125,
0.0253448486328125,
0.0183563232421875,
-0.042999267578125,
-0.0269622802734375,
-0.01702880859375,
0.038848876953125,
0.052032470703125,
-0.0070648193359375,
0.022613525390625,
0.055694580078125,
0.0144195556640625,
0.0060272216796875,
0.0182647705078125,
0.0108184814453125,
0.0086669921875,
-0.004878997802734375,
0.01435089111328125,
-0.020904541015625,
-0.050079345703125,
0.02703857421875,
0.0292816162109375,
-0.0161590576171875,
0.044708251953125,
-0.02679443359375,
0.00693511962890625,
-0.03533935546875,
0.0297393798828125,
-0.01898193359375,
-0.0283660888671875,
-0.052337646484375,
-0.0132598876953125,
0.0411376953125,
0.038177490234375,
0.01934814453125,
-0.0073394775390625,
0.0036563873291015625,
-0.043670654296875,
0.048370361328125,
-0.00768280029296875,
0.059417724609375,
0.027130126953125,
-0.006763458251953125,
0.005401611328125,
0.010223388671875,
-0.024932861328125,
0.0204010009765625,
0.0115203857421875,
0.015777587890625,
-0.006275177001953125,
-0.004787445068359375,
-0.0011968612670898438,
0.00641632080078125,
0.047393798828125,
-0.00551605224609375,
0.0217742919921875,
-0.00836944580078125,
0.01259613037109375,
-0.00450897216796875,
-0.03167724609375,
-0.0256195068359375,
-0.04107666015625,
-0.005619049072265625,
0.003326416015625,
-0.019500732421875,
-0.048187255859375,
0.0007486343383789062,
-0.01253509521484375,
0.020599365234375,
-0.007518768310546875,
-0.01172637939453125,
0.01543426513671875,
-0.033935546875,
0.0054779052734375,
-0.005329132080078125,
0.01154327392578125,
-0.0254669189453125,
-0.024078369140625,
-0.039581298828125,
-0.056732177734375,
-0.06982421875,
0.077880859375,
-0.0616455078125,
0.03143310546875,
0.0706787109375,
-0.035064697265625,
0.0128936767578125,
0.00713348388671875,
0.024993896484375,
0.052886962890625,
-0.0239715576171875,
-0.00936126708984375,
0.0175018310546875,
0.004047393798828125,
-0.01000213623046875,
-0.06005859375,
-0.0181427001953125,
-0.039276123046875,
-0.0009317398071289062,
0.00385284423828125,
-0.0186920166015625,
-0.018096923828125,
-0.0352783203125,
-0.04827880859375,
-0.0167999267578125,
0.033843994140625,
-0.0291900634765625,
-0.083740234375,
0.0285491943359375,
0.0167083740234375,
-0.049896240234375,
-0.03173828125,
-0.01416015625,
-0.02752685546875,
0.031341552734375,
0.018890380859375,
0.005992889404296875,
0.045928955078125,
-0.0231170654296875,
-0.042449951171875,
0.0120849609375,
0.01166534423828125,
0.007747650146484375,
-0.031982421875,
0.0218505859375,
0.018829345703125,
0.038787841796875,
-0.0009722709655761719,
0.0189056396484375,
0.019287109375,
-0.02630615234375,
0.006702423095703125,
-0.01468658447265625,
-0.06036376953125,
-0.007198333740234375,
0.057647705078125,
0.0562744140625,
0.0197296142578125,
-0.0386962890625,
0.045318603515625,
0.054229736328125,
-0.05120849609375,
0.01861572265625,
0.01384735107421875,
0.01100921630859375,
-0.003314971923828125,
-0.045623779296875,
-0.001194000244140625,
-0.032989501953125,
-0.03192138671875,
-0.0296783447265625,
-0.02386474609375,
0.00931549072265625,
0.042266845703125,
0.01611328125,
-0.035064697265625,
0.053955078125,
-0.0322265625,
-0.01351165771484375,
0.0122528076171875,
0.0222320556640625,
0.003376007080078125,
0.00440216064453125,
-0.02734375,
-0.029052734375,
0.00611114501953125,
0.040618896484375,
-0.022186279296875,
0.06591796875,
-0.03704833984375,
-0.00675201416015625,
0.001277923583984375,
0.008453369140625,
-0.0108642578125,
0.004360198974609375,
-0.035125732421875,
0.02728271484375,
-0.0322265625,
0.06304931640625,
-0.0146942138671875,
0.005889892578125,
0.00853729248046875,
-0.00041937828063964844,
0.017669677734375,
-0.005962371826171875,
0.0726318359375,
-0.060943603515625,
-0.01107025146484375,
0.0176239013671875,
-0.032867431640625,
-0.0887451171875,
0.0093231201171875,
0.02947998046875,
0.03558349609375,
0.020477294921875
]
|
a453a4a6026cc16701d7d507178cefdfc45930fc | Wordpress Stackexchange
Q: what are pmxi tables? I'm on multisite mode. I can see that for each site of the network there are 4 'pmxi' tables. What are they for?
They're something like this
siteprefix_pmxi_files
siteprefix_pmxi_imports
siteprefix_pmxi_posts
siteprefix_pmxi_templates
A: This doesn't sound like something coming from WordPress core.
Quick search online got pretty slim results, but it seems to be asscociated with WP All Import plugin.
| Q: what are pmxi tables? I'm on multisite mode. I can see that for each site of the network there are 4 'pmxi' tables. What are they for?
They're something like this
siteprefix_pmxi_files
siteprefix_pmxi_imports
siteprefix_pmxi_posts
siteprefix_pmxi_templates
A: This doesn't sound like something coming from WordPress core.
Quick search online got pretty slim results, but it seems to be asscociated with WP All Import plugin.
| wordpress | {
"language": "en",
"length": 64,
"provenance": "stackexchange_00019.jsonl.gz:465480",
"question_score": "10",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226743"
} | [
0.0037326812744140625,
-0.0413818359375,
0.01001739501953125,
0.01352691650390625,
-0.0289306640625,
-0.0233001708984375,
0.041778564453125,
0.01364898681640625,
-0.01934814453125,
0.0059967041015625,
-0.00656890869140625,
0.0316162109375,
-0.06732177734375,
-0.023040771484375,
-0.00836181640625,
-0.04327392578125,
0.038330078125,
-0.06591796875,
-0.0272064208984375,
-0.025848388671875,
-0.0147247314453125,
0.0006747245788574219,
0.030181884765625,
0.01165008544921875,
0.0031719207763671875,
0.006908416748046875,
-0.0113983154296875,
-0.019561767578125,
0.00237274169921875,
-0.00033020973205566406,
0.01279449462890625,
0.009124755859375,
0.0218353271484375,
0.01483917236328125,
-0.005199432373046875,
0.0014085769653320312,
-0.01204681396484375,
0.0076446533203125,
0.026397705078125,
-0.001129150390625,
-0.01629638671875,
0.00930023193359375,
0.055938720703125,
0.01480865478515625,
-0.006801605224609375,
0.021148681640625,
-0.048370361328125,
-0.059539794921875,
0.01702880859375,
-0.02642822265625,
0.0009427070617675781,
0.0252685546875,
0.024566650390625,
-0.06231689453125,
-0.0161895751953125,
-0.0015411376953125,
0.0406494140625,
-0.0247802734375,
0.03240966796875,
0.01446533203125,
-0.0269317626953125,
0.0181884765625,
-0.0015659332275390625,
-0.039794921875,
-0.046661376953125,
-0.0243682861328125,
-0.05133056640625,
0.0066986083984375,
-0.0092010498046875,
-0.06072998046875,
0.0074615478515625,
-0.0018644332885742188,
0.0082855224609375,
-0.03594970703125,
-0.03936767578125,
0.012542724609375,
0.0157012939453125,
-0.01934814453125,
0.002712249755859375,
-0.0201568603515625,
-0.0131988525390625,
-0.056121826171875,
-0.06884765625,
0.007656097412109375,
0.01006317138671875,
0.03948974609375,
-0.0142822265625,
-0.0149078369140625,
0.00213623046875,
0.0003337860107421875,
-0.01373291015625,
-0.04864501953125,
0.0103912353515625,
0.0242462158203125,
0.003208160400390625,
-0.04638671875,
0.011749267578125,
0.03131103515625,
-0.033111572265625,
-0.021514892578125,
0.0182647705078125,
-0.03363037109375,
0.0128936767578125,
-0.027374267578125,
0.023193359375,
0.0210418701171875,
-0.021026611328125,
0.0175628662109375,
0.06829833984375,
0.02325439453125,
0.00832366943359375,
0.045684814453125,
0.0220794677734375,
-0.007549285888671875,
-0.0450439453125,
-0.00038909912109375,
0.006137847900390625,
-0.0243377685546875,
-0.014617919921875,
-0.04656982421875,
-0.02191162109375,
0.00946807861328125,
-0.0147857666015625,
-0.08306884765625,
0.038299560546875,
-0.0172576904296875,
-0.0213470458984375,
0.02850341796875,
-0.08282470703125,
0.0723876953125,
-0.0338134765625,
-0.0211944580078125,
0.05059814453125,
0.055206298828125,
0.01103973388671875,
-0.041107177734375,
0.06878662109375,
0.0250091552734375,
-0.004093170166015625,
0.032440185546875,
-0.0173187255859375,
-0.05694580078125,
-0.045654296875,
0.00852203369140625,
-0.0283660888671875,
-0.01483917236328125,
0.027496337890625,
0.04974365234375,
-0.02667236328125,
-0.0055999755859375,
-0.01340484619140625,
0.058013916015625,
0.01522064208984375,
-0.024444580078125,
0.0037097930908203125,
-0.0513916015625,
-0.0256805419921875,
-0.0156402587890625,
0.01154327392578125,
-0.0027256011962890625,
-0.0233154296875,
-0.00557708740234375,
0.042449951171875,
-0.0625,
-0.046722412109375,
-0.00971221923828125,
-0.03997802734375,
-0.00724029541015625,
0.037841796875,
0.033050537109375,
-0.0228729248046875,
-0.0197906494140625,
0.06329345703125,
0.037139892578125,
-0.006290435791015625,
0.052825927734375,
-0.001125335693359375,
-0.03521728515625,
0.01708984375,
0.0302581787109375,
-0.01540374755859375,
-0.04461669921875,
-0.0292816162109375,
0.001880645751953125,
-0.0225982666015625,
-0.0236358642578125,
0.0201416015625,
0.050445556640625,
0.0060272216796875,
0.03155517578125,
0.0262298583984375,
-0.0225372314453125,
0.0017070770263671875,
0.0020198822021484375,
-0.03948974609375,
-0.00984954833984375,
0.01555633544921875,
0.044647216796875,
-0.01526641845703125,
-0.00495147705078125,
-0.059417724609375,
0.0099945068359375,
0.00714111328125,
0.01306915283203125,
-0.031494140625,
0.02081298828125,
-0.0257110595703125,
0.05926513671875,
0.00954437255859375,
-0.0057830810546875,
0.0120849609375,
0.00621795654296875,
0.006534576416015625,
-0.0762939453125,
-0.03997802734375,
0.02813720703125,
-0.018768310546875,
-0.004451751708984375,
0.019073486328125,
0.007610321044921875,
-0.0276641845703125,
0.04443359375,
-0.022613525390625,
-0.031402587890625,
0.0031986236572265625,
-0.01395416259765625,
-0.0169677734375,
0.0021038055419921875,
0.0226593017578125,
-0.004314422607421875,
0.07977294921875,
0.0171356201171875,
0.032470703125,
0.04327392578125,
-0.01523590087890625,
-0.0036678314208984375,
0.004344940185546875,
-0.033355712890625,
0.0023021697998046875,
0.03155517578125,
0.0243682861328125,
0.0153350830078125,
-0.0296783447265625,
-0.01331329345703125,
0.0238189697265625,
-0.0133819580078125,
0.00856781005859375,
-0.000331878662109375,
0.006801605224609375,
0.0267181396484375,
-0.05096435546875,
0.00567626953125,
0.047088623046875,
-0.03704833984375,
-0.012969970703125,
0.058319091796875,
-0.031585693359375,
-0.0462646484375,
0.026702880859375,
0.016448974609375,
0.0193023681640625,
0.0684814453125,
0.01983642578125,
0.02996826171875,
0.04608154296875,
0.024932861328125,
0.06671142578125,
0.037017822265625,
0.0042572021484375,
0.007198333740234375,
-0.01214599609375,
-0.050140380859375,
-0.00714874267578125,
0.0024566650390625,
-0.0265045166015625,
0.0728759765625,
-0.01325225830078125,
0.004791259765625,
-0.0247650146484375,
0.02288818359375,
-0.0105743408203125,
0.0191497802734375,
-0.06475830078125,
-0.017059326171875,
0.0423583984375,
0.004161834716796875,
-0.044586181640625,
-0.0219879150390625,
0.0103912353515625,
-0.0255584716796875,
-0.00569915771484375,
0.0166778564453125,
-0.0070343017578125,
0.009429931640625,
0.0016384124755859375,
-0.0235748291015625,
-0.051849365234375,
-0.0257568359375,
0.03778076171875,
-0.0288543701171875,
0.001377105712890625,
0.06085205078125,
-0.020233154296875,
0.0262298583984375,
-0.0018167495727539062,
0.043701171875,
0.0428466796875,
0.01447296142578125,
0.0091552734375,
-0.033203125,
0.037811279296875,
0.00713348388671875,
0.003192901611328125,
-0.01378631591796875,
-0.03564453125,
-0.03515625,
-0.047576904296875,
-0.01349639892578125,
-0.06866455078125,
0.0035552978515625,
0.0169830322265625,
0.00652313232421875,
-0.0218353271484375,
-0.0341796875,
0.00939178466796875,
0.0118255615234375,
-0.06036376953125,
-0.01129913330078125,
-0.03179931640625,
-0.041412353515625,
-0.00809478759765625,
-0.07952880859375,
-0.06793212890625,
-0.041229248046875,
0.01904296875,
0.024627685546875,
-0.0035610198974609375,
0.03143310546875,
-0.0189208984375,
-0.0308685302734375,
-0.036956787109375,
-0.03973388671875,
0.0123291015625,
-0.04364013671875,
0.0028171539306640625,
-0.002349853515625,
-0.004878997802734375,
0.007427215576171875,
0.0286407470703125,
0.03814697265625,
-0.0595703125,
-0.0140380859375,
0.02764892578125,
0.0267333984375,
0.0308990478515625,
0.027130126953125,
-0.02642822265625,
-0.0011320114135742188,
0.005878448486328125,
-0.04901123046875,
-0.0258941650390625,
0.0260467529296875,
-0.0328369140625,
0.025299072265625,
0.009307861328125,
-0.0308990478515625,
0.0283050537109375,
0.0015411376953125,
0.04766845703125,
-0.012298583984375,
0.046234130859375,
0.00494384765625,
-0.0098724365234375,
-0.00351715087890625,
0.01287841796875,
-0.063232421875,
0.0136566162109375,
-0.0260162353515625,
0.03692626953125,
0.005603790283203125,
0.003997802734375,
0.00783538818359375,
-0.0137786865234375,
0.0032100677490234375,
-0.055816650390625,
0.0316162109375,
-0.015045166015625,
0.046661376953125,
-0.0261077880859375,
-0.013214111328125,
-0.027740478515625,
0.068115234375,
-0.05523681640625,
-0.016387939453125,
0.0178375244140625,
0.029449462890625,
-0.0215301513671875,
-0.044219970703125,
-0.02490234375,
-0.020111083984375,
-0.0292816162109375,
-0.010833740234375,
0.0046539306640625,
-0.039337158203125,
-0.00823974609375,
-0.050750732421875,
-0.0252532958984375,
-0.023193359375,
0.0264434814453125,
-0.0012760162353515625,
-0.0016374588012695312,
0.0301361083984375,
0.00121307373046875,
0.018585205078125,
-0.009735107421875,
-0.0152130126953125,
-0.031036376953125,
-0.005619049072265625,
-0.042694091796875,
0.02032470703125,
0.07012939453125,
-0.06231689453125,
0.0399169921875,
0.04248046875,
-0.0176544189453125,
0.0117340087890625,
0.0213165283203125,
0.057464599609375,
-0.00945281982421875,
-0.03564453125,
0.0211334228515625,
-0.05621337890625,
0.033935546875,
-0.01470947265625,
-0.057464599609375,
-0.00897216796875,
-0.0224761962890625,
0.01215362548828125,
0.000010073184967041016,
-0.04522705078125,
0.01549530029296875,
0.0273895263671875,
0.0099945068359375,
0.0247802734375,
-0.0189056396484375,
-0.00856781005859375,
0.0280609130859375,
0.00789642333984375,
0.030792236328125,
0.002834320068359375,
-0.006084442138671875,
0.0255889892578125,
0.0246429443359375,
-0.0005869865417480469,
-0.0285186767578125,
-0.08062744140625,
-0.045989990234375,
0.0355224609375,
-0.004730224609375,
0.053314208984375,
0.03607177734375,
-0.0164031982421875,
0.053070068359375,
0.01038360595703125,
0.01441192626953125,
-0.031585693359375,
-0.048004150390625,
0.0216522216796875,
0.0186309814453125,
-0.023468017578125,
-0.0025348663330078125,
0.05743408203125,
0.041168212890625,
-0.0103759765625,
-0.0245819091796875,
-0.093994140625,
0.0462646484375,
0.043975830078125,
-0.0168609619140625,
-0.078369140625,
0.02935791015625,
-0.0124053955078125,
-0.0027599334716796875,
0.036712646484375,
0.034942626953125,
0.00415802001953125,
-0.02593994140625,
0.00942230224609375,
-0.0053863525390625,
0.0102691650390625,
-0.0151824951171875,
-0.01525115966796875,
0.012237548828125,
0.006908416748046875,
-0.01485443115234375,
0.01178741455078125,
-0.01482391357421875,
0.0389404296875,
-0.011871337890625,
-0.0714111328125,
0.01064300537109375,
0.0007138252258300781,
0.037109375,
0.032257080078125,
-0.027618408203125,
-0.0126495361328125,
0.030487060546875,
-0.024200439453125,
0.0122528076171875,
-0.0132598876953125,
-0.0023288726806640625,
-0.01922607421875,
-0.0185089111328125,
-0.01666259765625,
0.00592803955078125,
0.0584716796875,
0.042633056640625,
-0.023101806640625,
0.038299560546875,
-0.009002685546875,
-0.0218353271484375,
-0.0099334716796875,
0.0163116455078125,
0.00131988525390625,
0.01465606689453125,
-0.0116119384765625,
0.02117919921875,
0.044464111328125,
-0.033721923828125,
0.0012235641479492188,
0.0190887451171875,
0.049102783203125,
-0.01511383056640625,
-0.035736083984375,
0.0004551410675048828,
-0.03717041015625,
-0.0245513916015625,
0.0290679931640625,
0.0309906005859375,
-0.0496826171875,
0.016937255859375,
0.005855560302734375,
-0.028167724609375,
-0.007080078125,
-0.011016845703125,
0.01837158203125,
0.0011768341064453125,
0.00026297569274902344,
0.026641845703125,
-0.05364990234375,
-0.0138397216796875,
0.012115478515625,
-0.0277099609375,
-0.0297698974609375,
-0.0411376953125,
-0.04986572265625,
-0.038421630859375,
0.02337646484375,
0.0218048095703125,
-0.0283050537109375,
0.01393890380859375,
0.01181793212890625,
-0.00820159912109375,
-0.015716552734375,
-0.0160675048828125,
0.02825927734375,
-0.026580810546875,
-0.0535888671875,
0.019195556640625,
-0.0194091796875,
-0.00044798851013183594,
-0.0237884521484375,
-0.017608642578125,
-0.017974853515625,
-0.0086212158203125,
-0.005764007568359375,
-0.01666259765625,
0.00952911376953125,
0.00046944618225097656,
0.01451873779296875,
0.00400543212890625,
0.0158538818359375,
-0.023651123046875,
-0.028045654296875,
-0.0323486328125,
0.067138671875,
-0.0162811279296875,
0.037750244140625,
0.003665924072265625,
0.047271728515625,
0.0175933837890625,
-0.019775390625,
0.0236968994140625,
-0.0526123046875,
-0.039520263671875,
-0.043212890625,
0.035675048828125,
0.0263519287109375,
0.0157470703125,
-0.01068878173828125,
0.037322998046875,
-0.0284881591796875,
0.00820159912109375,
-0.0145263671875,
0.022674560546875,
-0.0550537109375,
0.0026454925537109375,
0.05963134765625,
0.01277923583984375,
0.048126220703125,
-0.0207061767578125,
-0.0187225341796875,
0.005649566650390625,
-0.005706787109375,
0.0271759033203125,
0.005008697509765625,
-0.0251617431640625,
0.043731689453125,
0.07220458984375,
-0.0004839897155761719,
0.0274810791015625,
0.018310546875,
-0.0087890625,
0.011932373046875,
-0.0419921875,
0.007293701171875,
0.005641937255859375,
0.028656005859375,
-0.0222015380859375,
-0.0222930908203125,
0.01039886474609375,
-0.0313720703125,
0.01398468017578125,
0.0330810546875,
0.019866943359375,
-0.06622314453125,
0.017364501953125,
-0.00765228271484375,
-0.017669677734375,
0.01468658447265625,
-0.018829345703125,
-0.00079345703125,
-0.02587890625,
0.00989532470703125,
0.05120849609375,
-0.0171356201171875,
0.00792694091796875,
0.01010894775390625,
-0.0172119140625,
-0.0305328369140625,
0.05572509765625,
0.01552581787109375,
0.000025987625122070312,
-0.0123291015625,
-0.01483154296875,
-0.0196533203125,
-0.00919342041015625,
0.0168609619140625,
-0.020233154296875,
-0.01468658447265625,
-0.0113677978515625,
0.025634765625,
-0.00814056396484375,
0.0018529891967773438,
0.0074462890625,
0.007572174072265625,
0.055633544921875,
0.05010986328125,
0.002506256103515625,
-0.0164337158203125,
0.026031494140625,
0.007659912109375,
-0.0270843505859375,
-0.015777587890625,
0.016143798828125,
0.0002684593200683594,
0.030242919921875,
0.030181884765625,
-0.0052642822265625,
-0.0487060546875,
0.0027980804443359375,
-0.0302581787109375,
0.03814697265625,
-0.033233642578125,
0.0048675537109375,
0.0178680419921875,
0.045501708984375,
0.01910400390625,
0.015716552734375,
-0.01483154296875,
-0.052520751953125,
-0.0604248046875,
0.005527496337890625,
-0.06439208984375,
0.0178375244140625,
0.0111236572265625,
-0.05078125,
0.0975341796875,
-0.032806396484375,
0.0498046875,
0.046478271484375,
0.027313232421875,
-0.027496337890625,
0.0015611648559570312,
-0.036376953125,
0.0238800048828125,
0.005977630615234375,
0.07086181640625,
0.006763458251953125,
0.002910614013671875,
0.049896240234375,
0.0265960693359375,
-0.0036945343017578125,
0.00263214111328125,
-0.039764404296875,
0.00536346435546875,
0.0054779052734375,
0.0103607177734375,
0.001575469970703125,
0.05084228515625,
-0.0350341796875,
0.03594970703125,
0.02911376953125,
-0.058349609375,
-0.005218505859375,
0.05670166015625,
-0.03668212890625,
0.00885009765625,
0.005374908447265625,
-0.008758544921875,
0.025634765625,
-0.05120849609375,
-0.01036834716796875,
0.0096588134765625,
-0.0257415771484375,
0.0097503662109375,
0.0462646484375,
0.00495147705078125,
0.01145172119140625,
-0.012237548828125,
0.0263824462890625,
-0.01088714599609375,
0.04425048828125,
-0.0211181640625,
0.05609130859375,
0.08013916015625,
0.039306640625,
0.0058441162109375,
0.047515869140625,
0.054840087890625,
0.0279083251953125,
-0.037628173828125,
0.036865234375,
-0.0113677978515625,
0.01166534423828125,
-0.07806396484375,
-0.035247802734375,
-0.0011186599731445312,
0.048004150390625,
-0.0222015380859375,
-0.04266357421875,
0.02178955078125,
-0.00021576881408691406,
-0.01806640625,
0.0207672119140625,
-0.002361297607421875,
-0.045074462890625,
0.009765625,
0.03692626953125,
-0.0267181396484375,
0.0228424072265625,
0.00004118680953979492,
0.040252685546875,
0.09173583984375,
-0.0167388916015625,
-0.031951904296875,
-0.0299835205078125,
0.037994384765625,
0.01071929931640625,
-0.0240936279296875,
-0.0135650634765625,
0.038330078125,
0.06219482421875,
0.0207061767578125,
-0.01079559326171875,
0.02740478515625,
0.0245513916015625,
0.007190704345703125,
-0.038970947265625,
-0.052398681640625,
0.063232421875,
0.042236328125,
0.006160736083984375,
-0.0024967193603515625,
0.0246124267578125,
0.022308349609375,
-0.043609619140625,
-0.006816864013671875,
0.068359375,
-0.0156097412109375,
-0.0027027130126953125,
-0.04193115234375,
0.06732177734375,
0.056396484375,
0.0311431884765625,
0.01102447509765625,
0.049102783203125,
0.051239013671875,
-0.041595458984375,
0.0207061767578125,
0.00385284423828125,
-0.0401611328125,
0.0083160400390625,
0.01270294189453125,
0.01800537109375,
-0.01548004150390625,
-0.040313720703125,
-0.005405426025390625,
-0.033935546875,
0.04071044921875,
-0.0142974853515625,
0.0225677490234375,
0.0247039794921875,
0.0024814605712890625,
0.03326416015625,
-0.0179595947265625,
0.00875091552734375,
-0.004261016845703125,
0.01100921630859375,
0.0226287841796875,
0.02203369140625,
0.0145263671875,
-0.030517578125,
-0.0274658203125,
-0.024169921875,
0.0352783203125,
0.0256805419921875,
0.0150299072265625,
-0.0146636962890625,
0.055206298828125,
0.06939697265625,
-0.005603790283203125,
0.027435302734375,
0.0301055908203125,
0.029876708984375,
-0.01383209228515625,
0.00921630859375,
-0.0293121337890625,
-0.01216888427734375,
0.021881103515625,
0.039886474609375,
-0.04833984375,
-0.0031108856201171875,
0.028411865234375,
-0.00750732421875,
-0.015777587890625,
0.0266265869140625,
-0.0023021697998046875,
-0.030487060546875,
-0.020294189453125,
-0.0211334228515625,
0.04925537109375,
0.072265625,
0.03179931640625,
0.0374755859375,
0.1085205078125,
-0.00731658935546875,
-0.0028438568115234375,
-0.029388427734375,
0.0439453125,
0.041717529296875,
0.076904296875,
0.01055145263671875,
0.0072174072265625,
-0.0283203125,
0.031646728515625,
-0.01517486572265625,
0.010650634765625,
0.01378631591796875,
-0.050628662109375,
0.032379150390625,
0.0498046875,
0.0419921875,
-0.03643798828125,
0.0002841949462890625,
0.061767578125,
-0.0178375244140625,
0.00919342041015625,
-0.043182373046875,
-0.01375579833984375,
-0.0267791748046875,
-0.027984619140625,
0.0287017822265625,
-0.036834716796875,
-0.00914764404296875,
-0.035369873046875,
-0.044403076171875,
0.0030269622802734375,
-0.01059722900390625,
-0.005573272705078125,
0.0066070556640625,
-0.017486572265625,
-0.01201629638671875,
-0.0273895263671875,
0.00881195068359375,
-0.009857177734375,
0.0017337799072265625,
-0.049591064453125,
-0.0111083984375,
-0.038116455078125,
0.006763458251953125,
-0.047393798828125,
-0.0025234222412109375,
0.0076751708984375,
-0.019927978515625,
-0.0289306640625,
0.011474609375,
0.0333251953125,
0.057952880859375,
0.0151824951171875,
-0.022064208984375,
0.0017156600952148438,
0.0016641616821289062,
-0.0257110595703125,
-0.050445556640625,
-0.00634002685546875,
-0.04022216796875,
-0.0025348663330078125,
-0.04071044921875,
0.029937744140625,
0.006992340087890625,
-0.0477294921875,
-0.065673828125,
0.1143798828125,
-0.0357666015625,
-0.005313873291015625,
-0.05859375,
-0.05303955078125,
-0.00197601318359375,
0.061370849609375,
-0.01425933837890625,
0.0014963150024414062,
-0.06396484375,
0.032501220703125,
0.01166534423828125,
-0.01210784912109375,
0.047821044921875,
-0.0176544189453125,
-0.0428466796875,
-0.0008029937744140625,
-0.0162200927734375,
-0.0036773681640625,
0.02288818359375,
-0.0228424072265625,
0.037994384765625,
0.054229736328125,
-0.0212554931640625,
-0.052459716796875,
-0.019866943359375,
-0.0249786376953125,
0.0017957687377929688,
0.00832366943359375,
-0.016571044921875,
-0.0180511474609375,
0.027008056640625,
0.046875,
0.013824462890625,
-0.020416259765625,
0.02862548828125,
-0.0013599395751953125,
-0.050872802734375,
-0.01171875,
0.01458740234375,
-0.0157623291015625,
-0.006664276123046875,
-0.0225982666015625,
-0.0267181396484375,
0.034454345703125,
-0.04681396484375,
-0.04644775390625,
0.020477294921875,
-0.0462646484375,
-0.02252197265625,
-0.0123138427734375,
0.0426025390625,
0.0056304931640625,
-0.01535797119140625,
-0.0038127899169921875,
-0.0217132568359375,
-0.002025604248046875,
-0.0006060600280761719,
-0.0096893310546875,
-0.0601806640625,
-0.003421783447265625,
-0.0228424072265625,
0.01171112060546875,
-0.039825439453125,
0.0200347900390625,
-0.0222320556640625,
0.0305938720703125,
0.0010786056518554688,
0.0131072998046875,
0.005096435546875,
-0.0026683807373046875,
-0.01483154296875,
0.023101806640625,
-0.0124053955078125,
0.06756591796875,
0.0035572052001953125,
-0.0099945068359375,
-0.0214996337890625,
0.0595703125,
-0.021453857421875,
-0.0226898193359375,
-0.004886627197265625,
-0.0249786376953125,
0.01267242431640625,
0.01200103759765625,
0.01305389404296875,
-0.0011720657348632812,
-0.0181121826171875,
-0.032928466796875,
0.000659942626953125,
-0.00701141357421875
]
|
344229a6e2340d31042a20f67eced6e181d6c416 | Wordpress Stackexchange
Q: Add post meta based on another post meta value before publish post I want to add a meta value to my post , which will be based on another meta value , before publish post . This is what I have tried
add_action('save_post_my_custom_post', 'add_custom_field_automatically' );
function add_custom_field_automatically($post_ID) {
$new_meta_value = get_post_meta($post_ID,'_my_meta_key',TRUE).'to ' .' something new';
add_post_meta($post_ID, '_my_new_meta_key', $new_meta_value, true);
}
But it doesn't work . The hook fired properly , it saves only "to something new" , but what I expect the value should be "my meta value to something new"
A: The solution is using added_post_meta and updated_post_meta hook .
Here is the working code .
add_action( 'added_post_meta', 'add_custom_field_automatically', 10, 4 );
add_action( 'updated_post_meta', 'add_custom_field_automatically', 10, 4 );
function add_custom_field_automatically( $meta_id, $post_id, $meta_key, $meta_value )
{
if ( '_my_meta_key' == $meta_key ) {
add_post_meta($post_id, '_my_new_meta_key', $meta_value.'to something new', true);
}
}
| Q: Add post meta based on another post meta value before publish post I want to add a meta value to my post , which will be based on another meta value , before publish post . This is what I have tried
add_action('save_post_my_custom_post', 'add_custom_field_automatically' );
function add_custom_field_automatically($post_ID) {
$new_meta_value = get_post_meta($post_ID,'_my_meta_key',TRUE).'to ' .' something new';
add_post_meta($post_ID, '_my_new_meta_key', $new_meta_value, true);
}
But it doesn't work . The hook fired properly , it saves only "to something new" , but what I expect the value should be "my meta value to something new"
A: The solution is using added_post_meta and updated_post_meta hook .
Here is the working code .
add_action( 'added_post_meta', 'add_custom_field_automatically', 10, 4 );
add_action( 'updated_post_meta', 'add_custom_field_automatically', 10, 4 );
function add_custom_field_automatically( $meta_id, $post_id, $meta_key, $meta_value )
{
if ( '_my_meta_key' == $meta_key ) {
add_post_meta($post_id, '_my_new_meta_key', $meta_value.'to something new', true);
}
}
A: Use global $post at the top of the page just before the function start
global $post;
| wordpress | {
"language": "en",
"length": 160,
"provenance": "stackexchange_00019.jsonl.gz:465485",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226765"
} | [
0.013397216796875,
-0.0115509033203125,
0.0251617431640625,
-0.0104522705078125,
-0.01454925537109375,
-0.0015621185302734375,
0.0126953125,
-0.033294677734375,
-0.00705718994140625,
-0.004150390625,
-0.005519866943359375,
-0.0011529922485351562,
-0.01349639892578125,
-0.03564453125,
0.023193359375,
-0.0266265869140625,
0.0290985107421875,
-0.017669677734375,
0.04132080078125,
-0.001953125,
0.01031494140625,
-0.0009307861328125,
0.0723876953125,
-0.003818511962890625,
0.03900146484375,
-0.04888916015625,
0.02459716796875,
-0.0186920166015625,
0.03497314453125,
0.0005593299865722656,
0.0299224853515625,
-0.007549285888671875,
0.01366424560546875,
0.0003154277801513672,
-0.00009018182754516602,
-0.00864410400390625,
0.0389404296875,
-0.0153656005859375,
-0.004238128662109375,
0.0361328125,
0.035003662109375,
-0.0175018310546875,
-0.0189208984375,
0.01445770263671875,
-0.005146026611328125,
-0.033111572265625,
0.038665771484375,
-0.0286712646484375,
0.0267333984375,
-0.0130767822265625,
-0.002292633056640625,
0.0175933837890625,
-0.004611968994140625,
-0.000568389892578125,
-0.00981903076171875,
-0.00920867919921875,
-0.057861328125,
0.0140838623046875,
0.055328369140625,
0.01983642578125,
-0.0181884765625,
-0.053009033203125,
0.004001617431640625,
-0.048431396484375,
0.0068359375,
-0.008392333984375,
-0.0287322998046875,
0.0037708282470703125,
-0.0182647705078125,
0.00782012939453125,
0.036712646484375,
-0.04644775390625,
-0.00001704692840576172,
0.002666473388671875,
0.002185821533203125,
-0.057952880859375,
0.037078857421875,
-0.024200439453125,
-0.01476287841796875,
0.032623291015625,
0.0002841949462890625,
0.00124359130859375,
0.054046630859375,
-0.03607177734375,
-0.0042572021484375,
-0.031219482421875,
-0.02642822265625,
0.00716400146484375,
-0.0185089111328125,
-0.049041748046875,
-0.00920867919921875,
-0.0711669921875,
-0.031768798828125,
-0.01320648193359375,
0.0022907257080078125,
-0.050506591796875,
-0.00013577938079833984,
0.08892822265625,
-0.034423828125,
0.0374755859375,
-0.0242156982421875,
-0.021453857421875,
0.0333251953125,
-0.0679931640625,
0.0085906982421875,
0.03082275390625,
-0.011016845703125,
-0.06329345703125,
-0.00336456298828125,
0.01873779296875,
-0.016876220703125,
-0.0396728515625,
0.00983428955078125,
0.01328277587890625,
-0.0307159423828125,
-0.002025604248046875,
-0.0242156982421875,
-0.0020236968994140625,
-0.0163726806640625,
0.00994110107421875,
0.0239715576171875,
0.0224761962890625,
0.042510986328125,
-0.057861328125,
0.029876708984375,
0.0183868408203125,
-0.058074951171875,
-0.042144775390625,
-0.004863739013671875,
0.015106201171875,
-0.0469970703125,
0.006622314453125,
0.1031494140625,
0.048858642578125,
0.03350830078125,
-0.0267791748046875,
-0.020843505859375,
-0.055419921875,
-0.0186614990234375,
0.03582763671875,
-0.041229248046875,
-0.059722900390625,
0.0119781494140625,
-0.01995849609375,
-0.0218658447265625,
0.01343536376953125,
0.0037670135498046875,
0.019287109375,
-0.01226043701171875,
-0.027618408203125,
0.0031070709228515625,
-0.02813720703125,
0.0252227783203125,
0.004718780517578125,
0.0017490386962890625,
0.0147247314453125,
0.0209503173828125,
-0.021514892578125,
-0.020538330078125,
-0.0115814208984375,
-0.005405426025390625,
-0.01007080078125,
-0.00649261474609375,
-0.048553466796875,
-0.052215576171875,
0.0016937255859375,
-0.0282440185546875,
0.0005588531494140625,
0.01120758056640625,
0.01464080810546875,
0.031982421875,
0.06390380859375,
0.028839111328125,
-0.0119171142578125,
-0.00731658935546875,
-0.054718017578125,
0.007183074951171875,
0.0307159423828125,
0.0196380615234375,
0.0179901123046875,
-0.0142059326171875,
-0.03253173828125,
0.06524658203125,
-0.0197601318359375,
-0.054412841796875,
0.06842041015625,
0.002964019775390625,
0.0731201171875,
0.0061492919921875,
0.01324462890625,
0.0221405029296875,
0.0247344970703125,
-0.03350830078125,
-0.0209808349609375,
0.00946044921875,
0.00014400482177734375,
0.0136566162109375,
-0.0009222030639648438,
0.01074981689453125,
-0.006481170654296875,
-0.00936126708984375,
-0.0009617805480957031,
-0.01354217529296875,
0.01464080810546875,
-0.0665283203125,
-0.01230621337890625,
-0.0233917236328125,
0.040435791015625,
-0.029144287109375,
-0.01393890380859375,
0.00624847412109375,
-0.06121826171875,
0.034515380859375,
-0.03778076171875,
-0.026275634765625,
-0.0136260986328125,
-0.0203094482421875,
0.010589599609375,
-0.0027179718017578125,
0.0157318115234375,
0.0015249252319335938,
0.004669189453125,
-0.0167236328125,
-0.0081939697265625,
0.05230712890625,
-0.0072784423828125,
-0.01540374755859375,
-0.0149688720703125,
0.01922607421875,
0.0170745849609375,
-0.055816650390625,
0.039093017578125,
-0.0008711814880371094,
-0.055908203125,
-0.05108642578125,
0.005718231201171875,
-0.031402587890625,
-0.0927734375,
-0.00838470458984375,
0.078857421875,
0.031280517578125,
0.026031494140625,
0.01177978515625,
0.04730224609375,
0.056671142578125,
0.02056884765625,
0.0253753662109375,
-0.00030350685119628906,
0.031280517578125,
0.06365966796875,
-0.03173828125,
-0.0039825439453125,
0.0145111083984375,
-0.11395263671875,
0.00466156005859375,
0.047821044921875,
-0.036468505859375,
-0.00589752197265625,
0.0174102783203125,
-0.033477783203125,
-0.00008910894393920898,
-0.041046142578125,
0.0015192031860351562,
-0.0235137939453125,
0.03759765625,
0.006031036376953125,
0.032806396484375,
0.0240478515625,
-0.0244598388671875,
-0.005985260009765625,
0.016021728515625,
-0.0012788772583007812,
0.00978851318359375,
-0.0251617431640625,
-0.0341796875,
0.01194000244140625,
-0.0400390625,
0.0292816162109375,
0.024993896484375,
-0.0220184326171875,
0.0005693435668945312,
0.0299224853515625,
-0.017974853515625,
-0.01056671142578125,
0.0030345916748046875,
-0.052734375,
-0.0087738037109375,
-0.0046234130859375,
-0.007511138916015625,
-0.055419921875,
-0.00025844573974609375,
0.0026226043701171875,
-0.039215087890625,
0.0265045166015625,
0.019439697265625,
-0.05029296875,
-0.021636962890625,
-0.0341796875,
0.0426025390625,
-0.048614501953125,
0.00394439697265625,
0.060302734375,
-0.0277252197265625,
0.03814697265625,
-0.0234375,
0.0077362060546875,
-0.06280517578125,
0.02655029296875,
-0.008697509765625,
-0.0628662109375,
-0.0189971923828125,
-0.0035915374755859375,
0.026458740234375,
0.0200653076171875,
0.0304107666015625,
-0.010589599609375,
0.0207977294921875,
0.03509521484375,
-0.04278564453125,
-0.059600830078125,
0.033966064453125,
-0.016876220703125,
-0.0262451171875,
-0.0267791748046875,
-0.014984130859375,
0.0018072128295898438,
-0.03204345703125,
-0.006633758544921875,
-0.043426513671875,
-0.0199737548828125,
-0.034149169921875,
-0.052581787109375,
-0.0295562744140625,
0.011444091796875,
-0.0030841827392578125,
0.00336456298828125,
0.006832122802734375,
0.08843994140625,
0.0189666748046875,
-0.028900146484375,
0.0197601318359375,
-0.03656005859375,
-0.0221710205078125,
0.0164794921875,
0.0101470947265625,
-0.0419921875,
0.02215576171875,
0.00240325927734375,
0.05450439453125,
0.0079193115234375,
-0.0076446533203125,
-0.01473236083984375,
-0.0333251953125,
0.0005793571472167969,
0.019775390625,
-0.000518798828125,
0.0196990966796875,
0.03607177734375,
0.054290771484375,
-0.0189056396484375,
-0.005771636962890625,
0.0002834796905517578,
-0.0211639404296875,
0.01346588134765625,
-0.0167694091796875,
0.0025787353515625,
-0.0015773773193359375,
0.033050537109375,
-0.0289764404296875,
-0.0091552734375,
0.045318603515625,
-0.007598876953125,
-0.0120086669921875,
-0.0267486572265625,
-0.055999755859375,
-0.0185699462890625,
-0.01739501953125,
-0.01702880859375,
0.037841796875,
-0.01047515869140625,
0.0487060546875,
-0.003810882568359375,
0.0301513671875,
-0.04827880859375,
-0.0394287109375,
0.03399658203125,
-0.0079803466796875,
0.05035400390625,
-0.04486083984375,
-0.032196044921875,
-0.0255279541015625,
0.0982666015625,
-0.0191192626953125,
-0.021392822265625,
-0.005596160888671875,
0.0088348388671875,
-0.0004570484161376953,
-0.0255279541015625,
-0.01113128662109375,
-0.017425537109375,
-0.043487548828125,
0.01110076904296875,
-0.004795074462890625,
-0.0027141571044921875,
-0.027374267578125,
0.061309814453125,
-0.044403076171875,
-0.0127410888671875,
0.035491943359375,
-0.047943115234375,
0.002025604248046875,
0.05450439453125,
-0.01273345947265625,
0.027587890625,
-0.0294952392578125,
-0.029571533203125,
-0.07098388671875,
-0.01102447509765625,
-0.0289459228515625,
0.055206298828125,
0.01068878173828125,
0.001499176025390625,
0.01546478271484375,
0.0430908203125,
0.01291656494140625,
0.0107269287109375,
0.0037174224853515625,
0.003322601318359375,
0.0173492431640625,
-0.0158233642578125,
0.0032901763916015625,
-0.0288238525390625,
0.0029468536376953125,
-0.01702880859375,
-0.021728515625,
0.031707763671875,
-0.035064697265625,
0.0149383544921875,
-0.006130218505859375,
-0.0242767333984375,
-0.0204925537109375,
-0.0089111328125,
-0.03216552734375,
-0.00978851318359375,
-0.0190582275390625,
-0.01275634765625,
-0.01194000244140625,
-0.0404052734375,
0.032257080078125,
-0.01385498046875,
0.007297515869140625,
0.01442718505859375,
0.0965576171875,
0.0157928466796875,
-0.023345947265625,
-0.029876708984375,
0.0157318115234375,
0.0232696533203125,
0.01507568359375,
0.01446533203125,
-0.005115509033203125,
-0.00820159912109375,
0.0053863525390625,
-0.0079803466796875,
0.0032291412353515625,
-0.0338134765625,
0.0911865234375,
-0.01473236083984375,
-0.002162933349609375,
-0.0021266937255859375,
-0.049591064453125,
0.015350341796875,
0.0230865478515625,
-0.0092315673828125,
-0.0256195068359375,
0.0051727294921875,
0.032012939453125,
-0.00846099853515625,
0.024444580078125,
-0.0243072509765625,
-0.02313232421875,
0.0086517333984375,
0.013580322265625,
-0.01136016845703125,
0.01947021484375,
-0.006313323974609375,
-0.0175933837890625,
-0.0401611328125,
-0.004150390625,
-0.0265960693359375,
-0.0235595703125,
0.005748748779296875,
-0.002597808837890625,
0.0052337646484375,
-0.01025390625,
-0.0205230712890625,
0.00868988037109375,
0.036346435546875,
-0.0123291015625,
-0.04498291015625,
-0.024658203125,
-0.0121002197265625,
0.05609130859375,
0.0077362060546875,
-0.00452423095703125,
0.0350341796875,
0.04931640625,
-0.0167694091796875,
0.00328826904296875,
0.016326904296875,
0.0128173828125,
-0.047149658203125,
-0.0245361328125,
0.0232086181640625,
-0.024322509765625,
-0.027313232421875,
0.07879638671875,
0.0092620849609375,
0.0141143798828125,
-0.025604248046875,
0.0697021484375,
0.059234619140625,
0.00540924072265625,
0.00921630859375,
0.0212860107421875,
-0.01342010498046875,
-0.003749847412109375,
-0.033599853515625,
-0.005130767822265625,
0.0099334716796875,
-0.0026111602783203125,
0.01320648193359375,
-0.0059814453125,
-0.01015472412109375,
0.0338134765625,
-0.016448974609375,
-0.0194244384765625,
0.00146484375,
0.01322174072265625,
-0.02435302734375,
0.01059722900390625,
0.0198822021484375,
-0.020843505859375,
0.00238800048828125,
0.0103607177734375,
0.0130767822265625,
-0.0140838623046875,
0.06024169921875,
-0.057281494140625,
0.0626220703125,
-0.03302001953125,
-0.055419921875,
-0.004505157470703125,
0.01233673095703125,
-0.0009031295776367188,
-0.0168609619140625,
-0.052490234375,
-0.0087738037109375,
-0.0223846435546875,
0.042938232421875,
-0.005767822265625,
0.01323699951171875,
-0.034912109375,
0.01340484619140625,
0.002231597900390625,
0.00778961181640625,
0.0036182403564453125,
-0.032196044921875,
0.0196685791015625,
-0.00351715087890625,
-0.020599365234375,
-0.029296875,
-0.01605224609375,
-0.0338134765625,
-0.0160369873046875,
-0.02325439453125,
0.020904541015625,
0.036102294921875,
-0.007511138916015625,
-0.0251007080078125,
0.0026836395263671875,
-0.004375457763671875,
0.009002685546875,
0.0543212890625,
0.0107879638671875,
0.04541015625,
-0.0244598388671875,
0.06939697265625,
0.017791748046875,
-0.0007724761962890625,
-0.029388427734375,
-0.0265960693359375,
-0.0170135498046875,
-0.039794921875,
-0.0135345458984375,
0.030853271484375,
-0.0214080810546875,
0.01503753662109375,
0.024169921875,
-0.005260467529296875,
0.036376953125,
-0.0008463859558105469,
0.0048065185546875,
-0.010406494140625,
-0.015899658203125,
-0.00243377685546875,
0.017913818359375,
0.05029296875,
-0.034332275390625,
-0.0192413330078125,
0.005298614501953125,
0.0086212158203125,
0.0194549560546875,
-0.01071929931640625,
0.005329132080078125,
0.00962066650390625,
-0.07611083984375,
0.0667724609375,
0.0589599609375,
0.0289306640625,
0.0467529296875,
-0.0209808349609375,
0.0258026123046875,
0.0082855224609375,
0.005096435546875,
-0.0012178421020507812,
0.00408172607421875,
0.059417724609375,
-0.0048980712890625,
-0.0287628173828125,
0.033172607421875,
-0.034088134765625,
0.02166748046875,
0.04901123046875,
0.0565185546875,
-0.06597900390625,
0.018524169921875,
0.01654052734375,
-0.00797271728515625,
0.03485107421875,
0.0040130615234375,
0.0007662773132324219,
0.01482391357421875,
0.0006937980651855469,
-0.03125,
-0.027618408203125,
0.005405426025390625,
0.00870513916015625,
-0.0197601318359375,
-0.031829833984375,
-0.03271484375,
0.00896453857421875,
0.041778564453125,
0.0199737548828125,
-0.0198516845703125,
0.01050567626953125,
-0.0109710693359375,
-0.0194091796875,
-0.0130767822265625,
-0.03692626953125,
-0.079833984375,
-0.038421630859375,
-0.041107177734375,
0.0008091926574707031,
0.0251312255859375,
0.018890380859375,
0.0703125,
0.03466796875,
0.02777099609375,
-0.0027370452880859375,
-0.0127105712890625,
0.05718994140625,
-0.05694580078125,
-0.0498046875,
0.0051116943359375,
0.0279541015625,
-0.0146484375,
0.036224365234375,
0.02410888671875,
-0.06890869140625,
0.0121002197265625,
0.034332275390625,
0.052703857421875,
-0.044189453125,
-0.016326904296875,
0.0256805419921875,
0.002231597900390625,
0.00027871131896972656,
0.0150909423828125,
0.00954437255859375,
-0.01409149169921875,
-0.0009975433349609375,
0.009765625,
-0.035919189453125,
-0.01139068603515625,
0.0142364501953125,
-0.0771484375,
0.1162109375,
0.007457733154296875,
0.006229400634765625,
-0.037841796875,
0.0455322265625,
-0.0189208984375,
0.035552978515625,
-0.0498046875,
0.0682373046875,
-0.01062774658203125,
0.0268402099609375,
-0.099609375,
-0.0214080810546875,
-0.030059814453125,
0.041961669921875,
0.060089111328125,
0.0194549560546875,
-0.039581298828125,
-0.00489044189453125,
0.0119476318359375,
0.0008831024169921875,
-0.0304718017578125,
0.049652099609375,
-0.0119476318359375,
0.032012939453125,
0.06085205078125,
-0.028045654296875,
0.0264129638671875,
0.02081298828125,
-0.041473388671875,
0.010101318359375,
-0.00861358642578125,
-0.028656005859375,
-0.0116729736328125,
0.0268096923828125,
-0.00620269775390625,
-0.006015777587890625,
-0.007610321044921875,
0.0011129379272460938,
0.037689208984375,
-0.0228729248046875,
0.001491546630859375,
0.01678466796875,
0.0286407470703125,
-0.006519317626953125,
0.03143310546875,
0.0079345703125,
0.009033203125,
-0.0037746429443359375,
-0.00579071044921875,
0.02783203125,
0.040679931640625,
0.0017518997192382812,
0.045501708984375,
0.019775390625,
0.0635986328125,
0.04718017578125,
0.015960693359375,
0.00040721893310546875,
0.05419921875,
0.006130218505859375,
0.05059814453125,
-0.06048583984375,
-0.015838623046875,
0.0103302001953125,
-0.0161285400390625,
-0.0207366943359375,
-0.0292205810546875,
-0.0268402099609375,
-0.0116729736328125,
0.002475738525390625,
-0.052825927734375,
0.018798828125,
0.024078369140625,
0.036651611328125,
-0.007625579833984375,
0.0080108642578125,
-0.07763671875,
-0.015838623046875,
-0.0921630859375,
0.016876220703125,
0.0270843505859375,
0.09918212890625,
0.06243896484375,
0.07275390625,
0.03216552734375,
-0.05364990234375,
-0.027099609375,
0.038787841796875,
0.010498046875,
0.0343017578125,
-0.041839599609375,
-0.020172119140625,
0.0193634033203125,
0.0298919677734375,
-0.0308074951171875,
0.055328369140625,
0.0596923828125,
0.047027587890625,
-0.03924560546875,
-0.01715087890625,
0.0538330078125,
-0.04595947265625,
0.016448974609375,
-0.04022216796875,
0.01247406005859375,
0.0013294219970703125,
0.0022640228271484375,
-0.01255035400390625,
0.01080322265625,
0.0184173583984375,
0.0099945068359375,
0.0002493858337402344,
0.00856781005859375,
-0.021209716796875,
0.03973388671875,
0.026947021484375,
0.055328369140625,
0.046142578125,
-0.038177490234375,
0.023712158203125,
-0.062408447265625,
-0.09307861328125,
0.0257110595703125,
0.041107177734375,
-0.038665771484375,
0.03546142578125,
0.00982666015625,
-0.0009198188781738281,
0.0085906982421875,
0.01064300537109375,
-0.001590728759765625,
0.0167999267578125,
0.0273284912109375,
0.007198333740234375,
-0.0225830078125,
-0.0154266357421875,
0.0210418701171875,
0.0299835205078125,
-0.00003325939178466797,
0.01132965087890625,
-0.002071380615234375,
0.0146026611328125,
-0.00795745849609375,
-0.0268096923828125,
0.0161285400390625,
-0.00731658935546875,
0.0180816650390625,
0.01039886474609375,
-0.0007534027099609375,
-0.01702880859375,
0.0144805908203125,
-0.005687713623046875,
0.061004638671875,
-0.0198516845703125,
-0.00962066650390625,
-0.0101318359375,
0.016571044921875,
-0.0253448486328125,
-0.0023956298828125,
-0.035552978515625,
-0.0022640228271484375,
-0.06488037109375,
-0.04180908203125,
0.052276611328125,
-0.00688934326171875,
-0.01432037353515625,
0.0222320556640625,
0.031585693359375,
0.0164337158203125,
0.0212860107421875,
0.01446533203125,
0.0153656005859375,
0.0269927978515625,
-0.0146636962890625,
-0.0065460205078125,
0.017333984375,
-0.01255035400390625,
0.01068878173828125,
0.0131988525390625,
0.01708984375,
0.0310211181640625,
-0.043792724609375,
-0.0270538330078125,
0.04296875,
0.0413818359375,
-0.01445770263671875,
0.020660400390625,
0.0026721954345703125,
-0.0162353515625,
0.0184783935546875,
-0.0031795501708984375,
-0.0235595703125,
-0.038299560546875,
-0.0025348663330078125,
0.006053924560546875,
-0.021484375,
-0.03411865234375,
-0.0267486572265625,
0.0294952392578125,
0.04693603515625,
0.0122222900390625,
-0.036407470703125,
0.02587890625,
-0.0283966064453125,
0.0213775634765625,
0.0241241455078125,
-0.0367431640625,
0.014984130859375,
0.06317138671875,
0.0204620361328125,
-0.01114654541015625,
-0.024200439453125,
0.0162353515625,
-0.0031909942626953125,
-0.0072479248046875,
-0.003353118896484375,
-0.0096282958984375,
-0.01238250732421875,
0.0250091552734375,
0.00876617431640625,
0.047393798828125,
0.03253173828125,
-0.0284271240234375,
0.01715087890625,
-0.0214691162109375,
-0.0032825469970703125,
-0.04754638671875,
0.007320404052734375,
-0.0733642578125,
-0.010650634765625,
-0.037933349609375,
0.033935546875,
0.045318603515625,
-0.0106964111328125,
-0.07135009765625,
0.0114898681640625,
-0.01183319091796875,
-0.03253173828125,
-0.0316162109375,
-0.0224151611328125,
-0.00969696044921875,
0.04071044921875,
0.001117706298828125,
-0.0311126708984375,
-0.03509521484375,
0.0284271240234375,
0.021453857421875,
-0.015869140625,
0.03765869140625,
0.0140533447265625,
-0.06414794921875,
0.00624847412109375,
-0.007564544677734375,
-0.005123138427734375,
0.0008392333984375,
-0.02056884765625,
0.01192474365234375,
-0.01027679443359375,
-0.0675048828125,
-0.03839111328125,
-0.00841522216796875,
0.047393798828125,
-0.0176849365234375,
-0.02642822265625,
-0.0274505615234375,
-0.0052947998046875,
0.0992431640625,
0.03094482421875,
0.0306396484375,
-0.04510498046875,
0.026397705078125,
-0.04351806640625,
-0.043426513671875,
-0.018402099609375,
-0.0005707740783691406,
-0.043975830078125,
-0.01019287109375,
0.009674072265625,
-0.0014705657958984375,
-0.00328826904296875,
0.00782012939453125,
0.0027141571044921875,
0.0009975433349609375,
0.06829833984375,
0.0030231475830078125,
-0.01654052734375,
0.0022602081298828125,
0.100341796875,
-0.05157470703125,
-0.0019512176513671875,
0.042999267578125,
-0.01473236083984375,
0.04833984375,
0.048431396484375,
0.03662109375,
-0.0005536079406738281,
-0.021087646484375,
0.000659942626953125,
0.018402099609375,
0.0194091796875,
0.00704193115234375,
-0.050201416015625,
-0.0243072509765625,
0.0207366943359375,
0.0014772415161132812,
0.01568603515625,
-0.0157318115234375,
0.0350341796875,
0.02130126953125,
0.059417724609375,
-0.01264190673828125,
0.004611968994140625,
-0.0167083740234375,
0.020904541015625,
-0.0172119140625,
-0.0010137557983398438,
0.01256561279296875,
-0.018157958984375,
0.0024776458740234375,
0.0026226043701171875,
-0.0079193115234375,
-0.0255584716796875,
0.018707275390625,
0.005886077880859375,
-0.0146636962890625,
0.0151214599609375
]
|
1a469e834a3a3c869d6c8da0bb494a6a8d8fb2ec | Wordpress Stackexchange
Q: How to allow users login to WP from external domain and make REST requests Basically what i want to do is:
*
*Use Wordpress as a login system and data storage for web-application on another domain.
*Make users able to register and perform REST calls from the application.
*Let users manage their accounts and post contents without using wp-admin at all.
For REST Api i found a really nice plugin:
http://v2.wp-api.org/
however after using POST method my wordpress is saying:
"Sorry, you are not allowed to create new posts." - Because I'm not logged in.
REST plugin does allow me to configure App and Secret, but what if i have
1000 users, each with different privilliges. I need a real per-user login system.
Any recommendations will be helpful.
| Q: How to allow users login to WP from external domain and make REST requests Basically what i want to do is:
*
*Use Wordpress as a login system and data storage for web-application on another domain.
*Make users able to register and perform REST calls from the application.
*Let users manage their accounts and post contents without using wp-admin at all.
For REST Api i found a really nice plugin:
http://v2.wp-api.org/
however after using POST method my wordpress is saying:
"Sorry, you are not allowed to create new posts." - Because I'm not logged in.
REST plugin does allow me to configure App and Secret, but what if i have
1000 users, each with different privilliges. I need a real per-user login system.
Any recommendations will be helpful.
| wordpress | {
"language": "en",
"length": 129,
"provenance": "stackexchange_00019.jsonl.gz:465494",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226810"
} | [
0.06146240234375,
0.015655517578125,
-0.0055084228515625,
0.0269012451171875,
0.0214385986328125,
-0.05828857421875,
0.0849609375,
-0.0341796875,
-0.04766845703125,
0.002349853515625,
-0.0181732177734375,
0.02923583984375,
-0.06976318359375,
-0.018524169921875,
0.016845703125,
-0.05438232421875,
0.005222320556640625,
0.01210784912109375,
0.0283050537109375,
-0.028289794921875,
0.0215301513671875,
-0.0250244140625,
0.025360107421875,
0.0006403923034667969,
0.010833740234375,
0.059661865234375,
0.01338958740234375,
-0.01222991943359375,
0.022430419921875,
0.022064208984375,
0.014251708984375,
-0.08343505859375,
-0.0012350082397460938,
0.044403076171875,
-0.036834716796875,
-0.0361328125,
-0.00453948974609375,
0.023956298828125,
0.006969451904296875,
0.01384735107421875,
0.060699462890625,
-0.0291748046875,
-0.004581451416015625,
0.01849365234375,
-0.00537109375,
-0.033416748046875,
0.06683349609375,
-0.04010009765625,
0.0270843505859375,
0.04449462890625,
0.0004372596740722656,
0.02386474609375,
0.00644683837890625,
0.032806396484375,
-0.015533447265625,
-0.0147247314453125,
0.029571533203125,
-0.0276641845703125,
0.048431396484375,
-0.037078857421875,
-0.0714111328125,
-0.055755615234375,
0.050445556640625,
-0.0174560546875,
0.030120849609375,
0.0008864402770996094,
-0.00229644775390625,
0.033843994140625,
-0.0014858245849609375,
0.0149993896484375,
-0.0127410888671875,
-0.032012939453125,
0.007114410400390625,
-0.00006109476089477539,
-0.01342010498046875,
-0.0286712646484375,
0.0015001296997070312,
-0.0161590576171875,
0.024932861328125,
0.007198333740234375,
-0.02783203125,
-0.0061492919921875,
-0.0245208740234375,
-0.01983642578125,
-0.005130767822265625,
-0.01381683349609375,
-0.022125244140625,
0.00008016824722290039,
-0.00818634033203125,
0.0082244873046875,
-0.00653839111328125,
-0.053680419921875,
-0.017425537109375,
0.0672607421875,
0.0235748291015625,
-0.015777587890625,
-0.0051116943359375,
-0.03826904296875,
0.023834228515625,
0.0069427490234375,
0.041168212890625,
-0.0660400390625,
0.0249176025390625,
-0.00034880638122558594,
-0.005054473876953125,
0.0235443115234375,
0.0256195068359375,
0.005970001220703125,
-0.0008673667907714844,
0.007396697998046875,
-0.0147857666015625,
0.017852783203125,
0.022552490234375,
-0.03076171875,
0.009735107421875,
-0.0006384849548339844,
0.002094268798828125,
0.0263214111328125,
0.005374908447265625,
-0.01009368896484375,
-0.035247802734375,
-0.0081024169921875,
-0.0220489501953125,
0.01459503173828125,
-0.0006680488586425781,
-0.01129913330078125,
0.015045166015625,
0.002925872802734375,
-0.0286102294921875,
0.0498046875,
-0.00852203369140625,
0.0129547119140625,
-0.0014047622680664062,
-0.0078582763671875,
-0.0462646484375,
-0.0149078369140625,
0.04058837890625,
0.0229949951171875,
0.0017137527465820312,
-0.00493621826171875,
0.0202484130859375,
-0.035125732421875,
-0.03350830078125,
0.004241943359375,
0.0165557861328125,
-0.00446319580078125,
0.0244903564453125,
0.01413726806640625,
0.0024662017822265625,
0.0164642333984375,
-0.01389312744140625,
-0.00042438507080078125,
-0.0102996826171875,
0.0013113021850585938,
0.09527587890625,
-0.008819580078125,
0.06341552734375,
-0.032501220703125,
0.0201568603515625,
0.00865936279296875,
0.00391387939453125,
-0.016632080078125,
0.03753662109375,
-0.02764892578125,
-0.04095458984375,
0.01161956787109375,
-0.05535888671875,
-0.0169677734375,
0.0289306640625,
0.02081298828125,
0.0014820098876953125,
-0.028350830078125,
0.026947021484375,
0.018951416015625,
-0.0041351318359375,
0.0307769775390625,
0.0005393028259277344,
0.06695556640625,
0.0056610107421875,
0.031341552734375,
0.0306243896484375,
-0.034515380859375,
0.08026123046875,
-0.005634307861328125,
-0.0124969482421875,
0.03717041015625,
0.01739501953125,
0.045013427734375,
-0.0367431640625,
0.025421142578125,
0.0036163330078125,
0.055694580078125,
0.008087158203125,
0.020355224609375,
-0.00807952880859375,
-0.0635986328125,
0.0138702392578125,
-0.01800537109375,
-0.00859832763671875,
0.010772705078125,
0.0252532958984375,
-0.00806427001953125,
-0.00569915771484375,
-0.044647216796875,
-0.0105438232421875,
-0.034088134765625,
0.0158843994140625,
0.0162811279296875,
0.01171875,
0.020416259765625,
0.007843017578125,
0.0201263427734375,
-0.0185394287109375,
-0.0245361328125,
-0.0202178955078125,
0.0130157470703125,
-0.0231475830078125,
0.053619384765625,
0.0038127899169921875,
0.0352783203125,
-0.003818511962890625,
-0.041229248046875,
-0.0049285888671875,
-0.0256500244140625,
0.04339599609375,
-0.048004150390625,
0.017547607421875,
-0.03948974609375,
0.06414794921875,
-0.02410888671875,
0.0265960693359375,
0.01213836669921875,
0.0193023681640625,
0.01751708984375,
-0.0209808349609375,
-0.0103607177734375,
-0.00139617919921875,
-0.037506103515625,
0.01470184326171875,
0.04486083984375,
0.025421142578125,
0.01351165771484375,
0.004596710205078125,
0.01178741455078125,
-0.007152557373046875,
-0.04937744140625,
0.0228424072265625,
-0.0151519775390625,
-0.00820159912109375,
0.0030422210693359375,
-0.01090240478515625,
-0.0125274658203125,
0.0360107421875,
-0.043609619140625,
-0.02435302734375,
0.05242919921875,
0.004817962646484375,
-0.00562286376953125,
-0.003620147705078125,
-0.021087646484375,
0.0170745849609375,
-0.06524658203125,
-0.042083740234375,
-0.014617919921875,
-0.050384521484375,
-0.0105743408203125,
-0.004058837890625,
-0.001552581787109375,
-0.005779266357421875,
-0.03167724609375,
0.0234527587890625,
0.00679779052734375,
-0.005336761474609375,
0.0018320083618164062,
0.050994873046875,
0.005023956298828125,
-0.03460693359375,
0.002033233642578125,
0.0272979736328125,
0.00514984130859375,
-0.01079559326171875,
-0.0025196075439453125,
-0.008026123046875,
-0.006595611572265625,
0.009490966796875,
-0.05657958984375,
0.0182037353515625,
0.01457977294921875,
0.024688720703125,
0.00739288330078125,
0.02777099609375,
0.020751953125,
-0.0099029541015625,
0.04742431640625,
-0.00937652587890625,
-0.026519775390625,
-0.0088348388671875,
-0.04534912109375,
0.03594970703125,
-0.032562255859375,
0.04608154296875,
0.076904296875,
0.038238525390625,
-0.0200958251953125,
-0.002471923828125,
0.00623321533203125,
0.005939483642578125,
0.0196685791015625,
0.01180267333984375,
-0.041229248046875,
0.002597808837890625,
0.01322174072265625,
0.01806640625,
-0.015899658203125,
0.0198822021484375,
-0.018707275390625,
-0.0111236572265625,
0.019439697265625,
-0.0599365234375,
-0.047576904296875,
-0.004230499267578125,
-0.0699462890625,
0.01448822021484375,
-0.0196380615234375,
-0.040069580078125,
-0.00466156005859375,
0.01910400390625,
-0.00922393798828125,
-0.0217132568359375,
-0.033172607421875,
-0.0292205810546875,
-0.062744140625,
-0.03857421875,
-0.012847900390625,
0.0015392303466796875,
-0.01548004150390625,
0.0032939910888671875,
0.0401611328125,
-0.00045871734619140625,
0.002933502197265625,
0.0011692047119140625,
0.0247344970703125,
0.0031070709228515625,
-0.04766845703125,
-0.0023593902587890625,
0.0001226663589477539,
0.00197601318359375,
-0.002002716064453125,
0.027374267578125,
0.0192413330078125,
-0.01983642578125,
-0.01329803466796875,
-0.012939453125,
-0.00562286376953125,
-0.002910614013671875,
-0.0212860107421875,
0.006954193115234375,
-0.0148773193359375,
-0.0292205810546875,
-0.049346923828125,
0.0181732177734375,
-0.0107421875,
-0.034942626953125,
-0.03216552734375,
0.0288848876953125,
-0.0247344970703125,
-0.0063018798828125,
-0.04205322265625,
0.014312744140625,
0.0119171142578125,
-0.0034847259521484375,
-0.0071868896484375,
0.0303192138671875,
0.0026416778564453125,
0.00711822509765625,
-0.009918212890625,
0.0462646484375,
-0.0081024169921875,
-0.056243896484375,
-0.00997161865234375,
-0.004238128662109375,
-0.0255279541015625,
0.00022423267364501953,
-0.06622314453125,
-0.041778564453125,
0.067626953125,
0.0284881591796875,
-0.005859375,
-0.0216064453125,
-0.032958984375,
0.006702423095703125,
0.08087158203125,
-0.005458831787109375,
0.002899169921875,
0.01340484619140625,
0.012420654296875,
-0.064697265625,
-0.023406982421875,
-0.08551025390625,
0.006816864013671875,
0.046722412109375,
-0.0216217041015625,
-0.03472900390625,
0.00937652587890625,
0.01332855224609375,
-0.03515625,
0.06622314453125,
-0.02764892578125,
0.016265869140625,
0.0011949539184570312,
0.015289306640625,
-0.04736328125,
0.042266845703125,
-0.088134765625,
0.0256195068359375,
-0.0184478759765625,
-0.08258056640625,
-0.0044708251953125,
-0.01358795166015625,
0.039703369140625,
0.0257568359375,
-0.06732177734375,
0.0165863037109375,
0.043426513671875,
-0.0141448974609375,
0.03436279296875,
-0.019989013671875,
0.00208282470703125,
0.0269775390625,
-0.00484466552734375,
-0.0325927734375,
-0.005435943603515625,
-0.006038665771484375,
-0.011260986328125,
-0.005779266357421875,
-0.001270294189453125,
-0.033721923828125,
-0.0556640625,
-0.0031528472900390625,
-0.020538330078125,
-0.03924560546875,
-0.014068603515625,
-0.0157012939453125,
0.0166168212890625,
-0.0276336669921875,
0.00495147705078125,
-0.012420654296875,
-0.047149658203125,
0.039764404296875,
0.03790283203125,
-0.01323699951171875,
0.002475738525390625,
0.06060791015625,
0.00450897216796875,
-0.033416748046875,
-0.0780029296875,
-0.0179443359375,
0.01314544677734375,
-0.034942626953125,
0.05609130859375,
0.001972198486328125,
-0.02264404296875,
0.07586669921875,
-0.0105438232421875,
0.01030731201171875,
0.0157318115234375,
-0.005428314208984375,
-0.0128326416015625,
-0.039703369140625,
0.029541015625,
0.0038127899169921875,
-0.027313232421875,
0.00791168212890625,
0.0028896331787109375,
-0.004085540771484375,
0.007015228271484375,
0.00580596923828125,
-0.01181793212890625,
0.0071258544921875,
0.01161956787109375,
-0.045074462890625,
0.02801513671875,
-0.055633544921875,
-0.019256591796875,
0.005733489990234375,
0.0026836395263671875,
-0.0240325927734375,
-0.037628173828125,
-0.033111572265625,
-0.00798797607421875,
-0.016265869140625,
-0.00885009765625,
0.0158538818359375,
-0.027374267578125,
-0.035003662109375,
0.0032711029052734375,
-0.029693603515625,
0.11529541015625,
-0.01248931884765625,
-0.0872802734375,
0.021514892578125,
-0.02386474609375,
0.03936767578125,
0.06829833984375,
-0.0295562744140625,
0.0192108154296875,
-0.007167816162109375,
-0.028167724609375,
0.01389312744140625,
-0.008453369140625,
-0.056915283203125,
-0.032073974609375,
0.0066070556640625,
-0.0272216796875,
0.0106964111328125,
-0.005260467529296875,
0.07635498046875,
-0.0170440673828125,
0.052154541015625,
-0.0177154541015625,
0.0472412109375,
0.0433349609375,
0.0223846435546875,
0.018524169921875,
-0.0009427070617675781,
0.006534576416015625,
-0.0067291259765625,
-0.0214691162109375,
-0.04510498046875,
-0.0159454345703125,
0.035675048828125,
0.052337646484375,
0.0009059906005859375,
-0.0238800048828125,
0.0110931396484375,
-0.0160675048828125,
-0.02935791015625,
0.0254058837890625,
0.0086212158203125,
-0.0223846435546875,
-0.033721923828125,
0.01727294921875,
0.03887939453125,
0.002285003662109375,
0.03466796875,
-0.024169921875,
0.042388916015625,
0.0194549560546875,
0.02557373046875,
-0.00445556640625,
-0.01541900634765625,
-0.009307861328125,
-0.03662109375,
-0.0396728515625,
-0.000025928020477294922,
0.032196044921875,
0.0200042724609375,
-0.0068359375,
-0.024871826171875,
0.0008015632629394531,
-0.0132904052734375,
-0.017059326171875,
-0.043853759765625,
0.0401611328125,
-0.044403076171875,
0.00019729137420654297,
0.03619384765625,
0.00345611572265625,
-0.05218505859375,
-0.0204315185546875,
-0.014617919921875,
-0.0016460418701171875,
0.0302886962890625,
-0.0005946159362792969,
-0.035247802734375,
-0.016387939453125,
0.037078857421875,
0.028656005859375,
-0.0114593505859375,
-0.037078857421875,
-0.0283203125,
0.004787445068359375,
0.020965576171875,
0.042572021484375,
-0.042999267578125,
0.0958251953125,
-0.003002166748046875,
0.051727294921875,
-0.0018472671508789062,
0.04547119140625,
0.001178741455078125,
0.00027298927307128906,
0.013397216796875,
-0.07904052734375,
-0.03179931640625,
-0.027313232421875,
-0.03448486328125,
0.06475830078125,
0.05499267578125,
-0.0021686553955078125,
0.0140838623046875,
-0.041015625,
-0.00691986083984375,
-0.016632080078125,
0.0694580078125,
-0.04083251953125,
-0.00823974609375,
0.02178955078125,
0.00849151611328125,
0.025482177734375,
-0.032257080078125,
-0.046051025390625,
0.0194854736328125,
0.0217132568359375,
0.01108551025390625,
0.01047515869140625,
-0.0206298828125,
0.03326416015625,
0.080322265625,
0.02703857421875,
0.05657958984375,
0.01522064208984375,
0.01465606689453125,
0.03363037109375,
-0.002994537353515625,
-0.0154876708984375,
-0.0071868896484375,
0.0150299072265625,
-0.01136016845703125,
-0.01953125,
-0.006649017333984375,
-0.026397705078125,
0.036224365234375,
0.0631103515625,
0.07623291015625,
-0.1162109375,
0.0258636474609375,
-0.01529693603515625,
-0.0031185150146484375,
0.047119140625,
0.0005502700805664062,
0.00508880615234375,
0.006805419921875,
0.049285888671875,
-0.02099609375,
-0.0048675537109375,
0.02056884765625,
-0.01023101806640625,
-0.00778961181640625,
0.00780487060546875,
0.04400634765625,
0.017333984375,
-0.01369476318359375,
-0.003620147705078125,
0.00510406494140625,
0.0245513916015625,
-0.01113128662109375,
0.00783538818359375,
0.0198516845703125,
-0.02130126953125,
-0.047271728515625,
0.0189971923828125,
-0.034759521484375,
-0.006122589111328125,
0.035552978515625,
-0.0229034423828125,
0.0718994140625,
0.0394287109375,
-0.00579071044921875,
0.020233154296875,
-0.015594482421875,
0.044219970703125,
0.00691986083984375,
-0.0428466796875,
-0.001277923583984375,
0.0186309814453125,
-0.0271759033203125,
0.0031681060791015625,
0.01031494140625,
-0.0234375,
-0.0260772705078125,
-0.05059814453125,
0.058746337890625,
-0.004802703857421875,
-0.008148193359375,
0.038055419921875,
0.0265655517578125,
-0.0178985595703125,
-0.003269195556640625,
0.0209197998046875,
-0.060089111328125,
-0.0130615234375,
0.012969970703125,
-0.01145172119140625,
-0.0012884140014648438,
0.009552001953125,
-0.058929443359375,
0.1124267578125,
-0.0298919677734375,
0.0237579345703125,
0.003810882568359375,
0.0309906005859375,
-0.0227813720703125,
0.0286712646484375,
-0.07135009765625,
0.04998779296875,
0.0230865478515625,
0.0192718505859375,
-0.04046630859375,
0.0003795623779296875,
-0.004405975341796875,
-0.0155792236328125,
0.08447265625,
0.028167724609375,
-0.0689697265625,
-0.031585693359375,
-0.006072998046875,
0.0234832763671875,
-0.01904296875,
0.060699462890625,
0.00969696044921875,
0.0290679931640625,
0.039642333984375,
-0.04351806640625,
0.012786865234375,
0.01074981689453125,
-0.0014429092407226562,
0.04266357421875,
-0.00757598876953125,
-0.035308837890625,
-0.015899658203125,
0.05120849609375,
-0.052825927734375,
-0.0004024505615234375,
0.020477294921875,
0.0222625732421875,
-0.0140533447265625,
0.0176544189453125,
0.01352691650390625,
-0.0015163421630859375,
0.028533935546875,
-0.041290283203125,
0.039215087890625,
-0.0005784034729003906,
0.01085662841796875,
0.0301666259765625,
0.03118896484375,
0.0123748779296875,
-0.0221710205078125,
0.005527496337890625,
0.00991058349609375,
-0.049224853515625,
0.0255126953125,
0.0216522216796875,
0.027740478515625,
-0.03289794921875,
-0.0197601318359375,
0.037353515625,
0.056060791015625,
-0.0290069580078125,
-0.025054931640625,
0.00623321533203125,
0.0255889892578125,
0.051483154296875,
0.0254058837890625,
0.11737060546875,
0.018341064453125,
0.0248870849609375,
-0.004596710205078125,
0.0264892578125,
0.031646728515625,
-0.0093841552734375,
0.0169830322265625,
0.048553466796875,
-0.04071044921875,
0.043975830078125,
0.0121612548828125,
-0.014007568359375,
-0.002777099609375,
0.01171875,
-0.0012769699096679688,
0.018707275390625,
-0.023345947265625,
0.00769805908203125,
0.007411956787109375,
0.01983642578125,
0.028076171875,
-0.02947998046875,
0.0150146484375,
-0.034759521484375,
0.037689208984375,
0.0238037109375,
0.0012273788452148438,
0.01395416259765625,
0.05474853515625,
0.03173828125,
-0.03912353515625,
-0.0189666748046875,
0.040496826171875,
-0.021514892578125,
-0.00007224082946777344,
-0.01285552978515625,
-0.0357666015625,
-0.0042266845703125,
-0.039764404296875,
0.003246307373046875,
0.00029540061950683594,
0.01136016845703125,
-0.00574493408203125,
0.03662109375,
-0.0113067626953125,
-0.0234375,
0.022552490234375,
-0.032684326171875,
0.0523681640625,
-0.0149688720703125,
-0.06298828125,
-0.0258636474609375,
-0.03643798828125,
0.0108184814453125,
0.0115509033203125,
0.01849365234375,
-0.0014200210571289062,
0.0452880859375,
0.037445068359375,
-0.01348876953125,
0.0340576171875,
-0.03399658203125,
0.00963592529296875,
-0.0211639404296875,
0.0105743408203125,
0.0021800994873046875,
-0.06939697265625,
-0.05938720703125,
-0.03363037109375,
0.05224609375,
0.01239776611328125,
0.05377197265625,
-0.007518768310546875,
0.0219573974609375,
-0.034881591796875,
0.01123809814453125,
-0.01287841796875,
-0.02020263671875,
-0.0008959770202636719,
0.0243682861328125,
0.0096588134765625,
0.00484466552734375,
-0.039825439453125,
0.058807373046875,
-0.01397705078125,
0.039276123046875,
0.06243896484375,
-0.047943115234375,
0.0080108642578125,
0.0162353515625,
-0.005062103271484375,
-0.045562744140625,
-0.0182647705078125,
-0.00713348388671875,
0.022979736328125,
-0.01369476318359375,
-0.028594970703125,
-0.032470703125,
0.06103515625,
-0.07244873046875,
-0.0307464599609375,
-0.0173797607421875,
-0.0738525390625,
-0.04638671875,
0.0164642333984375,
-0.0009341239929199219,
0.00432586669921875,
-0.01313018798828125,
-0.0305023193359375,
0.0084228515625,
0.0012969970703125,
0.0083465576171875,
-0.019317626953125,
0.0154571533203125,
0.0018949508666992188,
0.034332275390625,
0.058624267578125,
0.028778076171875,
0.0089111328125,
-0.0222930908203125,
-0.0228271484375,
-0.0169830322265625,
-0.053924560546875,
-0.043182373046875,
-0.05450439453125,
0.0102081298828125,
0.028961181640625,
-0.01546478271484375,
-0.048431396484375,
-0.06890869140625,
0.01459503173828125,
0.014984130859375,
-0.00994873046875,
-0.050811767578125,
0.0292205810546875,
-0.03314208984375,
0.037933349609375,
-0.024139404296875,
-0.031036376953125,
0.01593017578125,
0.017791748046875,
-0.037200927734375,
0.004535675048828125,
-0.0316162109375,
-0.0177459716796875,
-0.01488494873046875,
0.02276611328125,
0.03668212890625,
-0.0162506103515625,
-0.0162200927734375,
0.0237274169921875,
-0.004638671875,
0.054046630859375,
-0.0269317626953125,
0.00983428955078125,
-0.007404327392578125,
0.00658416748046875,
-0.033416748046875,
-0.032501220703125,
0.024078369140625,
-0.04241943359375,
-0.04364013671875,
-0.0261383056640625,
0.006740570068359375,
0.0119171142578125,
-0.0408935546875,
-0.0909423828125,
0.052001953125,
-0.023712158203125,
-0.0267181396484375,
-0.09503173828125,
-0.017578125,
0.01296234130859375,
0.025390625,
-0.035797119140625,
-0.00777435302734375,
-0.066162109375,
0.04766845703125,
0.017364501953125,
0.0007886886596679688,
-0.002124786376953125,
0.0211181640625,
-0.041015625,
0.02911376953125,
0.0230255126953125,
0.01352691650390625,
-0.001209259033203125,
0.0234527587890625,
0.0207366943359375,
0.036956787109375,
-0.0278778076171875,
0.072509765625,
-0.0110015869140625,
0.001010894775390625,
-0.0175323486328125,
-0.047149658203125,
0.0164794921875,
-0.0090484619140625,
0.023773193359375,
0.03924560546875,
-0.007740020751953125,
-0.038238525390625,
0.0030994415283203125,
-0.0650634765625,
0.005977630615234375,
-0.019500732421875,
-0.00726318359375,
-0.044189453125,
-0.0062103271484375,
0.01568603515625,
0.01256561279296875,
0.0013599395751953125,
-0.00182342529296875,
0.003314971923828125,
-0.011199951171875,
0.0197906494140625,
-0.03662109375,
0.025299072265625,
0.011016845703125,
0.058929443359375,
-0.04852294921875,
-0.0008878707885742188,
0.01523590087890625,
-0.0015935897827148438,
0.01910400390625,
0.008392333984375,
-0.0204315185546875,
-0.0084228515625,
-0.02947998046875,
0.025299072265625,
-0.005939483642578125,
0.02117919921875,
-0.030487060546875,
-0.007965087890625,
-0.026519775390625,
0.01174163818359375,
0.0120391845703125,
0.0247802734375,
0.0025348663330078125,
0.01019287109375,
0.03863525390625,
0.007732391357421875,
-0.01288604736328125,
-0.05206298828125,
-0.019683837890625,
0.00974273681640625,
-0.02191162109375,
-0.008392333984375,
0.0013666152954101562,
-0.02471923828125,
0.004901885986328125,
0.01422882080078125,
0.0015726089477539062,
-0.03887939453125,
0.033660888671875,
0.0171051025390625,
0.006000518798828125,
0.024993896484375
]
|
8cba619d857872cf29a15279d87d526bde3312d7 | Wordpress Stackexchange
Q: Post injection - how to exclude the original post This question refers to @Pieter Goosen´s extensive work about how to alter the main query using the pre_get_posts hook on true pages. It is also referenced in the codex.
With his method you are able to inject specified posts in your page without having to touch the template file itself. This gives numerous development options.
Until now his method uses CSS to hide the post object which the standard loop outputs for the page that is displayed. There are two actions hooks, loop_start and loop_end that are used to create a hidden container around the post object. It would be great if it was possible to completly exclude the page´s post object.
I tried to hook into pre_get_posts with something like $query->set('post__not_in', get_the_ID(); at loop_start but this didnt work.
I am lacking the skills needed to put the finishing touches on this.
Can you help? Remember we dont want to touch the template files. Thanks in advance.
A: I think pre_get_posts should work with $query->set().
Only problem I see there is you are using get_the_ID() in a hook. Try using global $post variable to get the current post id.
| Q: Post injection - how to exclude the original post This question refers to @Pieter Goosen´s extensive work about how to alter the main query using the pre_get_posts hook on true pages. It is also referenced in the codex.
With his method you are able to inject specified posts in your page without having to touch the template file itself. This gives numerous development options.
Until now his method uses CSS to hide the post object which the standard loop outputs for the page that is displayed. There are two actions hooks, loop_start and loop_end that are used to create a hidden container around the post object. It would be great if it was possible to completly exclude the page´s post object.
I tried to hook into pre_get_posts with something like $query->set('post__not_in', get_the_ID(); at loop_start but this didnt work.
I am lacking the skills needed to put the finishing touches on this.
Can you help? Remember we dont want to touch the template files. Thanks in advance.
A: I think pre_get_posts should work with $query->set().
Only problem I see there is you are using get_the_ID() in a hook. Try using global $post variable to get the current post id.
A: Here's a simple hack that might help you achieve to whatever it is you are trying to do -:
Warning: This is only tested on twentysixteen and twentyseventeen themes so it may or may not work to your current theme.
class VirtualPage {
/**
* @var int $page_id The ID of the page where you would want to inject your custom template.
**/
var $page_id = 0;
/**
* @var (mixed) $callback The callback function/method that will be called to replace the current post.
**/
var $callback = false;
function __construct( $page_id, $callback = false ) {
$this->page_id = $page_id;
$this->callback = $callback;
/**
* Set the injector when there are posts found.
**/
add_action( 'posts_results', array( $this, 'posts_results' ), 10, 2 );
}
function posts_results( $posts, $wp ) {
if ( $wp->is_main_query()
&& $wp->is_singular
&& count( $posts ) > 0
&& $posts[0]->ID == $this->page_id ) {
$found_posts = count( $posts );
/**
* $wp->post_count holds the number of iterated posts. We'll make WP believe that all
* posts are iterated.
**/
$wp->post_count = $found_posts;
/**
* $wp->current_post holds the current post index. Setting it to the last post index
* will immediately trigger `loop_end` action hook.
**/
$wp->current_post = $found_posts - 1;
add_action( 'loop_end', array( $this, 'loop_end' ) );
/**
* Immediately remove the hook!
**/
remove_action( 'posts_results', array( $this, 'posts_results' ), 10, 2 );
}
return $posts;
}
function loop_end() {
if ( $this->callback ) {
// Call your callback here or do your stuff here
call_user_func( $this->callback );
}
/**
* Immediately remove the hook!
**/
remove_action( 'loop_end', array( $this, 'loop_end' ) );
}
}
| wordpress | {
"language": "en",
"length": 468,
"provenance": "stackexchange_00019.jsonl.gz:465495",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226811"
} | [
0.06365966796875,
-0.00948333740234375,
0.0311279296875,
0.011077880859375,
0.01202392578125,
-0.038330078125,
0.09246826171875,
-0.015960693359375,
-0.02008056640625,
0.0189056396484375,
-0.04620361328125,
0.03216552734375,
-0.026885986328125,
-0.003520965576171875,
0.024688720703125,
-0.0183868408203125,
0.035003662109375,
-0.0310516357421875,
0.020477294921875,
-0.0222015380859375,
0.0094451904296875,
-0.017333984375,
0.058868408203125,
0.054443359375,
0.04022216796875,
-0.042755126953125,
0.03955078125,
-0.009368896484375,
0.0135955810546875,
-0.0213165283203125,
0.017547607421875,
-0.00484466552734375,
0.01213836669921875,
0.039764404296875,
-0.044891357421875,
-0.0109405517578125,
-0.0025043487548828125,
0.015777587890625,
0.007503509521484375,
0.01297760009765625,
0.0011386871337890625,
0.00568389892578125,
-0.044464111328125,
0.0133514404296875,
-0.057952880859375,
-0.041778564453125,
0.004955291748046875,
-0.002277374267578125,
0.045135498046875,
-0.00934600830078125,
0.01132965087890625,
0.0484619140625,
0.0128326416015625,
0.022796630859375,
-0.0137481689453125,
0.022125244140625,
-0.027130126953125,
0.006626129150390625,
0.042327880859375,
0.0215911865234375,
-0.033599853515625,
-0.029266357421875,
0.006801605224609375,
-0.062408447265625,
0.0226593017578125,
-0.02740478515625,
-0.00775909423828125,
0.0355224609375,
-0.05450439453125,
0.032989501953125,
0.06390380859375,
-0.034149169921875,
-0.00002294778823852539,
-0.0247039794921875,
-0.0345458984375,
0.00997161865234375,
0.0208892822265625,
-0.0007653236389160156,
0.0002911090850830078,
-0.017791748046875,
0.003032684326171875,
-0.00909423828125,
-0.06439208984375,
-0.0075836181640625,
0.00975799560546875,
0.0184326171875,
-0.01131439208984375,
-0.00458526611328125,
-0.00942230224609375,
-0.01540374755859375,
-0.02362060546875,
0.023223876953125,
-0.0227203369140625,
0.004512786865234375,
-0.0224456787109375,
-0.00782012939453125,
0.036651611328125,
0.058380126953125,
-0.020111083984375,
0.0144805908203125,
-0.035308837890625,
-0.029052734375,
0.0297698974609375,
-0.0260772705078125,
0.012542724609375,
0.0261688232421875,
-0.0067901611328125,
0.033843994140625,
0.0606689453125,
0.030059814453125,
0.0053558349609375,
0.039154052734375,
-0.0176239013671875,
0.005176544189453125,
-0.061370849609375,
0.0302276611328125,
-0.010498046875,
-0.044036865234375,
-0.0179443359375,
0.004940032958984375,
0.0156707763671875,
0.0311126708984375,
-0.00440216064453125,
-0.048675537109375,
0.01184844970703125,
-0.01076507568359375,
-0.03607177734375,
-0.0016527175903320312,
0.03216552734375,
0.0283660888671875,
-0.05487060546875,
-0.020599365234375,
0.127685546875,
0.031768798828125,
0.04534912109375,
-0.049896240234375,
-0.00807952880859375,
-0.0025157928466796875,
0.006328582763671875,
-0.02386474609375,
0.00843048095703125,
-0.044525146484375,
-0.01032257080078125,
0.0088348388671875,
0.0008740425109863281,
0.0394287109375,
0.0216217041015625,
-0.003520965576171875,
0.00705718994140625,
-0.049591064453125,
-0.01467132568359375,
-0.01255035400390625,
0.0217742919921875,
0.01062774658203125,
0.01177978515625,
-0.0011339187622070312,
0.042022705078125,
-0.0290985107421875,
-0.0092926025390625,
-0.0168609619140625,
0.017974853515625,
0.00562286376953125,
0.0140228271484375,
0.0033054351806640625,
-0.02484130859375,
-0.0119171142578125,
-0.015045166015625,
-0.00803375244140625,
0.0259246826171875,
0.0640869140625,
0.044036865234375,
-0.0255279541015625,
-0.0075531005859375,
-0.0178070068359375,
-0.03521728515625,
-0.023773193359375,
-0.017181396484375,
-0.0109100341796875,
0.0423583984375,
-0.005992889404296875,
-0.0258331298828125,
-0.0198211669921875,
0.038177490234375,
-0.0022525787353515625,
-0.0728759765625,
0.08770751953125,
-0.0032062530517578125,
0.061981201171875,
-0.0031414031982421875,
-0.00612640380859375,
0.0567626953125,
0.054046630859375,
-0.04156494140625,
0.048248291015625,
-0.011688232421875,
-0.0253753662109375,
-0.00893402099609375,
-0.0009760856628417969,
-0.0097198486328125,
-0.0007319450378417969,
0.01108551025390625,
0.010650634765625,
-0.004207611083984375,
0.01580810546875,
-0.07763671875,
0.01229095458984375,
-0.019012451171875,
0.0306549072265625,
-0.008026123046875,
0.03302001953125,
0.027618408203125,
0.0244293212890625,
-0.05133056640625,
0.000013828277587890625,
-0.0252532958984375,
-0.007465362548828125,
-0.01007080078125,
0.0347900390625,
0.0077667236328125,
0.022216796875,
0.02764892578125,
-0.032806396484375,
0.00434112548828125,
-0.0148468017578125,
0.08929443359375,
-0.0252227783203125,
0.00823211669921875,
-0.043914794921875,
0.039337158203125,
0.0023403167724609375,
-0.05511474609375,
0.0288238525390625,
0.0264129638671875,
0.044891357421875,
-0.0372314453125,
-0.0247802734375,
0.0024356842041015625,
-0.0154571533203125,
0.0242156982421875,
0.0386962890625,
0.0278778076171875,
0.038360595703125,
-0.004726409912109375,
-0.01316070556640625,
0.04742431640625,
-0.05902099609375,
0.001384735107421875,
-0.0161285400390625,
0.016326904296875,
0.057861328125,
-0.01557159423828125,
0.00553131103515625,
0.0179595947265625,
-0.0260009765625,
0.01155853271484375,
0.03021240234375,
0.0256805419921875,
0.051025390625,
-0.037322998046875,
-0.0145721435546875,
0.0081329345703125,
-0.0117950439453125,
-0.03656005859375,
-0.0018892288208007812,
0.05047607421875,
-0.0150909423828125,
0.042083740234375,
0.0268402099609375,
-0.000682830810546875,
-0.0230255126953125,
0.00667572021484375,
-0.00527191162109375,
-0.0004019737243652344,
-0.0016527175903320312,
-0.01129913330078125,
-0.00007468461990356445,
-0.0093841552734375,
0.0009899139404296875,
-0.00200653076171875,
-0.00864410400390625,
0.0016508102416992188,
0.036865234375,
0.0205078125,
-0.004329681396484375,
-0.01126861572265625,
-0.07330322265625,
0.0215606689453125,
0.01013946533203125,
0.059722900390625,
0.00826263427734375,
0.0157012939453125,
0.013427734375,
-0.00859832763671875,
0.059967041015625,
0.027862548828125,
-0.03228759765625,
0.018157958984375,
-0.062744140625,
0.058807373046875,
-0.044769287109375,
0.0498046875,
0.06622314453125,
-0.01114654541015625,
0.0226593017578125,
0.00907135009765625,
0.0115509033203125,
-0.01025390625,
0.021270751953125,
0.0196990966796875,
-0.006443023681640625,
-0.0258941650390625,
0.03265380859375,
0.029632568359375,
0.056060791015625,
-0.0112457275390625,
-0.032135009765625,
0.00010144710540771484,
0.0303497314453125,
-0.0389404296875,
-0.05596923828125,
0.01169586181640625,
-0.028656005859375,
-0.026641845703125,
-0.0107574462890625,
-0.013763427734375,
0.00830078125,
-0.0192413330078125,
-0.01311492919921875,
0.0235595703125,
-0.0191802978515625,
-0.031158447265625,
-0.0304718017578125,
-0.05010986328125,
-0.00848388671875,
0.0052032470703125,
-0.0084228515625,
0.0159912109375,
0.10064697265625,
0.023681640625,
-0.05487060546875,
0.01482391357421875,
0.039459228515625,
-0.03631591796875,
0.0144805908203125,
-0.03131103515625,
0.0051422119140625,
-0.01450347900390625,
0.00795745849609375,
0.005535125732421875,
-0.0198211669921875,
0.006847381591796875,
-0.01104736328125,
-0.00007253885269165039,
0.0185394287109375,
0.0154876708984375,
0.024627685546875,
0.01042938232421875,
0.024871826171875,
0.041107177734375,
-0.0203094482421875,
-0.00583648681640625,
-0.0386962890625,
-0.0343017578125,
-0.0147857666015625,
0.001506805419921875,
0.0227203369140625,
-0.0223388671875,
0.0107421875,
0.021484375,
-0.01345062255859375,
-0.01468658447265625,
-0.0035152435302734375,
0.03521728515625,
0.00992584228515625,
0.0411376953125,
-0.0091400146484375,
0.043731689453125,
-0.01629638671875,
0.0161895751953125,
0.013885498046875,
-0.0024623870849609375,
0.00908660888671875,
-0.02862548828125,
0.00127410888671875,
-0.006374359130859375,
0.036163330078125,
0.0159912109375,
0.00803375244140625,
-0.00679779052734375,
-0.03790283203125,
-0.0061798095703125,
0.067138671875,
-0.01806640625,
-0.020355224609375,
-0.01317596435546875,
0.001598358154296875,
0.005859375,
-0.0120849609375,
-0.0092010498046875,
-0.0108489990234375,
-0.06396484375,
0.002071380615234375,
-0.010223388671875,
-0.00852203369140625,
-0.0027980804443359375,
0.0023365020751953125,
-0.0221405029296875,
-0.033782958984375,
0.04522705078125,
0.007724761962890625,
0.0256500244140625,
-0.024139404296875,
0.0203857421875,
-0.0220489501953125,
-0.033416748046875,
0.020751953125,
-0.047821044921875,
-0.0036907196044921875,
-0.005767822265625,
0.024505615234375,
-0.004058837890625,
0.0279083251953125,
-0.033172607421875,
0.01279449462890625,
-0.00818634033203125,
0.00507354736328125,
-0.01203155517578125,
0.0252685546875,
-0.02349853515625,
0.02215576171875,
-0.01416015625,
-0.006275177001953125,
0.005405426025390625,
-0.01129150390625,
-0.021942138671875,
-0.00821685791015625,
-0.05804443359375,
-0.0280914306640625,
-0.0295257568359375,
-0.030120849609375,
-0.0697021484375,
-0.0455322265625,
0.005786895751953125,
0.0157012939453125,
-0.00206756591796875,
-0.00742340087890625,
-0.052337646484375,
-0.06658935546875,
0.0697021484375,
0.026885986328125,
-0.010711669921875,
-0.0121917724609375,
0.05572509765625,
0.01280975341796875,
-0.046478271484375,
-0.019378662109375,
-0.028778076171875,
0.0213623046875,
-0.0218505859375,
0.0275726318359375,
0.01361083984375,
-0.00844573974609375,
0.032501220703125,
-0.0168609619140625,
-0.004955291748046875,
-0.0298309326171875,
0.041900634765625,
-0.011566162109375,
0.004314422607421875,
-0.0205841064453125,
-0.03192138671875,
0.057647705078125,
-0.0077972412109375,
-0.0116729736328125,
-0.0237579345703125,
0.038055419921875,
0.045623779296875,
-0.0242767333984375,
0.04693603515625,
-0.035186767578125,
-0.019012451171875,
0.0011196136474609375,
0.042633056640625,
0.0170135498046875,
0.010009765625,
0.021209716796875,
-0.004024505615234375,
0.006366729736328125,
0.0296173095703125,
-0.01137542724609375,
0.032257080078125,
-0.04388427734375,
0.056549072265625,
0.0018100738525390625,
-0.001934051513671875,
-0.002689361572265625,
-0.006927490234375,
0.00001049041748046875,
-0.0289764404296875,
-0.07464599609375,
0.00957489013671875,
0.004039764404296875,
0.007343292236328125,
0.052276611328125,
-0.0095367431640625,
0.027740478515625,
0.0184478759765625,
0.0016641616821289062,
-0.00814056396484375,
0.018707275390625,
-0.026397705078125,
-0.03125,
-0.0194549560546875,
0.018157958984375,
-0.007396697998046875,
0.041259765625,
0.0430908203125,
0.0288238525390625,
0.0262298583984375,
-0.052764892578125,
0.06298828125,
0.0286712646484375,
0.0175933837890625,
-0.0164794921875,
0.0279541015625,
-0.004474639892578125,
0.016143798828125,
-0.01303863525390625,
-0.0222015380859375,
-0.0254058837890625,
0.013916015625,
0.0274505615234375,
-0.049713134765625,
-0.0129241943359375,
0.0313720703125,
-0.002262115478515625,
-0.0009984970092773438,
0.07501220703125,
0.056884765625,
-0.030487060546875,
-0.034881591796875,
-0.019622802734375,
0.025299072265625,
-0.01479339599609375,
0.018890380859375,
-0.0192718505859375,
-0.007965087890625,
-0.0184173583984375,
-0.00383758544921875,
-0.0236053466796875,
-0.020416259765625,
-0.006771087646484375,
0.0023784637451171875,
-0.046783447265625,
-0.0201416015625,
0.01271820068359375,
-0.0003883838653564453,
-0.01031494140625,
0.005222320556640625,
0.02105712890625,
-0.006500244140625,
0.056304931640625,
-0.048858642578125,
-0.0345458984375,
-0.02197265625,
0.0034942626953125,
0.048095703125,
0.03253173828125,
-0.0263824462890625,
0.0112457275390625,
-0.0540771484375,
-0.00209808349609375,
0.01190185546875,
-0.03717041015625,
-0.0300140380859375,
-0.013580322265625,
0.002185821533203125,
0.047332763671875,
-0.0230560302734375,
-0.02679443359375,
0.023193359375,
-0.00875091552734375,
-0.01080322265625,
0.0631103515625,
-0.00372314453125,
0.08795166015625,
-0.05303955078125,
0.060821533203125,
0.010223388671875,
0.0439453125,
0.00492095947265625,
-0.025604248046875,
-0.0389404296875,
-0.07452392578125,
0.01044464111328125,
0.0247802734375,
0.0152435302734375,
0.061798095703125,
0.031707763671875,
0.01467132568359375,
-0.0224609375,
0.0251312255859375,
0.0163421630859375,
-0.01873779296875,
0.0034694671630859375,
0.042327880859375,
-0.047332763671875,
0.037445068359375,
0.0065765380859375,
-0.01306915283203125,
-0.018035888671875,
-0.0132904052734375,
-0.026336669921875,
0.01538848876953125,
-0.034149169921875,
-0.0032482147216796875,
0.0142364501953125,
0.0284423828125,
0.04364013671875,
-0.01416015625,
0.0283050537109375,
0.040924072265625,
0.0166168212890625,
-0.0055999755859375,
0.0250396728515625,
-0.031890869140625,
-0.0218658447265625,
0.054473876953125,
0.01134490966796875,
-0.0305023193359375,
0.0413818359375,
-0.033538818359375,
0.0020294189453125,
0.016845703125,
0.0245513916015625,
-0.0318603515625,
0.01154327392578125,
-0.0037746429443359375,
-0.0283355712890625,
-0.01326751708984375,
0.006938934326171875,
0.010833740234375,
0.0162506103515625,
0.036956787109375,
0.0281524658203125,
-0.0015506744384765625,
0.039306640625,
-0.00394439697265625,
-0.0416259765625,
-0.048553466796875,
-0.007175445556640625,
0.01531982421875,
-0.01136016845703125,
0.06097412109375,
0.00815582275390625,
-0.00074005126953125,
-0.060211181640625,
0.0081634521484375,
0.01502227783203125,
0.0017547607421875,
-0.07562255859375,
0.0116119384765625,
-0.00498199462890625,
0.024200439453125,
0.050140380859375,
0.035308837890625,
0.01861572265625,
0.0165252685546875,
0.02203369140625,
-0.01238250732421875,
-0.00543212890625,
-0.0248870849609375,
-0.0198822021484375,
-0.0142059326171875,
0.02178955078125,
0.048980712890625,
-0.031341552734375,
0.0271148681640625,
-0.00328826904296875,
-0.00936126708984375,
-0.0093536376953125,
-0.04058837890625,
0.0811767578125,
-0.03558349609375,
-0.0175323486328125,
0.005329132080078125,
-0.0012359619140625,
-0.005054473876953125,
0.00004404783248901367,
-0.0245361328125,
0.0003304481506347656,
0.02044677734375,
-0.0302276611328125,
-0.0220794677734375,
0.0005311965942382812,
-0.033966064453125,
-0.09844970703125,
0.143798828125,
0.00646209716796875,
0.07830810546875,
0.01824951171875,
0.030517578125,
-0.04248046875,
0.0022792816162109375,
-0.0882568359375,
0.08270263671875,
-0.0011186599731445312,
0.09649658203125,
-0.09747314453125,
-0.0205230712890625,
0.02813720703125,
0.017578125,
0.045928955078125,
0.001720428466796875,
-0.01806640625,
-0.023406982421875,
0.031982421875,
0.0750732421875,
0.0228118896484375,
0.00826263427734375,
0.007274627685546875,
0.05413818359375,
0.039337158203125,
-0.03778076171875,
0.0343017578125,
-0.0177154541015625,
-0.03167724609375,
0.03936767578125,
0.004856109619140625,
-0.01302337646484375,
0.03125,
0.031829833984375,
-0.01342010498046875,
0.01537322998046875,
0.004802703857421875,
-0.0000940561294555664,
0.0231475830078125,
0.02734375,
0.0543212890625,
-0.05731201171875,
-0.031951904296875,
-0.017364501953125,
0.041839599609375,
0.01537322998046875,
0.03997802734375,
0.022491455078125,
0.01538848876953125,
0.07086181640625,
0.0007014274597167969,
0.0250244140625,
0.0229339599609375,
-0.01439666748046875,
0.0099945068359375,
0.03179931640625,
0.03619384765625,
-0.0267791748046875,
0.0251922607421875,
0.05511474609375,
0.02264404296875,
-0.028289794921875,
0.006092071533203125,
0.01280975341796875,
0.005451202392578125,
-0.01168060302734375,
-0.0467529296875,
-0.0171051025390625,
0.02032470703125,
0.02313232421875,
-0.036224365234375,
-0.0242919921875,
0.0032806396484375,
0.047882080078125,
-0.0173187255859375,
-0.03302001953125,
0.0020389556884765625,
-0.03851318359375,
-0.05474853515625,
-0.0172882080078125,
0.0002906322479248047,
0.051422119140625,
0.04034423828125,
0.0270538330078125,
0.00611114501953125,
-0.0265960693359375,
-0.008636474609375,
0.0237884521484375,
0.00922393798828125,
0.01995849609375,
-0.021575927734375,
-0.0012655258178710938,
-0.019287109375,
0.0212249755859375,
0.014801025390625,
0.059295654296875,
0.05926513671875,
0.019744873046875,
-0.057861328125,
-0.0005297660827636719,
0.04168701171875,
-0.037384033203125,
0.0238037109375,
-0.0200042724609375,
-0.0242156982421875,
-0.030792236328125,
-0.043304443359375,
-0.0176849365234375,
0.00839996337890625,
-0.00473785400390625,
0.01331329345703125,
0.0265045166015625,
0.005466461181640625,
-0.02032470703125,
0.0247802734375,
-0.0006451606750488281,
0.05694580078125,
0.03204345703125,
-0.0299224853515625,
0.011138916015625,
-0.030242919921875,
-0.06292724609375,
0.008087158203125,
0.022735595703125,
-0.032257080078125,
0.03277587890625,
0.067626953125,
0.0307159423828125,
-0.018585205078125,
-0.028076171875,
0.03790283203125,
-0.0179290771484375,
0.030792236328125,
0.04449462890625,
-0.0166015625,
0.0085296630859375,
-0.010955810546875,
0.008819580078125,
0.0119781494140625,
0.007350921630859375,
0.0231781005859375,
0.0311126708984375,
0.007305145263671875,
0.042388916015625,
-0.04803466796875,
0.0043487548828125,
0.0000362396240234375,
-0.038299560546875,
0.0172271728515625,
0.01245880126953125,
-0.02276611328125,
-0.0186920166015625,
0.04974365234375,
-0.0275726318359375,
0.02734375,
-0.05853271484375,
0.0271759033203125,
-0.05712890625,
0.03955078125,
-0.01073455810546875,
0.005451202392578125,
-0.00424957275390625,
-0.0222015380859375,
0.044647216796875,
0.0382080078125,
0.0026340484619140625,
0.0247039794921875,
0.00569915771484375,
-0.0247344970703125,
0.0230560302734375,
-0.029541015625,
0.0196075439453125,
0.0247039794921875,
-0.003276824951171875,
0.007160186767578125,
0.0350341796875,
-0.0010585784912109375,
0.0193939208984375,
0.0450439453125,
0.0005922317504882812,
0.037017822265625,
-0.049163818359375,
-0.00872802734375,
-0.00769805908203125,
0.04083251953125,
-0.002643585205078125,
0.0153045654296875,
-0.0198974609375,
0.0155792236328125,
-0.0213470458984375,
-0.03436279296875,
-0.0218963623046875,
-0.020904541015625,
-0.035797119140625,
0.002899169921875,
-0.022674560546875,
-0.0869140625,
-0.043060302734375,
-0.0276336669921875,
0.02764892578125,
0.00948333740234375,
-0.060516357421875,
0.0106048583984375,
0.010223388671875,
0.042633056640625,
-0.0277252197265625,
0.040008544921875,
-0.007099151611328125,
0.0226898193359375,
-0.034942626953125,
-0.0175628662109375,
-0.003917694091796875,
0.0216522216796875,
0.00061798095703125,
0.00789642333984375,
0.02593994140625,
-0.00589752197265625,
-0.0204315185546875,
-0.0030155181884765625,
-0.021453857421875,
0.033355712890625,
-0.0233154296875,
-0.0186309814453125,
0.004138946533203125,
0.0123291015625,
-0.0249481201171875,
-0.0625,
0.025177001953125,
-0.0711669921875,
0.0005426406860351562,
-0.0036144256591796875,
-0.001312255859375,
0.01183319091796875,
-0.025604248046875,
-0.0562744140625,
0.060089111328125,
-0.006687164306640625,
-0.0254974365234375,
-0.044708251953125,
0.01495361328125,
0.021575927734375,
-0.03192138671875,
-0.00980377197265625,
-0.036224365234375,
-0.024658203125,
0.01007080078125,
0.0019626617431640625,
0.01087188720703125,
0.04107666015625,
-0.01690673828125,
-0.035491943359375,
-0.016448974609375,
-0.023956298828125,
0.004608154296875,
0.0072174072265625,
-0.004238128662109375,
0.035858154296875,
0.0304718017578125,
-0.050262451171875,
0.076171875,
0.0009436607360839844,
0.0259552001953125,
-0.0171356201171875,
-0.032257080078125,
-0.072509765625,
-0.017608642578125,
0.1038818359375,
0.09454345703125,
0.04815673828125,
-0.044769287109375,
-0.0023593902587890625,
-0.025299072265625,
-0.056915283203125,
-0.0112152099609375,
0.034576416015625,
-0.057220458984375,
-0.00598907470703125,
-0.0112457275390625,
0.00414276123046875,
-0.0208892822265625,
-0.0240936279296875,
-0.0309295654296875,
-0.02783203125,
-0.0494384765625,
0.0034008026123046875,
-0.034576416015625,
-0.0019016265869140625,
0.0216522216796875,
-0.0252227783203125,
-0.03961181640625,
-0.0014181137084960938,
0.0018434524536132812,
-0.018951416015625,
-0.00794219970703125,
-0.012237548828125,
-0.0239105224609375,
-0.0220489501953125,
0.026947021484375,
-0.0104217529296875,
0.0268096923828125,
-0.0276336669921875,
-0.010009765625,
-0.017303466796875,
0.014007568359375,
0.01468658447265625,
-0.00007772445678710938,
-0.027862548828125,
0.029144287109375,
0.00951385498046875,
0.07269287109375,
-0.01139068603515625,
0.0631103515625,
0.010284423828125,
0.014251708984375,
0.0037822723388671875,
0.0022411346435546875,
0.0097503662109375,
-0.0124053955078125,
-0.0101776123046875,
0.01200103759765625,
-0.033905029296875,
-0.027130126953125,
0.0185546875,
0.004283905029296875,
-0.003025054931640625,
0.0085296630859375
]
|
2ff6c77838080524cd15293f425b7f8b4f477fce | Wordpress Stackexchange
Q: Is sanitize_text_field() is enough to save to DB? So here is the situation. We allow users to enter input data, i.e. user_first_name and user_additional_comments.
Then we use sanitize_text_field() , which is named as save.
But after this filter:
Thomas' OR SELECT * FROM wp_user
Is still save into DATABASE as full text. And ' char is not escaped as ' or \'.
I use $wpdb->query("INSERT INTO A (a,b,c) VALUES ('{$a}', '{$b}', '{$c}')"); So $a has to be a valid value here, which can be inserted into db. I have reasons not to use insert(), prepare() etc. specific functions, so I need to be sure that $a is VALID and SECURE. How to ensure that for text data like last name, or comment.
So is this brokes the security?
A: You can use wpdb insert function. It's better in every way.
It can care about data's escapeing itself and it's shorter.
You can use your own query anyway but I would recommended this article for reading https://codex.wordpress.org/Data_Validation#Database
| Q: Is sanitize_text_field() is enough to save to DB? So here is the situation. We allow users to enter input data, i.e. user_first_name and user_additional_comments.
Then we use sanitize_text_field() , which is named as save.
But after this filter:
Thomas' OR SELECT * FROM wp_user
Is still save into DATABASE as full text. And ' char is not escaped as ' or \'.
I use $wpdb->query("INSERT INTO A (a,b,c) VALUES ('{$a}', '{$b}', '{$c}')"); So $a has to be a valid value here, which can be inserted into db. I have reasons not to use insert(), prepare() etc. specific functions, so I need to be sure that $a is VALID and SECURE. How to ensure that for text data like last name, or comment.
So is this brokes the security?
A: You can use wpdb insert function. It's better in every way.
It can care about data's escapeing itself and it's shorter.
You can use your own query anyway but I would recommended this article for reading https://codex.wordpress.org/Data_Validation#Database
| wordpress | {
"language": "en",
"length": 167,
"provenance": "stackexchange_00019.jsonl.gz:465498",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226820"
} | [
0.05126953125,
0.0005621910095214844,
-0.0175323486328125,
-0.0750732421875,
0.025543212890625,
-0.0203399658203125,
0.0032711029052734375,
-0.00015437602996826172,
0.030517578125,
0.031707763671875,
-0.03326416015625,
-0.012847900390625,
0.00591278076171875,
-0.0208587646484375,
-0.0406494140625,
-0.031494140625,
-0.0037860870361328125,
-0.0156402587890625,
-0.0046844482421875,
-0.0252838134765625,
-0.0025501251220703125,
-0.02301025390625,
0.01194000244140625,
-0.02581787109375,
0.023773193359375,
-0.0499267578125,
0.107666015625,
0.003971099853515625,
0.04058837890625,
0.01318359375,
0.03167724609375,
-0.06805419921875,
0.022613525390625,
0.041351318359375,
-0.04534912109375,
0.051544189453125,
0.0206146240234375,
0.0189208984375,
0.0177459716796875,
0.0236358642578125,
0.034423828125,
-0.0115814208984375,
0.00655364990234375,
0.07305908203125,
-0.0250244140625,
-0.048980712890625,
0.060028076171875,
-0.007526397705078125,
0.01322174072265625,
-0.02178955078125,
0.0078125,
0.008087158203125,
0.0372314453125,
-0.02203369140625,
-0.0010786056518554688,
0.03778076171875,
-0.058990478515625,
-0.020599365234375,
0.0012731552124023438,
0.093994140625,
0.036346435546875,
-0.009918212890625,
-0.029754638671875,
-0.0556640625,
0.0119171142578125,
0.00899505615234375,
0.03118896484375,
0.0193634033203125,
-0.034515380859375,
0.018585205078125,
0.0162811279296875,
-0.02972412109375,
0.0009517669677734375,
-0.0338134765625,
0.028350830078125,
0.01812744140625,
-0.01349639892578125,
-0.00548553466796875,
0.0121612548828125,
0.018951416015625,
-0.0223236083984375,
-0.02996826171875,
-0.039520263671875,
-0.009796142578125,
-0.0188751220703125,
-0.00894927978515625,
-0.0185394287109375,
0.0172271728515625,
0.016448974609375,
-0.0178070068359375,
0.003704071044921875,
-0.0256500244140625,
0.0153350830078125,
0.029449462890625,
-0.007289886474609375,
-0.034027099609375,
-0.0214385986328125,
0.0338134765625,
-0.01751708984375,
0.0357666015625,
0.011627197265625,
-0.04376220703125,
0.05120849609375,
-0.05474853515625,
0.0306396484375,
0.051666259765625,
-0.00841522216796875,
-0.088623046875,
-0.003314971923828125,
-0.009368896484375,
0.002593994140625,
-0.01107025146484375,
-0.034912109375,
-0.0589599609375,
-0.0137939453125,
0.054290771484375,
-0.030609130859375,
-0.00408935546875,
0.024444580078125,
-0.0280914306640625,
-0.00807952880859375,
0.01509857177734375,
-0.0594482421875,
-0.0250701904296875,
-0.02166748046875,
-0.06842041015625,
-0.0149688720703125,
0.044830322265625,
-0.00952911376953125,
0.046539306640625,
-0.03985595703125,
0.00760650634765625,
0.0498046875,
0.01522064208984375,
0.00650787353515625,
-0.032745361328125,
-0.0102996826171875,
-0.02020263671875,
-0.005153656005859375,
0.0294647216796875,
-0.018035888671875,
-0.0294189453125,
0.042236328125,
-0.01415252685546875,
0.0148773193359375,
0.0257720947265625,
0.01378631591796875,
0.001216888427734375,
0.00690460205078125,
-0.039337158203125,
0.0199737548828125,
-0.035003662109375,
0.044342041015625,
0.006366729736328125,
-0.066650390625,
-0.046600341796875,
-0.039093017578125,
-0.033050537109375,
0.0159912109375,
-0.04559326171875,
0.0201263427734375,
-0.0028285980224609375,
0.00972747802734375,
-0.03076171875,
-0.025146484375,
-0.0179443359375,
-0.06500244140625,
-0.00110626220703125,
0.0247344970703125,
0.004852294921875,
-0.0036945343017578125,
0.030853271484375,
0.040924072265625,
-0.007259368896484375,
-0.0216522216796875,
-0.0130157470703125,
-0.01548004150390625,
0.00955963134765625,
0.0169830322265625,
0.03466796875,
0.00583648681640625,
-0.0212860107421875,
0.04156494140625,
-0.00420379638671875,
-0.007625579833984375,
0.0167236328125,
0.0186614990234375,
0.0677490234375,
0.01177215576171875,
0.0205535888671875,
-0.000751495361328125,
0.0028076171875,
-0.0218963623046875,
0.007579803466796875,
-0.0125579833984375,
-0.053497314453125,
0.024139404296875,
-0.00860595703125,
-0.017181396484375,
0.03509521484375,
0.046844482421875,
-0.023162841796875,
0.052978515625,
-0.040863037109375,
-0.04058837890625,
0.00817108154296875,
-0.0190887451171875,
0.0272979736328125,
-0.03692626953125,
0.032470703125,
0.047271728515625,
0.024200439453125,
-0.076416015625,
0.0443115234375,
-0.0039520263671875,
-0.031341552734375,
-0.0025539398193359375,
0.047393798828125,
-0.00862884521484375,
0.049652099609375,
-0.0200042724609375,
-0.045867919921875,
0.0008983612060546875,
-0.0195465087890625,
-0.00658416748046875,
-0.0161895751953125,
0.0014562606811523438,
-0.0031299591064453125,
0.017791748046875,
-0.00567626953125,
0.067138671875,
0.00043654441833496094,
0.07647705078125,
0.0352783203125,
-0.040557861328125,
-0.01136016845703125,
-0.037506103515625,
-0.07916259765625,
-0.0189971923828125,
0.0780029296875,
0.0129241943359375,
0.034210205078125,
-0.033660888671875,
-0.0323486328125,
0.012420654296875,
-0.0153961181640625,
0.019989013671875,
-0.0228424072265625,
0.0174713134765625,
0.029571533203125,
-0.01300048828125,
-0.0271148681640625,
0.0167999267578125,
-0.1002197265625,
0.01007080078125,
0.034820556640625,
-0.05810546875,
-0.0030364990234375,
-0.01540374755859375,
-0.00005042552947998047,
-0.006103515625,
-0.0225982666015625,
0.04656982421875,
-0.03131103515625,
0.0360107421875,
-0.0157470703125,
0.0234375,
0.00958251953125,
0.0074005126953125,
-0.0132598876953125,
-0.003253936767578125,
-0.058685302734375,
-0.00560760498046875,
0.0155029296875,
-0.03448486328125,
0.028289794921875,
-0.00972747802734375,
0.014556884765625,
-0.01617431640625,
0.005771636962890625,
0.01520538330078125,
0.052490234375,
0.02508544921875,
-0.01366424560546875,
0.004169464111328125,
-0.0172576904296875,
0.00907135009765625,
0.00991058349609375,
-0.0243988037109375,
-0.049468994140625,
-0.006877899169921875,
0.034942626953125,
-0.01300811767578125,
0.0386962890625,
-0.0001596212387084961,
-0.026092529296875,
0.00981903076171875,
0.00537109375,
0.0137176513671875,
-0.011138916015625,
-0.00519561767578125,
0.04827880859375,
0.00485992431640625,
-0.0118560791015625,
-0.0149078369140625,
0.00434112548828125,
-0.0073089599609375,
0.00383758544921875,
-0.03240966796875,
-0.07611083984375,
-0.038848876953125,
-0.05804443359375,
0.027099609375,
0.0758056640625,
-0.0235748291015625,
-0.0408935546875,
-0.0077972412109375,
0.036651611328125,
-0.033538818359375,
-0.055633544921875,
-0.06427001953125,
-0.0213165283203125,
-0.01531982421875,
-0.00922393798828125,
-0.0003867149353027344,
0.033477783203125,
-0.0226593017578125,
0.00986480712890625,
-0.007785797119140625,
-0.0266265869140625,
-0.0318603515625,
-0.02734375,
-0.031463623046875,
0.013153076171875,
0.00493621826171875,
-0.0085601806640625,
0.00400543212890625,
0.0400390625,
-0.006580352783203125,
-0.0439453125,
-0.01800537109375,
-0.01308441162109375,
-0.006259918212890625,
0.003307342529296875,
-0.02423095703125,
-0.02001953125,
0.038177490234375,
-0.01239013671875,
-0.02557373046875,
0.01165008544921875,
0.036590576171875,
-0.00469207763671875,
0.0300140380859375,
-0.01361846923828125,
0.0474853515625,
0.029327392578125,
-0.04144287109375,
0.02496337890625,
0.048553466796875,
-0.038238525390625,
0.0099945068359375,
0.0089569091796875,
0.0118255615234375,
-0.01263427734375,
-0.060882568359375,
0.003627777099609375,
-0.00689697265625,
0.04296875,
0.030517578125,
0.03387451171875,
0.01189422607421875,
0.0207977294921875,
-0.034271240234375,
0.0009264945983886719,
0.006153106689453125,
-0.01549530029296875,
-0.0045928955078125,
-0.039398193359375,
0.01561737060546875,
-0.0142974853515625,
-0.0226593017578125,
-0.0013790130615234375,
0.00946044921875,
0.0117645263671875,
-0.0697021484375,
0.031494140625,
-0.0211181640625,
0.043701171875,
-0.04278564453125,
-0.006103515625,
-0.011138916015625,
0.09674072265625,
-0.042755126953125,
-0.019805908203125,
0.0164337158203125,
0.03887939453125,
-0.06494140625,
-0.0272369384765625,
-0.04229736328125,
-0.00012135505676269531,
0.002574920654296875,
-0.02197265625,
-0.02587890625,
-0.0260772705078125,
0.0158538818359375,
-0.062103271484375,
0.04754638671875,
-0.030364990234375,
0.0300140380859375,
-0.054412841796875,
0.0116424560546875,
0.0164947509765625,
0.0017671585083007812,
-0.035797119140625,
-0.005985260009765625,
-0.04425048828125,
-0.08154296875,
-0.019866943359375,
0.000965118408203125,
0.060546875,
0.0009450912475585938,
-0.0189971923828125,
-0.008575439453125,
0.049530029296875,
0.0008311271667480469,
0.01483154296875,
0.019134521484375,
0.04083251953125,
-0.014617919921875,
-0.0078125,
0.0225372314453125,
-0.0264434814453125,
0.0022335052490234375,
-0.0131378173828125,
-0.01277923583984375,
-0.012725830078125,
-0.046661376953125,
0.006076812744140625,
-0.028961181640625,
-0.01019287109375,
0.004608154296875,
-0.010101318359375,
-0.052703857421875,
0.049224853515625,
-0.02825927734375,
-0.0247344970703125,
-0.04522705078125,
-0.054107666015625,
0.048126220703125,
-0.0294036865234375,
0.0099945068359375,
0.00040459632873535156,
0.106201171875,
0.013671875,
-0.0108489990234375,
-0.034576416015625,
-0.038116455078125,
0.0369873046875,
0.0112152099609375,
-0.0113525390625,
-0.009063720703125,
-0.047332763671875,
0.032135009765625,
0.025604248046875,
0.019927978515625,
-0.041259765625,
0.070556640625,
0.0016164779663085938,
0.02105712890625,
0.006870269775390625,
-0.0198822021484375,
0.0280914306640625,
0.06805419921875,
0.011962890625,
-0.00490570068359375,
-0.0114288330078125,
-0.00604248046875,
-0.009429931640625,
-0.000732421875,
-0.0019283294677734375,
-0.0372314453125,
0.0190277099609375,
-0.02496337890625,
0.00843048095703125,
-0.032958984375,
0.02020263671875,
-0.0044403076171875,
-0.005615234375,
-0.01401519775390625,
-0.01392364501953125,
-0.0296783447265625,
0.01369476318359375,
0.0192718505859375,
-0.01544189453125,
-0.008941650390625,
0.0005207061767578125,
-0.003726959228515625,
0.0489501953125,
0.0004470348358154297,
-0.017974853515625,
-0.02880859375,
-0.0200958251953125,
0.03387451171875,
0.01122283935546875,
0.06121826171875,
0.0031490325927734375,
-0.023345947265625,
0.018280029296875,
0.005908966064453125,
0.0123291015625,
0.01904296875,
-0.004070281982421875,
0.031219482421875,
0.01392364501953125,
-0.00994873046875,
0.0223236083984375,
0.0030078887939453125,
-0.01232147216796875,
0.0034847259521484375,
-0.006622314453125,
0.055633544921875,
0.043670654296875,
0.0237884521484375,
-0.000995635986328125,
0.005596160888671875,
-0.013031005859375,
-0.000995635986328125,
-0.01134490966796875,
-0.0225372314453125,
0.0020847320556640625,
0.021881103515625,
0.006805419921875,
-0.002838134765625,
-0.006046295166015625,
0.016082763671875,
0.0210113525390625,
-0.026275634765625,
0.005031585693359375,
-0.02362060546875,
-0.04278564453125,
-0.026519775390625,
-0.016998291015625,
0.006084442138671875,
0.007038116455078125,
0.0299530029296875,
-0.002567291259765625,
-0.0169525146484375,
-0.01264190673828125,
-0.00830078125,
0.0301055908203125,
-0.07135009765625,
-0.056427001953125,
0.0509033203125,
-0.0237579345703125,
-0.0484619140625,
0.035247802734375,
0.04278564453125,
-0.03924560546875,
-0.0193634033203125,
0.045867919921875,
-0.00794219970703125,
0.0228271484375,
-0.05084228515625,
0.028900146484375,
0.01019287109375,
-0.01043701171875,
0.028350830078125,
-0.0029201507568359375,
0.049652099609375,
-0.0340576171875,
-0.0195159912109375,
-0.0257568359375,
0.012359619140625,
0.01247406005859375,
0.01800537109375,
0.0005350112915039062,
-0.001712799072265625,
0.0259857177734375,
-0.004299163818359375,
-0.0202789306640625,
0.00806427001953125,
0.0004405975341796875,
-0.0206298828125,
0.0197906494140625,
-0.056396484375,
0.07452392578125,
0.0056304931640625,
0.01525115966796875,
-0.002017974853515625,
0.040435791015625,
0.0276641845703125,
-0.0011167526245117188,
-0.0028076171875,
-0.0227203369140625,
0.01406097412109375,
-0.03741455078125,
0.059844970703125,
0.00983428955078125,
0.0290679931640625,
0.0035305023193359375,
0.058837890625,
0.0030498504638671875,
0.017608642578125,
-0.00951385498046875,
-0.011993408203125,
-0.029052734375,
0.0037975311279296875,
0.074462890625,
-0.020263671875,
-0.0095367431640625,
-0.0391845703125,
-0.0175933837890625,
-0.00240325927734375,
-0.0038967132568359375,
-0.0207672119140625,
0.0254974365234375,
-0.01309967041015625,
0.0230865478515625,
0.012451171875,
0.0034122467041015625,
0.0347900390625,
0.01141357421875,
0.0272674560546875,
0.007518768310546875,
-0.0159912109375,
-0.061065673828125,
0.0316162109375,
-0.0010328292846679688,
-0.013702392578125,
0.0093231201171875,
-0.0031585693359375,
0.01436614990234375,
0.032562255859375,
0.0809326171875,
0.1253662109375,
-0.08306884765625,
0.0015325546264648438,
0.044464111328125,
-0.042327880859375,
0.01369476318359375,
-0.0222625732421875,
0.0189971923828125,
-0.0264892578125,
0.041015625,
-0.01451873779296875,
-0.018157958984375,
0.0043182373046875,
-0.034881591796875,
0.00899505615234375,
-0.02532958984375,
0.04986572265625,
0.00330352783203125,
0.00441741943359375,
-0.01385498046875,
-0.0026226043701171875,
-0.02117919921875,
-0.015533447265625,
0.0165252685546875,
-0.01399993896484375,
-0.0170135498046875,
-0.055419921875,
-0.003635406494140625,
-0.0167083740234375,
-0.010772705078125,
-0.036285400390625,
-0.0013141632080078125,
0.0665283203125,
0.048370361328125,
-0.006015777587890625,
-0.03729248046875,
0.017578125,
0.035675048828125,
-0.0244140625,
-0.0289764404296875,
-0.0357666015625,
0.01528167724609375,
-0.031829833984375,
0.01421356201171875,
-0.024169921875,
0.0169677734375,
-0.023529052734375,
-0.01702880859375,
0.06005859375,
-0.009429931640625,
-0.01410675048828125,
0.0040435791015625,
0.032257080078125,
0.0157623291015625,
-0.03118896484375,
0.01715087890625,
-0.052734375,
-0.0227813720703125,
-0.022125244140625,
-0.04669189453125,
-0.004039764404296875,
-0.05609130859375,
-0.105712890625,
0.09515380859375,
0.052825927734375,
0.040557861328125,
-0.009002685546875,
0.0205535888671875,
-0.04107666015625,
-0.0179595947265625,
-0.0118408203125,
0.033172607421875,
0.0124053955078125,
0.01424407958984375,
-0.0313720703125,
-0.0084686279296875,
0.001941680908203125,
0.03912353515625,
0.0018949508666992188,
0.00305938720703125,
-0.004993438720703125,
-0.01140594482421875,
0.0202178955078125,
0.00555419921875,
-0.01413726806640625,
0.0222015380859375,
-0.007511138916015625,
-0.01702880859375,
0.068603515625,
-0.0041046142578125,
0.035003662109375,
0.00499725341796875,
0.00689697265625,
0.0100860595703125,
-0.0005068778991699219,
-0.0019063949584960938,
-0.00739288330078125,
0.0222930908203125,
0.0064239501953125,
-0.0175628662109375,
-0.0015048980712890625,
-0.03668212890625,
-0.00977325439453125,
0.0234375,
0.042022705078125,
-0.05743408203125,
0.006694793701171875,
-0.0340576171875,
0.050811767578125,
0.036651611328125,
0.052490234375,
0.07513427734375,
0.025115966796875,
0.08404541015625,
0.0411376953125,
0.038604736328125,
0.0088043212890625,
0.0194854736328125,
0.051666259765625,
0.042999267578125,
0.0261383056640625,
-0.0141754150390625,
0.01132965087890625,
0.059600830078125,
0.0711669921875,
-0.0482177734375,
-0.01031494140625,
0.01194000244140625,
0.025543212890625,
-0.003726959228515625,
0.0059814453125,
0.03521728515625,
0.0005116462707519531,
0.029998779296875,
-0.02642822265625,
0.020263671875,
0.035552978515625,
-0.005405426025390625,
-0.00811004638671875,
0.0245513916015625,
-0.0238800048828125,
0.02386474609375,
-0.0258636474609375,
-0.0194244384765625,
0.024627685546875,
0.01525115966796875,
0.0185394287109375,
-0.01036834716796875,
0.07080078125,
0.0038051605224609375,
-0.0255584716796875,
0.0380859375,
0.020263671875,
0.0271453857421875,
-0.00896453857421875,
-0.009246826171875,
0.0208282470703125,
0.00908660888671875,
-0.01453399658203125,
0.04290771484375,
0.045379638671875,
0.047698974609375,
0.00412750244140625,
-0.0003502368927001953,
0.048187255859375,
-0.0301513671875,
-0.0205535888671875,
-0.0274810791015625,
-0.0199127197265625,
-0.005413055419921875,
0.007167816162109375,
-0.00732421875,
0.040557861328125,
0.0011606216430664062,
0.009246826171875,
0.0203857421875,
-0.004581451416015625,
-0.0221710205078125,
0.006427764892578125,
-0.01549530029296875,
0.01111602783203125,
0.03497314453125,
-0.017822265625,
-0.016845703125,
-0.007747650146484375,
-0.00036907196044921875,
-0.005950927734375,
0.01142120361328125,
-0.0145721435546875,
0.0293426513671875,
0.044921875,
-0.04071044921875,
0.002902984619140625,
0.0576171875,
0.0068359375,
-0.0299224853515625,
0.01100921630859375,
-0.01306915283203125,
-0.0235137939453125,
-0.0003285408020019531,
0.0338134765625,
0.0185699462890625,
-0.062286376953125,
0.06536865234375,
-0.026519775390625,
-0.0181121826171875,
-0.02374267578125,
0.02191162109375,
-0.0537109375,
0.0005259513854980469,
-0.004169464111328125,
-0.00330352783203125,
-0.0014734268188476562,
0.006389617919921875,
-0.0322265625,
0.0185394287109375,
0.01110076904296875,
-0.040618896484375,
0.01593017578125,
-0.005828857421875,
0.01052093505859375,
-0.0091400146484375,
0.043365478515625,
-0.0193634033203125,
-0.03094482421875,
-0.0261383056640625,
-0.01291656494140625,
0.0188446044921875,
0.033935546875,
0.01177215576171875,
0.0484619140625,
-0.0225677490234375,
-0.0005898475646972656,
0.01861572265625,
-0.06756591796875,
0.01543426513671875,
0.007633209228515625,
-0.0305023193359375,
-0.00435638427734375,
0.033172607421875,
-0.01328277587890625,
-0.008941650390625,
0.0285797119140625,
0.00732421875,
0.00984954833984375,
-0.035858154296875,
-0.0428466796875,
0.027374267578125,
0.064453125,
0.057861328125,
0.0357666015625,
-0.04248046875,
-0.02264404296875,
-0.01446533203125,
-0.01788330078125,
-0.0186309814453125,
-0.005756378173828125,
-0.016845703125,
0.017303466796875,
-0.0157470703125,
-0.058807373046875,
-0.07666015625,
-0.00659942626953125,
0.0224456787109375,
-0.01148223876953125,
-0.024444580078125,
-0.019561767578125,
-0.0264892578125,
0.048980712890625,
-0.033111572265625,
0.0204010009765625,
-0.00797271728515625,
0.016754150390625,
-0.01157379150390625,
-0.040313720703125,
-0.00872039794921875,
0.06842041015625,
-0.00971221923828125,
0.022125244140625,
0.02001953125,
-0.005462646484375,
-0.0022430419921875,
0.0169830322265625,
0.00998687744140625,
0.057159423828125,
0.0005297660827636719,
-0.0196380615234375,
0.0221710205078125,
0.00797271728515625,
-0.0014629364013671875,
-0.0908203125,
-0.02374267578125,
-0.05303955078125,
0.059814453125,
-0.03216552734375,
0.0130767822265625,
0.0023174285888671875,
-0.0399169921875,
-0.082763671875,
0.061553955078125,
-0.02362060546875,
-0.033294677734375,
0.0191650390625,
0.004367828369140625,
-0.0178985595703125,
0.023681640625,
0.00537872314453125,
-0.009552001953125,
0.003650665283203125,
-0.0003960132598876953,
0.0006251335144042969,
0.00042319297790527344,
0.04449462890625,
-0.007740020751953125,
-0.039306640625,
-0.0139617919921875,
-0.016510009765625,
-0.01132965087890625,
0.00948333740234375,
-0.007007598876953125,
0.040283203125,
0.057891845703125,
-0.0208587646484375,
0.0257110595703125,
-0.00975799560546875,
-0.012603759765625,
-0.014923095703125,
0.003986358642578125,
-0.01212310791015625,
0.01290130615234375,
0.04913330078125,
0.047515869140625,
0.00994110107421875,
-0.051055908203125,
-0.0157012939453125,
-0.01393890380859375,
0.036834716796875,
0.00946044921875,
-0.0181884765625,
-0.02020263671875,
-0.00701904296875,
-0.00818634033203125,
0.0269775390625,
0.0013427734375,
0.04742431640625,
0.042449951171875,
-0.04058837890625,
0.07757568359375,
-0.050140380859375,
0.03668212890625,
-0.03521728515625,
0.06365966796875,
-0.0428466796875,
-0.04144287109375,
0.015899658203125,
0.04144287109375,
-0.0170745849609375,
0.0021381378173828125,
0.0077056884765625,
-0.0212554931640625,
-0.0070953369140625,
0.004825592041015625,
0.003818511962890625,
0.01605224609375,
-0.0146331787109375,
-0.0268707275390625,
0.0102996826171875,
0.004276275634765625,
-0.017181396484375,
0.0288238525390625,
0.0308074951171875,
0.01413726806640625,
-0.007659912109375,
0.004909515380859375,
-0.040069580078125,
-0.0309295654296875,
-0.026947021484375,
0.0199737548828125,
0.039276123046875,
-0.017364501953125,
0.09686279296875,
-0.017181396484375,
0.000885009765625,
0.0223236083984375,
-0.0265350341796875,
-0.056060791015625,
0.00478363037109375,
0.0036411285400390625,
0.029815673828125,
0.01120758056640625
]
|
7d08b73a8245d3ac442aa46c31a640c31cefdc46 | Wordpress Stackexchange
Q: wp-admin remove the subfolder URL I have a problem with WP. I have a website with this URL: http://sub.domain.com/subfolder My Website works fine, but when I connect on wp-admin, the subfolder URL disappeared (http://sub.domain.com/wp-admin). I don't understand why the subfolder disappears ?
Thank you in advance for your response.
| Q: wp-admin remove the subfolder URL I have a problem with WP. I have a website with this URL: http://sub.domain.com/subfolder My Website works fine, but when I connect on wp-admin, the subfolder URL disappeared (http://sub.domain.com/wp-admin). I don't understand why the subfolder disappears ?
Thank you in advance for your response.
| wordpress | {
"language": "en",
"length": 50,
"provenance": "stackexchange_00019.jsonl.gz:465523",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226912"
} | [
0.05523681640625,
-0.017486572265625,
0.004375457763671875,
0.00891876220703125,
-0.00914764404296875,
-0.055084228515625,
0.0673828125,
-0.032928466796875,
0.021026611328125,
0.0157928466796875,
0.016937255859375,
-0.0487060546875,
0.00908660888671875,
-0.045867919921875,
-0.023712158203125,
-0.032440185546875,
-0.003711700439453125,
0.0242767333984375,
-0.002071380615234375,
-0.01459503173828125,
-0.0090789794921875,
0.00392913818359375,
-0.0341796875,
0.0227508544921875,
-0.015350341796875,
0.0305328369140625,
0.05694580078125,
-0.018096923828125,
-0.0201416015625,
-0.035369873046875,
0.0006952285766601562,
0.00921630859375,
-0.023956298828125,
0.03692626953125,
0.023529052734375,
-0.0574951171875,
-0.00847625732421875,
0.018524169921875,
0.03436279296875,
-0.0156402587890625,
0.01995849609375,
-0.00136566162109375,
0.035064697265625,
-0.0196533203125,
0.0207977294921875,
-0.04730224609375,
0.03411865234375,
-0.03936767578125,
0.022430419921875,
-0.0026264190673828125,
0.004169464111328125,
0.038787841796875,
0.0166015625,
-0.01995849609375,
-0.023651123046875,
-0.0220794677734375,
0.032806396484375,
0.0016651153564453125,
0.0263519287109375,
-0.053741455078125,
-0.050750732421875,
0.01514434814453125,
0.034210205078125,
0.019012451171875,
-0.021453857421875,
-0.0125885009765625,
-0.019775390625,
0.0074615478515625,
-0.074951171875,
-0.00897979736328125,
0.07159423828125,
-0.03656005859375,
0.01410675048828125,
-0.01092529296875,
-0.00382232666015625,
-0.006633758544921875,
0.0029010772705078125,
0.0202789306640625,
0.0263824462890625,
-0.006160736083984375,
0.0265655517578125,
-0.0107879638671875,
-0.04815673828125,
-0.004116058349609375,
0.035980224609375,
0.0380859375,
0.0015077590942382812,
-0.027740478515625,
-0.036224365234375,
-0.0192413330078125,
-0.031829833984375,
-0.0391845703125,
-0.004276275634765625,
-0.0167236328125,
-0.040313720703125,
-0.00963592529296875,
0.03887939453125,
0.05987548828125,
-0.0064697265625,
-0.00951385498046875,
-0.00972747802734375,
-0.0310516357421875,
-0.036712646484375,
-0.019989013671875,
0.0030498504638671875,
0.034912109375,
-0.006183624267578125,
0.02410888671875,
0.040283203125,
0.02783203125,
0.0001074075698852539,
0.02069091796875,
0.022491455078125,
-0.034454345703125,
-0.0237274169921875,
0.0014905929565429688,
-0.0019388198852539062,
0.0017042160034179688,
0.01313018798828125,
-0.007503509521484375,
-0.01319122314453125,
0.03759765625,
-0.09197998046875,
-0.03521728515625,
-0.005718231201171875,
-0.032135009765625,
-0.0090179443359375,
0.048187255859375,
0.0229949951171875,
-0.01419830322265625,
-0.04290771484375,
0.0242156982421875,
0.047515869140625,
0.0103302001953125,
0.006687164306640625,
-0.004608154296875,
0.042877197265625,
0.0299072265625,
0.00848388671875,
0.006298065185546875,
0.01477813720703125,
-0.0141754150390625,
-0.00998687744140625,
-0.0020751953125,
-0.0281524658203125,
0.030242919921875,
-0.0133514404296875,
-0.0009717941284179688,
0.003482818603515625,
-0.03497314453125,
-0.004962921142578125,
-0.08782958984375,
0.031890869140625,
0.01488494873046875,
-0.00615692138671875,
-0.01180267333984375,
0.05010986328125,
-0.036346435546875,
-0.036590576171875,
-0.045989990234375,
0.022308349609375,
-0.00205230712890625,
-0.0034465789794921875,
-0.0080108642578125,
-0.039276123046875,
-0.0107574462890625,
-0.00843048095703125,
-0.0167236328125,
0.0214080810546875,
-0.0135040283203125,
0.06219482421875,
-0.0220947265625,
-0.014404296875,
0.02703857421875,
0.03509521484375,
0.0215911865234375,
0.018310546875,
0.0258331298828125,
-0.0196075439453125,
0.0572509765625,
0.0244598388671875,
-0.0301361083984375,
0.002346038818359375,
0.0164794921875,
-0.0308837890625,
0.003643035888671875,
0.0010728836059570312,
0.01314544677734375,
0.0168914794921875,
0.00852203369140625,
0.036529541015625,
0.03399658203125,
-0.04443359375,
0.01255035400390625,
-0.01033782958984375,
-0.004718780517578125,
-0.006435394287109375,
0.013702392578125,
-0.013702392578125,
-0.0172882080078125,
-0.051300048828125,
-0.003173828125,
0.00009840726852416992,
0.0458984375,
0.03680419921875,
-0.0037136077880859375,
0.0117340087890625,
0.01079559326171875,
0.041412353515625,
0.01023101806640625,
-0.017303466796875,
0.004802703857421875,
0.01617431640625,
-0.06683349609375,
-0.05609130859375,
0.008148193359375,
-0.0137786865234375,
-0.011810302734375,
-0.00986480712890625,
0.01502227783203125,
-0.015655517578125,
0.01026153564453125,
-0.03387451171875,
-0.0235748291015625,
0.0221099853515625,
0.01385498046875,
-0.0259246826171875,
-0.0142059326171875,
0.0172271728515625,
0.01399993896484375,
-0.035430908203125,
0.028350830078125,
0.0233154296875,
0.029449462890625,
-0.043243408203125,
-0.0196533203125,
-0.0176544189453125,
-0.0239410400390625,
-0.0027942657470703125,
0.0478515625,
0.017974853515625,
0.03179931640625,
-0.0330810546875,
-0.0182952880859375,
0.054534912109375,
-0.0479736328125,
-0.01702880859375,
0.0002722740173339844,
-0.0186767578125,
0.00909423828125,
0.033477783203125,
0.0262298583984375,
0.0106201171875,
0.002101898193359375,
-0.01015472412109375,
0.03558349609375,
0.0182952880859375,
-0.0113067626953125,
-0.0009984970092773438,
0.01507568359375,
0.004917144775390625,
0.019256591796875,
-0.037109375,
0.00611114501953125,
-0.0287933349609375,
0.0345458984375,
0.01934814453125,
0.03173828125,
0.001888275146484375,
-0.0024051666259765625,
0.026031494140625,
0.01219940185546875,
-0.028228759765625,
0.03448486328125,
0.1302490234375,
-0.05242919921875,
-0.036834716796875,
-0.020050048828125,
0.005565643310546875,
0.0160980224609375,
-0.00016701221466064453,
0.0276947021484375,
-0.0171966552734375,
-0.01012420654296875,
-0.0184783935546875,
-0.036163330078125,
0.013519287109375,
0.04522705078125,
0.048980712890625,
0.0171051025390625,
0.0297698974609375,
-0.0032215118408203125,
-0.0254058837890625,
0.0498046875,
0.01334381103515625,
-0.0352783203125,
0.031707763671875,
-0.055389404296875,
0.027069091796875,
-0.0236053466796875,
0.021392822265625,
0.0643310546875,
0.02630615234375,
-0.0308074951171875,
0.040771484375,
-0.0263519287109375,
0.059814453125,
0.015655517578125,
0.0098724365234375,
0.0582275390625,
-0.1318359375,
-0.03375244140625,
0.004306793212890625,
-0.01049041748046875,
-0.01611328125,
-0.048126220703125,
-0.004894256591796875,
-0.0259552001953125,
-0.1129150390625,
-0.07537841796875,
-0.04046630859375,
-0.0001341104507446289,
-0.042755126953125,
0.041229248046875,
-0.022735595703125,
0.03564453125,
0.054443359375,
0.00962066650390625,
0.01264190673828125,
-0.033966064453125,
-0.0692138671875,
-0.06219482421875,
-0.076904296875,
-0.03228759765625,
-0.0017108917236328125,
-0.0006031990051269531,
0.008148193359375,
-0.00444793701171875,
-0.0038585662841796875,
-0.043212890625,
0.0092926025390625,
0.021331787109375,
-0.00046515464782714844,
-0.01093292236328125,
-0.00391387939453125,
-0.0333251953125,
-0.01267242431640625,
0.002773284912109375,
0.07501220703125,
-0.00257110595703125,
-0.0123291015625,
-0.00396728515625,
0.003932952880859375,
-0.022186279296875,
-0.00091552734375,
-0.039306640625,
0.01296234130859375,
-0.038818359375,
-0.059539794921875,
-0.080078125,
0.00864410400390625,
-0.0237579345703125,
-0.021453857421875,
0.050323486328125,
0.0151519775390625,
-0.024444580078125,
0.01410675048828125,
0.0009226799011230469,
0.031341552734375,
0.0072174072265625,
-0.007297515869140625,
-0.0102386474609375,
-0.00984954833984375,
0.0032329559326171875,
0.04656982421875,
-0.0021343231201171875,
0.051849365234375,
-0.0181884765625,
-0.008544921875,
0.0139617919921875,
0.008575439453125,
0.01763916015625,
-0.0125274658203125,
0.00482177734375,
-0.01024627685546875,
0.051513671875,
-0.020660400390625,
0.0087738037109375,
-0.03729248046875,
-0.031646728515625,
-0.0517578125,
0.0533447265625,
-0.050140380859375,
-0.0114593505859375,
0.0015687942504882812,
0.03106689453125,
-0.04376220703125,
-0.05621337890625,
-0.04803466796875,
-0.0006427764892578125,
-0.042083740234375,
-0.0028514862060546875,
-0.0213775634765625,
-0.00771331787109375,
-0.0115509033203125,
-0.0018787384033203125,
-0.020721435546875,
-0.030181884765625,
0.0177459716796875,
-0.02752685546875,
-0.01265716552734375,
0.00316619873046875,
0.01035308837890625,
-0.044158935546875,
-0.01470184326171875,
-0.0265045166015625,
-0.0204315185546875,
-0.0134124755859375,
0.0309295654296875,
0.0221405029296875,
-0.0033416748046875,
-0.026031494140625,
0.00797271728515625,
0.033172607421875,
0.0005507469177246094,
0.031768798828125,
-0.032440185546875,
-0.0268707275390625,
-0.018890380859375,
0.0160064697265625,
-0.0012350082397460938,
0.00710296630859375,
-0.01152801513671875,
-0.0322265625,
-0.0281219482421875,
-0.043701171875,
-0.034454345703125,
0.00386810302734375,
-0.00890350341796875,
-0.01085662841796875,
-0.00799560546875,
-0.0208892822265625,
-0.04931640625,
0.0039825439453125,
-0.03741455078125,
0.00988006591796875,
-0.005413055419921875,
-0.01061248779296875,
0.03009033203125,
0.035552978515625,
-0.0240325927734375,
0.00939178466796875,
-0.00649261474609375,
0.00794219970703125,
-0.0380859375,
-0.01430511474609375,
0.02874755859375,
0.040802001953125,
-0.0203094482421875,
0.048309326171875,
0.0654296875,
-0.008453369140625,
0.01404571533203125,
0.0265045166015625,
0.0186004638671875,
-0.004421234130859375,
0.004703521728515625,
0.005802154541015625,
-0.035247802734375,
0.04168701171875,
0.0168609619140625,
-0.0073394775390625,
0.0207672119140625,
-0.007175445556640625,
0.002262115478515625,
-0.0367431640625,
-0.00388336181640625,
0.0192108154296875,
-0.034088134765625,
-0.0268096923828125,
-0.03497314453125,
0.0126953125,
-0.0260772705078125,
0.031463623046875,
0.01053619384765625,
0.00368499755859375,
0.032012939453125,
0.0262908935546875,
-0.0086822509765625,
-0.032806396484375,
0.03955078125,
-0.026153564453125,
0.029052734375,
-0.02984619140625,
-0.0104827880859375,
-0.046844482421875,
-0.02264404296875,
0.114013671875,
0.0188446044921875,
-0.02362060546875,
0.0284271240234375,
-0.0238037109375,
0.0110015869140625,
0.0197601318359375,
-0.0077667236328125,
0.0151519775390625,
0.01055908203125,
0.0089263916015625,
0.0171966552734375,
0.00957489013671875,
-0.01255035400390625,
-0.02362060546875,
0.0211944580078125,
0.0114288330078125,
-0.002925872802734375,
0.004055023193359375,
0.08294677734375,
-0.029754638671875,
0.05535888671875,
-0.004150390625,
-0.02764892578125,
0.004451751708984375,
0.0278472900390625,
0.00881195068359375,
-0.0007882118225097656,
-0.0033054351806640625,
0.0118865966796875,
0.07037353515625,
-0.0389404296875,
-0.0078582763671875,
0.02398681640625,
0.06451416015625,
0.051971435546875,
0.00916290283203125,
-0.0271148681640625,
-0.027679443359375,
-0.0081787109375,
0.06402587890625,
-0.0086517333984375,
-0.08026123046875,
0.0017919540405273438,
0.01120758056640625,
0.007843017578125,
-0.06048583984375,
-0.0275115966796875,
0.0087127685546875,
-0.0460205078125,
-0.0155181884765625,
-0.00969696044921875,
-0.055999755859375,
0.0076446533203125,
0.013702392578125,
0.0162811279296875,
0.00833892822265625,
-0.005527496337890625,
-0.051422119140625,
-0.0478515625,
-0.022003173828125,
-0.01318359375,
0.07330322265625,
-0.01326751708984375,
0.027008056640625,
-0.0189666748046875,
-0.0097808837890625,
-0.039825439453125,
0.0165557861328125,
-0.000385284423828125,
0.006134033203125,
-0.0972900390625,
0.025787353515625,
-0.02520751953125,
0.0030040740966796875,
0.0017786026000976562,
-0.006862640380859375,
-0.07147216796875,
-0.0262451171875,
-0.003864288330078125,
-0.0028133392333984375,
-0.0047149658203125,
-0.01055908203125,
-0.0141143798828125,
0.026214599609375,
0.0238800048828125,
-0.0238037109375,
-0.006267547607421875,
0.07928466796875,
-0.043365478515625,
0.057037353515625,
-0.01367950439453125,
0.0298614501953125,
0.01494598388671875,
-0.0162200927734375,
0.02508544921875,
-0.02288818359375,
-0.021209716796875,
-0.04083251953125,
0.005496978759765625,
-0.01056671142578125,
0.0207977294921875,
-0.00789642333984375,
-0.01181793212890625,
-0.0296478271484375,
-0.01143646240234375,
-0.03582763671875,
0.061920166015625,
-0.0202484130859375,
0.04815673828125,
-0.0999755859375,
-0.01415252685546875,
0.0386962890625,
-0.00897979736328125,
-0.036285400390625,
0.007762908935546875,
0.0010251998901367188,
0.003314971923828125,
0.048736572265625,
0.0068206787109375,
0.028167724609375,
0.0709228515625,
0.0115814208984375,
0.059478759765625,
0.03961181640625,
0.033111572265625,
0.01485443115234375,
0.0169525146484375,
-0.00937652587890625,
-0.042327880859375,
0.0210418701171875,
0.01273345947265625,
0.003692626953125,
0.039947509765625,
-0.006072998046875,
-0.0003082752227783203,
0.0701904296875,
0.05511474609375,
-0.09735107421875,
-0.00811767578125,
-0.002964019775390625,
0.007678985595703125,
0.0216217041015625,
-0.0142974853515625,
0.00897979736328125,
0.002651214599609375,
-0.004589080810546875,
0.035125732421875,
-0.0250091552734375,
-0.0162353515625,
0.023193359375,
-0.016204833984375,
0.00823211669921875,
0.0206451416015625,
0.014617919921875,
-0.0021152496337890625,
-0.00887298583984375,
0.0068511962890625,
-0.00559234619140625,
-0.00640869140625,
-0.01422119140625,
0.0279998779296875,
-0.02215576171875,
-0.054656982421875,
0.0105743408203125,
-0.0325927734375,
-0.00969696044921875,
-0.02740478515625,
0.01788330078125,
0.030914306640625,
0.038116455078125,
-0.019012451171875,
0.004428863525390625,
0.01215362548828125,
-0.004364013671875,
0.0709228515625,
0.0038394927978515625,
0.0186004638671875,
0.0184783935546875,
-0.044891357421875,
-0.01299285888671875,
-0.0176239013671875,
0.0014715194702148438,
-0.006198883056640625,
0.025146484375,
0.12109375,
-0.058868408203125,
-0.0217437744140625,
0.009307861328125,
0.0048980712890625,
-0.0033130645751953125,
-0.00916290283203125,
0.01122283935546875,
-0.0235595703125,
0.004009246826171875,
-0.0028057098388671875,
0.0029201507568359375,
0.0213470458984375,
-0.01337432861328125,
-0.06915283203125,
0.06451416015625,
-0.0154266357421875,
0.0379638671875,
0.0238494873046875,
0.0231170654296875,
-0.034027099609375,
-0.0107269287109375,
-0.0164947509765625,
0.0207366943359375,
0.03363037109375,
0.006587982177734375,
0.0255584716796875,
0.0018053054809570312,
0.0110015869140625,
0.01406097412109375,
0.062255859375,
0.0205078125,
-0.019317626953125,
0.0084686279296875,
0.04315185546875,
0.0153656005859375,
-0.01326751708984375,
0.044342041015625,
-0.01296234130859375,
0.03692626953125,
0.02215576171875,
-0.019805908203125,
0.01515960693359375,
0.0184173583984375,
-0.052581787109375,
0.0283203125,
-0.01146697998046875,
-0.01690673828125,
0.057861328125,
0.0295257568359375,
-0.04443359375,
0.0299224853515625,
0.03997802734375,
-0.046112060546875,
0.022491455078125,
0.007568359375,
0.0206298828125,
-0.00858306884765625,
-0.0076141357421875,
-0.01091766357421875,
0.03863525390625,
0.01319122314453125,
-0.004764556884765625,
-0.017364501953125,
0.00933074951171875,
0.042083740234375,
-0.037872314453125,
-0.0277099609375,
0.042266845703125,
-0.028350830078125,
0.04315185546875,
0.0153656005859375,
0.033050537109375,
-0.034027099609375,
-0.0112762451171875,
0.0215911865234375,
0.04345703125,
-0.0230712890625,
-0.07379150390625,
0.0153045654296875,
-0.00518035888671875,
0.002574920654296875,
0.0084686279296875,
-0.0198211669921875,
-0.0177764892578125,
0.025238037109375,
-0.027557373046875,
-0.0016622543334960938,
0.02801513671875,
0.00405120849609375,
-0.0157623291015625,
0.007701873779296875,
0.0124359130859375,
0.0232696533203125,
-0.005153656005859375,
-0.0238494873046875,
0.020172119140625,
0.042694091796875,
0.0231781005859375,
0.027679443359375,
-0.03759765625,
-0.020111083984375,
-0.007427215576171875,
0.05462646484375,
-0.0193634033203125,
0.0098876953125,
-0.05047607421875,
-0.08544921875,
0.034027099609375,
0.035125732421875,
0.01824951171875,
0.0457763671875,
0.067138671875,
0.0155487060546875,
-0.044158935546875,
-0.0008616447448730469,
-0.013092041015625,
-0.043060302734375,
0.0374755859375,
-0.03338623046875,
0.04156494140625,
0.03125,
-0.0038204193115234375,
-0.0295257568359375,
-0.0011301040649414062,
0.074462890625,
-0.0016622543334960938,
0.00830078125,
0.00411224365234375,
-0.0200042724609375,
0.0252838134765625,
-0.01297760009765625,
0.01354217529296875,
0.014892578125,
-0.0165863037109375,
0.0012617111206054688,
-0.031646728515625,
-0.014495849609375,
0.016143798828125,
0.038482666015625,
-0.011260986328125,
0.024932861328125,
0.0019235610961914062,
0.01023101806640625,
-0.0169830322265625,
0.004703521728515625,
-0.0005121231079101562,
-0.01132965087890625,
0.033233642578125,
0.00033664703369140625,
-0.0655517578125,
-0.03900146484375,
-0.0312347412109375,
0.024627685546875,
0.0004978179931640625,
0.150634765625,
-0.0572509765625,
0.0059356689453125,
-0.0023860931396484375,
0.0011968612670898438,
-0.0015535354614257812,
-0.0036869049072265625,
-0.00969696044921875,
-0.003108978271484375,
0.005214691162109375,
-0.00859832763671875,
-0.065673828125,
0.01235198974609375,
0.0110626220703125,
-0.032196044921875,
0.046051025390625,
-0.0273590087890625,
0.0101470947265625,
-0.0226287841796875,
0.022613525390625,
-0.024322509765625,
-0.0460205078125,
-0.0390625,
0.003688812255859375,
0.0162506103515625,
0.056640625,
0.0069580078125,
-0.0092926025390625,
-0.038055419921875,
-0.03521728515625,
0.0205841064453125,
-0.02655029296875,
0.0284423828125,
0.02484130859375,
-0.0687255859375,
-0.041107177734375,
0.004791259765625,
-0.009674072265625,
0.02099609375,
-0.00934600830078125,
0.04486083984375,
0.02838134765625,
-0.0060577392578125,
-0.044525146484375,
-0.0243988037109375,
-0.0184326171875,
-0.03631591796875,
-0.00945281982421875,
-0.0184173583984375,
-0.0124053955078125,
0.0054473876953125,
0.02142333984375,
-0.02142333984375,
0.00457763671875,
-0.0124664306640625,
-0.003543853759765625,
0.0032939910888671875,
-0.06695556640625,
-0.053192138671875,
0.0000903010368347168,
0.04962158203125,
0.02410888671875,
-0.070068359375,
0.0233612060546875,
0.001007080078125,
0.04461669921875,
0.0210113525390625,
0.0263214111328125,
-0.0151824951171875,
0.01175689697265625,
-0.0380859375,
0.0016450881958007812,
-0.044830322265625,
-0.0021228790283203125,
-0.0190277099609375,
0.0243988037109375,
0.04296875,
-0.02862548828125,
0.027435302734375,
0.004558563232421875,
-0.01104736328125,
0.065185546875,
-0.0269775390625,
-0.00928497314453125,
-0.036956787109375,
0.03692626953125,
-0.0150299072265625,
-0.0185089111328125,
0.0048980712890625,
0.01300048828125,
-0.0207672119140625,
-0.0161895751953125,
0.0277252197265625,
0.043182373046875,
-0.0171966552734375,
-0.053985595703125,
0.03179931640625,
-0.002101898193359375,
-0.0263824462890625,
-0.03363037109375,
-0.01641845703125,
-0.0099945068359375,
0.049774169921875,
-0.01113128662109375,
-0.0081787109375,
-0.0303192138671875,
0.040374755859375,
0.0306396484375,
0.055328369140625,
-0.00208282470703125,
0.02813720703125,
0.0158233642578125,
0.04742431640625,
0.032989501953125,
0.01436614990234375,
0.0182342529296875,
-0.022705078125,
0.048065185546875,
0.06329345703125,
-0.01088714599609375,
-0.021728515625,
-0.0005288124084472656,
-0.044097900390625,
0.00774383544921875,
-0.049041748046875,
-0.01264190673828125,
-0.02325439453125,
0.01059722900390625,
0.032470703125,
0.006168365478515625,
-0.00838470458984375,
-0.0153350830078125,
-0.059906005859375,
-0.01409149169921875,
-0.0294647216796875,
0.022186279296875,
-0.0679931640625,
-0.0087890625,
0.0186004638671875,
0.0024242401123046875,
-0.0122528076171875,
-0.040924072265625,
-0.030181884765625,
-0.00910186767578125,
-0.007587432861328125,
0.0206146240234375,
-0.0187835693359375,
0.004489898681640625,
0.0249176025390625,
-0.03662109375,
-0.01192474365234375,
-0.01354217529296875,
0.0266265869140625,
-0.00909423828125,
-0.03564453125,
0.0245513916015625,
0.0166473388671875,
-0.0523681640625,
0.0158538818359375,
0.01412200927734375,
0.00850677490234375,
-0.041839599609375,
-0.034576416015625,
-0.005435943603515625,
0.005245208740234375,
0.003017425537109375,
0.00856781005859375,
0.0146026611328125,
0.035430908203125,
0.0005731582641601562,
0.05340576171875,
0.0164794921875,
0.057037353515625,
-0.0195770263671875,
0.08038330078125,
-0.0230865478515625,
-0.04779052734375,
-0.003154754638671875,
-0.032623291015625,
-0.007282257080078125,
0.0030002593994140625,
-0.0198974609375,
-0.07940673828125,
0.031951904296875,
-0.004444122314453125,
0.03192138671875,
0.0264129638671875
]
|
b30bc2abccb05214920fa15801db3d8d51cbc115 | Wordpress Stackexchange
Q: How to set the default embed image size When a user adds media to the WYSIWYG, is there a way to set the default image size to large?
It defaults to medium, I'd like this to be "large" without the user having to change the value.
A: If you add this to functions.php, this will update the options as set.
function custom_image_size() {
// Set default values for the upload media box
update_option('image_default_align', 'center' );
update_option('image_default_size', 'large' );
}
add_action('after_setup_theme', 'custom_image_size');
You can update the options as you need.
| Q: How to set the default embed image size When a user adds media to the WYSIWYG, is there a way to set the default image size to large?
It defaults to medium, I'd like this to be "large" without the user having to change the value.
A: If you add this to functions.php, this will update the options as set.
function custom_image_size() {
// Set default values for the upload media box
update_option('image_default_align', 'center' );
update_option('image_default_size', 'large' );
}
add_action('after_setup_theme', 'custom_image_size');
You can update the options as you need.
| wordpress | {
"language": "en",
"length": 90,
"provenance": "stackexchange_00019.jsonl.gz:465524",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/226915"
} | [
-0.01354217529296875,
-0.0233001708984375,
-0.0031280517578125,
0.0161895751953125,
-0.01546478271484375,
-0.016143798828125,
0.04901123046875,
-0.004093170166015625,
-0.005664825439453125,
-0.00354766845703125,
-0.03875732421875,
-0.0299530029296875,
-0.028350830078125,
-0.022674560546875,
-0.01523590087890625,
-0.06353759765625,
0.051300048828125,
-0.0175933837890625,
0.05218505859375,
-0.00165557861328125,
0.0116729736328125,
0.033599853515625,
0.050994873046875,
0.0902099609375,
-0.0167694091796875,
-0.00400543212890625,
0.09356689453125,
-0.013214111328125,
-0.024261474609375,
-0.03265380859375,
0.00785064697265625,
0.0276947021484375,
0.035003662109375,
0.0011882781982421875,
-0.015380859375,
0.039398193359375,
-0.0036468505859375,
-0.00859832763671875,
-0.0068817138671875,
0.01134490966796875,
0.0200347900390625,
0.00015246868133544922,
0.05029296875,
-0.0033168792724609375,
0.0155487060546875,
-0.034942626953125,
0.038421630859375,
-0.04791259765625,
0.026458740234375,
-0.0273895263671875,
-0.00457000732421875,
0.0173187255859375,
0.0088043212890625,
-0.0657958984375,
-0.015350341796875,
-0.01605224609375,
0.00025153160095214844,
0.0205230712890625,
0.02947998046875,
-0.00371551513671875,
-0.04632568359375,
-0.0006251335144042969,
0.0236358642578125,
-0.031341552734375,
0.0175323486328125,
-0.006015777587890625,
-0.0167236328125,
0.032196044921875,
-0.0196990966796875,
-0.003025054931640625,
0.004695892333984375,
-0.031402587890625,
-0.005947113037109375,
-0.02642822265625,
-0.037567138671875,
0.05755615234375,
-0.00783538818359375,
0.0007076263427734375,
0.034576416015625,
-0.0413818359375,
0.05828857421875,
0.0028820037841796875,
0.035400390625,
-0.0219879150390625,
0.05975341796875,
0.0221710205078125,
0.006561279296875,
-0.03533935546875,
-0.00875091552734375,
0.0228271484375,
-0.01303863525390625,
0.002880096435546875,
0.0194549560546875,
0.01922607421875,
-0.027099609375,
-0.0189666748046875,
0.0238800048828125,
0.0200347900390625,
-0.0049896240234375,
0.006866455078125,
0.013275146484375,
-0.041015625,
0.0299072265625,
-0.038482666015625,
0.0122833251953125,
0.0005970001220703125,
-0.02496337890625,
-0.0543212890625,
0.015960693359375,
0.03924560546875,
-0.0228729248046875,
-0.004947662353515625,
-0.0201873779296875,
0.00955963134765625,
-0.0207366943359375,
-0.005847930908203125,
-0.061737060546875,
0.03302001953125,
-0.01410675048828125,
0.0239715576171875,
0.01016998291015625,
0.033660888671875,
0.030120849609375,
-0.04437255859375,
0.0237884521484375,
0.020721435546875,
-0.0164031982421875,
-0.063232421875,
-0.061370849609375,
0.0389404296875,
-0.03668212890625,
0.01708984375,
0.06646728515625,
0.0287933349609375,
0.0030651092529296875,
-0.028076171875,
-0.03369140625,
-0.02947998046875,
-0.00885772705078125,
0.041748046875,
-0.056793212890625,
-0.056915283203125,
0.05572509765625,
-0.011016845703125,
-0.0279998779296875,
0.0269927978515625,
-0.003662109375,
0.0061187744140625,
0.00426483154296875,
-0.0948486328125,
0.0269927978515625,
-0.04248046875,
0.00040531158447265625,
0.0191497802734375,
0.02703857421875,
0.00940704345703125,
0.039764404296875,
-0.014862060546875,
-0.0085296630859375,
-0.0199432373046875,
-0.00360870361328125,
0.01263427734375,
0.0182037353515625,
-0.0212554931640625,
-0.0059356689453125,
-0.02862548828125,
-0.0186614990234375,
0.0150146484375,
0.0246429443359375,
0.026214599609375,
-0.0139312744140625,
-0.007114410400390625,
-0.0250244140625,
0.0012331008911132812,
-0.00873565673828125,
0.017913818359375,
0.017425537109375,
0.040802001953125,
0.0134429931640625,
0.038818359375,
0.0197906494140625,
-0.030120849609375,
0.07080078125,
-0.02142333984375,
-0.00724029541015625,
-0.05059814453125,
-0.00421905517578125,
-0.0031719207763671875,
0.046234130859375,
0.0306854248046875,
-0.0307464599609375,
-0.015716552734375,
-0.028228759765625,
-0.01070404052734375,
0.01009368896484375,
-0.0016803741455078125,
-0.045257568359375,
-0.0222015380859375,
-0.01448822021484375,
0.0193634033203125,
0.03533935546875,
-0.02978515625,
0.0159149169921875,
-0.01168060302734375,
-0.04241943359375,
-0.01708984375,
-0.0203399658203125,
0.01404571533203125,
-0.00896453857421875,
-0.0025177001953125,
0.0027637481689453125,
-0.026641845703125,
0.0160675048828125,
-0.0511474609375,
-0.028045654296875,
0.016754150390625,
-0.01263427734375,
0.048492431640625,
-0.01110076904296875,
0.05120849609375,
-0.05120849609375,
-0.039276123046875,
-0.01502227783203125,
-0.0125885009765625,
0.0557861328125,
0.00848388671875,
-0.018157958984375,
-0.01134490966796875,
0.055572509765625,
0.0036163330078125,
-0.01458740234375,
0.03485107421875,
-0.0093994140625,
0.016448974609375,
-0.0183563232421875,
-0.0269775390625,
-0.0240020751953125,
-0.08203125,
0.03369140625,
0.0594482421875,
0.0252532958984375,
-0.00006633996963500977,
0.0274505615234375,
0.06756591796875,
0.06817626953125,
0.04534912109375,
0.031982421875,
0.0037631988525390625,
0.014251708984375,
0.01128387451171875,
-0.0243072509765625,
-0.045440673828125,
0.01497650146484375,
-0.12408447265625,
0.022003173828125,
0.01849365234375,
-0.0195770263671875,
-0.0325927734375,
0.006450653076171875,
0.038116455078125,
-0.00901031494140625,
0.0035762786865234375,
0.00689697265625,
-0.0116424560546875,
-0.0172119140625,
0.026580810546875,
-0.0198822021484375,
-0.00960540771484375,
-0.03546142578125,
0.051422119140625,
0.0276641845703125,
-0.060394287109375,
-0.0113677978515625,
0.0197601318359375,
0.040313720703125,
-0.03717041015625,
-0.048492431640625,
0.01189422607421875,
0.007511138916015625,
0.01104736328125,
-0.0087127685546875,
-0.006656646728515625,
-0.06634521484375,
-0.00359344482421875,
0.0150299072265625,
-0.0556640625,
-0.0010671615600585938,
0.0272064208984375,
0.0243682861328125,
-0.04901123046875,
-0.00954437255859375,
0.0389404296875,
0.001434326171875,
0.05548095703125,
0.004863739013671875,
-0.041015625,
-0.01198577880859375,
-0.06689453125,
0.0718994140625,
-0.07586669921875,
0.09332275390625,
0.0732421875,
-0.09747314453125,
0.09130859375,
-0.009307861328125,
0.02191162109375,
-0.0198974609375,
0.02716064453125,
-0.008087158203125,
-0.017974853515625,
-0.0380859375,
-0.0228424072265625,
-0.00818634033203125,
0.002643585205078125,
-0.055328369140625,
-0.03204345703125,
-0.03521728515625,
-0.0234527587890625,
-0.01092529296875,
0.03619384765625,
-0.0150604248046875,
-0.0772705078125,
-0.03082275390625,
-0.01262664794921875,
-0.036529541015625,
0.01425933837890625,
0.0034885406494140625,
-0.00435638427734375,
-0.01087188720703125,
-0.01256561279296875,
-0.0005817413330078125,
-0.047576904296875,
-0.029693603515625,
-0.036529541015625,
0.0034732818603515625,
-0.0089569091796875,
-0.00920867919921875,
0.024749755859375,
0.0105438232421875,
0.01099395751953125,
0.004581451416015625,
-0.0295867919921875,
0.00981903076171875,
-0.0264129638671875,
0.03631591796875,
-0.021881103515625,
0.00759124755859375,
0.003326416015625,
0.0283966064453125,
0.051910400390625,
-0.058807373046875,
-0.00860595703125,
-0.0548095703125,
-0.0723876953125,
-0.0545654296875,
0.0667724609375,
0.061767578125,
-0.09228515625,
0.004192352294921875,
-0.0792236328125,
0.0191802978515625,
-0.034027099609375,
-0.0280303955078125,
0.0248565673828125,
0.007045745849609375,
-0.00946807861328125,
-0.0137481689453125,
0.01499176025390625,
-0.0201263427734375,
0.00914764404296875,
0.0450439453125,
-0.053375244140625,
0.03173828125,
-0.01016998291015625,
-0.03265380859375,
-0.03076171875,
0.03485107421875,
-0.0175323486328125,
0.03167724609375,
0.016693115234375,
0.007381439208984375,
0.000316619873046875,
0.00504302978515625,
-0.026336669921875,
-0.041778564453125,
0.0245513916015625,
-0.019195556640625,
0.04302978515625,
-0.039093017578125,
-0.022064208984375,
-0.0036716461181640625,
0.0865478515625,
-0.02362060546875,
-0.01206207275390625,
0.007244110107421875,
0.0208892822265625,
-0.04534912109375,
-0.0264892578125,
-0.046234130859375,
0.0024166107177734375,
-0.0217742919921875,
0.0139007568359375,
0.00882720947265625,
-0.022552490234375,
-0.0085601806640625,
0.024810791015625,
-0.0180206298828125,
-0.0159149169921875,
0.0263671875,
0.00542449951171875,
-0.0155792236328125,
0.0144805908203125,
0.005176544189453125,
-0.0060882568359375,
0.006130218505859375,
-0.0168304443359375,
-0.09698486328125,
-0.0157928466796875,
-0.00653076171875,
0.0758056640625,
-0.0119171142578125,
0.0126800537109375,
-0.03326416015625,
0.047119140625,
0.034149169921875,
-0.033782958984375,
0.034423828125,
-0.0038471221923828125,
0.0006608963012695312,
-0.0216064453125,
-0.0003914833068847656,
-0.0479736328125,
-0.00475311279296875,
-0.04010009765625,
-0.043670654296875,
-0.013580322265625,
-0.01375579833984375,
0.0299530029296875,
-0.007843017578125,
-0.0088043212890625,
-0.057098388671875,
-0.054901123046875,
-0.0229949951171875,
0.029205322265625,
-0.007167816162109375,
-0.0011854171752929688,
-0.07574462890625,
-0.07080078125,
0.027587890625,
0.00760650634765625,
-0.006061553955078125,
0.0018873214721679688,
0.037689208984375,
0.004608154296875,
-0.023040771484375,
-0.04315185546875,
-0.01038360595703125,
0.025360107421875,
0.051116943359375,
-0.026519775390625,
-0.01139068603515625,
-0.026641845703125,
0.01410675048828125,
0.02447509765625,
0.033935546875,
-0.0185089111328125,
0.0650634765625,
0.0014801025390625,
-0.01248931884765625,
0.031890869140625,
-0.0017004013061523438,
-0.0384521484375,
-0.004657745361328125,
-0.006103515625,
0.01103973388671875,
-0.0152740478515625,
0.0155029296875,
0.01439666748046875,
-0.02459716796875,
-0.04327392578125,
-0.030242919921875,
0.0103759765625,
-0.01837158203125,
0.00261688232421875,
-0.0269927978515625,
0.0176544189453125,
-0.0228729248046875,
0.008697509765625,
0.0032138824462890625,
-0.0013589859008789062,
-0.003017425537109375,
-0.0014104843139648438,
0.0367431640625,
-0.0026092529296875,
0.0009522438049316406,
-0.00049591064453125,
0.0152130126953125,
-0.046478271484375,
0.005886077880859375,
-0.031036376953125,
-0.050384521484375,
0.04254150390625,
0.03363037109375,
-0.005786895751953125,
0.01200103759765625,
0.05438232421875,
0.0229949951171875,
0.00009948015213012695,
-0.0277557373046875,
-0.0350341796875,
0.0248565673828125,
-0.055419921875,
0.0211944580078125,
0.00952911376953125,
-0.00864410400390625,
0.06591796875,
0.0026702880859375,
0.004833221435546875,
0.0229034423828125,
-0.0007719993591308594,
0.040771484375,
0.0257568359375,
0.017059326171875,
0.03228759765625,
0.004669189453125,
-0.0031833648681640625,
-0.00827789306640625,
-0.00914764404296875,
0.0006041526794433594,
0.0259552001953125,
0.0184326171875,
-0.0009813308715820312,
-0.02252197265625,
-0.0218353271484375,
0.02398681640625,
-0.00942230224609375,
0.01354217529296875,
0.01146697998046875,
-0.06536865234375,
-0.07147216796875,
-0.01230621337890625,
0.03497314453125,
0.048004150390625,
-0.05499267578125,
-0.04486083984375,
-0.003017425537109375,
-0.045379638671875,
0.0241851806640625,
-0.00771331787109375,
-0.0140228271484375,
0.03302001953125,
0.014068603515625,
-0.0308074951171875,
-0.0078277587890625,
-0.004116058349609375,
-0.042205810546875,
-0.0264434814453125,
-0.00383758544921875,
-0.009735107421875,
0.036041259765625,
-0.038848876953125,
0.0229949951171875,
-0.005603790283203125,
-0.0252838134765625,
-0.0206756591796875,
0.02545166015625,
0.0258941650390625,
0.0178680419921875,
0.0113983154296875,
-0.020751953125,
-0.0269317626953125,
-0.021942138671875,
0.0499267578125,
-0.004150390625,
-0.000957489013671875,
-0.0390625,
0.004428863525390625,
0.0180206298828125,
0.0032329559326171875,
0.002498626708984375,
-0.04193115234375,
0.0211639404296875,
0.0294952392578125,
0.039459228515625,
-0.0240936279296875,
-0.005390167236328125,
0.048309326171875,
0.004207611083984375,
-0.00907135009765625,
-0.018646240234375,
-0.003570556640625,
-0.0160064697265625,
-0.034210205078125,
-0.0169830322265625,
0.0015592575073242188,
0.0457763671875,
-0.0130462646484375,
0.00836944580078125,
0.038665771484375,
0.01387786865234375,
0.020599365234375,
-0.03314208984375,
-0.0166778564453125,
-0.0235595703125,
0.040679931640625,
-0.0408935546875,
0.023681640625,
-0.00901031494140625,
-0.0364990234375,
0.020294189453125,
0.01806640625,
0.0221405029296875,
0.0227203369140625,
-0.05072021484375,
0.01434326171875,
0.0261993408203125,
-0.050018310546875,
0.0211639404296875,
0.047821044921875,
-0.0013895034790039062,
0.03857421875,
-0.00479888916015625,
0.00310516357421875,
0.035980224609375,
0.019378662109375,
-0.048004150390625,
-0.03216552734375,
-0.0160064697265625,
0.0029144287109375,
0.0350341796875,
0.0013818740844726562,
0.028472900390625,
0.04345703125,
0.0038280487060546875,
0.06903076171875,
-0.015411376953125,
0.03570556640625,
0.0222625732421875,
-0.018218994140625,
0.07049560546875,
-0.01361083984375,
0.021087646484375,
0.024932861328125,
0.040802001953125,
-0.03192138671875,
-0.01788330078125,
0.0225067138671875,
-0.0251007080078125,
-0.0153350830078125,
0.00946044921875,
0.019866943359375,
0.0143890380859375,
-0.04437255859375,
-0.004055023193359375,
0.026580810546875,
-0.0065765380859375,
0.022918701171875,
0.03424072265625,
-0.038970947265625,
-0.0093536376953125,
-0.034210205078125,
-0.020416259765625,
-0.0220947265625,
-0.025665283203125,
0.03802490234375,
-0.0252532958984375,
0.0259552001953125,
0.0199127197265625,
-0.0036067962646484375,
-0.00042891502380371094,
-0.0081634521484375,
-0.0599365234375,
0.017974853515625,
-0.019500732421875,
0.040191650390625,
0.011016845703125,
-0.060302734375,
0.00902557373046875,
-0.0164947509765625,
-0.017486572265625,
-0.00832366943359375,
-0.0567626953125,
0.056549072265625,
-0.05340576171875,
-0.0033779144287109375,
0.0021495819091796875,
0.034759521484375,
0.0113372802734375,
-0.0222930908203125,
0.0177459716796875,
-0.055755615234375,
-0.026336669921875,
-0.0164642333984375,
-0.044891357421875,
0.0008511543273925781,
-0.047332763671875,
-0.037109375,
0.052154541015625,
-0.041412353515625,
0.01360321044921875,
-0.00360870361328125,
0.024017333984375,
0.0196990966796875,
0.02734375,
0.00995635986328125,
-0.004055023193359375,
-0.0196533203125,
-0.04278564453125,
-0.00614166259765625,
0.00547027587890625,
-0.0243072509765625,
0.018768310546875,
0.0269012451171875,
0.00032901763916015625,
-0.0184326171875,
-0.0223236083984375,
0.040496826171875,
0.07952880859375,
0.031402587890625,
-0.00690460205078125,
-0.014556884765625,
-0.0310821533203125,
0.01148223876953125,
0.022674560546875,
0.0396728515625,
-0.0117340087890625,
-0.03277587890625,
0.01175689697265625,
0.007144927978515625,
0.01043701171875,
0.004299163818359375,
0.037506103515625,
-0.038787841796875,
0.00457000732421875,
0.04864501953125,
-0.055877685546875,
0.0328369140625,
0.07012939453125,
0.08013916015625,
0.00470733642578125,
0.0221405029296875,
-0.017364501953125,
0.0748291015625,
0.0008459091186523438,
-0.03839111328125,
0.0543212890625,
0.00447845458984375,
-0.0160980224609375,
0.0052947998046875,
-0.01273345947265625,
-0.0083160400390625,
0.03302001953125,
0.00389862060546875,
0.008880615234375,
0.008819580078125,
-0.0533447265625,
-0.0223388671875,
0.0237579345703125,
0.028717041015625,
-0.016693115234375,
-0.0042572021484375,
0.01421356201171875,
0.00428009033203125,
-0.0015048980712890625,
-0.03521728515625,
-0.00658416748046875,
-0.049835205078125,
-0.033538818359375,
-0.047821044921875,
0.0184478759765625,
0.042938232421875,
0.02899169921875,
-0.01544189453125,
-0.010650634765625,
-0.051055908203125,
-0.0022182464599609375,
-0.0203857421875,
-0.016754150390625,
0.012786865234375,
0.027740478515625,
0.02630615234375,
0.004955291748046875,
0.01959228515625,
0.00251007080078125,
-0.030914306640625,
0.031280517578125,
0.0179901123046875,
0.031097412109375,
-0.013397216796875,
0.0179290771484375,
0.00200653076171875,
0.0223846435546875,
0.04876708984375,
0.0003459453582763672,
0.0496826171875,
0.021636962890625,
-0.04327392578125,
0.003566741943359375,
0.0304412841796875,
-0.01332855224609375,
0.054718017578125,
-0.045562744140625,
0.043975830078125,
0.0291900634765625,
-0.0175018310546875,
-0.0259552001953125,
-0.0357666015625,
0.09088134765625,
-0.016021728515625,
0.023223876953125,
-0.0021038055419921875,
-0.03314208984375,
0.029876708984375,
-0.01064300537109375,
0.072021484375,
0.0022754669189453125,
-0.03594970703125,
0.007587432861328125,
-0.01268768310546875,
-0.05987548828125,
0.01016998291015625,
0.0238189697265625,
-0.033843994140625,
0.0237884521484375,
-0.0142669677734375,
0.00345611572265625,
0.0036792755126953125,
-0.0119781494140625,
0.0003476142883300781,
-0.0193023681640625,
0.016265869140625,
-0.0142364501953125,
-0.01708984375,
-0.016693115234375,
-0.0100860595703125,
0.041168212890625,
0.0100250244140625,
0.046234130859375,
-0.0164947509765625,
0.03350830078125,
-0.0004730224609375,
-0.03619384765625,
0.028961181640625,
0.01263427734375,
-0.0205841064453125,
0.004688262939453125,
-0.018341064453125,
-0.01074981689453125,
0.0301361083984375,
0.03155517578125,
0.01296234130859375,
-0.021270751953125,
-0.013824462890625,
-0.02752685546875,
0.02130126953125,
0.04608154296875,
0.025238037109375,
-0.0175018310546875,
-0.0214385986328125,
-0.04656982421875,
0.0011539459228515625,
0.027252197265625,
0.0014867782592773438,
-0.057098388671875,
0.0301666259765625,
-0.0023899078369140625,
0.00432586669921875,
0.0229644775390625,
-0.0289306640625,
0.041015625,
0.032745361328125,
-0.049407958984375,
-0.07928466796875,
-0.0206146240234375,
-0.003536224365234375,
-0.047088623046875,
0.0173492431640625,
0.0311279296875,
0.0007271766662597656,
-0.0308074951171875,
0.0216827392578125,
0.005977630615234375,
0.00704193115234375,
-0.057220458984375,
-0.014373779296875,
0.037322998046875,
-0.00304412841796875,
0.01107025146484375,
-0.01238250732421875,
-0.007762908935546875,
-0.004306793212890625,
-0.01531982421875,
0.0196380615234375,
0.019134521484375,
-0.0033893585205078125,
-0.0285186767578125,
0.01318359375,
0.0352783203125,
-0.00815582275390625,
-0.031402587890625,
0.0220489501953125,
-0.052032470703125,
0.03692626953125,
-0.0205230712890625,
-0.062042236328125,
-0.006717681884765625,
0.00344085693359375,
-0.00911712646484375,
-0.057891845703125,
-0.056610107421875,
0.023651123046875,
-0.05224609375,
0.0246124267578125,
0.0394287109375,
-0.017303466796875,
0.00414276123046875,
0.034698486328125,
0.0108795166015625,
0.09942626953125,
-0.059417724609375,
-0.0207366943359375,
0.0134429931640625,
0.01824951171875,
-0.0207366943359375,
-0.0606689453125,
0.00527191162109375,
-0.049468994140625,
0.0242156982421875,
-0.046905517578125,
0.01062774658203125,
0.01497650146484375,
-0.03253173828125,
-0.0760498046875,
0.0186614990234375,
-0.0264892578125,
-0.03924560546875,
0.0001850128173828125,
-0.01092529296875,
-0.03289794921875,
0.043060302734375,
0.02398681640625,
-0.018585205078125,
0.0055999755859375,
0.01187896728515625,
-0.0187530517578125,
0.0023822784423828125,
0.0264129638671875,
-0.0279693603515625,
-0.0289306640625,
-0.02764892578125,
-0.00954437255859375,
-0.034088134765625,
0.031280517578125,
-0.02923583984375,
0.04144287109375,
0.044647216796875,
-0.026641845703125,
-0.04095458984375,
-0.0122528076171875,
-0.0406494140625,
-0.03179931640625,
-0.035491943359375,
0.0018520355224609375,
-0.00247955322265625,
0.0762939453125,
0.01299285888671875,
0.007480621337890625,
-0.02777099609375,
0.0129241943359375,
-0.00939178466796875,
0.0233154296875,
-0.0173797607421875,
-0.01129150390625,
-0.03619384765625,
-0.01543426513671875,
-0.00568389892578125,
-0.0242767333984375,
-0.0008029937744140625,
0.002071380615234375,
-0.042694091796875,
0.01129150390625,
0.007801055908203125,
-0.01030731201171875,
-0.050537109375,
0.034210205078125,
0.052490234375,
-0.035980224609375,
0.0153350830078125,
-0.010345458984375,
-0.004024505615234375,
0.02752685546875,
-0.03155517578125,
-0.03131103515625,
0.0160369873046875,
-0.005741119384765625,
0.024383544921875,
0.005096435546875,
-0.046722412109375,
-0.0157928466796875,
0.036346435546875,
-0.0015153884887695312,
0.002216339111328125,
0.004665374755859375,
0.01934814453125,
0.0148773193359375,
-0.01702880859375,
-0.005313873291015625,
-0.04656982421875,
-0.042816162109375,
-0.016632080078125,
-0.0230255126953125,
-0.0005240440368652344,
-0.031158447265625,
0.030853271484375,
0.0213775634765625,
-0.001155853271484375,
0.0178985595703125,
0.013671875,
-0.030303955078125,
-0.005950927734375,
-0.004215240478515625,
-0.04058837890625,
-0.0195770263671875,
-0.00738525390625
]
|
7f1512ab850201123ac25fd17cdb522def11fba5 | Wordpress Stackexchange
Q: Shortcodes not resolved in AJAX call response I have a simple function, which returns the content of a page with the given pageID:
function get_page_content(){
$id = $_REQUEST['id'];
$page_data = get_page($id);
echo apply_filters('the_content', $page_data->post_content);
//echo do_shortcode($page_data -> post_content);
wp_die();
}
add_action( 'wp_ajax_nopriv_get_page_content', 'get_page_content' );
add_action( 'wp_ajax_get_page_content', 'get_page_content' );
But after an Update of WP and some Plugins the returned content still containes unresolved shortcodes like so:
[vc_row row_type=“row“ use_row_as_full_screen_section=“no“ type=“grid“ text_align=“left“ background_image_as_pattern=“without_pattern“][vc_column width=“1/1″]
The shortcodes come from a Plugin called Visual Composer (which got updated in the process to the latest version)
Question:
How can i render the shortcodes befor i return the content?
I tried both
echo apply_filters('the_content', $page_data->post_content);
and
echo do_shortcode($page_data -> post_content);
A: Since version 4.9 visual composer added shortcode lazy loading. To use VC shortcodes on AJAX content use this function before printing the content WPBMap::addAllMappedShortcodes();. So below code may help you,
function get_page_content(){
$id = $_REQUEST['id'];
$page_data = get_page($id);
WPBMap::addAllMappedShortcodes();
echo apply_filters('the_content', $page_data->post_content);
wp_die();
}
add_action( 'wp_ajax_nopriv_get_page_content', 'get_page_content' );
add_action( 'wp_ajax_get_page_content', 'get_page_content' );
| Q: Shortcodes not resolved in AJAX call response I have a simple function, which returns the content of a page with the given pageID:
function get_page_content(){
$id = $_REQUEST['id'];
$page_data = get_page($id);
echo apply_filters('the_content', $page_data->post_content);
//echo do_shortcode($page_data -> post_content);
wp_die();
}
add_action( 'wp_ajax_nopriv_get_page_content', 'get_page_content' );
add_action( 'wp_ajax_get_page_content', 'get_page_content' );
But after an Update of WP and some Plugins the returned content still containes unresolved shortcodes like so:
[vc_row row_type=“row“ use_row_as_full_screen_section=“no“ type=“grid“ text_align=“left“ background_image_as_pattern=“without_pattern“][vc_column width=“1/1″]
The shortcodes come from a Plugin called Visual Composer (which got updated in the process to the latest version)
Question:
How can i render the shortcodes befor i return the content?
I tried both
echo apply_filters('the_content', $page_data->post_content);
and
echo do_shortcode($page_data -> post_content);
A: Since version 4.9 visual composer added shortcode lazy loading. To use VC shortcodes on AJAX content use this function before printing the content WPBMap::addAllMappedShortcodes();. So below code may help you,
function get_page_content(){
$id = $_REQUEST['id'];
$page_data = get_page($id);
WPBMap::addAllMappedShortcodes();
echo apply_filters('the_content', $page_data->post_content);
wp_die();
}
add_action( 'wp_ajax_nopriv_get_page_content', 'get_page_content' );
add_action( 'wp_ajax_get_page_content', 'get_page_content' );
A: the_content is usually "executed" in the context of a loop when all relevant global data is set. You should try to mimic it by using code like
function get_page_content(){
global $post;
$id = $_REQUEST['id'];
$post = get_page($id);
setup_postdata($post);
echo apply_filters('the_content', $post->post_content);
//echo do_shortcode($page_data -> post_content);
wp_die();
}
add_action( 'wp_ajax_nopriv_get_page_content', 'get_page_content' );
add_action( 'wp_ajax_get_page_content', 'get_page_content' );
This may or may not be enough depending on the specific checks the plugin does, and you might need to construct the main query object probably by using query_posts (one of the very rare cases in which it is ok to use that function).
| wordpress | {
"language": "en",
"length": 269,
"provenance": "stackexchange_00019.jsonl.gz:465550",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/227003"
} | [
0.042572021484375,
-0.03851318359375,
0.0022296905517578125,
-0.0616455078125,
0.0115203857421875,
-0.026885986328125,
0.049072265625,
0.03814697265625,
0.02581787109375,
0.0208587646484375,
-0.045623779296875,
-0.012420654296875,
-0.037872314453125,
0.004009246826171875,
-0.054779052734375,
-0.0548095703125,
0.038818359375,
-0.01096343994140625,
0.0287628173828125,
0.00348663330078125,
-0.004199981689453125,
0.015838623046875,
0.0125732421875,
0.0362548828125,
-0.0015478134155273438,
-0.01491546630859375,
0.0416259765625,
0.001659393310546875,
-0.006633758544921875,
-0.00968170166015625,
0.0025920867919921875,
0.0015058517456054688,
0.046966552734375,
0.0092926025390625,
-0.064697265625,
0.031982421875,
-0.023468017578125,
0.0022029876708984375,
-0.026214599609375,
0.0272674560546875,
0.0210723876953125,
-0.0218963623046875,
0.057403564453125,
-0.0245819091796875,
0.01476287841796875,
0.0152130126953125,
0.02587890625,
-0.047454833984375,
-0.005847930908203125,
0.0379638671875,
0.042877197265625,
-0.00801849365234375,
0.030364990234375,
0.0191650390625,
-0.0123138427734375,
-0.0041656494140625,
-0.046417236328125,
0.01195526123046875,
0.031829833984375,
0.0295257568359375,
-0.00031113624572753906,
-0.0099334716796875,
-0.0088958740234375,
-0.05828857421875,
0.0033054351806640625,
0.0182647705078125,
0.00778961181640625,
-0.0011692047119140625,
-0.0316162109375,
0.0187225341796875,
0.0266876220703125,
-0.0308685302734375,
-0.023956298828125,
-0.0004189014434814453,
-0.016082763671875,
0.0148468017578125,
0.0032596588134765625,
-0.00621795654296875,
-0.00846099853515625,
0.0184783935546875,
0.004703521728515625,
0.0003688335418701172,
-0.023773193359375,
0.019317626953125,
-0.036468505859375,
0.0161895751953125,
-0.00911712646484375,
-0.01045989990234375,
-0.034271240234375,
-0.0018243789672851562,
-0.024200439453125,
-0.028564453125,
-0.00738525390625,
-0.01230621337890625,
-0.0198516845703125,
-0.018707275390625,
0.01035308837890625,
0.06195068359375,
-0.01107025146484375,
0.044403076171875,
-0.0176849365234375,
-0.04736328125,
0.09515380859375,
-0.07037353515625,
0.01308441162109375,
-0.015838623046875,
-0.0190582275390625,
0.033599853515625,
0.06573486328125,
0.03912353515625,
-0.00452423095703125,
0.01641845703125,
-0.0182037353515625,
0.00904083251953125,
-0.03533935546875,
-0.00548553466796875,
-0.054656982421875,
-0.031005859375,
-0.0081939697265625,
-0.02435302734375,
0.0121612548828125,
0.00379180908203125,
0.00913238525390625,
-0.01264190673828125,
0.0052032470703125,
-0.00484466552734375,
-0.040283203125,
-0.0102386474609375,
0.061859130859375,
0.00879669189453125,
-0.0277252197265625,
0.0007586479187011719,
0.020660400390625,
0.0170135498046875,
0.023895263671875,
-0.0187530517578125,
0.004169464111328125,
-0.0305328369140625,
0.0206146240234375,
0.0179595947265625,
-0.003849029541015625,
-0.0211944580078125,
0.0164947509765625,
-0.0024394989013671875,
0.01517486572265625,
-0.00215911865234375,
0.028350830078125,
0.02093505859375,
-0.00974273681640625,
-0.03228759765625,
0.0117645263671875,
0.03973388671875,
0.037750244140625,
0.00461578369140625,
0.0280914306640625,
0.010284423828125,
0.0751953125,
-0.031463623046875,
-0.05657958984375,
-0.034515380859375,
0.04583740234375,
-0.00939178466796875,
-0.037994384765625,
-0.00621795654296875,
-0.042022705078125,
0.00004088878631591797,
-0.01192474365234375,
-0.0038318634033203125,
0.01526641845703125,
0.1038818359375,
0.00507354736328125,
0.01085662841796875,
-0.0333251953125,
0.01216888427734375,
-0.01751708984375,
-0.028106689453125,
-0.0212860107421875,
0.03411865234375,
0.041412353515625,
-0.040191650390625,
-0.04510498046875,
-0.0479736328125,
0.075927734375,
-0.0130157470703125,
-0.08544921875,
0.09844970703125,
0.021514892578125,
0.12359619140625,
-0.0124053955078125,
0.00872039794921875,
0.020050048828125,
0.03375244140625,
-0.0178680419921875,
0.003353118896484375,
0.0132904052734375,
-0.048431396484375,
-0.037628173828125,
-0.03857421875,
-0.0211181640625,
0.040374755859375,
0.017181396484375,
-0.05059814453125,
0.057952880859375,
0.00844573974609375,
-0.01477813720703125,
-0.0008654594421386719,
-0.023101806640625,
-0.00160980224609375,
0.0104827880859375,
-0.0222930908203125,
0.00522613525390625,
-0.0305938720703125,
-0.02587890625,
0.0292205810546875,
-0.007640838623046875,
0.056915283203125,
-0.045074462890625,
0.013031005859375,
-0.0296783447265625,
0.04339599609375,
-0.0156402587890625,
-0.0286407470703125,
-0.02166748046875,
0.00731658935546875,
0.0165557861328125,
-0.0025634765625,
-0.002277374267578125,
-0.006473541259765625,
0.024658203125,
0.003505706787109375,
0.0228729248046875,
-0.004650115966796875,
0.037689208984375,
0.03765869140625,
-0.0406494140625,
-0.0224609375,
-0.04425048828125,
-0.049560546875,
-0.0058746337890625,
0.0611572265625,
0.055694580078125,
0.0330810546875,
-0.0079193115234375,
-0.04986572265625,
0.08758544921875,
-0.00942230224609375,
0.0297088623046875,
-0.0643310546875,
0.0049896240234375,
0.03912353515625,
0.0181427001953125,
-0.007549285888671875,
-0.0027408599853515625,
-0.0011959075927734375,
0.0072021484375,
0.0162811279296875,
-0.0206298828125,
0.0167236328125,
-0.0213775634765625,
-0.005077362060546875,
0.0005273818969726562,
-0.026702880859375,
-0.00710296630859375,
-0.027740478515625,
0.037811279296875,
0.006496429443359375,
0.04449462890625,
0.049346923828125,
-0.00722503662109375,
-0.01169586181640625,
-0.005718231201171875,
0.0162506103515625,
-0.00530242919921875,
0.060546875,
0.0284881591796875,
0.01557159423828125,
-0.03021240234375,
-0.0186004638671875,
0.0177764892578125,
0.03948974609375,
0.00418853759765625,
0.041290283203125,
0.0006117820739746094,
-0.01308441162109375,
0.0015392303466796875,
0.0206451416015625,
-0.00206756591796875,
-0.0006308555603027344,
0.0191192626953125,
0.001773834228515625,
-0.0053558349609375,
0.0965576171875,
0.00997161865234375,
0.056915283203125,
0.00388336181640625,
0.0214080810546875,
0.087890625,
-0.01120758056640625,
0.0291595458984375,
-0.046875,
0.0151214599609375,
0.0166015625,
-0.037811279296875,
-0.0047149658203125,
-0.0030059814453125,
0.01326751708984375,
0.01419830322265625,
-0.0090789794921875,
-0.01151275634765625,
-0.0109710693359375,
0.0040435791015625,
0.0272674560546875,
0.02557373046875,
0.07574462890625,
-0.032470703125,
-0.0611572265625,
-0.014251708984375,
0.0186004638671875,
-0.091064453125,
-0.0841064453125,
0.0210418701171875,
-0.0096435546875,
-0.0210113525390625,
0.00995635986328125,
-0.0101776123046875,
-0.0030612945556640625,
0.0092315673828125,
-0.022613525390625,
0.00724029541015625,
-0.01039886474609375,
-0.0709228515625,
-0.0218353271484375,
-0.07855224609375,
0.027496337890625,
-0.01514434814453125,
0.0251922607421875,
0.004180908203125,
-0.0294036865234375,
-0.0167999267578125,
-0.0203094482421875,
-0.01462554931640625,
0.06512451171875,
-0.0092010498046875,
-0.05413818359375,
-0.0002751350402832031,
-0.05047607421875,
-0.02447509765625,
0.004791259765625,
-0.0158538818359375,
-0.0259246826171875,
0.03570556640625,
-0.01568603515625,
-0.004001617431640625,
0.016693115234375,
0.02508544921875,
0.0655517578125,
0.00920867919921875,
0.018798828125,
0.06494140625,
-0.02301025390625,
-0.020843505859375,
0.013702392578125,
-0.03973388671875,
0.01122283935546875,
0.035552978515625,
-0.026702880859375,
0.0120391845703125,
-0.00968170166015625,
0.01116943359375,
0.0092315673828125,
0.040985107421875,
-0.01416778564453125,
0.01666259765625,
-0.00873565673828125,
-0.019744873046875,
-0.03350830078125,
0.0194854736328125,
-0.01091766357421875,
0.03350830078125,
0.01593017578125,
0.0225677490234375,
0.00943756103515625,
-0.00603485107421875,
0.007965087890625,
-0.037017822265625,
0.045928955078125,
-0.0187835693359375,
0.0182647705078125,
-0.053314208984375,
-0.038299560546875,
-0.028717041015625,
0.08343505859375,
0.0168609619140625,
-0.01324462890625,
-0.0202789306640625,
-0.00605010986328125,
-0.017333984375,
-0.0307159423828125,
-0.01392364501953125,
-0.0011501312255859375,
-0.084228515625,
0.0251007080078125,
0.00907135009765625,
-0.0197296142578125,
-0.00626373291015625,
-0.0214080810546875,
-0.037139892578125,
-0.0310211181640625,
0.050445556640625,
-0.0030422210693359375,
0.00882720947265625,
0.025909423828125,
-0.0236663818359375,
0.0196533203125,
-0.04656982421875,
0.0013265609741210938,
-0.07147216796875,
-0.0139312744140625,
-0.00738525390625,
0.05859375,
0.01207733154296875,
-0.06982421875,
-0.02996826171875,
0.02923583984375,
0.00495147705078125,
0.0280914306640625,
-0.0138702392578125,
0.004344940185546875,
0.0007376670837402344,
0.01654052734375,
0.01129150390625,
-0.008819580078125,
-0.00823211669921875,
0.0133819580078125,
-0.006404876708984375,
0.0262603759765625,
-0.0190582275390625,
-0.02532958984375,
0.019287109375,
-0.030364990234375,
-0.0645751953125,
-0.033294677734375,
-0.0323486328125,
-0.007503509521484375,
-0.03875732421875,
0.001506805419921875,
-0.038116455078125,
-0.0501708984375,
0.05279541015625,
0.0162353515625,
-0.012298583984375,
-0.006351470947265625,
0.0213470458984375,
0.006359100341796875,
-0.0496826171875,
-0.007099151611328125,
0.021942138671875,
0.049224853515625,
-0.00611114501953125,
0.0501708984375,
0.01380157470703125,
-0.043975830078125,
0.0989990234375,
0.004241943359375,
0.026702880859375,
-0.03411865234375,
0.0509033203125,
-0.0035381317138671875,
0.019287109375,
0.00458526611328125,
0.0131378173828125,
-0.0214080810546875,
0.044921875,
-0.03564453125,
0.00713348388671875,
0.002124786376953125,
0.0255889892578125,
-0.0469970703125,
0.036468505859375,
-0.027313232421875,
-0.0167083740234375,
-0.004344940185546875,
0.04498291015625,
0.070556640625,
0.0231781005859375,
0.01496124267578125,
0.022705078125,
0.048736572265625,
0.00852203369140625,
0.030731201171875,
0.01531219482421875,
0.002262115478515625,
0.044281005859375,
-0.00998687744140625,
0.0008401870727539062,
0.0210723876953125,
0.0077056884765625,
0.021759033203125,
-0.022674560546875,
-0.0379638671875,
-0.0309295654296875,
-0.0189361572265625,
0.0008907318115234375,
0.019073486328125,
0.01263427734375,
0.016265869140625,
0.047271728515625,
-0.021240234375,
-0.0172119140625,
0.050018310546875,
0.0132293701171875,
-0.04010009765625,
0.03118896484375,
-0.01325225830078125,
0.000308990478515625,
-0.022369384765625,
0.051177978515625,
-0.0261688232421875,
0.01515960693359375,
-0.0000407099723815918,
0.0247039794921875,
-0.010589599609375,
0.04833984375,
0.03204345703125,
-0.0440673828125,
0.0015745162963867188,
0.020111083984375,
-0.0200042724609375,
-0.0182952880859375,
-0.034698486328125,
0.0244598388671875,
0.03411865234375,
-0.040924072265625,
-0.00490570068359375,
0.0032901763916015625,
-0.0130615234375,
-0.0199432373046875,
-0.0018663406372070312,
-0.004207611083984375,
0.00908660888671875,
-0.035675048828125,
-0.035858154296875,
0.020477294921875,
0.041351318359375,
-0.02685546875,
0.015625,
-0.0177764892578125,
0.0125885009765625,
0.010589599609375,
-0.02789306640625,
0.01177978515625,
0.0018749237060546875,
0.030548095703125,
-0.01137542724609375,
-0.0245208740234375,
-0.045562744140625,
0.01629638671875,
-0.008758544921875,
0.0114898681640625,
0.04150390625,
-0.0298919677734375,
0.0556640625,
-0.035919189453125,
-0.0096282958984375,
-0.01448822021484375,
0.0121917724609375,
0.034637451171875,
0.0311126708984375,
-0.00011658668518066406,
-0.012542724609375,
-0.0116729736328125,
-0.00531768798828125,
0.0250091552734375,
-0.0195465087890625,
-0.0118408203125,
-0.0206298828125,
-0.01180267333984375,
0.01264190673828125,
-0.0309295654296875,
-0.0191497802734375,
-0.0362548828125,
0.0246734619140625,
0.0106964111328125,
0.04620361328125,
0.0179901123046875,
0.052581787109375,
-0.0023136138916015625,
0.061309814453125,
0.047882080078125,
0.036834716796875,
-0.0262451171875,
-0.0416259765625,
-0.00366973876953125,
-0.0148773193359375,
-0.035186767578125,
0.01192474365234375,
-0.0168304443359375,
0.0343017578125,
0.055908203125,
0.003986358642578125,
0.027130126953125,
-0.0142364501953125,
0.0006823539733886719,
-0.0206451416015625,
0.0151519775390625,
-0.010650634765625,
0.013824462890625,
0.0200653076171875,
-0.046875,
-0.012298583984375,
-0.011260986328125,
-0.0193328857421875,
0.056060791015625,
-0.02593994140625,
0.0270538330078125,
0.03387451171875,
0.00201416015625,
0.08282470703125,
0.08941650390625,
-0.03424072265625,
0.035125732421875,
0.047576904296875,
-0.01092529296875,
0.026397705078125,
0.04449462890625,
0.0330810546875,
-0.0545654296875,
0.08746337890625,
0.0223388671875,
-0.038330078125,
0.07025146484375,
-0.053558349609375,
0.01044464111328125,
0.0280914306640625,
0.0433349609375,
-0.0626220703125,
0.0025234222412109375,
0.0212554931640625,
-0.03948974609375,
-0.046112060546875,
0.0083465576171875,
-0.0166168212890625,
-0.047027587890625,
0.051300048828125,
0.0003726482391357422,
0.01251220703125,
0.024200439453125,
-0.00887298583984375,
-0.0143890380859375,
-0.00743865966796875,
0.01317596435546875,
0.0141448974609375,
-0.00870513916015625,
0.018951416015625,
-0.01096343994140625,
0.026123046875,
-0.01153564453125,
0.0192718505859375,
0.0158538818359375,
-0.042510986328125,
-0.0772705078125,
-0.009185791015625,
0.043060302734375,
-0.059295654296875,
0.0262603759765625,
0.0041961669921875,
0.0034198760986328125,
0.0596923828125,
-0.0246429443359375,
0.0377197265625,
0.019866943359375,
-0.000823974609375,
0.04638671875,
-0.000060677528381347656,
0.0096893310546875,
0.0419921875,
-0.054656982421875,
0.005146026611328125,
-0.01617431640625,
0.0239410400390625,
-0.018218994140625,
-0.047607421875,
0.07275390625,
-0.0587158203125,
0.00719451904296875,
0.0280609130859375,
0.0159149169921875,
-0.0263519287109375,
0.01439666748046875,
-0.00153350830078125,
0.00968170166015625,
-0.0023479461669921875,
0.0037059783935546875,
-0.03436279296875,
-0.0145416259765625,
-0.003955841064453125,
-0.0877685546875,
0.0904541015625,
0.0203857421875,
0.025482177734375,
-0.001857757568359375,
0.0260772705078125,
-0.051055908203125,
-0.0236968994140625,
-0.029052734375,
0.05426025390625,
-0.01531982421875,
0.060272216796875,
-0.02679443359375,
-0.0091400146484375,
0.0312347412109375,
0.04376220703125,
0.024810791015625,
0.002468109130859375,
-0.043609619140625,
-0.01111602783203125,
0.0172271728515625,
0.004180908203125,
-0.00940704345703125,
0.035614013671875,
-0.01081085205078125,
-0.0263214111328125,
0.032684326171875,
-0.0281982421875,
0.01444244384765625,
-0.031341552734375,
0.00897979736328125,
0.005344390869140625,
-0.00004595518112182617,
-0.00377655029296875,
0.021453857421875,
0.034088134765625,
-0.04425048828125,
0.0199737548828125,
0.03167724609375,
-0.006107330322265625,
-0.001956939697265625,
0.0218963623046875,
0.00803375244140625,
-0.036895751953125,
-0.0482177734375,
-0.0234222412109375,
0.01739501953125,
-0.00576019287109375,
0.049835205078125,
0.05035400390625,
0.02899169921875,
0.051116943359375,
-0.01222991943359375,
0.024169921875,
0.00726318359375,
-0.0165252685546875,
0.033111572265625,
0.023468017578125,
0.0126800537109375,
-0.0187835693359375,
0.0025424957275390625,
0.0178070068359375,
0.036895751953125,
-0.021453857421875,
-0.030792236328125,
0.01166534423828125,
-0.0015201568603515625,
-0.0157623291015625,
-0.00838470458984375,
-0.006061553955078125,
-0.01934814453125,
0.01470184326171875,
-0.019561767578125,
-0.01763916015625,
0.009429931640625,
0.037811279296875,
0.0013027191162109375,
0.0215911865234375,
-0.017425537109375,
-0.038787841796875,
-0.040618896484375,
0.019683837890625,
0.01432037353515625,
0.054931640625,
0.00519561767578125,
0.06201171875,
-0.04638671875,
-0.020721435546875,
0.00732421875,
0.00562286376953125,
-0.01129913330078125,
-0.003086090087890625,
-0.0272216796875,
-0.0307769775390625,
-0.0039520263671875,
0.039276123046875,
0.01134490966796875,
-0.034454345703125,
0.01389312744140625,
0.0234222412109375,
-0.0205535888671875,
-0.01447296142578125,
0.0188140869140625,
-0.0053558349609375,
-0.0078277587890625,
-0.00787353515625,
-0.03851318359375,
-0.0018329620361328125,
-0.0186614990234375,
-0.01517486572265625,
0.01430511474609375,
-0.0006799697875976562,
-0.060760498046875,
0.093994140625,
-0.030120849609375,
-0.0204620361328125,
0.0234375,
-0.02587890625,
0.08642578125,
-0.03424072265625,
-0.0309906005859375,
-0.0015764236450195312,
-0.014892578125,
-0.056793212890625,
0.0192108154296875,
0.048858642578125,
-0.00682830810546875,
0.0028896331787109375,
-0.01654052734375,
-0.052978515625,
0.01146697998046875,
0.051116943359375,
-0.00504302978515625,
0.007213592529296875,
0.0036563873291015625,
-0.03973388671875,
-0.0128326416015625,
0.01513671875,
-0.03448486328125,
0.0261688232421875,
0.030487060546875,
0.09344482421875,
-0.026031494140625,
0.0236968994140625,
-0.0236358642578125,
-0.0165863037109375,
-0.0007596015930175781,
-0.0274658203125,
0.0310821533203125,
0.0005936622619628906,
-0.010894775390625,
-0.020477294921875,
0.007305145263671875,
0.0243072509765625,
0.0350341796875,
-0.0084075927734375,
0.0182647705078125,
-0.01485443115234375,
0.016204833984375,
-0.0095062255859375,
0.013153076171875,
-0.0284423828125,
-0.042266845703125,
-0.027923583984375,
-0.004276275634765625,
0.000713348388671875,
0.0297393798828125,
0.0275115966796875,
-0.0168304443359375,
0.04766845703125,
-0.038299560546875,
0.045318603515625,
-0.003753662109375,
0.08038330078125,
0.037139892578125,
0.00508880615234375,
-0.00392913818359375,
0.00847625732421875,
-0.011474609375,
0.0301361083984375,
0.00785064697265625,
-0.017242431640625,
0.028289794921875,
-0.06268310546875,
0.0169830322265625,
0.032318115234375,
0.035614013671875,
-0.0223236083984375,
0.003993988037109375,
0.0458984375,
-0.0222015380859375,
0.012542724609375,
0.016326904296875,
0.0012836456298828125,
-0.0008821487426757812,
-0.0115814208984375,
0.0011796951293945312,
0.01399993896484375,
-0.0158233642578125,
-0.0175628662109375,
-0.0081939697265625,
0.0284271240234375,
0.0201416015625,
-0.052001953125,
0.027374267578125,
0.0038700103759765625,
-0.0162506103515625,
0.0258026123046875,
0.0538330078125,
-0.03277587890625,
-0.0311279296875,
-0.039764404296875,
0.0010271072387695312,
-0.043670654296875,
0.031951904296875,
-0.00743865966796875,
-0.00955963134765625,
-0.0130157470703125,
0.011871337890625,
-0.0227508544921875,
0.0172882080078125,
-0.03271484375,
0.07122802734375,
-0.000240325927734375,
-0.01227569580078125,
0.0498046875,
-0.024810791015625,
-0.0139007568359375,
-0.06439208984375,
-0.00848388671875,
-0.057464599609375,
0.00366973876953125,
0.02838134765625,
-0.026702880859375,
-0.00653839111328125,
-0.037200927734375,
-0.06585693359375,
0.020233154296875,
0.0160064697265625,
-0.03289794921875,
-0.04522705078125,
0.0012388229370117188,
0.0295867919921875,
-0.04766845703125,
-0.0297393798828125,
-0.03814697265625,
-0.0545654296875,
0.006206512451171875,
-0.0158233642578125,
0.039703369140625,
-0.00493621826171875,
-0.0181732177734375,
-0.0269622802734375,
-0.00336456298828125,
-0.01491546630859375,
-0.01519012451171875,
0.0281219482421875,
-0.04296875,
0.05059814453125,
0.032073974609375,
-0.04217529296875,
-0.029083251953125,
0.01021575927734375,
-0.01861572265625,
0.0243682861328125,
-0.06317138671875,
0.00579833984375,
0.0006871223449707031,
0.04791259765625,
-0.023712158203125,
0.0048828125,
-0.032470703125,
0.0229644775390625,
0.01190185546875,
0.01287078857421875,
0.002208709716796875,
-0.011322021484375,
-0.0179443359375,
-0.035186767578125,
-0.030914306640625,
-0.00737762451171875,
0.0021877288818359375,
-0.0224151611328125,
-0.0240478515625,
-0.0015077590942382812,
-0.007724761962890625,
0.00778961181640625,
-0.0158233642578125,
-0.00897216796875,
0.0028553009033203125,
-0.004932403564453125,
0.003692626953125,
0.0113067626953125,
0.007228851318359375,
-0.00518798828125,
0.0550537109375,
-0.00899505615234375,
0.0321044921875,
-0.0248260498046875,
-0.0005297660827636719,
0.016571044921875,
0.027099609375,
-0.0139007568359375,
0.005321502685546875,
0.005313873291015625,
0.0180511474609375,
-0.01451873779296875,
0.00708770751953125,
0.031341552734375,
-0.01143646240234375,
-0.0198822021484375,
0.024993896484375,
-0.03955078125,
0.09124755859375,
-0.0070648193359375,
0.020538330078125,
0.00757598876953125,
0.0033550262451171875,
0.0643310546875,
-0.023223876953125,
0.01146697998046875,
0.0360107421875,
0.023834228515625,
0.0004405975341796875,
-0.01253509521484375,
-0.04827880859375,
0.0297393798828125,
-0.01218414306640625
]
|
758b20520474a1f13c8635cd9d1ce60ca0e2ca56 | Wordpress Stackexchange
Q: Can I strip HTML tags in the "Compare Revisions" screen? I am building a CMS for content editors that have zero tech savvy. They currently use a system called NewsCred that allows them to compare revisions much like how WordPress does when you visit /wp-admin/revision.php?revision=[post_id] however their tool doesn't show shortcodes or HTML tags. Some of them are saying it's a deal breaker because HTML confuses them, so I'm trying to figure out how to hook into this to strip HTML and shortcodes from the revision comparison.
Is this possible? I've looked at wp-admin/revisions.php and the wp_print_revision_templates() function but all it has is some template code called {{{ field.diff }}} and don't know where to look from there.
And before you say it's ridiculous for content editors to be confused by HTML in 2016, I agree and have tried fighting that battle.
| Q: Can I strip HTML tags in the "Compare Revisions" screen? I am building a CMS for content editors that have zero tech savvy. They currently use a system called NewsCred that allows them to compare revisions much like how WordPress does when you visit /wp-admin/revision.php?revision=[post_id] however their tool doesn't show shortcodes or HTML tags. Some of them are saying it's a deal breaker because HTML confuses them, so I'm trying to figure out how to hook into this to strip HTML and shortcodes from the revision comparison.
Is this possible? I've looked at wp-admin/revisions.php and the wp_print_revision_templates() function but all it has is some template code called {{{ field.diff }}} and don't know where to look from there.
And before you say it's ridiculous for content editors to be confused by HTML in 2016, I agree and have tried fighting that battle.
| wordpress | {
"language": "en",
"length": 143,
"provenance": "stackexchange_00019.jsonl.gz:465570",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/227072"
} | [
-0.003841400146484375,
0.006816864013671875,
-0.038543701171875,
-0.0041351318359375,
0.019439697265625,
-0.0257568359375,
0.02349853515625,
-0.012359619140625,
-0.000843048095703125,
0.041656494140625,
-0.0288543701171875,
-0.01403045654296875,
-0.0008077621459960938,
-0.004486083984375,
-0.051055908203125,
-0.049774169921875,
0.0191802978515625,
0.0110321044921875,
0.0147552490234375,
0.00853729248046875,
-0.018890380859375,
0.02362060546875,
-0.00995635986328125,
-0.04193115234375,
0.00316619873046875,
-0.0218658447265625,
0.07989501953125,
-0.003963470458984375,
-0.0078277587890625,
-0.0243682861328125,
0.0032787322998046875,
-0.00673675537109375,
0.0699462890625,
0.0303802490234375,
-0.09783935546875,
0.053131103515625,
-0.0295257568359375,
0.0190582275390625,
-0.0188140869140625,
0.0092620849609375,
0.007244110107421875,
-0.020721435546875,
0.029205322265625,
-0.03173828125,
-0.004604339599609375,
0.02056884765625,
-0.0004897117614746094,
-0.041015625,
-0.005062103271484375,
0.0283660888671875,
0.011871337890625,
-0.012969970703125,
0.0258026123046875,
-0.0161590576171875,
-0.00848388671875,
-0.01084136962890625,
-0.0234832763671875,
0.0172271728515625,
0.0240325927734375,
0.0184478759765625,
-0.000949859619140625,
0.014801025390625,
-0.0213775634765625,
-0.024658203125,
-0.035614013671875,
-0.00797271728515625,
0.091064453125,
0.005306243896484375,
-0.018341064453125,
-0.04791259765625,
0.02020263671875,
0.0268402099609375,
0.031402587890625,
-0.04864501953125,
0.0160369873046875,
0.038299560546875,
-0.01277923583984375,
0.01073455810546875,
0.012054443359375,
-0.01313018798828125,
0.01068115234375,
-0.0253143310546875,
-0.0245819091796875,
-0.011077880859375,
0.00954437255859375,
0.02374267578125,
-0.00814056396484375,
-0.005603790283203125,
-0.0264739990234375,
-0.022491455078125,
-0.0216064453125,
0.01995849609375,
-0.06683349609375,
0.0007390975952148438,
-0.0162811279296875,
-0.0195465087890625,
0.01763916015625,
0.04046630859375,
-0.0043792724609375,
0.000759124755859375,
-0.0147705078125,
-0.0269012451171875,
-0.0093231201171875,
-0.0333251953125,
0.01306915283203125,
0.019866943359375,
-0.012786865234375,
0.01105499267578125,
0.06732177734375,
0.032745361328125,
0.0005278587341308594,
0.040985107421875,
-0.0290985107421875,
-0.039794921875,
-0.0145111083984375,
0.059112548828125,
-0.00528717041015625,
-0.007343292236328125,
0.00982666015625,
-0.005878448486328125,
0.0073089599609375,
0.03497314453125,
0.007335662841796875,
-0.005481719970703125,
-0.0384521484375,
-0.0161895751953125,
-0.0044097900390625,
-0.046112060546875,
-0.004436492919921875,
0.004180908203125,
-0.01535797119140625,
0.01953125,
0.00899505615234375,
0.0139312744140625,
-0.01314544677734375,
-0.006160736083984375,
0.03399658203125,
-0.0274505615234375,
-0.0183868408203125,
0.03839111328125,
-0.06121826171875,
0.0024623870849609375,
0.0391845703125,
-0.0872802734375,
-0.01282501220703125,
0.035369873046875,
0.0260467529296875,
0.0130767822265625,
-0.03497314453125,
-0.08038330078125,
0.0234832763671875,
-0.01531982421875,
0.052978515625,
-0.031402587890625,
0.019195556640625,
-0.056976318359375,
0.0160369873046875,
-0.0435791015625,
0.0013408660888671875,
-0.026885986328125,
-0.0026569366455078125,
-0.01253509521484375,
0.046417236328125,
-0.0240631103515625,
-0.0477294921875,
0.022491455078125,
-0.07049560546875,
-0.01136016845703125,
0.03326416015625,
0.0374755859375,
0.0235595703125,
-0.01192474365234375,
0.0257720947265625,
0.03558349609375,
-0.00048065185546875,
0.028717041015625,
-0.006381988525390625,
-0.0216522216796875,
0.00556182861328125,
0.033660888671875,
-0.0021953582763671875,
-0.0214385986328125,
0.005886077880859375,
0.01287841796875,
-0.071533203125,
0.041107177734375,
-0.01287078857421875,
0.0679931640625,
0.0482177734375,
0.006145477294921875,
0.032012939453125,
-0.0266265869140625,
0.0140228271484375,
-0.0097198486328125,
0.0297698974609375,
-0.036834716796875,
-0.05023193359375,
-0.0295257568359375,
-0.0098419189453125,
0.0018014907836914062,
-0.0017595291137695312,
-0.0207366943359375,
-0.00024890899658203125,
-0.027313232421875,
-0.049285888671875,
-0.018035888671875,
-0.0159912109375,
0.0263214111328125,
-0.014190673828125,
0.01983642578125,
0.016082763671875,
0.000225067138671875,
-0.047149658203125,
0.0631103515625,
0.030303955078125,
0.019805908203125,
-0.0277862548828125,
0.0308837890625,
0.015777587890625,
-0.00438690185546875,
0.0333251953125,
0.0019016265869140625,
0.037139892578125,
0.009674072265625,
0.01255035400390625,
-0.0104217529296875,
-0.01837158203125,
-0.004367828369140625,
-0.00994873046875,
0.02398681640625,
-0.027496337890625,
0.0140228271484375,
0.0229644775390625,
0.057159423828125,
-0.0024700164794921875,
-0.00836944580078125,
-0.01087188720703125,
-0.046966552734375,
0.012115478515625,
0.03887939453125,
0.044708251953125,
0.0423583984375,
-0.0290069580078125,
-0.048736572265625,
0.06903076171875,
-0.010101318359375,
0.018218994140625,
-0.052764892578125,
-0.00855255126953125,
0.03460693359375,
0.019805908203125,
0.001415252685546875,
0.00423431396484375,
-0.0292205810546875,
0.00078582763671875,
0.016387939453125,
0.0131378173828125,
0.044525146484375,
-0.017608642578125,
0.00008183717727661133,
0.00926971435546875,
-0.0235748291015625,
-0.0240478515625,
-0.0128631591796875,
0.07598876953125,
0.01265716552734375,
0.08111572265625,
0.046661376953125,
-0.023101806640625,
0.015869140625,
-0.0015735626220703125,
0.0214691162109375,
0.00988006591796875,
0.055328369140625,
0.005634307861328125,
0.03741455078125,
-0.04071044921875,
-0.0057525634765625,
0.007022857666015625,
0.057464599609375,
-0.0019178390502929688,
0.034149169921875,
0.0031490325927734375,
-0.01074981689453125,
-0.001811981201171875,
-0.01549530029296875,
-0.0122528076171875,
-0.009429931640625,
0.0036983489990234375,
0.0013608932495117188,
0.02227783203125,
0.00177764892578125,
-0.0170440673828125,
0.0030384063720703125,
0.0243682861328125,
-0.018218994140625,
0.02532958984375,
-0.0367431640625,
0.058624267578125,
-0.039154052734375,
0.04241943359375,
0.060394287109375,
-0.028289794921875,
0.0261993408203125,
0.0062408447265625,
-0.00868988037109375,
0.0156707763671875,
-0.0018968582153320312,
-0.020172119140625,
0.0218505859375,
-0.0845947265625,
-0.021636962890625,
0.02081298828125,
-0.03179931640625,
0.025787353515625,
-0.0054931640625,
-0.017120361328125,
-0.01025390625,
-0.08184814453125,
-0.045166015625,
-0.03131103515625,
-0.0289764404296875,
-0.01311492919921875,
0.046661376953125,
-0.01068878173828125,
-0.0141448974609375,
0.06414794921875,
0.0141143798828125,
0.038482666015625,
-0.00775146484375,
-0.08355712890625,
-0.038787841796875,
-0.1136474609375,
0.002655029296875,
-0.0123138427734375,
0.0374755859375,
0.010894775390625,
0.01361846923828125,
0.00598907470703125,
-0.0526123046875,
0.004657745361328125,
-0.000644683837890625,
0.0003657341003417969,
0.00498199462890625,
0.0182952880859375,
-0.0224761962890625,
-0.001384735107421875,
0.0214996337890625,
-0.0013227462768554688,
0.01457977294921875,
0.0005640983581542969,
-0.031219482421875,
-0.0130157470703125,
-0.00537109375,
0.0232086181640625,
-0.0267333984375,
-0.006717681884765625,
0.01528167724609375,
0.0271759033203125,
-0.0364990234375,
-0.045074462890625,
0.00336456298828125,
-0.040283203125,
0.006305694580078125,
-0.01096343994140625,
0.007457733154296875,
0.00989532470703125,
0.03289794921875,
0.047882080078125,
0.0287933349609375,
0.062286376953125,
0.01361846923828125,
-0.03363037109375,
-0.021514892578125,
0.01094818115234375,
-0.06585693359375,
0.021240234375,
-0.0260009765625,
0.0121002197265625,
-0.00033164024353027344,
0.0029163360595703125,
-0.01332855224609375,
0.006755828857421875,
-0.01006317138671875,
-0.003963470458984375,
0.038787841796875,
-0.01317596435546875,
0.035980224609375,
-0.055999755859375,
-0.026214599609375,
-0.057586669921875,
0.048309326171875,
-0.0233917236328125,
-0.02655029296875,
-0.016632080078125,
0.007183074951171875,
-0.00800323486328125,
-0.0182952880859375,
-0.0048828125,
-0.01132965087890625,
-0.093505859375,
0.0574951171875,
0.001049041748046875,
-0.0080108642578125,
-0.04364013671875,
-0.035400390625,
-0.05908203125,
-0.05413818359375,
0.041778564453125,
-0.0017690658569335938,
0.014495849609375,
-0.01497650146484375,
0.00725555419921875,
-0.0364990234375,
-0.03619384765625,
0.003688812255859375,
-0.054656982421875,
-0.001277923583984375,
-0.08038330078125,
0.040435791015625,
0.043792724609375,
-0.01047515869140625,
-0.037353515625,
0.00868988037109375,
-0.0025634765625,
0.01122283935546875,
0.02264404296875,
0.0384521484375,
-0.0257415771484375,
-0.0163421630859375,
0.0165252685546875,
-0.048431396484375,
-0.019500732421875,
-0.024200439453125,
0.0250091552734375,
0.00766754150390625,
-0.031524658203125,
-0.046478271484375,
-0.03436279296875,
-0.0037288665771484375,
-0.0438232421875,
-0.025482177734375,
-0.0065765380859375,
0.01009368896484375,
-0.005397796630859375,
-0.01403045654296875,
-0.01317596435546875,
-0.049102783203125,
0.024169921875,
0.03875732421875,
-0.027374267578125,
0.010589599609375,
-0.0039825439453125,
0.020477294921875,
-0.046905517578125,
-0.0321044921875,
0.01641845703125,
0.04241943359375,
-0.023834228515625,
0.051116943359375,
0.00687408447265625,
-0.039093017578125,
0.114990234375,
-0.00766754150390625,
0.006633758544921875,
0.006839752197265625,
0.004390716552734375,
0.018768310546875,
0.019989013671875,
-0.0227508544921875,
0.0172271728515625,
0.00936126708984375,
0.028717041015625,
0.03240966796875,
-0.017486572265625,
0.029022216796875,
-0.00017905235290527344,
0.012908935546875,
-0.02117919921875,
0.01312255859375,
-0.0107269287109375,
-0.016021728515625,
0.010498046875,
0.050048828125,
0.04888916015625,
-0.002971649169921875,
0.0229949951171875,
0.045867919921875,
0.0241546630859375,
-0.00933837890625,
-0.025299072265625,
-0.05010986328125,
0.048187255859375,
-0.040130615234375,
-0.0017499923706054688,
0.03759765625,
-0.0137176513671875,
0.0041046142578125,
0.027191162109375,
-0.06640625,
0.02728271484375,
0.00244903564453125,
0.0261688232421875,
-0.01959228515625,
0.023590087890625,
0.015045166015625,
-0.0236053466796875,
0.0050201416015625,
-0.01451873779296875,
0.00368499755859375,
-0.0283355712890625,
-0.0195770263671875,
-0.0217437744140625,
-0.0134429931640625,
-0.0282135009765625,
0.03875732421875,
-0.0521240234375,
-0.0290069580078125,
-0.01039886474609375,
-0.0023326873779296875,
0.031402587890625,
0.01171112060546875,
0.0170440673828125,
0.0267486572265625,
0.003437042236328125,
-0.002910614013671875,
-0.0298614501953125,
-0.022216796875,
-0.01511383056640625,
-0.049560546875,
0.02508544921875,
0.0198822021484375,
-0.01409149169921875,
0.021728515625,
0.004077911376953125,
0.01010894775390625,
0.0072784423828125,
0.015289306640625,
-0.00374603271484375,
0.00533294677734375,
-0.02020263671875,
-0.00452423095703125,
0.03326416015625,
0.0237579345703125,
-0.0144805908203125,
-0.0024166107177734375,
-0.037750244140625,
-0.01354217529296875,
0.053955078125,
-0.057281494140625,
0.008270263671875,
-0.0004906654357910156,
-0.033782958984375,
-0.0163726806640625,
-0.007328033447265625,
0.0030364990234375,
-0.0092620849609375,
-0.00843048095703125,
-0.011016845703125,
0.049224853515625,
-0.005275726318359375,
0.01253509521484375,
-0.026763916015625,
-0.0015773773193359375,
-0.013214111328125,
-0.0127105712890625,
0.071533203125,
0.025604248046875,
-0.05364990234375,
-0.013702392578125,
-0.0312042236328125,
-0.01434326171875,
-0.044769287109375,
-0.0154876708984375,
-0.0309600830078125,
0.012237548828125,
-0.00759124755859375,
0.0269622802734375,
-0.015960693359375,
-0.006870269775390625,
0.0013246536254882812,
-0.00519561767578125,
-0.01309967041015625,
0.0247955322265625,
-0.00965118408203125,
0.0005140304565429688,
0.01447296142578125,
0.033172607421875,
-0.010894775390625,
-0.01451873779296875,
0.002147674560546875,
-0.0214080810546875,
0.02105712890625,
-0.046905517578125,
-0.04656982421875,
-0.004291534423828125,
-0.0234832763671875,
0.01800537109375,
-0.00661468505859375,
0.004978179931640625,
0.04119873046875,
-0.01995849609375,
0.01203155517578125,
-0.020721435546875,
0.0139617919921875,
-0.046966552734375,
0.01294708251953125,
0.00792694091796875,
-0.0137481689453125,
-0.0218658447265625,
-0.011138916015625,
-0.0005698204040527344,
0.0208282470703125,
0.007537841796875,
-0.0027942657470703125,
-0.031463623046875,
0.038909912109375,
-0.014862060546875,
0.0465087890625,
-0.0281829833984375,
0.0289459228515625,
0.04083251953125,
0.006183624267578125,
0.025054931640625,
0.0240936279296875,
-0.0166015625,
-0.004199981689453125,
0.0457763671875,
0.015869140625,
-0.002655029296875,
0.0338134765625,
-0.019439697265625,
0.01335906982421875,
0.05615234375,
0.062408447265625,
-0.0794677734375,
0.0132598876953125,
0.0361328125,
-0.004978179931640625,
-0.0009198188781738281,
0.006084442138671875,
-0.0282745361328125,
-0.06109619140625,
-0.0002429485321044922,
-0.01284027099609375,
-0.0246124267578125,
-0.0173492431640625,
0.00016319751739501953,
-0.0208282470703125,
-0.01812744140625,
0.07415771484375,
0.033111572265625,
0.0253753662109375,
-0.0005784034729003906,
-0.035980224609375,
0.0243072509765625,
-0.039093017578125,
0.029052734375,
0.0182647705078125,
-0.0509033203125,
-0.059356689453125,
0.0232391357421875,
0.054290771484375,
-0.048095703125,
-0.0121307373046875,
-0.00957489013671875,
-0.0088348388671875,
0.041656494140625,
-0.041778564453125,
0.0141448974609375,
0.0142669677734375,
-0.0171051025390625,
-0.006816864013671875,
-0.0186614990234375,
-0.011444091796875,
-0.041778564453125,
0.02313232421875,
0.0034694671630859375,
-0.01094818115234375,
-0.043701171875,
0.00691986083984375,
0.023834228515625,
0.048370361328125,
-0.0200347900390625,
-0.0238037109375,
0.031829833984375,
0.015777587890625,
-0.026336669921875,
-0.01113128662109375,
-0.047027587890625,
-0.049163818359375,
-0.04193115234375,
-0.037933349609375,
-0.08795166015625,
0.0241851806640625,
-0.038726806640625,
-0.102783203125,
0.09814453125,
0.03814697265625,
0.05706787109375,
0.0233612060546875,
0.02197265625,
-0.062286376953125,
-0.0264434814453125,
-0.01302337646484375,
0.05267333984375,
0.0232086181640625,
0.0275421142578125,
-0.03363037109375,
-0.0257568359375,
0.0247955322265625,
0.0645751953125,
-0.006359100341796875,
0.005779266357421875,
-0.023956298828125,
-0.0045623779296875,
-0.011993408203125,
-0.03790283203125,
-0.0367431640625,
0.07049560546875,
0.0012807846069335938,
0.01132965087890625,
0.029510498046875,
-0.028839111328125,
0.03143310546875,
-0.028900146484375,
-0.006114959716796875,
0.0070343017578125,
0.00185394287109375,
-0.005199432373046875,
0.020050048828125,
0.0081329345703125,
-0.052734375,
0.0202484130859375,
0.0228424072265625,
0.0014810562133789062,
-0.0146942138671875,
0.01494598388671875,
0.032684326171875,
-0.05682373046875,
-0.083984375,
-0.01641845703125,
0.0251312255859375,
0.0305023193359375,
0.052734375,
0.04217529296875,
0.0172882080078125,
0.060699462890625,
0.01462554931640625,
0.04058837890625,
0.0106048583984375,
0.0206756591796875,
0.0007905960083007812,
-0.0099639892578125,
0.0081024169921875,
-0.033966064453125,
0.0082855224609375,
0.03961181640625,
0.017059326171875,
-0.01311492919921875,
-0.003269195556640625,
0.008544921875,
0.01503753662109375,
-0.007633209228515625,
-0.0190887451171875,
0.001354217529296875,
-0.0226593017578125,
0.0016918182373046875,
0.0279998779296875,
-0.04803466796875,
-0.0098724365234375,
0.0012760162353515625,
0.0229339599609375,
0.022918701171875,
0.039886474609375,
-0.04901123046875,
-0.052001953125,
0.022430419921875,
-0.0024547576904296875,
0.03265380859375,
0.051361083984375,
0.041412353515625,
0.02386474609375,
-0.026336669921875,
-0.018646240234375,
0.05859375,
-0.0362548828125,
0.0206451416015625,
-0.061126708984375,
-0.054412841796875,
-0.0166778564453125,
0.047821044921875,
0.0113983154296875,
-0.049407958984375,
0.0200958251953125,
0.00667572021484375,
-0.06744384765625,
-0.0194244384765625,
0.01036834716796875,
-0.0217132568359375,
-0.0005178451538085938,
-0.026885986328125,
0.01042938232421875,
0.01194000244140625,
-0.0017442703247070312,
-0.0102081298828125,
0.016937255859375,
0.033050537109375,
-0.0357666015625,
0.0665283203125,
-0.0175323486328125,
0.0097503662109375,
-0.01331329345703125,
-0.0330810546875,
-0.01210784912109375,
-0.01360321044921875,
-0.01490020751953125,
-0.000484466552734375,
0.030731201171875,
-0.0452880859375,
-0.00667572021484375,
0.0322265625,
-0.042877197265625,
0.055145263671875,
0.04083251953125,
-0.038665771484375,
-0.0286712646484375,
0.0289154052734375,
0.036956787109375,
0.0206451416015625,
-0.0142822265625,
0.02886962890625,
-0.0206146240234375,
-0.006282806396484375,
-0.011962890625,
0.036956787109375,
0.00533294677734375,
0.0924072265625,
-0.033660888671875,
0.007537841796875,
-0.0024929046630859375,
0.02227783203125,
-0.05645751953125,
-0.0433349609375,
0.07806396484375,
-0.057098388671875,
-0.0152435302734375,
0.007808685302734375,
-0.00024771690368652344,
0.017333984375,
0.0280914306640625,
-0.0301361083984375,
0.01136016845703125,
-0.045654296875,
0.01202392578125,
-0.006816864013671875,
0.01092529296875,
-0.012969970703125,
-0.044708251953125,
0.0311126708984375,
0.0665283203125,
-0.0439453125,
0.0011873245239257812,
-0.020965576171875,
0.0034046173095703125,
0.05059814453125,
-0.04180908203125,
0.016357421875,
-0.00548553466796875,
0.0169677734375,
0.037628173828125,
0.06036376953125,
0.057464599609375,
0.0556640625,
-0.017364501953125,
0.07635498046875,
0.010772705078125,
-0.0257110595703125,
0.05841064453125,
-0.060821533203125,
-0.023590087890625,
0.04510498046875,
0.0472412109375,
0.00734710693359375,
0.031463623046875,
-0.0017337799072265625,
-0.017333984375,
0.00592803955078125,
-0.00201416015625,
-0.023468017578125,
-0.0248565673828125,
0.001514434814453125,
0.005352020263671875,
-0.0117340087890625,
-0.038360595703125,
-0.033477783203125,
-0.01102447509765625,
-0.0021915435791015625,
0.00489044189453125,
-0.036773681640625,
0.01230621337890625,
0.0008568763732910156,
0.0100860595703125,
-0.026092529296875,
0.027923583984375,
-0.04486083984375,
-0.05718994140625,
-0.040313720703125,
-0.042083740234375,
-0.052032470703125,
0.0726318359375,
-0.0100860595703125,
0.0006632804870605469,
0.00033211708068847656,
-0.0164794921875,
-0.0292816162109375,
-0.00859832763671875,
0.0117034912109375,
0.0305633544921875,
-0.0021152496337890625,
-0.01568603515625,
-0.00545501708984375,
0.02178955078125,
-0.01125335693359375,
-0.0413818359375,
-0.00565338134765625,
-0.005672454833984375,
-0.005451202392578125,
-0.01071929931640625,
-0.0072784423828125,
0.0086669921875,
-0.037109375,
-0.0789794921875,
0.035003662109375,
0.0006570816040039062,
-0.028778076171875,
0.0028972625732421875,
0.007404327392578125,
-0.01422882080078125,
0.0260009765625,
0.00772857666015625,
0.00115966796875,
-0.002872467041015625,
-0.0019969940185546875,
0.01561737060546875,
0.00833892822265625,
0.0114593505859375,
0.04083251953125,
-0.05804443359375,
0.0219573974609375,
-0.0213623046875,
-0.02587890625,
-0.01442718505859375,
0.01230621337890625,
-0.023773193359375,
0.00811767578125,
-0.042633056640625,
-0.10791015625,
-0.0147552490234375,
0.01611328125,
0.03277587890625,
-0.0214080810546875,
-0.08184814453125,
-0.049591064453125,
0.044769287109375,
0.052154541015625,
0.01983642578125,
-0.00637054443359375,
0.0184783935546875,
-0.0014142990112304688,
-0.028839111328125,
-0.0112152099609375,
0.016326904296875,
-0.0333251953125,
-0.00701904296875,
-0.0075531005859375,
-0.0211639404296875,
0.0187225341796875,
-0.0300750732421875,
-0.038909912109375,
0.0026645660400390625,
-0.02374267578125,
0.0162353515625,
-0.07073974609375,
0.0391845703125,
0.0196380615234375,
-0.0263214111328125,
-0.0009403228759765625,
-0.0180206298828125,
0.0007233619689941406,
0.0249481201171875,
-0.035888671875,
0.0098419189453125,
-0.00397491455078125,
-0.0164031982421875,
0.0131683349609375,
0.01508331298828125,
0.0016279220581054688,
-0.03271484375,
-0.021270751953125,
0.0037708282470703125,
0.009857177734375,
-0.0023326873779296875,
-0.01715087890625,
-0.02117919921875,
-0.0291748046875,
-0.0263671875,
0.05706787109375,
-0.02606201171875,
0.0200653076171875,
-0.0099639892578125,
0.00559234619140625,
-0.04498291015625,
0.0217437744140625,
0.006603240966796875,
-0.020294189453125,
0.0170440673828125,
0.0107269287109375,
0.07275390625,
-0.0491943359375,
0.06597900390625,
-0.01215362548828125,
0.04742431640625,
0.03399658203125
]
|
5293ee9a696a32b26e7262ca7a843c52444fd0c1 | Wordpress Stackexchange
Q: Render Selected Categories in Admin Edit Post Screen differently Selected Categories for a post in the admin screen are rendered by:
// Put checked cats on top
$output .= call_user_func_array( array( $walker, 'walk' ),
array( $checked_categories, 0, $args ) );
in \wp-admin\includes\template.php (around line 163)
I would like to, for the selected one on top, instead of displaying category "jkl", render the full hierarchical path behind it, like so: "jkl (abc\def\ghi\jkl)", how ? (thinking of either custom taxonomy or custom box (hide original) or jquery, find the div, replace the div with ajax call).
| Q: Render Selected Categories in Admin Edit Post Screen differently Selected Categories for a post in the admin screen are rendered by:
// Put checked cats on top
$output .= call_user_func_array( array( $walker, 'walk' ),
array( $checked_categories, 0, $args ) );
in \wp-admin\includes\template.php (around line 163)
I would like to, for the selected one on top, instead of displaying category "jkl", render the full hierarchical path behind it, like so: "jkl (abc\def\ghi\jkl)", how ? (thinking of either custom taxonomy or custom box (hide original) or jquery, find the div, replace the div with ajax call).
| wordpress | {
"language": "en",
"length": 95,
"provenance": "stackexchange_00019.jsonl.gz:465573",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/227080"
} | [
0.0682373046875,
-0.012237548828125,
-0.0084381103515625,
-0.08941650390625,
0.01532745361328125,
-0.033355712890625,
0.0022029876708984375,
0.01049041748046875,
-0.01273345947265625,
0.0000438690185546875,
0.0112762451171875,
-0.033355712890625,
-0.01959228515625,
-0.0576171875,
-0.0265960693359375,
-0.048980712890625,
-0.002079010009765625,
0.0165863037109375,
0.0225830078125,
-0.0022525787353515625,
0.00037550926208496094,
-0.004505157470703125,
-0.01500701904296875,
0.0109405517578125,
0.00960540771484375,
-0.000682830810546875,
0.00833892822265625,
-0.030914306640625,
-0.0134124755859375,
-0.0269317626953125,
-0.0005698204040527344,
0.03790283203125,
0.022552490234375,
-0.0274200439453125,
0.017547607421875,
0.001850128173828125,
0.0138702392578125,
-0.006549835205078125,
0.005474090576171875,
0.006008148193359375,
0.027557373046875,
-0.015777587890625,
0.0064697265625,
0.00955963134765625,
-0.0036869049072265625,
-0.0177001953125,
0.007007598876953125,
-0.046112060546875,
0.005161285400390625,
-0.0428466796875,
0.0213470458984375,
-0.01397705078125,
0.031280517578125,
-0.0592041015625,
-0.01268768310546875,
0.011138916015625,
0.0101470947265625,
-0.01824951171875,
0.049835205078125,
0.030731201171875,
-0.03387451171875,
-0.016815185546875,
0.0025177001953125,
-0.0645751953125,
-0.00856781005859375,
0.007259368896484375,
0.0003440380096435547,
0.0161895751953125,
-0.007678985595703125,
-0.0088958740234375,
0.00618743896484375,
-0.0204010009765625,
0.0189971923828125,
-0.0477294921875,
-0.01160430908203125,
0.05975341796875,
-0.01374053955078125,
0.036773681640625,
0.01023101806640625,
-0.03778076171875,
0.028289794921875,
0.058135986328125,
0.0181427001953125,
-0.00568389892578125,
0.0031147003173828125,
0.01451873779296875,
-0.0032367706298828125,
-0.04266357421875,
-0.0304718017578125,
-0.004024505615234375,
-0.0185546875,
-0.007076263427734375,
-0.04388427734375,
0.01422119140625,
-0.00002485513687133789,
-0.0105438232421875,
0.0135345458984375,
-0.0014142990112304688,
-0.005062103271484375,
-0.018310546875,
-0.01276397705078125,
-0.01439666748046875,
-0.00434112548828125,
-0.0029315948486328125,
-0.0029144287109375,
0.049957275390625,
-0.0218048095703125,
0.035736083984375,
0.0675048828125,
0.03741455078125,
0.0264129638671875,
0.021270751953125,
-0.00555419921875,
0.0178680419921875,
-0.034332275390625,
-0.0103302001953125,
-0.05352783203125,
0.0201263427734375,
-0.031158447265625,
0.0153961181640625,
-0.0014429092407226562,
0.01244354248046875,
0.038238525390625,
-0.01354217529296875,
0.02484130859375,
0.0308074951171875,
-0.01042938232421875,
-0.062744140625,
-0.02301025390625,
-0.015594482421875,
-0.031494140625,
0.026947021484375,
0.09002685546875,
0.062408447265625,
0.023406982421875,
0.00662994384765625,
-0.0185699462890625,
0.0253753662109375,
-0.0205841064453125,
-0.00817108154296875,
0.006793975830078125,
-0.01016998291015625,
0.0218353271484375,
0.0007309913635253906,
-0.025054931640625,
0.0288238525390625,
-0.0021495819091796875,
0.006023406982421875,
0.0172576904296875,
-0.0273590087890625,
-0.0025424957275390625,
-0.06951904296875,
0.0096588134765625,
0.039886474609375,
0.0158843994140625,
0.00226593017578125,
0.0229034423828125,
-0.01178741455078125,
-0.0087432861328125,
-0.0290069580078125,
0.020416259765625,
0.035888671875,
0.0294647216796875,
-0.057037353515625,
-0.0386962890625,
-0.0528564453125,
-0.0587158203125,
0.0015611648559570312,
0.0276336669921875,
-0.0204925537109375,
0.036590576171875,
0.0011129379272460938,
0.019439697265625,
0.005615234375,
0.01149749755859375,
0.00511932373046875,
-0.047088623046875,
-0.027801513671875,
0.019989013671875,
0.01082611083984375,
-0.0127716064453125,
-0.03765869140625,
-0.05609130859375,
0.035858154296875,
-0.0175628662109375,
-0.001209259033203125,
0.01471710205078125,
0.03948974609375,
0.00496673583984375,
0.03375244140625,
0.01197052001953125,
0.0009870529174804688,
-0.033447265625,
0.0262603759765625,
-0.00292205810546875,
-0.00685882568359375,
-0.04705810546875,
0.0184478759765625,
-0.01959228515625,
-0.032135009765625,
0.0006194114685058594,
0.036590576171875,
-0.0025177001953125,
0.0250396728515625,
0.00905609130859375,
0.014739990234375,
0.000904083251953125,
0.028717041015625,
0.035888671875,
0.0447998046875,
-0.004261016845703125,
0.017669677734375,
-0.01377105712890625,
-0.03948974609375,
-0.009246826171875,
0.0401611328125,
0.01041412353515625,
0.026123046875,
0.00298309326171875,
-0.022552490234375,
0.005435943603515625,
0.00847625732421875,
-0.00238800048828125,
0.037109375,
0.0200042724609375,
0.01058197021484375,
-0.0129852294921875,
-0.006656646728515625,
0.004749298095703125,
0.0416259765625,
-0.042022705078125,
-0.00635528564453125,
-0.0258026123046875,
0.004001617431640625,
-0.034912109375,
-0.028564453125,
-0.00673675537109375,
-0.022216796875,
0.03564453125,
0.035003662109375,
0.01329803466796875,
0.01422119140625,
-0.03167724609375,
0.010528564453125,
0.05999755859375,
-0.02447509765625,
-0.0168609619140625,
0.0170135498046875,
0.00795745849609375,
0.001766204833984375,
0.0224761962890625,
-0.0280914306640625,
0.034576416015625,
-0.01345062255859375,
0.03955078125,
-0.0018091201782226562,
-0.007396697998046875,
-0.01427459716796875,
0.00189208984375,
-0.0038356781005859375,
0.039825439453125,
0.007770538330078125,
-0.057891845703125,
0.0108642578125,
0.03570556640625,
-0.035888671875,
0.03643798828125,
0.00777435302734375,
-0.005390167236328125,
-0.0309906005859375,
0.0231781005859375,
-0.0016584396362304688,
-0.01470947265625,
0.027496337890625,
0.051422119140625,
-0.0260772705078125,
-0.0241546630859375,
-0.0160980224609375,
-0.01241302490234375,
-0.002361297607421875,
0.00225067138671875,
0.05047607421875,
0.002788543701171875,
-0.003856658935546875,
-0.0251922607421875,
-0.040130615234375,
0.0034198760986328125,
0.03045654296875,
-0.034820556640625,
0.00701904296875,
0.021331787109375,
0.036895751953125,
-0.004184722900390625,
-0.01122283935546875,
-0.05206298828125,
0.014556884765625,
0.023651123046875,
-0.006023406982421875,
0.004566192626953125,
-0.021484375,
0.058837890625,
0.04571533203125,
-0.015533447265625,
-0.00373077392578125,
0.007244110107421875,
0.0283050537109375,
0.036895751953125,
-0.0287933349609375,
-0.0217132568359375,
-0.004161834716796875,
-0.004009246826171875,
0.0017757415771484375,
0.0223846435546875,
0.027008056640625,
-0.0005445480346679688,
-0.036041259765625,
0.0003783702850341797,
0.026458740234375,
-0.05194091796875,
-0.050537109375,
-0.0247802734375,
-0.04461669921875,
0.0285491943359375,
0.00885009765625,
-0.00727081298828125,
-0.028289794921875,
0.039398193359375,
0.025177001953125,
-0.04095458984375,
0.006008148193359375,
-0.017608642578125,
-0.0247955322265625,
-0.03070068359375,
-0.02685546875,
-0.025360107421875,
-0.00787353515625,
0.0177764892578125,
0.06280517578125,
0.023590087890625,
-0.0762939453125,
0.0019855499267578125,
0.0309295654296875,
-0.03558349609375,
0.026458740234375,
0.018707275390625,
-0.043487548828125,
0.006916046142578125,
0.01512908935546875,
0.0048828125,
-0.0028324127197265625,
-0.0030803680419921875,
-0.00909423828125,
-0.039031982421875,
0.018096923828125,
-0.005115509033203125,
-0.01453399658203125,
0.041961669921875,
0.052490234375,
0.0013952255249023438,
-0.0085906982421875,
0.00013387203216552734,
-0.0220489501953125,
-0.037841796875,
-0.0258026123046875,
0.0172576904296875,
-0.001026153564453125,
-0.034393310546875,
-0.02130126953125,
0.0172119140625,
0.0004267692565917969,
-0.007598876953125,
-0.01141357421875,
0.023895263671875,
-0.00896453857421875,
0.0219879150390625,
-0.0055389404296875,
-0.0195465087890625,
-0.0162811279296875,
-0.00830841064453125,
-0.0273284912109375,
0.03375244140625,
0.0004246234893798828,
0.05145263671875,
0.00934600830078125,
-0.062042236328125,
0.03656005859375,
-0.03955078125,
-0.022857666015625,
-0.032135009765625,
-0.0028018951416015625,
-0.002338409423828125,
0.05706787109375,
-0.041412353515625,
-0.00519561767578125,
-0.0218963623046875,
0.007320404052734375,
-0.01702880859375,
-0.03045654296875,
-0.054046630859375,
-0.00894927978515625,
-0.117431640625,
-0.006198883056640625,
0.005855560302734375,
-0.0704345703125,
-0.015960693359375,
0.04034423828125,
-0.1041259765625,
-0.0270843505859375,
0.04388427734375,
-0.0302886962890625,
0.0098724365234375,
0.0008950233459472656,
0.0233001708984375,
-0.05029296875,
-0.0180206298828125,
-0.01313018798828125,
-0.0460205078125,
-0.0129852294921875,
-0.0191650390625,
0.0272979736328125,
-0.000047147274017333984,
0.0089874267578125,
-0.0220489501953125,
0.0312042236328125,
0.0111541748046875,
-0.0022716522216796875,
-0.02239990234375,
-0.00331878662109375,
-0.027679443359375,
-0.0243988037109375,
-0.0177764892578125,
-0.0165252685546875,
-0.057891845703125,
-0.054718017578125,
0.003993988037109375,
-0.015625,
-0.0103302001953125,
-0.02520751953125,
0.0010833740234375,
0.018280029296875,
-0.08465576171875,
-0.038238525390625,
-0.050567626953125,
-0.0176849365234375,
-0.022613525390625,
-0.006084442138671875,
-0.051513671875,
-0.09033203125,
0.01139068603515625,
-0.0255279541015625,
-0.004924774169921875,
0.011627197265625,
0.033172607421875,
0.020599365234375,
-0.0033473968505859375,
0.004505157470703125,
-0.016204833984375,
0.04254150390625,
-0.0200042724609375,
0.0482177734375,
0.031341552734375,
-0.0228424072265625,
0.07867431640625,
0.005664825439453125,
0.006900787353515625,
-0.012359619140625,
0.08642578125,
0.012542724609375,
-0.018707275390625,
0.02392578125,
0.01247406005859375,
-0.0457763671875,
0.0511474609375,
0.0012722015380859375,
0.0193939208984375,
-0.03277587890625,
-0.01177215576171875,
0.016082763671875,
-0.03778076171875,
-0.0089263916015625,
-0.03790283203125,
0.006366729736328125,
0.0240020751953125,
0.03662109375,
0.049346923828125,
-0.0017404556274414062,
0.044830322265625,
0.020538330078125,
-0.0124969482421875,
0.0225677490234375,
-0.031402587890625,
0.011322021484375,
0.0117645263671875,
0.00626373291015625,
-0.00904083251953125,
0.0274810791015625,
0.0125579833984375,
-0.036041259765625,
-0.01505279541015625,
-0.033294677734375,
-0.023834228515625,
0.00702667236328125,
0.00824737548828125,
0.03411865234375,
-0.0118865966796875,
-0.00383758544921875,
-0.004161834716796875,
0.01096343994140625,
0.01568603515625,
-0.007659912109375,
-0.01342010498046875,
-0.006694793701171875,
0.030670166015625,
0.0165557861328125,
-0.0003795623779296875,
0.0455322265625,
0.05133056640625,
-0.0013742446899414062,
0.0413818359375,
-0.02191162109375,
0.019378662109375,
0.03826904296875,
-0.01242828369140625,
0.01230621337890625,
0.032806396484375,
-0.026092529296875,
-0.0274658203125,
0.002197265625,
-0.032012939453125,
-0.007427215576171875,
-0.00286102294921875,
0.023712158203125,
0.032196044921875,
0.02105712890625,
-0.00341796875,
-0.00879669189453125,
-0.0244598388671875,
0.04681396484375,
-0.032196044921875,
-0.050262451171875,
-0.0386962890625,
-0.005889892578125,
0.035064697265625,
-0.013427734375,
-0.03326416015625,
0.027252197265625,
-0.0457763671875,
0.0318603515625,
0.01446533203125,
-0.022918701171875,
0.016632080078125,
0.008575439453125,
-0.06878662109375,
0.007503509521484375,
0.02191162109375,
-0.03680419921875,
-0.03955078125,
0.013427734375,
-0.02911376953125,
0.041778564453125,
0.00942230224609375,
0.047607421875,
-0.00827789306640625,
-0.061279296875,
0.037689208984375,
0.0010652542114257812,
0.066650390625,
0.0106353759765625,
-0.06146240234375,
-0.0004849433898925781,
-0.059722900390625,
-0.021209716796875,
-0.042999267578125,
-0.0199432373046875,
-0.04315185546875,
0.0089111328125,
0.0218353271484375,
0.0178375244140625,
0.0084075927734375,
-0.001708984375,
-0.034454345703125,
0.0235748291015625,
0.034820556640625,
0.03668212890625,
0.007671356201171875,
0.03240966796875,
-0.045989990234375,
0.033447265625,
-0.00640869140625,
-0.004512786865234375,
-0.0355224609375,
-0.004131317138671875,
-0.018798828125,
-0.05609130859375,
0.0222015380859375,
0.027587890625,
-0.01910400390625,
0.016448974609375,
0.0499267578125,
0.0261077880859375,
0.059478759765625,
0.0256805419921875,
0.039398193359375,
-0.007602691650390625,
-0.10009765625,
-0.030670166015625,
-0.0238494873046875,
0.058319091796875,
0.007450103759765625,
0.017364501953125,
-0.0213165283203125,
-0.046051025390625,
0.0110626220703125,
0.001911163330078125,
0.014373779296875,
0.0306549072265625,
-0.03192138671875,
0.03131103515625,
0.06427001953125,
0.053619384765625,
0.0626220703125,
0.054779052734375,
0.052215576171875,
-0.0149993896484375,
0.0014123916625976562,
0.05755615234375,
-0.0234222412109375,
0.024169921875,
-0.015899658203125,
0.0186004638671875,
0.0089569091796875,
-0.0204315185546875,
-0.00861358642578125,
0.0152435302734375,
0.0264129638671875,
-0.07427978515625,
0.0211181640625,
-0.0064544677734375,
0.0010700225830078125,
0.004650115966796875,
0.033233642578125,
-0.046173095703125,
-0.043609619140625,
-0.020538330078125,
-0.031829833984375,
-0.037017822265625,
-0.0176239013671875,
0.004985809326171875,
-0.0219879150390625,
-0.01134490966796875,
0.0083770751953125,
0.01082611083984375,
0.003688812255859375,
-0.030731201171875,
-0.014007568359375,
-0.005970001220703125,
-0.044158935546875,
0.01030731201171875,
0.0244598388671875,
0.004673004150390625,
-0.046905517578125,
0.053314208984375,
-0.0062713623046875,
0.01549530029296875,
0.0273590087890625,
0.0027751922607421875,
-0.004787445068359375,
0.043731689453125,
-0.016876220703125,
0.006256103515625,
0.02496337890625,
-0.05072021484375,
0.054351806640625,
0.0023288726806640625,
-0.00017070770263671875,
0.0158538818359375,
-0.028411865234375,
-0.004047393798828125,
-0.012115478515625,
-0.00984954833984375,
-0.013336181640625,
0.0165252685546875,
0.0914306640625,
-0.01232147216796875,
-0.039703369140625,
0.03228759765625,
0.0115966796875,
-0.022491455078125,
0.0111846923828125,
0.02032470703125,
-0.057647705078125,
-0.058319091796875,
0.0149078369140625,
-0.0513916015625,
-0.0199127197265625,
0.0047607421875,
-0.07135009765625,
0.023345947265625,
-0.006664276123046875,
0.06292724609375,
-0.00791168212890625,
-0.00814056396484375,
0.0210723876953125,
-0.01476287841796875,
-0.053436279296875,
0.046417236328125,
0.01308441162109375,
0.0257415771484375,
-0.05731201171875,
-0.0145111083984375,
-0.007709503173828125,
0.0286407470703125,
-0.0209503173828125,
0.0009088516235351562,
0.0016803741455078125,
0.002796173095703125,
0.00360870361328125,
0.0101776123046875,
-0.0006074905395507812,
0.023406982421875,
0.00013506412506103516,
0.016876220703125,
0.04095458984375,
-0.0002472400665283203,
0.030914306640625,
0.0195770263671875,
-0.03204345703125,
0.0251617431640625,
0.028564453125,
0.0305023193359375,
0.033843994140625,
0.043304443359375,
-0.06878662109375,
0.024688720703125,
0.0628662109375,
-0.06500244140625,
0.0165557861328125,
-0.0008440017700195312,
0.01215362548828125,
-0.034698486328125,
-0.0185699462890625,
-0.0171356201171875,
0.023895263671875,
0.00412750244140625,
-0.00908660888671875,
0.0211334228515625,
0.029815673828125,
-0.01561737060546875,
-0.0176239013671875,
-0.0023651123046875,
0.006565093994140625,
-0.0322265625,
0.0196533203125,
0.026519775390625,
0.01715087890625,
0.007350921630859375,
0.07684326171875,
0.044647216796875,
0.01441192626953125,
-0.0650634765625,
-0.06500244140625,
0.00620269775390625,
0.022918701171875,
0.009063720703125,
0.040802001953125,
0.05108642578125,
0.00511932373046875,
0.07000732421875,
-0.0826416015625,
-0.037322998046875,
0.051513671875,
0.01580810546875,
-0.019256591796875,
-0.033294677734375,
0.0390625,
-0.0241241455078125,
-0.053466796875,
0.01143646240234375,
0.021514892578125,
0.0599365234375,
0.0201416015625,
0.049072265625,
-0.01007080078125,
-0.0247650146484375,
-0.01053619384765625,
-0.01293182373046875,
0.0033283233642578125,
-0.00038504600524902344,
-0.04412841796875,
-0.0140228271484375,
0.0013399124145507812,
0.039794921875,
-0.036407470703125,
0.02484130859375,
0.00894927978515625,
0.032562255859375,
0.02569580078125,
-0.0278167724609375,
0.0694580078125,
-0.0100555419921875,
-0.0084381103515625,
-0.03729248046875,
0.04351806640625,
0.052093505859375,
0.0277862548828125,
0.0240325927734375,
0.006168365478515625,
0.07147216796875,
-0.017303466796875,
0.037109375,
-0.0000718235969543457,
-0.019500732421875,
0.0258636474609375,
-0.036407470703125,
0.058380126953125,
0.00756072998046875,
-0.11761474609375,
-0.01456451416015625,
-0.0128936767578125,
-0.08465576171875,
0.048248291015625,
0.05487060546875,
-0.048065185546875,
0.0262908935546875,
0.021392822265625,
-0.0167236328125,
0.0166015625,
0.0085906982421875,
0.005924224853515625,
-0.025726318359375,
0.01111602783203125,
-0.0183563232421875,
-0.0269317626953125,
-0.0082244873046875,
-0.01251983642578125,
0.044647216796875,
0.0009579658508300781,
0.09210205078125,
-0.03546142578125,
0.00920867919921875,
-0.01178741455078125,
0.049224853515625,
-0.0565185546875,
-0.0325927734375,
0.067138671875,
-0.02679443359375,
-0.01320648193359375,
0.012786865234375,
-0.0218963623046875,
-0.0019989013671875,
0.052032470703125,
-0.0462646484375,
-0.0152740478515625,
0.00008875131607055664,
0.0194854736328125,
-0.05230712890625,
0.034210205078125,
-0.00630950927734375,
-0.05096435546875,
-0.062225341796875,
-0.00949859619140625,
0.0267486572265625,
0.09930419921875,
0.01629638671875,
0.04022216796875,
0.01375579833984375,
0.0079803466796875,
0.03021240234375,
-0.02545166015625,
0.042388916015625,
0.033477783203125,
-0.04876708984375,
0.04296875,
0.042022705078125,
-0.011016845703125,
0.049072265625,
0.0179443359375,
-0.01216888427734375,
0.04718017578125,
-0.025299072265625,
-0.0256500244140625,
0.018798828125,
0.006900787353515625,
-0.0255889892578125,
0.0028362274169921875,
0.0166473388671875,
-0.0243072509765625,
-0.004718780517578125,
0.03802490234375,
-0.0256500244140625,
-0.005207061767578125,
0.005596160888671875,
-0.0011644363403320312,
0.03326416015625,
-0.03277587890625,
-0.018341064453125,
0.01416778564453125,
0.0426025390625,
0.022003173828125,
-0.047607421875,
0.049346923828125,
-0.036529541015625,
0.01373291015625,
0.01401519775390625,
0.0156097412109375,
-0.0032196044921875,
0.034027099609375,
-0.032623291015625,
0.0087432861328125,
-0.02099609375,
-0.011138916015625,
-0.0235748291015625,
0.0018720626831054688,
0.002704620361328125,
0.0012521743774414062,
-0.036865234375,
0.004398345947265625,
0.00936126708984375,
0.0545654296875,
0.031768798828125,
-0.006298065185546875,
-0.00984954833984375,
0.041656494140625,
-0.051513671875,
-0.062255859375,
0.0189666748046875,
-0.0172576904296875,
-0.02069091796875,
0.0330810546875,
0.0182037353515625,
0.055267333984375,
-0.019805908203125,
-0.07562255859375,
0.0280609130859375,
-0.005100250244140625,
-0.04376220703125,
0.01824951171875,
-0.00730133056640625,
-0.01593017578125,
0.0020771026611328125,
0.0131378173828125,
-0.0022335052490234375,
-0.00844573974609375,
0.00213623046875,
0.0171966552734375,
0.03125,
0.01377105712890625,
0.0244903564453125,
-0.0518798828125,
0.01088714599609375,
-0.00687408447265625,
0.0248260498046875,
-0.02410888671875,
0.0192108154296875,
-0.017608642578125,
0.0029239654541015625,
-0.0306549072265625,
-0.0501708984375,
-0.0020313262939453125,
0.028533935546875,
0.0116729736328125,
-0.09454345703125,
-0.0283966064453125,
-0.055938720703125,
0.03863525390625,
-0.0020694732666015625,
0.00717926025390625,
0.0028743743896484375,
-0.03741455078125,
-0.06329345703125,
-0.0020618438720703125,
0.004425048828125,
0.0149383544921875,
-0.083251953125,
0.0224151611328125,
0.056365966796875,
-0.01239013671875,
-0.0199737548828125,
-0.014739990234375,
-0.03790283203125,
-0.00383758544921875,
0.018096923828125,
0.0162200927734375,
0.007221221923828125,
-0.01241302490234375,
0.0053863525390625,
-0.0204315185546875,
-0.0528564453125,
-0.0147247314453125,
0.0200653076171875,
-0.0457763671875,
-0.0170440673828125,
-0.03851318359375,
-0.0019931793212890625,
-0.022186279296875,
0.019073486328125,
-0.0146636962890625,
0.0250701904296875,
-0.04083251953125,
0.0316162109375,
-0.020233154296875,
0.0143585205078125,
-0.004528045654296875,
0.0086517333984375,
-0.00826263427734375,
0.035491943359375,
0.0134735107421875,
0.041046142578125,
0.01525115966796875,
0.09307861328125,
-0.0055999755859375,
0.0703125,
0.020477294921875,
-0.04180908203125,
0.035797119140625,
-0.033935546875,
0.01153564453125,
-0.01305389404296875,
-0.0330810546875,
-0.01085662841796875,
-0.01174163818359375,
0.07275390625,
-0.0303802490234375,
0.0194244384765625
]
|
1f5ae772f5f64f9cd69d97e303b4cc2b2834dffe | Wordpress Stackexchange
Q: Extension preview disapeared since WP 4.5.2 Since the last Wordpress update, I can't read new version notes when trying to update a plugin in my dashboard.
The same thing happens when I try to read an plugin's details.
How can I fix that ?
Edit:
Here's what I get from my browser's console when trying to view a plugin's details:
A: Your error log does tell you the reason, it's the part about:
Refused to display ... in a frame because it set to 'X-Frame-Origin' to 'SAMEORIGIN,DENY'
And the reason for that is the one about "conflicting values" before it.
WordPress core only sends SAMEORIGIN value in admin screens, via send_frame_options_header(). So DENY is coming from elsewhere and is what messes things up.
Search your sources for DENY and inquire with hosting support if it's something web server might be configured to add.
| Q: Extension preview disapeared since WP 4.5.2 Since the last Wordpress update, I can't read new version notes when trying to update a plugin in my dashboard.
The same thing happens when I try to read an plugin's details.
How can I fix that ?
Edit:
Here's what I get from my browser's console when trying to view a plugin's details:
A: Your error log does tell you the reason, it's the part about:
Refused to display ... in a frame because it set to 'X-Frame-Origin' to 'SAMEORIGIN,DENY'
And the reason for that is the one about "conflicting values" before it.
WordPress core only sends SAMEORIGIN value in admin screens, via send_frame_options_header(). So DENY is coming from elsewhere and is what messes things up.
Search your sources for DENY and inquire with hosting support if it's something web server might be configured to add.
A: Thanks for your answer @rarst. The issue came from my nginx configuration.
I just had to change add_header X-Frame-Options deny; to add_header X-Frame-Options "SAMEORIGIN" always;
| wordpress | {
"language": "en",
"length": 170,
"provenance": "stackexchange_00019.jsonl.gz:465598",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/227170"
} | [
0.051055908203125,
-0.0340576171875,
0.03375244140625,
-0.056396484375,
-0.00658416748046875,
-0.009002685546875,
0.01259613037109375,
-0.0006589889526367188,
0.006832122802734375,
0.021514892578125,
-0.042572021484375,
-0.0027408599853515625,
-0.00780487060546875,
0.0009279251098632812,
-0.029571533203125,
-0.047698974609375,
0.036285400390625,
-0.01477813720703125,
0.03338623046875,
-0.00038814544677734375,
0.0204925537109375,
0.019195556640625,
-0.000011444091796875,
0.0205230712890625,
-0.02130126953125,
-0.0035724639892578125,
0.09063720703125,
-0.037139892578125,
0.007656097412109375,
-0.025390625,
0.0013751983642578125,
-0.0100555419921875,
0.02410888671875,
0.0667724609375,
-0.09735107421875,
-0.01561737060546875,
0.00971221923828125,
0.0092620849609375,
-0.0089111328125,
0.033416748046875,
0.0116729736328125,
0.0025501251220703125,
0.01080322265625,
0.01012420654296875,
0.004077911376953125,
-0.040679931640625,
0.01004791259765625,
-0.054290771484375,
0.0217742919921875,
0.006275177001953125,
-0.0269927978515625,
0.004703521728515625,
-0.016143798828125,
0.020050048828125,
-0.0008816719055175781,
-0.0189208984375,
-0.028045654296875,
0.109375,
0.00835418701171875,
0.0154876708984375,
-0.00452423095703125,
0.06268310546875,
-0.03759765625,
-0.005191802978515625,
0.02215576171875,
-0.031005859375,
0.05908203125,
0.0144500732421875,
0.0023555755615234375,
0.030120849609375,
0.0360107421875,
0.036834716796875,
0.02447509765625,
-0.023773193359375,
0.04388427734375,
-0.02838134765625,
0.01068115234375,
-0.0112457275390625,
-0.0001804828643798828,
0.0185089111328125,
0.018768310546875,
-0.02471923828125,
-0.0179290771484375,
-0.0191650390625,
0.0098419189453125,
0.01148223876953125,
0.0096588134765625,
-0.0158538818359375,
0.01073455810546875,
0.0183258056640625,
0.002056121826171875,
-0.045196533203125,
0.0248260498046875,
0.043548583984375,
0.0124359130859375,
-0.02374267578125,
0.00821685791015625,
0.044219970703125,
-0.0213470458984375,
-0.01190948486328125,
0.00994110107421875,
-0.037933349609375,
0.0017242431640625,
-0.033111572265625,
-0.01641845703125,
0.0252685546875,
0.0440673828125,
0.0210418701171875,
0.018524169921875,
0.018646240234375,
-0.0055694580078125,
0.01806640625,
-0.01181793212890625,
-0.042724609375,
0.036163330078125,
0.040863037109375,
-0.006359100341796875,
0.03582763671875,
-0.00904083251953125,
0.01456451416015625,
-0.0123291015625,
0.01451873779296875,
-0.06884765625,
0.040985107421875,
0.0155029296875,
0.01003265380859375,
-0.005352020263671875,
0.041473388671875,
-0.002117156982421875,
0.01372528076171875,
-0.0158538818359375,
0.006404876708984375,
-0.00009185075759887695,
0.03338623046875,
-0.0003352165222167969,
-0.01506805419921875,
0.04254150390625,
0.007465362548828125,
-0.00951385498046875,
-0.0000024437904357910156,
-0.006732940673828125,
0.0063323974609375,
0.0138397216796875,
-0.04510498046875,
0.0220184326171875,
-0.01459503173828125,
0.0212249755859375,
0.0416259765625,
0.0194244384765625,
0.007343292236328125,
-0.005764007568359375,
0.0377197265625,
0.042510986328125,
-0.0013132095336914062,
-0.00608062744140625,
-0.04583740234375,
0.0867919921875,
-0.0660400390625,
-0.03802490234375,
-0.07049560546875,
0.0278778076171875,
0.003849029541015625,
0.0292816162109375,
-0.0283050537109375,
-0.0281219482421875,
-0.006839752197265625,
-0.05108642578125,
-0.006649017333984375,
0.01357269287109375,
0.045501708984375,
-0.03619384765625,
-0.0296630859375,
0.021453857421875,
0.020721435546875,
-0.020477294921875,
0.042327880859375,
-0.010284423828125,
-0.0159149169921875,
0.04205322265625,
0.0105743408203125,
-0.016265869140625,
-0.0099945068359375,
0.05572509765625,
-0.014678955078125,
-0.051239013671875,
0.02679443359375,
0.00791168212890625,
0.054412841796875,
0.0335693359375,
-0.00453948974609375,
0.019195556640625,
0.00836944580078125,
-0.007694244384765625,
0.0296630859375,
-0.0220947265625,
0.00463104248046875,
-0.0153350830078125,
0.0479736328125,
-0.030242919921875,
-0.02886962890625,
-0.0019893646240234375,
0.0484619140625,
0.0020198822021484375,
-0.033660888671875,
-0.06298828125,
0.00949859619140625,
-0.0184173583984375,
0.0655517578125,
0.0330810546875,
0.031341552734375,
0.0204315185546875,
0.052459716796875,
-0.04742431640625,
0.01285552978515625,
-0.039337158203125,
0.0298919677734375,
-0.04193115234375,
0.050262451171875,
0.01366424560546875,
0.043609619140625,
0.0175628662109375,
-0.01056671142578125,
0.0106964111328125,
-0.034027099609375,
0.0245361328125,
-0.02154541015625,
0.017547607421875,
-0.0090179443359375,
0.0726318359375,
-0.00933074951171875,
0.079345703125,
-0.019744873046875,
0.03216552734375,
0.019989013671875,
-0.0260009765625,
-0.01018524169921875,
-0.0097503662109375,
-0.08026123046875,
0.00469970703125,
0.06512451171875,
0.032989501953125,
-0.017547607421875,
-0.011138916015625,
-0.0296478271484375,
0.022064208984375,
-0.08184814453125,
-0.005657196044921875,
-0.01226806640625,
0.01873779296875,
0.01367950439453125,
0.025634765625,
-0.004581451416015625,
0.045745849609375,
0.01549530029296875,
0.033538818359375,
0.03875732421875,
0.03643798828125,
0.00994873046875,
-0.08270263671875,
0.055938720703125,
0.007747650146484375,
-0.005611419677734375,
-0.0465087890625,
0.0082244873046875,
0.0275726318359375,
0.023193359375,
0.07232666015625,
0.0809326171875,
0.007686614990234375,
-0.032745361328125,
-0.01045989990234375,
0.054718017578125,
0.0177001953125,
0.0095672607421875,
-0.002536773681640625,
0.01445770263671875,
-0.0206756591796875,
-0.008026123046875,
0.030059814453125,
0.0140533447265625,
-0.0256805419921875,
0.03656005859375,
-0.047515869140625,
-0.0307159423828125,
0.00052642822265625,
-0.037139892578125,
-0.040740966796875,
-0.05560302734375,
-0.02227783203125,
-0.01186370849609375,
0.033905029296875,
0.0025653839111328125,
-0.0308685302734375,
0.0103759765625,
0.005466461181640625,
-0.02239990234375,
-0.00891876220703125,
-0.05181884765625,
0.031036376953125,
-0.00820159912109375,
0.048614501953125,
0.0762939453125,
0.020050048828125,
0.01357269287109375,
0.00004583597183227539,
-0.0123748779296875,
0.0057373046875,
-0.005573272705078125,
-0.0162200927734375,
0.00957489013671875,
-0.059844970703125,
0.0288848876953125,
0.030303955078125,
0.0167999267578125,
-0.0196685791015625,
-0.033294677734375,
-0.0650634765625,
0.021484375,
-0.08392333984375,
-0.01360321044921875,
-0.050140380859375,
-0.0567626953125,
-0.02301025390625,
-0.0002789497375488281,
-0.043182373046875,
0.024261474609375,
0.0140228271484375,
0.0101318359375,
-0.0298919677734375,
-0.023040771484375,
-0.08453369140625,
-0.0792236328125,
-0.0848388671875,
-0.0143890380859375,
-0.00504302978515625,
0.0187530517578125,
-0.0002932548522949219,
0.0246734619140625,
-0.0041351318359375,
-0.0164947509765625,
0.01070404052734375,
-0.00667572021484375,
0.00566864013671875,
-0.0140380859375,
-0.030120849609375,
0.0059661865234375,
0.006603240966796875,
-0.005863189697265625,
0.0236358642578125,
-0.009765625,
0.0038509368896484375,
-0.004009246826171875,
-0.00350189208984375,
-0.0173797607421875,
0.0067596435546875,
0.0195159912109375,
-0.00679779052734375,
-0.042022705078125,
0.00989532470703125,
-0.052703857421875,
-0.02252197265625,
0.0261688232421875,
-0.038787841796875,
-0.02197265625,
0.0093231201171875,
-0.032012939453125,
0.01708984375,
-0.0238189697265625,
0.003448486328125,
0.0173492431640625,
0.057098388671875,
-0.006561279296875,
-0.006107330322265625,
-0.02325439453125,
-0.030487060546875,
-0.055511474609375,
0.005619049072265625,
-0.03814697265625,
0.00223541259765625,
-0.0178375244140625,
0.0004520416259765625,
0.0063018798828125,
-0.008087158203125,
0.007305145263671875,
-0.02838134765625,
0.0200042724609375,
-0.10491943359375,
-0.00923919677734375,
-0.0523681640625,
0.00821685791015625,
-0.0103302001953125,
0.06915283203125,
-0.035003662109375,
0.0011358261108398438,
0.0150146484375,
0.0038890838623046875,
-0.0166168212890625,
-0.0021686553955078125,
-0.060150146484375,
-0.008148193359375,
-0.04937744140625,
-0.0171661376953125,
-0.0190277099609375,
-0.01007080078125,
-0.01837158203125,
0.01178741455078125,
-0.0076446533203125,
-0.03515625,
0.04095458984375,
-0.01364898681640625,
0.0007524490356445312,
-0.0213775634765625,
0.004486083984375,
-0.04974365234375,
-0.026519775390625,
0.00775909423828125,
-0.09002685546875,
-0.01384735107421875,
0.0259857177734375,
0.0380859375,
-0.00689697265625,
-0.0220794677734375,
-0.034912109375,
0.037322998046875,
0.0229339599609375,
-0.0006871223449707031,
0.0027790069580078125,
-0.00865936279296875,
-0.01544189453125,
0.0005941390991210938,
0.018157958984375,
-0.0228118896484375,
-0.03240966796875,
-0.02471923828125,
-0.0227508544921875,
-0.01727294921875,
-0.007183074951171875,
-0.036224365234375,
0.0155487060546875,
-0.0097808837890625,
-0.01451873779296875,
-0.043609619140625,
-0.01432037353515625,
0.0004754066467285156,
-0.00820159912109375,
0.0007224082946777344,
-0.040740966796875,
-0.031951904296875,
0.0276031494140625,
-0.016326904296875,
-0.02191162109375,
0.00183868408203125,
0.0931396484375,
0.02288818359375,
0.0007348060607910156,
-0.0269622802734375,
0.007312774658203125,
0.03521728515625,
0.005367279052734375,
0.026885986328125,
0.00699615478515625,
-0.03155517578125,
0.063720703125,
0.0019407272338867188,
0.00844573974609375,
-0.035369873046875,
0.019989013671875,
0.0026683807373046875,
-0.02484130859375,
0.037139892578125,
0.00428009033203125,
-0.005340576171875,
0.0236968994140625,
-0.0240936279296875,
0.005550384521484375,
-0.0055084228515625,
0.0076751708984375,
-0.0175628662109375,
0.032989501953125,
-0.0033550262451171875,
-0.05560302734375,
0.03314208984375,
-0.01007843017578125,
0.00498199462890625,
0.01446533203125,
0.0026721954345703125,
0.033905029296875,
0.005764007568359375,
-0.0124664306640625,
-0.00835418701171875,
0.005931854248046875,
-0.00467681884765625,
0.01381683349609375,
0.00844573974609375,
-0.0242156982421875,
-0.032379150390625,
-0.0241546630859375,
0.0682373046875,
-0.01023101806640625,
-0.07354736328125,
0.003185272216796875,
-0.0038814544677734375,
0.0352783203125,
0.0213470458984375,
0.023406982421875,
0.0009655952453613281,
-0.0033740997314453125,
0.01451873779296875,
-0.0048065185546875,
0.027618408203125,
-0.0011758804321289062,
-0.01421356201171875,
0.054412841796875,
-0.02349853515625,
0.0011873245239257812,
0.01430511474609375,
0.0306854248046875,
-0.046142578125,
0.024566650390625,
0.004222869873046875,
0.00170135498046875,
0.0017023086547851562,
0.02923583984375,
0.031585693359375,
-0.04534912109375,
0.036773681640625,
-0.033538818359375,
0.0136566162109375,
-0.0035419464111328125,
-0.0284576416015625,
-0.0203399658203125,
-0.009796142578125,
-0.0357666015625,
0.0019521713256835938,
0.051422119140625,
0.0162200927734375,
-0.0176239013671875,
0.040374755859375,
0.0189666748046875,
-0.040191650390625,
-0.01104736328125,
0.030517578125,
0.0188751220703125,
-0.0174102783203125,
-0.01523590087890625,
-0.009185791015625,
-0.004329681396484375,
0.010650634765625,
-0.0005373954772949219,
-0.0350341796875,
0.0222015380859375,
0.0176849365234375,
-0.002155303955078125,
-0.0013017654418945312,
-0.006317138671875,
-0.04412841796875,
-0.032073974609375,
-0.0089874267578125,
0.00011599063873291016,
0.0616455078125,
-0.01654052734375,
0.0238800048828125,
-0.0246124267578125,
-0.0038585662841796875,
0.0006489753723144531,
0.00774383544921875,
0.048675537109375,
0.024688720703125,
-0.03857421875,
-0.0251007080078125,
-0.03509521484375,
-0.055633544921875,
-0.0208892822265625,
-0.0011425018310546875,
-0.05865478515625,
0.02471923828125,
0.01377105712890625,
0.0237884521484375,
-0.0181121826171875,
-0.006927490234375,
-0.0228729248046875,
0.0300445556640625,
0.019683837890625,
0.09857177734375,
0.006587982177734375,
0.037078857421875,
-0.001811981201171875,
0.0439453125,
0.0186004638671875,
0.0082550048828125,
-0.054595947265625,
-0.0170440673828125,
0.039215087890625,
-0.0009965896606445312,
-0.036712646484375,
-0.08990478515625,
0.0188140869140625,
-0.005710601806640625,
0.0311279296875,
-0.0203704833984375,
0.00565338134765625,
-0.016143798828125,
0.006649017333984375,
-0.0136260986328125,
0.0246734619140625,
-0.0222015380859375,
-0.022216796875,
0.04962158203125,
-0.0416259765625,
-0.005809783935546875,
0.002750396728515625,
-0.0005335807800292969,
0.02978515625,
-0.0207366943359375,
0.02264404296875,
0.00040078163146972656,
0.0111083984375,
0.0208740234375,
0.06439208984375,
-0.00931549072265625,
0.02435302734375,
0.024993896484375,
0.004871368408203125,
0.003170013427734375,
0.023895263671875,
0.02978515625,
-0.030487060546875,
0.055999755859375,
0.006580352783203125,
-0.04412841796875,
0.0055694580078125,
-0.04022216796875,
0.0166168212890625,
0.0116729736328125,
0.033477783203125,
-0.056121826171875,
0.0234527587890625,
0.005977630615234375,
0.0020694732666015625,
0.0465087890625,
-0.0018377304077148438,
0.01381683349609375,
-0.02423095703125,
0.016387939453125,
-0.00799560546875,
-0.0125885009765625,
0.004756927490234375,
-0.0128173828125,
-0.00917816162109375,
-0.005779266357421875,
0.0272216796875,
0.00846099853515625,
-0.006778717041015625,
-0.013641357421875,
0.0009675025939941406,
-0.009124755859375,
0.005367279052734375,
-0.04736328125,
-0.0004076957702636719,
-0.0655517578125,
-0.069091796875,
-0.04156494140625,
-0.061859130859375,
-0.0227813720703125,
0.051483154296875,
0.061370849609375,
0.0291900634765625,
0.058685302734375,
0.01389312744140625,
0.006252288818359375,
0.0318603515625,
-0.01898193359375,
0.0140838623046875,
-0.0237274169921875,
0.0005254745483398438,
0.04730224609375,
-0.0228118896484375,
0.028106689453125,
0.004230499267578125,
-0.002925872802734375,
0.008941650390625,
0.00652313232421875,
0.0562744140625,
-0.0290985107421875,
-0.01506805419921875,
0.01021575927734375,
-0.04486083984375,
0.0029087066650390625,
0.00457000732421875,
0.0185394287109375,
-0.051910400390625,
0.001728057861328125,
0.0180511474609375,
0.03460693359375,
0.003589630126953125,
0.0478515625,
-0.1064453125,
0.071044921875,
0.033447265625,
0.058837890625,
0.01146697998046875,
0.0100250244140625,
-0.07073974609375,
-0.054107666015625,
-0.007579803466796875,
0.0343017578125,
-0.02593994140625,
0.06304931640625,
-0.04364013671875,
-0.006694793701171875,
0.01329803466796875,
0.0511474609375,
0.0213165283203125,
0.0155029296875,
0.004482269287109375,
-0.0306396484375,
-0.045013427734375,
-0.006435394287109375,
-0.024566650390625,
0.016632080078125,
0.00878143310546875,
0.0013074874877929688,
0.0237274169921875,
0.0013484954833984375,
0.0367431640625,
-0.0269317626953125,
-0.022369384765625,
0.017120361328125,
0.005771636962890625,
0.009063720703125,
-0.021575927734375,
0.0582275390625,
-0.0011196136474609375,
-0.02789306640625,
0.01041412353515625,
-0.007091522216796875,
-0.0103302001953125,
0.0244903564453125,
0.00623321533203125,
-0.02667236328125,
0.00873565673828125,
-0.034423828125,
0.0396728515625,
0.00899505615234375,
-0.01540374755859375,
-0.0196380615234375,
0.014739990234375,
-0.0192413330078125,
-0.056243896484375,
-0.0106964111328125,
0.019866943359375,
-0.055328369140625,
0.0015859603881835938,
0.0070953369140625,
0.0179595947265625,
0.0004849433898925781,
0.0268707275390625,
0.0343017578125,
0.018768310546875,
-0.03045654296875,
-0.034271240234375,
0.00689697265625,
-0.015625,
0.004329681396484375,
-0.010040283203125,
-0.0158538818359375,
-0.01380157470703125,
0.0055084228515625,
-0.008026123046875,
-0.040374755859375,
0.0275421142578125,
0.0300140380859375,
0.0186614990234375,
0.033050537109375,
-0.0026702880859375,
-0.057891845703125,
-0.034820556640625,
0.0124359130859375,
0.00640869140625,
0.00543975830078125,
0.00582122802734375,
0.0212249755859375,
0.040771484375,
0.0189056396484375,
0.0009746551513671875,
0.036346435546875,
-0.00494384765625,
-0.00873565673828125,
-0.046051025390625,
-0.07635498046875,
0.03497314453125,
0.046112060546875,
-0.038360595703125,
-0.04046630859375,
0.0008983612060546875,
0.030670166015625,
-0.06396484375,
-0.0295257568359375,
0.04351806640625,
-0.0182342529296875,
-0.0200347900390625,
-0.05633544921875,
0.05072021484375,
0.0279998779296875,
0.0257415771484375,
0.029327392578125,
0.0205230712890625,
0.049560546875,
-0.0165557861328125,
0.0305023193359375,
0.009124755859375,
0.005435943603515625,
0.0200958251953125,
-0.005649566650390625,
0.0169830322265625,
0.01470947265625,
-0.02642822265625,
0.0245208740234375,
-0.03179931640625,
-0.0216217041015625,
-0.0299072265625,
0.006591796875,
-0.0291290283203125,
0.0587158203125,
-0.01509857177734375,
0.019866943359375,
-0.033843994140625,
-0.0240936279296875,
0.050994873046875,
0.026092529296875,
-0.01348114013671875,
0.033935546875,
-0.052490234375,
-0.0284271240234375,
-0.0308380126953125,
0.04718017578125,
0.02789306640625,
0.06365966796875,
-0.01334381103515625,
0.040985107421875,
0.005138397216796875,
0.0215606689453125,
-0.048553466796875,
-0.01520538330078125,
0.046142578125,
-0.025848388671875,
-0.01392364501953125,
-0.00849151611328125,
-0.049774169921875,
0.055999755859375,
-0.0059967041015625,
-0.036224365234375,
0.054595947265625,
-0.0225372314453125,
-0.0168609619140625,
-0.0178680419921875,
-0.026885986328125,
-0.03558349609375,
-0.07379150390625,
0.003704071044921875,
0.033538818359375,
-0.037567138671875,
-0.0086212158203125,
-0.0068359375,
0.018707275390625,
0.03680419921875,
0.006374359130859375,
-0.0009226799011230469,
0.01953125,
-0.0182647705078125,
0.029266357421875,
0.05078125,
0.027496337890625,
0.0076141357421875,
-0.0232391357421875,
0.035125732421875,
-0.01342010498046875,
0.028900146484375,
-0.0163421630859375,
0.03314208984375,
0.006458282470703125,
0.0026454925537109375,
0.006389617919921875,
-0.0552978515625,
-0.0012140274047851562,
0.0262298583984375,
0.01200103759765625,
0.0157928466796875,
-0.02215576171875,
-0.0047454833984375,
-0.05511474609375,
-0.0167694091796875,
0.0021076202392578125,
-0.0287017822265625,
-0.01444244384765625,
0.0130615234375,
-0.0057373046875,
0.036376953125,
0.00792694091796875,
-0.06195068359375,
0.01233673095703125,
-0.0045928955078125,
0.03680419921875,
-0.022857666015625,
0.028106689453125,
0.002536773681640625,
0.0134735107421875,
-0.024658203125,
-0.01331329345703125,
0.00754547119140625,
0.044952392578125,
0.00624847412109375,
-0.00548553466796875,
-0.0033550262451171875,
-0.002986907958984375,
0.0205535888671875,
-0.02520751953125,
0.00811767578125,
0.03070068359375,
0.002857208251953125,
0.00997161865234375,
-0.0265350341796875,
-0.0038909912109375,
-0.034271240234375,
-0.027191162109375,
0.03753662109375,
-0.046173095703125,
-0.07073974609375,
-0.0010766983032226562,
0.00238037109375,
0.0005230903625488281,
-0.04962158203125,
-0.04656982421875,
-0.036346435546875,
0.018798828125,
-0.037506103515625,
-0.046356201171875,
-0.0139312744140625,
-0.013763427734375,
0.057891845703125,
-0.004070281982421875,
-0.0297393798828125,
-0.02191162109375,
0.04931640625,
-0.01251983642578125,
0.00254058837890625,
0.0016450881958007812,
-0.033233642578125,
-0.0125885009765625,
0.0175628662109375,
0.038177490234375,
-0.032745361328125,
-0.060302734375,
0.016815185546875,
-0.0019359588623046875,
0.005596160888671875,
-0.0290985107421875,
-0.01277923583984375,
0.048187255859375,
0.037322998046875,
0.006984710693359375,
0.0034542083740234375,
-0.07000732421875,
-0.02020263671875,
0.02227783203125,
0.07586669921875,
0.01227569580078125,
-0.022674560546875,
0.0033721923828125,
-0.0360107421875,
-0.035888671875,
-0.00836944580078125,
0.01422882080078125,
-0.0625,
-0.00444793701171875,
0.015045166015625,
0.0225677490234375,
0.01152801513671875,
0.0216064453125,
0.0008873939514160156,
-0.03680419921875,
0.01056671142578125,
-0.0007205009460449219,
-0.06732177734375,
-0.07989501953125,
0.117919921875,
-0.050537109375,
0.0189056396484375,
0.0164642333984375,
0.032806396484375,
0.0728759765625,
0.024749755859375,
-0.003711700439453125,
-0.0153045654296875,
-0.03521728515625,
0.042572021484375,
-0.0102996826171875,
0.0516357421875,
-0.05902099609375,
-0.033447265625,
0.0180511474609375,
0.005138397216796875,
-0.0194091796875,
0.0192718505859375,
0.032440185546875,
-0.01666259765625,
-0.03582763671875,
0.045440673828125,
-0.017242431640625,
-0.006343841552734375,
-0.02093505859375,
0.022491455078125,
0.023040771484375,
-0.016815185546875,
0.0506591796875,
-0.02685546875,
0.01059722900390625,
0.0281829833984375,
0.02923583984375,
-0.029937744140625,
0.009002685546875,
-0.063720703125,
0.029815673828125,
0.007534027099609375
]
|
498a2688a5876df709a037f7c8fb2b0376cdeffa | Wordpress Stackexchange
Q: How to create a custom page base on URL for Wordpress? How can I achieve the following:
example.com/mycategory/my-first-page
example.com/mycategory/a-random-file-name-page
If the user enters http://example.com/mycategory/*, it will load a standard template page. Inside this page would display a page title depending on the URL e.g. my-first-page will display as "My First Page" with some static contents.
Please advise how should I go about doing that.
| Q: How to create a custom page base on URL for Wordpress? How can I achieve the following:
example.com/mycategory/my-first-page
example.com/mycategory/a-random-file-name-page
If the user enters http://example.com/mycategory/*, it will load a standard template page. Inside this page would display a page title depending on the URL e.g. my-first-page will display as "My First Page" with some static contents.
Please advise how should I go about doing that.
| wordpress | {
"language": "en",
"length": 65,
"provenance": "stackexchange_00019.jsonl.gz:465606",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/227193"
} | [
0.00930023193359375,
0.0156707763671875,
-0.0216827392578125,
-0.0199737548828125,
0.0013055801391601562,
-0.01605224609375,
-0.022491455078125,
-0.016204833984375,
-0.03009033203125,
0.00025534629821777344,
0.0120849609375,
0.017852783203125,
-0.0263824462890625,
-0.04638671875,
0.043609619140625,
-0.00995635986328125,
0.017364501953125,
0.01605224609375,
0.0264739990234375,
-0.0037631988525390625,
0.027069091796875,
-0.006191253662109375,
0.00441741943359375,
0.0372314453125,
0.037445068359375,
-0.04620361328125,
0.00833892822265625,
-0.04949951171875,
0.00582122802734375,
-0.040435791015625,
0.016021728515625,
0.0278778076171875,
0.0271453857421875,
0.002239227294921875,
-0.0008778572082519531,
0.017059326171875,
0.0037021636962890625,
0.007709503173828125,
0.00628662109375,
0.01326751708984375,
0.0247955322265625,
-0.0034027099609375,
0.0367431640625,
0.0103302001953125,
0.0179290771484375,
-0.08099365234375,
0.06829833984375,
-0.06304931640625,
0.039031982421875,
0.0079345703125,
-0.01995849609375,
0.00199127197265625,
-0.024566650390625,
0.003696441650390625,
-0.0213470458984375,
-0.02264404296875,
0.002899169921875,
-0.029541015625,
0.034423828125,
-0.035675048828125,
-0.021514892578125,
-0.03106689453125,
0.03973388671875,
0.01447296142578125,
-0.01264190673828125,
-0.00640869140625,
-0.00417327880859375,
0.03765869140625,
-0.0291748046875,
-0.0313720703125,
0.00806427001953125,
-0.0116119384765625,
-0.0089874267578125,
-0.0290985107421875,
-0.044403076171875,
0.036529541015625,
0.0089874267578125,
-0.01178741455078125,
-0.00849151611328125,
0.0121002197265625,
-0.0416259765625,
-0.010894775390625,
0.0069427490234375,
-0.0673828125,
0.01641845703125,
-0.00844573974609375,
-0.0289154052734375,
0.0014886856079101562,
-0.02252197265625,
0.005886077880859375,
-0.020233154296875,
0.017364501953125,
-0.000774383544921875,
-0.00138092041015625,
-0.01462554931640625,
-0.0008959770202636719,
-0.01056671142578125,
0.00885772705078125,
0.00305938720703125,
0.0086822509765625,
0.01788330078125,
-0.0222625732421875,
0.0170745849609375,
-0.035675048828125,
0.020751953125,
0.07769775390625,
0.0340576171875,
-0.01461029052734375,
0.0287933349609375,
-0.0296478271484375,
0.01313018798828125,
0.06561279296875,
0.0211639404296875,
0.01241302490234375,
-0.00945281982421875,
-0.0090484619140625,
-0.0167083740234375,
0.01898193359375,
-0.02337646484375,
0.01328277587890625,
0.0110626220703125,
0.0421142578125,
0.043365478515625,
-0.019073486328125,
0.020843505859375,
0.035675048828125,
-0.0030651092529296875,
-0.07806396484375,
-0.023345947265625,
0.01029205322265625,
0.0024547576904296875,
0.033203125,
0.056793212890625,
0.019927978515625,
-0.01300048828125,
-0.01078033447265625,
-0.0024700164794921875,
-0.04156494140625,
-0.0167236328125,
-0.0172271728515625,
0.005367279052734375,
-0.00628662109375,
0.02911376953125,
-0.0163726806640625,
0.006954193115234375,
0.0204925537109375,
0.006755828857421875,
0.019287109375,
0.0181121826171875,
-0.0198211669921875,
0.0278167724609375,
-0.055633544921875,
0.0188751220703125,
0.0064849853515625,
0.00855255126953125,
-0.020843505859375,
0.0016727447509765625,
-0.009307861328125,
0.00891876220703125,
-0.00446319580078125,
0.0163116455078125,
-0.002819061279296875,
0.01232147216796875,
-0.029144287109375,
-0.028533935546875,
-0.02435302734375,
-0.023712158203125,
-0.002376556396484375,
0.022674560546875,
0.0258636474609375,
-0.0001537799835205078,
0.0013751983642578125,
0.00974273681640625,
0.032379150390625,
0.009735107421875,
0.0343017578125,
0.0007104873657226562,
-0.01235198974609375,
0.0006093978881835938,
0.1048583984375,
0.03717041015625,
-0.0109710693359375,
-0.007415771484375,
0.005588531494140625,
-0.0450439453125,
0.0292510986328125,
0.0162811279296875,
0.076171875,
-0.0125579833984375,
0.023284912109375,
0.006786346435546875,
0.015899658203125,
-0.0203399658203125,
0.040313720703125,
-0.0031032562255859375,
-0.018798828125,
-0.03271484375,
0.014556884765625,
-0.02252197265625,
-0.037322998046875,
-0.0089263916015625,
-0.006992340087890625,
0.031494140625,
0.0390625,
0.048919677734375,
0.01849365234375,
0.00402069091796875,
0.0212249755859375,
0.030242919921875,
0.035980224609375,
0.0006427764892578125,
0.022003173828125,
0.00200653076171875,
-0.09368896484375,
-0.0595703125,
-0.014404296875,
0.032012939453125,
-0.004894256591796875,
0.005401611328125,
-0.015625,
0.01554107666015625,
0.0134735107421875,
-0.0202484130859375,
0.050537109375,
0.02490234375,
-0.01200103759765625,
-0.034332275390625,
-0.02691650390625,
-0.0235443115234375,
-0.0003097057342529297,
-0.0682373046875,
0.06451416015625,
0.0103302001953125,
0.020294189453125,
-0.04998779296875,
-0.02001953125,
-0.053619384765625,
-0.0123443603515625,
-0.01300811767578125,
0.054534912109375,
0.0250091552734375,
0.01515960693359375,
-0.0019369125366210938,
0.0158233642578125,
0.0223388671875,
-0.0301666259765625,
0.0120391845703125,
0.00032210350036621094,
0.0210723876953125,
0.05133056640625,
0.01291656494140625,
-0.0187530517578125,
0.0162353515625,
-0.040008544921875,
-0.00951385498046875,
0.0252227783203125,
0.0109710693359375,
-0.00579833984375,
-0.00966644287109375,
0.0028400421142578125,
0.0133209228515625,
0.03656005859375,
-0.0158233642578125,
0.016510009765625,
0.021575927734375,
0.050628662109375,
0.040435791015625,
0.049072265625,
-0.034576416015625,
0.0285186767578125,
0.0009365081787109375,
-0.0204620361328125,
-0.003612518310546875,
0.00479888916015625,
0.049530029296875,
-0.03509521484375,
-0.015472412109375,
-0.0015516281127929688,
-0.026397705078125,
-0.01116943359375,
-0.0247650146484375,
0.0457763671875,
-0.0640869140625,
-0.01922607421875,
-0.042572021484375,
-0.11279296875,
-0.024871826171875,
0.0221710205078125,
0.00424957275390625,
-0.0142669677734375,
0.0054779052734375,
0.03814697265625,
-0.02099609375,
0.03619384765625,
0.0212860107421875,
-0.0196380615234375,
0.02130126953125,
-0.04071044921875,
0.0379638671875,
-0.05548095703125,
-0.01198577880859375,
0.045989990234375,
-0.020782470703125,
0.01462554931640625,
-0.0128631591796875,
0.0413818359375,
0.03228759765625,
-0.028656005859375,
-0.02459716796875,
-0.0132904052734375,
-0.02471923828125,
-0.0419921875,
0.021942138671875,
0.046783447265625,
0.0269622802734375,
-0.020050048828125,
0.024688720703125,
0.038543701171875,
-0.040679931640625,
-0.08935546875,
0.0033111572265625,
-0.01666259765625,
0.0311431884765625,
0.0016126632690429688,
0.009674072265625,
-0.036041259765625,
0.028533935546875,
0.01120758056640625,
-0.0076904296875,
-0.043121337890625,
-0.053070068359375,
-0.083984375,
-0.0750732421875,
-0.0318603515625,
0.0037403106689453125,
0.0024852752685546875,
0.0133819580078125,
-0.0044708251953125,
0.002613067626953125,
-0.0604248046875,
0.0030689239501953125,
0.06201171875,
0.004230499267578125,
0.006649017333984375,
0.0107269287109375,
-0.0298309326171875,
0.020843505859375,
0.00859832763671875,
0.051910400390625,
0.03997802734375,
-0.02581787109375,
0.0027408599853515625,
-0.0299072265625,
0.0120697021484375,
-0.02825927734375,
0.000032782554626464844,
0.055633544921875,
-0.01520538330078125,
-0.03302001953125,
-0.04931640625,
-0.0168914794921875,
0.0084686279296875,
-0.0280914306640625,
0.0013990402221679688,
0.007266998291015625,
-0.011627197265625,
-0.0007967948913574219,
0.006618499755859375,
-0.0168914794921875,
-0.006504058837890625,
0.0400390625,
-0.03961181640625,
0.0274810791015625,
-0.01898193359375,
-0.0220489501953125,
-0.02630615234375,
0.058929443359375,
-0.006732940673828125,
-0.00754547119140625,
0.01739501953125,
-0.01424407958984375,
-0.01343536376953125,
0.007476806640625,
-0.0243682861328125,
-0.05242919921875,
0.044219970703125,
-0.033935546875,
-0.007232666015625,
-0.043304443359375,
-0.0124359130859375,
-0.0204620361328125,
0.0755615234375,
-0.05218505859375,
-0.0108489990234375,
0.03271484375,
0.027069091796875,
-0.046630859375,
-0.01325225830078125,
-0.0797119140625,
-0.01361846923828125,
-0.08624267578125,
-0.00887298583984375,
0.00458526611328125,
-0.045745849609375,
-0.007038116455078125,
-0.0132293701171875,
-0.0460205078125,
-0.0400390625,
0.0186004638671875,
-0.023193359375,
-0.00980377197265625,
-0.013458251953125,
-0.02117919921875,
-0.01727294921875,
0.0094757080078125,
-0.03314208984375,
-0.08056640625,
-0.020172119140625,
0.0231781005859375,
0.0509033203125,
-0.0194244384765625,
-0.01236724853515625,
-0.00977325439453125,
0.061370849609375,
0.002490997314453125,
0.015411376953125,
0.022918701171875,
-0.0104522705078125,
0.055938720703125,
0.0240936279296875,
0.0169677734375,
-0.00986480712890625,
0.0147552490234375,
-0.0196533203125,
-0.037506103515625,
0.0141754150390625,
-0.0372314453125,
0.00647735595703125,
-0.0019073486328125,
-0.0146636962890625,
-0.034912109375,
-0.0440673828125,
-0.01297760009765625,
0.015960693359375,
0.00821685791015625,
-0.00984954833984375,
-0.05340576171875,
-0.03314208984375,
-0.01078033447265625,
-0.025360107421875,
-0.024505615234375,
0.020294189453125,
0.028900146484375,
0.0162506103515625,
-0.011688232421875,
-0.027984619140625,
0.00275421142578125,
0.01538848876953125,
0.016571044921875,
0.077880859375,
0.01355743408203125,
-0.0032501220703125,
0.079833984375,
-0.0157012939453125,
0.00397491455078125,
0.0084991455078125,
0.04144287109375,
-0.0054473876953125,
-0.030059814453125,
0.0123443603515625,
-0.0189361572265625,
-0.00797271728515625,
0.025421142578125,
-0.01468658447265625,
0.0271453857421875,
-0.0147247314453125,
-0.01392364501953125,
-0.02215576171875,
0.009124755859375,
-0.004924774169921875,
-0.00027489662170410156,
-0.0005154609680175781,
0.0217742919921875,
0.0406494140625,
0.02392578125,
0.00429534912109375,
-0.0036067962646484375,
0.0134124755859375,
-0.010833740234375,
0.028594970703125,
0.0211639404296875,
-0.0013189315795898438,
0.001331329345703125,
0.0304412841796875,
-0.0301971435546875,
-0.006313323974609375,
0.0032215118408203125,
0.031890869140625,
-0.0079193115234375,
-0.033538818359375,
-0.00756072998046875,
-0.0183563232421875,
0.0186920166015625,
0.017425537109375,
-0.0018291473388671875,
-0.0008955001831054688,
-0.0006413459777832031,
-0.002010345458984375,
0.03338623046875,
0.007030487060546875,
-0.00823974609375,
-0.0112152099609375,
0.0362548828125,
0.02752685546875,
-0.0214080810546875,
0.00792694091796875,
0.0552978515625,
0.01413726806640625,
0.0204620361328125,
-0.0225067138671875,
0.0416259765625,
0.072998046875,
0.0092926025390625,
0.01248931884765625,
0.0196075439453125,
-0.01439666748046875,
-0.0030689239501953125,
0.005512237548828125,
-0.017547607421875,
-0.00623321533203125,
0.02618408203125,
0.05609130859375,
-0.054779052734375,
-0.0291290283203125,
0.01523590087890625,
-0.049163818359375,
0.0022869110107421875,
-0.0118255615234375,
-0.0382080078125,
-0.0164794921875,
-0.018402099609375,
-0.020416259765625,
0.0037174224853515625,
-0.0245819091796875,
-0.01062774658203125,
0.0269012451171875,
-0.005527496337890625,
0.08685302734375,
-0.022552490234375,
0.044219970703125,
0.0026645660400390625,
-0.0193328857421875,
-0.0011358261108398438,
-0.00910186767578125,
-0.01181793212890625,
-0.0006427764892578125,
0.00215911865234375,
-0.036041259765625,
-0.044891357421875,
0.05194091796875,
-0.005008697509765625,
0.0120697021484375,
-0.044921875,
0.0010194778442382812,
-0.0257568359375,
0.0105743408203125,
0.0306854248046875,
0.00981903076171875,
-0.057373046875,
0.0135040283203125,
-0.039031982421875,
-0.01171112060546875,
-0.0082244873046875,
-0.022125244140625,
-0.04437255859375,
-0.0193328857421875,
0.01160430908203125,
0.0294952392578125,
0.029815673828125,
0.02947998046875,
-0.0260162353515625,
0.00101470947265625,
-0.0094757080078125,
0.02813720703125,
-0.020965576171875,
0.04913330078125,
-0.01059722900390625,
0.06390380859375,
-0.003627777099609375,
0.00830841064453125,
-0.0132293701171875,
-0.0220947265625,
-0.00616455078125,
-0.0261993408203125,
-0.0093841552734375,
-0.01947021484375,
-0.01751708984375,
0.040496826171875,
0.07958984375,
0.01102447509765625,
0.018218994140625,
-0.00955963134765625,
0.0165863037109375,
-0.0213623046875,
-0.0015134811401367188,
-0.045501708984375,
-0.006488800048828125,
0.01457977294921875,
0.020751953125,
0.0246734619140625,
-0.01953125,
-0.0169525146484375,
-0.0016298294067382812,
0.0007696151733398438,
0.00516510009765625,
-0.00737762451171875,
-0.095947265625,
0.087646484375,
0.07952880859375,
0.034515380859375,
0.052734375,
0.0007448196411132812,
0.022125244140625,
0.0280914306640625,
0.037261962890625,
-0.0229644775390625,
-0.01099395751953125,
0.058746337890625,
0.0243377685546875,
-0.0361328125,
0.04376220703125,
-0.018951416015625,
0.01316070556640625,
0.09027099609375,
0.07720947265625,
-0.106201171875,
-0.0081024169921875,
-0.00516510009765625,
-0.0194091796875,
0.0147247314453125,
0.0277557373046875,
0.00013816356658935547,
-0.01995849609375,
0.0079193115234375,
0.00147247314453125,
-0.0003046989440917969,
0.010589599609375,
0.0017538070678710938,
-0.01213836669921875,
0.00380706787109375,
0.016143798828125,
0.014190673828125,
-0.03936767578125,
-0.00324249267578125,
0.035064697265625,
0.001331329345703125,
-0.03955078125,
-0.0043487548828125,
0.01480865478515625,
0.006378173828125,
0.031494140625,
0.08624267578125,
-0.037994384765625,
0.0506591796875,
0.030517578125,
0.04034423828125,
0.010162353515625,
0.016998291015625,
0.007678985595703125,
0.0203857421875,
-0.0084991455078125,
-0.017791748046875,
0.03680419921875,
-0.002506256103515625,
0.00397491455078125,
-0.0229644775390625,
-0.01453399658203125,
-0.01506805419921875,
-0.0229949951171875,
-0.004619598388671875,
-0.03912353515625,
-0.019805908203125,
0.126708984375,
-0.034088134765625,
-0.0289459228515625,
-0.005092620849609375,
0.03692626953125,
0.00798797607421875,
0.0183868408203125,
0.0027256011962890625,
-0.0011510848999023438,
0.011627197265625,
0.0028667449951171875,
-0.006999969482421875,
0.0242156982421875,
0.00457763671875,
-0.07318115234375,
0.0615234375,
-0.018951416015625,
0.06658935546875,
-0.009246826171875,
0.0225067138671875,
0.031646728515625,
0.006072998046875,
-0.032562255859375,
0.0428466796875,
0.02471923828125,
0.048919677734375,
-0.05316162109375,
-0.03558349609375,
0.03125,
0.0743408203125,
0.040863037109375,
-0.00029850006103515625,
0.0235595703125,
0.02032470703125,
0.041778564453125,
-0.019561767578125,
-0.04071044921875,
0.0218658447265625,
-0.01654052734375,
0.00881195068359375,
0.0012292861938476562,
-0.01145172119140625,
0.026458740234375,
-0.0276031494140625,
-0.04864501953125,
0.0146636962890625,
0.0219879150390625,
0.0128173828125,
-0.00040721893310546875,
0.00433349609375,
-0.06817626953125,
0.02667236328125,
0.04425048828125,
0.039520263671875,
0.006221771240234375,
0.05426025390625,
0.054534912109375,
-0.035736083984375,
-0.018524169921875,
-0.0380859375,
0.05682373046875,
0.006328582763671875,
-0.0002675056457519531,
0.031494140625,
0.007663726806640625,
0.016998291015625,
-0.01055908203125,
0.0018663406372070312,
-0.00035881996154785156,
-0.006130218505859375,
0.11163330078125,
0.028289794921875,
0.041961669921875,
-0.04638671875,
-0.006031036376953125,
0.002696990966796875,
0.1123046875,
-0.058837890625,
-0.0252532958984375,
-0.00714874267578125,
-0.00496673583984375,
0.021514892578125,
-0.0204620361328125,
0.0347900390625,
0.0439453125,
0.052154541015625,
-0.04620361328125,
0.00921630859375,
0.029876708984375,
0.0400390625,
-0.0219573974609375,
-0.024505615234375,
-0.045806884765625,
-0.004543304443359375,
-0.01425933837890625,
0.005786895751953125,
0.0200653076171875,
0.01080322265625,
-0.00835418701171875,
0.0238189697265625,
-0.00823211669921875,
0.0046234130859375,
-0.01502227783203125,
0.05828857421875,
0.017486572265625,
0.016387939453125,
-0.014617919921875,
-0.0269927978515625,
0.01097869873046875,
0.0269622802734375,
-0.0025691986083984375,
0.031585693359375,
0.030426025390625,
0.0195159912109375,
-0.01174163818359375,
-0.00962066650390625,
0.0246124267578125,
-0.02215576171875,
0.0411376953125,
-0.021484375,
0.004177093505859375,
-0.0144500732421875,
-0.022491455078125,
-0.01262664794921875,
-0.004093170166015625,
0.026092529296875,
-0.0113525390625,
0.0265350341796875,
-0.00811767578125,
-0.039581298828125,
0.03399658203125,
-0.050140380859375,
0.08001708984375,
-0.002994537353515625,
-0.07861328125,
-0.00229644775390625,
-0.051605224609375,
-0.07110595703125,
0.06646728515625,
0.058868408203125,
-0.03326416015625,
0.0205230712890625,
-0.00328826904296875,
0.034393310546875,
0.016632080078125,
-0.06976318359375,
0.0104827880859375,
-0.0167236328125,
0.005359649658203125,
0.0209808349609375,
-0.05560302734375,
-0.025421142578125,
-0.00632476806640625,
0.0295257568359375,
-0.030609130859375,
0.1075439453125,
-0.038177490234375,
0.006771087646484375,
0.01043701171875,
0.0173797607421875,
-0.02471923828125,
-0.01540374755859375,
0.03985595703125,
-0.0182342529296875,
0.01094818115234375,
-0.003936767578125,
-0.0184173583984375,
0.002613067626953125,
0.0173187255859375,
-0.026611328125,
-0.01499176025390625,
-0.025543212890625,
0.02972412109375,
0.0097808837890625,
0.0214080810546875,
-0.01241302490234375,
-0.02294921875,
-0.027587890625,
-0.006443023681640625,
0.03875732421875,
0.0302581787109375,
-0.0235137939453125,
0.0352783203125,
-0.003265380859375,
-0.01334381103515625,
0.01000213623046875,
-0.0200042724609375,
0.0277099609375,
0.0304107666015625,
-0.00557708740234375,
-0.017547607421875,
0.03033447265625,
-0.01313018798828125,
0.04193115234375,
0.00312042236328125,
0.045440673828125,
0.038665771484375,
-0.032470703125,
0.041107177734375,
-0.01076507568359375,
0.037078857421875,
-0.023834228515625,
-0.0149688720703125,
-0.00322723388671875,
0.0136260986328125,
0.0175933837890625,
-0.01282501220703125,
-0.0265655517578125,
-0.00872039794921875,
-0.00907135009765625,
0.0071868896484375,
-0.0107574462890625,
-0.022979736328125,
-0.00505828857421875,
0.018310546875,
0.0016908645629882812,
0.00278472900390625,
-0.048065185546875,
0.047760009765625,
-0.03155517578125,
0.02032470703125,
-0.0228271484375,
0.037872314453125,
-0.0165557861328125,
-0.0178375244140625,
-0.08538818359375,
-0.0032901763916015625,
-0.03521728515625,
0.0038814544677734375,
-0.004146575927734375,
0.0143890380859375,
0.050506591796875,
-0.00756072998046875,
-0.00872039794921875,
0.00423431396484375,
-0.0173797607421875,
0.07843017578125,
-0.0711669921875,
-0.0279388427734375,
0.01123046875,
-0.010223388671875,
-0.0283203125,
-0.034515380859375,
0.00620269775390625,
-0.03900146484375,
0.00040984153747558594,
0.01274871826171875,
0.0102081298828125,
0.041412353515625,
-0.016571044921875,
-0.06475830078125,
0.066650390625,
-0.0152435302734375,
-0.02996826171875,
-0.0225830078125,
0.0150299072265625,
-0.0235595703125,
0.0284576416015625,
0.0078887939453125,
-0.0182342529296875,
0.011383056640625,
0.0194244384765625,
0.01454925537109375,
0.02532958984375,
0.006622314453125,
0.012725830078125,
-0.0272674560546875,
0.01111602783203125,
0.00443267822265625,
-0.00732421875,
0.049285888671875,
-0.00005441904067993164,
-0.00055694580078125,
0.0411376953125,
-0.047027587890625,
-0.0014371871948242188,
-0.0535888671875,
-0.01018524169921875,
-0.005340576171875,
-0.037200927734375,
-0.043792724609375,
-0.029144287109375,
0.0282440185546875,
0.0396728515625,
0.0121612548828125,
-0.01367950439453125,
-0.04852294921875,
-0.054046630859375,
-0.02899169921875,
-0.04541015625,
0.03131103515625,
-0.10284423828125,
-0.0017919540405273438,
0.027435302734375,
-0.040863037109375,
0.008453369140625,
-0.00036263465881347656,
-0.048980712890625,
0.022674560546875,
0.0028400421142578125,
-0.01555633544921875,
-0.01861572265625,
-0.00820159912109375,
0.054840087890625,
-0.038970947265625,
-0.0009765625,
0.0016317367553710938,
0.0161590576171875,
0.016876220703125,
-0.015869140625,
-0.003734588623046875,
0.06646728515625,
-0.043304443359375,
-0.001094818115234375,
0.01203155517578125,
-0.0021190643310546875,
-0.02520751953125,
0.0075836181640625,
-0.02410888671875,
0.04742431640625,
0.03009033203125,
0.057159423828125,
-0.0233612060546875,
0.03448486328125,
0.02880859375,
-0.0028972625732421875,
0.0095977783203125,
-0.028839111328125,
-0.0141143798828125,
0.019927978515625,
-0.03155517578125,
-0.005756378173828125,
-0.022430419921875,
-0.03924560546875,
-0.021453857421875,
-0.0098114013671875,
-0.059600830078125,
-0.03582763671875,
-0.0020236968994140625,
-0.07342529296875,
-0.031982421875,
0.01049041748046875
]
|
356d4d4815fd018705a40ec297d25eac506522a4 | Wordpress Stackexchange
Q: Adding a drag and drop re-ordering from a custom post type default list I have custom post type named 'slider_to_be_ordered' and has the following arguments enabled:
'supports' => array( 'title', 'page-attributes' ),
'hierarchical' => true,
and I have the following default view:
I've seen there are plugins that enables that feature but would like to implement it using the WP-packaged jquery UI sortable but I would like to check first if there any hooks/filters/args that can be used to enable the drag and drop re-ordering, similar to the default menu re-ordering?
If the code implementation is complex, any clues on how to use jquery UI sortable to achieve the drag-and-drop effect?
| Q: Adding a drag and drop re-ordering from a custom post type default list I have custom post type named 'slider_to_be_ordered' and has the following arguments enabled:
'supports' => array( 'title', 'page-attributes' ),
'hierarchical' => true,
and I have the following default view:
I've seen there are plugins that enables that feature but would like to implement it using the WP-packaged jquery UI sortable but I would like to check first if there any hooks/filters/args that can be used to enable the drag and drop re-ordering, similar to the default menu re-ordering?
If the code implementation is complex, any clues on how to use jquery UI sortable to achieve the drag-and-drop effect?
| wordpress | {
"language": "en",
"length": 112,
"provenance": "stackexchange_00019.jsonl.gz:465607",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/227195"
} | [
0.056365966796875,
0.0170440673828125,
-0.00634002685546875,
-0.0235595703125,
0.04205322265625,
-0.0274658203125,
0.0643310546875,
-0.0128631591796875,
0.00043010711669921875,
0.0171661376953125,
0.01132965087890625,
-0.0009541511535644531,
0.0188751220703125,
-0.03253173828125,
-0.00650787353515625,
-0.0025844573974609375,
0.045654296875,
-0.05743408203125,
0.0276947021484375,
-0.03204345703125,
0.00606536865234375,
-0.017669677734375,
0.08599853515625,
0.06494140625,
0.025665283203125,
0.047607421875,
0.016815185546875,
-0.039520263671875,
0.03997802734375,
0.0015058517456054688,
0.023193359375,
-0.046783447265625,
-0.00016546249389648438,
0.003421783447265625,
0.011383056640625,
-0.00960540771484375,
0.00675201416015625,
0.01111602783203125,
0.0139617919921875,
0.0137786865234375,
0.00521087646484375,
0.01030731201171875,
-0.025726318359375,
-0.0011692047119140625,
-0.0380859375,
-0.057159423828125,
0.03338623046875,
0.00787353515625,
0.04400634765625,
-0.0011339187622070312,
-0.012298583984375,
-0.0003116130828857422,
-0.0002027750015258789,
-0.0814208984375,
-0.00627899169921875,
-0.015716552734375,
-0.02093505859375,
0.0101165771484375,
0.0228729248046875,
0.031768798828125,
-0.003604888916015625,
0.00914764404296875,
-0.0108184814453125,
-0.028411865234375,
-0.00556182861328125,
0.01141357421875,
0.006595611572265625,
0.01271820068359375,
-0.04620361328125,
-0.0116119384765625,
0.02984619140625,
-0.042572021484375,
-0.0010318756103515625,
-0.0130462646484375,
-0.00031185150146484375,
-0.037109375,
0.038970947265625,
-0.018890380859375,
-0.0148773193359375,
0.022857666015625,
0.01291656494140625,
-0.00400543212890625,
0.027618408203125,
-0.05596923828125,
0.0114898681640625,
-0.03887939453125,
-0.01001739501953125,
0.0020236968994140625,
-0.042236328125,
0.0005002021789550781,
-0.013641357421875,
-0.042083740234375,
-0.053314208984375,
0.048187255859375,
0.01244354248046875,
0.021453857421875,
0.02056884765625,
0.03271484375,
0.0034008026123046875,
0.03173828125,
-0.002239227294921875,
-0.0428466796875,
0.061492919921875,
-0.035797119140625,
0.006824493408203125,
-0.033355712890625,
-0.00608062744140625,
-0.02423095703125,
0.0360107421875,
0.0494384765625,
-0.03851318359375,
0.046417236328125,
0.04058837890625,
0.0243682861328125,
-0.0301513671875,
-0.04248046875,
-0.025634765625,
0.0312347412109375,
-0.0201873779296875,
0.0204010009765625,
0.01396942138671875,
0.0272216796875,
-0.01546478271484375,
-0.0038623809814453125,
0.02947998046875,
0.016204833984375,
-0.01027679443359375,
-0.043212890625,
-0.02276611328125,
0.00527191162109375,
-0.0355224609375,
0.0211944580078125,
0.0875244140625,
0.0445556640625,
0.01114654541015625,
-0.0173492431640625,
0.01126861572265625,
-0.0231781005859375,
-0.0011386871337890625,
-0.0231475830078125,
0.04815673828125,
-0.007781982421875,
-0.0198974609375,
0.02862548828125,
0.0325927734375,
0.0203094482421875,
0.021392822265625,
0.005603790283203125,
0.01461029052734375,
-0.0245361328125,
0.006267547607421875,
-0.0178375244140625,
0.03363037109375,
0.013824462890625,
0.0027599334716796875,
-0.019561767578125,
0.03143310546875,
-0.02703857421875,
-0.01561737060546875,
-0.040069580078125,
-0.0091400146484375,
-0.006122589111328125,
-0.0204620361328125,
-0.0679931640625,
-0.05523681640625,
0.005157470703125,
-0.00481414794921875,
0.0167236328125,
0.032958984375,
0.007442474365234375,
0.006237030029296875,
-0.0311126708984375,
0.04620361328125,
0.0208740234375,
-0.00690460205078125,
0.0362548828125,
0.0106658935546875,
-0.060272216796875,
0.0380859375,
0.00852203369140625,
-0.046844482421875,
-0.035308837890625,
0.00795745849609375,
-0.0265045166015625,
-0.041107177734375,
0.035125732421875,
-0.00525665283203125,
0.03228759765625,
0.0264892578125,
0.01314544677734375,
0.0116424560546875,
0.0238800048828125,
-0.004032135009765625,
-0.005615234375,
0.0007238388061523438,
-0.0019588470458984375,
-0.042694091796875,
-0.00397491455078125,
-0.01358795166015625,
-0.004299163818359375,
-0.0169677734375,
-0.014862060546875,
-0.0011730194091796875,
0.00860595703125,
-0.022735595703125,
-0.0090789794921875,
-0.01067352294921875,
0.0205535888671875,
0.01125335693359375,
0.005725860595703125,
0.0293426513671875,
0.03363037109375,
-0.0755615234375,
0.0166015625,
-0.0284271240234375,
0.033447265625,
-0.01139068603515625,
0.0223846435546875,
-0.0054473876953125,
0.0194854736328125,
-0.0045928955078125,
-0.033843994140625,
-0.01325225830078125,
0.035186767578125,
0.051788330078125,
-0.005886077880859375,
-0.0238037109375,
-0.0264739990234375,
0.04876708984375,
-0.0113983154296875,
-0.0007147789001464844,
0.052032470703125,
0.01055145263671875,
0.031951904296875,
-0.0218963623046875,
-0.0279693603515625,
0.006351470947265625,
-0.05609130859375,
0.034423828125,
0.053680419921875,
0.005588531494140625,
0.055999755859375,
0.0201416015625,
0.057098388671875,
0.08905029296875,
0.0157318115234375,
0.01329803466796875,
0.0157470703125,
-0.0161590576171875,
0.0184783935546875,
0.0318603515625,
0.0301971435546875,
0.0101470947265625,
0.04791259765625,
0.007373809814453125,
0.0286712646484375,
0.0234527587890625,
0.0675048828125,
-0.038482666015625,
0.0036525726318359375,
-0.01593017578125,
0.002727508544921875,
0.0004646778106689453,
-0.005687713623046875,
0.031585693359375,
-0.0078887939453125,
0.0243988037109375,
-0.0014667510986328125,
-0.016204833984375,
0.0114898681640625,
0.0035953521728515625,
-0.06414794921875,
0.004001617431640625,
0.02947998046875,
0.015777587890625,
0.01312255859375,
-0.0226287841796875,
-0.0196990966796875,
0.0187530517578125,
0.00959014892578125,
-0.0306243896484375,
-0.001880645751953125,
-0.02398681640625,
-0.00677490234375,
-0.0139923095703125,
-0.07305908203125,
0.01128387451171875,
0.0122833251953125,
-0.02069091796875,
-0.0023555755615234375,
0.018402099609375,
0.011627197265625,
-0.01983642578125,
0.006855010986328125,
0.018310546875,
-0.01568603515625,
0.0008153915405273438,
-0.0469970703125,
0.03680419921875,
-0.034423828125,
0.0119781494140625,
0.06829833984375,
0.00482177734375,
-0.00441741943359375,
0.029449462890625,
-0.0172576904296875,
0.035980224609375,
0.0439453125,
0.014739990234375,
-0.00957489013671875,
-0.041412353515625,
0.0111083984375,
0.0458984375,
-0.00968170166015625,
0.055084228515625,
-0.0016775131225585938,
0.0250244140625,
0.0533447265625,
-0.04608154296875,
-0.0777587890625,
0.0192718505859375,
-0.05224609375,
-0.00542449951171875,
0.0231475830078125,
-0.038482666015625,
-0.0146636962890625,
0.04754638671875,
0.00012481212615966797,
-0.0280914306640625,
0.0018949508666992188,
-0.032806396484375,
-0.027191162109375,
-0.04840087890625,
0.0155792236328125,
0.00496673583984375,
0.0196075439453125,
0.000873565673828125,
0.08660888671875,
0.006866455078125,
-0.049285888671875,
0.0087432861328125,
-0.0173797607421875,
-0.029571533203125,
0.0218048095703125,
0.046417236328125,
-0.043731689453125,
0.0294036865234375,
-0.0033054351806640625,
0.040802001953125,
0.047607421875,
-0.040863037109375,
-0.0158538818359375,
-0.055084228515625,
-0.00626373291015625,
-0.05303955078125,
0.0300445556640625,
0.080810546875,
-0.0146026611328125,
-0.026641845703125,
-0.039276123046875,
-0.0229339599609375,
0.01163482666015625,
-0.02423095703125,
-0.0226287841796875,
-0.0206298828125,
0.007610321044921875,
-0.032867431640625,
0.054595947265625,
0.015777587890625,
0.02288818359375,
0.01113128662109375,
0.0030059814453125,
-0.0021209716796875,
-0.0169677734375,
-0.021820068359375,
-0.0290069580078125,
0.0179443359375,
-0.0335693359375,
-0.003398895263671875,
0.00077056884765625,
-0.004352569580078125,
-0.006481170654296875,
0.0165557861328125,
-0.0214385986328125,
-0.07916259765625,
0.041290283203125,
-0.0220794677734375,
-0.035919189453125,
0.01247406005859375,
-0.004482269287109375,
0.057952880859375,
0.0928955078125,
-0.01690673828125,
0.0004298686981201172,
-0.03411865234375,
-0.025360107421875,
0.027008056640625,
-0.006748199462890625,
-0.03472900390625,
-0.0090484619140625,
-0.0789794921875,
0.01467132568359375,
-0.00276947021484375,
-0.03717041015625,
-0.0176239013671875,
-0.0105133056640625,
-0.06634521484375,
-0.032196044921875,
0.046356201171875,
-0.034423828125,
0.030364990234375,
0.01947021484375,
0.024505615234375,
-0.01241302490234375,
-0.01157379150390625,
-0.030731201171875,
-0.08843994140625,
-0.01267242431640625,
-0.038970947265625,
0.056304931640625,
0.0282440185546875,
-0.0270233154296875,
-0.036346435546875,
0.0185699462890625,
0.00801849365234375,
0.01934814453125,
0.00847625732421875,
0.0046844482421875,
0.00815582275390625,
-0.0248260498046875,
-0.0011959075927734375,
-0.040771484375,
0.00098419189453125,
-0.0069427490234375,
-0.046234130859375,
-0.010986328125,
-0.0095062255859375,
-0.0004911422729492188,
0.0285491943359375,
-0.0297393798828125,
-0.07421875,
-0.06695556640625,
-0.08514404296875,
-0.00681304931640625,
-0.0245513916015625,
-0.0267333984375,
-0.0814208984375,
-0.084716796875,
-0.01313018798828125,
-0.0390625,
-0.00836181640625,
0.0274658203125,
0.0384521484375,
0.0174713134765625,
0.017333984375,
-0.04205322265625,
0.01505279541015625,
0.016021728515625,
0.0299224853515625,
0.00443267822265625,
-0.01541900634765625,
0.007080078125,
-0.032440185546875,
-0.0163726806640625,
-0.00681304931640625,
-0.0229949951171875,
-0.0063323974609375,
-0.0156402587890625,
-0.035430908203125,
0.0232086181640625,
-0.0212554931640625,
0.051422119140625,
0.0157318115234375,
-0.01348114013671875,
-0.0164642333984375,
0.01751708984375,
0.0516357421875,
-0.03460693359375,
0.0208282470703125,
-0.038909912109375,
-0.021575927734375,
0.0198974609375,
-0.01287078857421875,
0.0286407470703125,
0.01004791259765625,
0.0037822723388671875,
0.006832122802734375,
-0.005840301513671875,
0.0076751708984375,
0.00948333740234375,
0.0260467529296875,
0.020751953125,
0.042388916015625,
0.020904541015625,
0.024169921875,
-0.0172576904296875,
-0.00951385498046875,
0.0947265625,
0.0149688720703125,
-0.027252197265625,
-0.065673828125,
-0.005550384521484375,
0.032257080078125,
-0.021942138671875,
-0.02825927734375,
-0.0172576904296875,
0.048583984375,
0.00612640380859375,
0.043304443359375,
0.01317596435546875,
0.04803466796875,
-0.004344940185546875,
-0.0069122314453125,
0.0304107666015625,
-0.02117919921875,
0.0016040802001953125,
0.050018310546875,
0.04144287109375,
0.01544189453125,
-0.0252227783203125,
0.0271148681640625,
0.0572509765625,
-0.016387939453125,
-0.00572967529296875,
0.0302734375,
0.007289886474609375,
-0.0309295654296875,
0.02789306640625,
-0.046661376953125,
-0.0217742919921875,
-0.0005550384521484375,
0.03466796875,
-0.0221710205078125,
-0.0189056396484375,
0.06402587890625,
0.0224609375,
-0.025543212890625,
0.0243377685546875,
0.031768798828125,
-0.030792236328125,
-0.00417327880859375,
0.00002014636993408203,
0.0021724700927734375,
-0.00559234619140625,
-0.0173797607421875,
0.0047760009765625,
-0.0362548828125,
0.0372314453125,
-0.03466796875,
0.032135009765625,
-0.01119232177734375,
-0.032562255859375,
-0.034423828125,
0.01378631591796875,
0.044036865234375,
-0.06390380859375,
-0.047210693359375,
-0.0019130706787109375,
-0.0228424072265625,
0.0288543701171875,
-0.047393798828125,
0.01187896728515625,
-0.0237579345703125,
0.017486572265625,
-0.08160400390625,
0.0258026123046875,
0.064453125,
0.0584716796875,
0.008026123046875,
-0.018157958984375,
-0.07086181640625,
-0.040863037109375,
-0.040069580078125,
-0.04730224609375,
-0.0286865234375,
-0.0004935264587402344,
0.0092926025390625,
0.0196533203125,
-0.0088348388671875,
-0.0240478515625,
-0.008270263671875,
0.0008912086486816406,
0.0027446746826171875,
0.012359619140625,
-0.0238494873046875,
0.053497314453125,
-0.015625,
0.0447998046875,
-0.0265350341796875,
-0.0092926025390625,
-0.007511138916015625,
-0.0016145706176757812,
0.0113372802734375,
-0.053436279296875,
-0.03692626953125,
-0.0190277099609375,
-0.0643310546875,
0.05133056640625,
0.07818603515625,
-0.01142120361328125,
0.0165557861328125,
-0.007717132568359375,
0.00902557373046875,
-0.030181884765625,
-0.0187835693359375,
-0.00988006591796875,
-0.010833740234375,
-0.00783538818359375,
0.005039215087890625,
0.006450653076171875,
-0.00289154052734375,
-0.00811767578125,
-0.0041351318359375,
0.00794219970703125,
-0.012908935546875,
-0.01947021484375,
-0.03436279296875,
0.018310546875,
0.054779052734375,
0.020294189453125,
0.055023193359375,
0.007198333740234375,
0.0312347412109375,
0.04168701171875,
-0.044219970703125,
0.015045166015625,
-0.036224365234375,
-0.0019359588623046875,
-0.0236663818359375,
-0.0016508102416992188,
0.005115509033203125,
-0.0184173583984375,
0.00800323486328125,
0.0037479400634765625,
0.051422119140625,
-0.044036865234375,
0.0229949951171875,
0.022308349609375,
0.01073455810546875,
0.03778076171875,
0.005237579345703125,
0.0010967254638671875,
0.0262451171875,
-0.00738525390625,
-0.02239990234375,
-0.04608154296875,
-0.01222991943359375,
-0.00305938720703125,
-0.02252197265625,
-0.03564453125,
-0.0377197265625,
0.0015392303466796875,
0.0318603515625,
-0.0220184326171875,
-0.035797119140625,
-0.01678466796875,
-0.0189361572265625,
0.0104217529296875,
0.0186004638671875,
-0.02020263671875,
-0.05352783203125,
0.035003662109375,
-0.0202789306640625,
0.0034847259521484375,
0.0203399658203125,
-0.0428466796875,
0.024017333984375,
0.03173828125,
-0.018646240234375,
-0.00519561767578125,
0.01366424560546875,
-0.02178955078125,
0.0140838623046875,
-0.0242919921875,
0.03790283203125,
-0.0139923095703125,
-0.046600341796875,
0.00794219970703125,
-0.0107269287109375,
-0.052093505859375,
-0.01241302490234375,
-0.014068603515625,
0.040069580078125,
-0.0209503173828125,
-0.0025844573974609375,
0.01430511474609375,
0.061614990234375,
0.0148162841796875,
0.0298614501953125,
0.0152130126953125,
-0.051361083984375,
-0.04986572265625,
0.0160064697265625,
-0.07977294921875,
-0.029632568359375,
0.01309967041015625,
-0.01438140869140625,
0.08001708984375,
-0.01953125,
-0.013275146484375,
0.00897216796875,
0.04901123046875,
-0.00742340087890625,
0.0423583984375,
-0.0256500244140625,
0.025360107421875,
-0.01377105712890625,
0.04656982421875,
-0.036590576171875,
-0.00711822509765625,
0.00028252601623535156,
0.049224853515625,
0.02813720703125,
0.0026111602783203125,
-0.01482391357421875,
0.008056640625,
0.0831298828125,
0.0673828125,
0.033294677734375,
0.004886627197265625,
0.018463134765625,
0.01200103759765625,
0.0275726318359375,
0.004047393798828125,
0.0305023193359375,
0.0140838623046875,
-0.01154327392578125,
0.033905029296875,
0.01092529296875,
0.01459503173828125,
-0.017059326171875,
-0.0050048828125,
-0.01611328125,
-0.0029315948486328125,
0.0022449493408203125,
0.01399993896484375,
0.03363037109375,
0.0086517333984375,
0.03424072265625,
-0.038848876953125,
-0.07049560546875,
0.0020732879638671875,
0.0179443359375,
0.0036029815673828125,
0.047698974609375,
0.02252197265625,
0.0223236083984375,
-0.021270751953125,
-0.00405120849609375,
0.021942138671875,
0.006687164306640625,
-0.041259765625,
0.035430908203125,
-0.0160064697265625,
0.00893402099609375,
-0.068359375,
-0.0113067626953125,
0.04229736328125,
0.046905517578125,
-0.028778076171875,
-0.0169219970703125,
0.011627197265625,
0.0015325546264648438,
0.00203704833984375,
-0.038909912109375,
0.0025768280029296875,
-0.08294677734375,
-0.0472412109375,
-0.057373046875,
-0.02996826171875,
0.0136260986328125,
0.04083251953125,
-0.0103759765625,
-0.02313232421875,
-0.0007605552673339844,
-0.05767822265625,
-0.003734588623046875,
-0.01062774658203125,
0.01024627685546875,
0.035125732421875,
-0.01212310791015625,
0.07159423828125,
-0.03851318359375,
-0.0081024169921875,
-0.012176513671875,
0.03314208984375,
-0.006229400634765625,
0.0164794921875,
-0.01214599609375,
-0.0170440673828125,
-0.0357666015625,
0.031646728515625,
0.02703857421875,
0.044403076171875,
0.0706787109375,
0.0283355712890625,
-0.031280517578125,
0.005977630615234375,
0.043487548828125,
-0.0265045166015625,
-0.02032470703125,
-0.0223541259765625,
-0.00032210350036621094,
0.04534912109375,
0.00312042236328125,
0.0305023193359375,
-0.00640106201171875,
0.064453125,
-0.028106689453125,
0.0246734619140625,
-0.002925872802734375,
-0.01454925537109375,
0.058807373046875,
-0.01508331298828125,
0.053253173828125,
-0.00983428955078125,
-0.09893798828125,
-0.03857421875,
-0.01953125,
0.0017614364624023438,
0.0199127197265625,
0.030670166015625,
-0.004459381103515625,
0.01436614990234375,
0.014862060546875,
-0.041290283203125,
-0.0002541542053222656,
0.01349639892578125,
0.0374755859375,
0.00217437744140625,
-0.016845703125,
0.004001617431640625,
-0.065185546875,
-0.0361328125,
-0.0148468017578125,
0.0243682861328125,
0.0141143798828125,
0.0250244140625,
0.034759521484375,
0.021331787109375,
-0.0022735595703125,
0.033843994140625,
-0.01056671142578125,
-0.00858306884765625,
0.035736083984375,
0.02093505859375,
0.010772705078125,
-0.034454345703125,
0.04345703125,
-0.004383087158203125,
0.037841796875,
-0.04840087890625,
-0.006923675537109375,
-0.03643798828125,
0.0286712646484375,
-0.01227569580078125,
0.0513916015625,
-0.033905029296875,
-0.045928955078125,
-0.0548095703125,
-0.00797271728515625,
-0.0017232894897460938,
0.0087738037109375,
0.0152435302734375,
0.003086090087890625,
-0.008819580078125,
-0.0298919677734375,
0.004978179931640625,
-0.02313232421875,
0.00859832763671875,
0.01181793212890625,
-0.003574371337890625,
-0.0596923828125,
0.01617431640625,
0.003650665283203125,
-0.03057861328125,
0.0262908935546875,
0.0171051025390625,
0.0272369384765625,
-0.04534912109375,
-0.00690460205078125,
0.01259613037109375,
0.049835205078125,
0.0130767822265625,
0.00701141357421875,
-0.0310211181640625,
-0.0004863739013671875,
-0.022674560546875,
0.01318359375,
-0.02655029296875,
-0.023681640625,
0.010833740234375,
0.0230712890625,
0.010162353515625,
0.03009033203125,
-0.03826904296875,
-0.0161590576171875,
0.0338134765625,
0.027923583984375,
-0.0814208984375,
0.048004150390625,
0.0025196075439453125,
-0.01678466796875,
0.011993408203125,
-0.0283660888671875,
0.019073486328125,
0.0450439453125,
-0.0273590087890625,
-0.01971435546875,
-0.0311126708984375,
-0.0148773193359375,
-0.04559326171875,
0.0201263427734375,
0.03594970703125,
-0.034576416015625,
-0.01442718505859375,
-0.002414703369140625,
0.0311279296875,
0.0421142578125,
0.0458984375,
-0.01038360595703125,
0.011810302734375,
0.016021728515625,
-0.0294342041015625,
-0.0687255859375,
0.01465606689453125,
-0.0550537109375,
0.000782012939453125,
-0.01532745361328125,
0.027923583984375,
0.053680419921875,
-0.0214080810546875,
-0.08404541015625,
0.05267333984375,
-0.032501220703125,
-0.0286865234375,
-0.0118865966796875,
0.0204925537109375,
-0.0196685791015625,
0.0196685791015625,
0.018463134765625,
-0.037567138671875,
-0.00982666015625,
0.012054443359375,
-0.005962371826171875,
0.0689697265625,
0.0245513916015625,
-0.003917694091796875,
-0.028289794921875,
-0.0367431640625,
-0.03955078125,
0.00868988037109375,
0.0021839141845703125,
-0.02032470703125,
0.02716064453125,
0.0248565673828125,
-0.0261993408203125,
-0.0208892822265625,
0.012115478515625,
0.000873565673828125,
0.01739501953125,
-0.0038051605224609375,
-0.0526123046875,
-0.022308349609375,
0.037261962890625,
0.0372314453125,
0.0176544189453125,
-0.0171661376953125,
0.0004868507385253906,
-0.0789794921875,
-0.0246429443359375,
-0.018096923828125,
-0.0079803466796875,
-0.0291900634765625,
0.015899658203125,
0.01328277587890625,
-0.0038585662841796875,
0.01116943359375,
0.00027251243591308594,
-0.023101806640625,
0.006744384765625,
0.048553466796875,
0.03570556640625,
-0.10205078125,
0.083984375,
0.037261962890625,
-0.035247802734375,
0.0233612060546875,
0.003498077392578125,
-0.042144775390625,
0.040008544921875,
0.0123138427734375,
-0.0670166015625,
0.0345458984375,
-0.03070068359375,
-0.0013608932495117188,
-0.0236968994140625,
0.045196533203125,
-0.0236968994140625,
0.05126953125,
-0.0015621185302734375,
0.004634857177734375,
-0.0016841888427734375,
0.01348114013671875,
-0.01537322998046875,
0.034698486328125,
-0.00222015380859375,
-0.0097808837890625,
-0.021270751953125,
0.01702880859375,
-0.0147247314453125,
0.023193359375,
-0.00722503662109375,
0.0048065185546875,
0.030670166015625,
-0.0184783935546875,
0.0184173583984375,
0.01221466064453125,
-0.005641937255859375,
0.027252197265625,
-0.00911712646484375,
-0.00911712646484375,
-0.031646728515625,
-0.01715087890625
]
|
0d1b3b3a7009bc5979aac44097fe6f18414891ae | Wordpress Stackexchange
Q: register_sidebar notice I have updated my site manually, now I get below mentioned notice in the front and backend:
Notice: register_sidebar was called incorrectly. No id was set in the
arguments array for the "Main Sidebar" sidebar. Defaulting to
"sidebar-1". Manually set the id to "sidebar-1" to silence this notice
and keep existing sidebar content. Please see Debugging in WordPress
for more information. (This message was added in version 4.2.0.)
How to fix this?
A: *
*Find file where is register_sidebar ( must be on theme folder or plugins )
*add ID to sidebar
register_sidebar( array(
'name' => __( 'Main Sidebar', 'theme-slug' ),
'id' => 'change_me', // Add only this line
'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'theme-slug' ),
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h2 class="widgettitle">',
'after_title' => '</h2>',
) );
Or you can just disable notification in wp-config.php
edit WP_DEBUG to false
define('WP_DEBUG', false);
| Q: register_sidebar notice I have updated my site manually, now I get below mentioned notice in the front and backend:
Notice: register_sidebar was called incorrectly. No id was set in the
arguments array for the "Main Sidebar" sidebar. Defaulting to
"sidebar-1". Manually set the id to "sidebar-1" to silence this notice
and keep existing sidebar content. Please see Debugging in WordPress
for more information. (This message was added in version 4.2.0.)
How to fix this?
A: *
*Find file where is register_sidebar ( must be on theme folder or plugins )
*add ID to sidebar
register_sidebar( array(
'name' => __( 'Main Sidebar', 'theme-slug' ),
'id' => 'change_me', // Add only this line
'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'theme-slug' ),
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h2 class="widgettitle">',
'after_title' => '</h2>',
) );
Or you can just disable notification in wp-config.php
edit WP_DEBUG to false
define('WP_DEBUG', false);
A: Looks like you have a very old theme. You'll have to search the functions.php file for register_sidebar and make sure the $args follow the format mentioned in the codex.
| wordpress | {
"language": "en",
"length": 191,
"provenance": "stackexchange_00019.jsonl.gz:465635",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/227301"
} | [
0.035247802734375,
-0.0095367431640625,
0.0140533447265625,
-0.0100555419921875,
0.014892578125,
-0.025054931640625,
0.049591064453125,
-0.0292816162109375,
0.0017681121826171875,
0.00969696044921875,
-0.0037250518798828125,
-0.0180206298828125,
0.00420379638671875,
-0.0273590087890625,
-0.01763916015625,
-0.016815185546875,
0.01177215576171875,
0.0196380615234375,
0.0081024169921875,
-0.0260772705078125,
0.00045371055603027344,
-0.0300140380859375,
-0.005035400390625,
0.061737060546875,
0.004001617431640625,
-0.03955078125,
0.099609375,
-0.0379638671875,
0.01517486572265625,
-0.03485107421875,
0.0278778076171875,
0.0139007568359375,
0.027679443359375,
0.00661468505859375,
-0.01568603515625,
0.059600830078125,
0.00015795230865478516,
0.00756072998046875,
0.00356292724609375,
0.0237579345703125,
0.01352691650390625,
-0.0244598388671875,
0.050933837890625,
-0.01398468017578125,
-0.003948211669921875,
0.02001953125,
-0.0006804466247558594,
-0.019073486328125,
0.0033588409423828125,
-0.035400390625,
-0.001438140869140625,
0.0287628173828125,
0.01345062255859375,
-0.0160675048828125,
-0.02191162109375,
0.004119873046875,
-0.01148223876953125,
0.01015472412109375,
0.0251312255859375,
0.06561279296875,
-0.0038909912109375,
0.00727081298828125,
-0.01788330078125,
-0.07757568359375,
-0.01177215576171875,
-0.0278167724609375,
-0.023345947265625,
0.002460479736328125,
-0.0207672119140625,
0.00597381591796875,
0.048004150390625,
-0.032379150390625,
0.01204681396484375,
-0.0189361572265625,
-0.01291656494140625,
-0.0142822265625,
0.0105438232421875,
0.00606536865234375,
0.002796173095703125,
0.00620269775390625,
-0.0244140625,
-0.0205841064453125,
-0.04296875,
0.01568603515625,
0.0098419189453125,
0.042694091796875,
-0.0161590576171875,
-0.01403045654296875,
-0.01348876953125,
0.007904052734375,
-0.00970458984375,
-0.06103515625,
0.016082763671875,
0.01079559326171875,
0.004291534423828125,
-0.0430908203125,
0.05755615234375,
0.09600830078125,
-0.031646728515625,
-0.020599365234375,
-0.0257568359375,
-0.0193939208984375,
-0.01739501953125,
-0.0345458984375,
0.00589752197265625,
0.06298828125,
-0.00890350341796875,
0.02313232421875,
0.043670654296875,
0.01209259033203125,
0.02032470703125,
-0.01393890380859375,
-0.0185394287109375,
-0.006988525390625,
-0.051727294921875,
0.02215576171875,
-0.0252532958984375,
-0.03363037109375,
0.0019054412841796875,
0.03277587890625,
0.0311737060546875,
0.056365966796875,
0.007358551025390625,
-0.049560546875,
0.0276031494140625,
0.0044708251953125,
-0.022064208984375,
-0.048828125,
-0.015350341796875,
0.0086212158203125,
-0.05181884765625,
-0.007663726806640625,
0.07061767578125,
0.052032470703125,
0.04473876953125,
-0.031768798828125,
0.0517578125,
0.036346435546875,
-0.007633209228515625,
0.03094482421875,
-0.01506805419921875,
-0.0135650634765625,
-0.01611328125,
-0.0171051025390625,
0.004131317138671875,
0.015869140625,
0.0158843994140625,
-0.01096343994140625,
0.0014581680297851562,
-0.006755828857421875,
-0.0212860107421875,
-0.032928466796875,
0.041473388671875,
0.02392578125,
-0.040740966796875,
0.004425048828125,
0.02178955078125,
-0.021392822265625,
-0.04779052734375,
-0.049468994140625,
-0.017425537109375,
-0.0224151611328125,
-0.001659393310546875,
-0.039703369140625,
-0.044952392578125,
0.0372314453125,
-0.006565093994140625,
-0.007232666015625,
0.0316162109375,
0.0281829833984375,
0.048828125,
-0.05023193359375,
-0.0260009765625,
-0.0012226104736328125,
-0.00875091552734375,
0.0149383544921875,
0.007373809814453125,
-0.004199981689453125,
0.01087188720703125,
0.004062652587890625,
-0.0177154541015625,
-0.033843994140625,
0.03363037109375,
-0.0138397216796875,
-0.09356689453125,
0.05316162109375,
-0.00677490234375,
0.093505859375,
0.05615234375,
-0.0009975433349609375,
0.03253173828125,
-0.01242828369140625,
-0.024139404296875,
0.03790283203125,
-0.00618743896484375,
-0.027252197265625,
-0.0029354095458984375,
0.0003275871276855469,
-0.00569915771484375,
-0.0165252685546875,
-0.0292205810546875,
-0.01332855224609375,
0.042022705078125,
-0.00876617431640625,
-0.05670166015625,
0.033477783203125,
-0.032135009765625,
0.045196533203125,
0.03497314453125,
0.01329803466796875,
0.009857177734375,
0.0430908203125,
-0.039093017578125,
-0.006687164306640625,
-0.058197021484375,
0.01125335693359375,
-0.0323486328125,
0.036041259765625,
-0.00786590576171875,
0.013397216796875,
-0.025909423828125,
-0.0064849853515625,
0.0027408599853515625,
0.005748748779296875,
0.06402587890625,
-0.03338623046875,
0.005123138427734375,
-0.034942626953125,
0.04925537109375,
0.0019626617431640625,
-0.051177978515625,
0.0283355712890625,
-0.029144287109375,
-0.046661376953125,
-0.04400634765625,
0.0017690658569335938,
0.0140228271484375,
-0.0263519287109375,
0.0163116455078125,
0.041351318359375,
0.00986480712890625,
-0.00982666015625,
-0.01428985595703125,
0.0352783203125,
0.0018224716186523438,
-0.0202789306640625,
0.0068359375,
0.01104736328125,
-0.0202789306640625,
-0.0255584716796875,
-0.023681640625,
-0.008056640625,
0.034393310546875,
-0.0239715576171875,
0.0259857177734375,
0.0267791748046875,
-0.01511383056640625,
-0.0172119140625,
-0.0242919921875,
-0.0229644775390625,
0.025604248046875,
-0.1114501953125,
-0.0623779296875,
-0.03485107421875,
0.0209197998046875,
0.022064208984375,
0.037689208984375,
0.02423095703125,
-0.0026645660400390625,
-0.00002753734588623047,
-0.01178741455078125,
-0.041290283203125,
-0.0230712890625,
0.007366180419921875,
0.063232421875,
-0.03607177734375,
-0.0419921875,
0.0169677734375,
0.007778167724609375,
-0.0085296630859375,
-0.03314208984375,
-0.007221221923828125,
-0.00946044921875,
-0.005828857421875,
-0.0242919921875,
-0.09271240234375,
0.036712646484375,
0.008514404296875,
0.00408172607421875,
-0.047576904296875,
-0.025360107421875,
0.04107666015625,
-0.0229949951171875,
0.04571533203125,
0.0131072998046875,
-0.017486572265625,
0.05450439453125,
-0.0025005340576171875,
0.00333404541015625,
-0.007465362548828125,
0.0531005859375,
0.0426025390625,
-0.0145721435546875,
-0.000926971435546875,
0.01346588134765625,
0.03631591796875,
0.044952392578125,
-0.0164337158203125,
-0.0013780593872070312,
0.006267547607421875,
-0.045989990234375,
-0.00934600830078125,
-0.0024471282958984375,
0.037506103515625,
-0.0222625732421875,
-0.048980712890625,
0.0170745849609375,
0.0023365020751953125,
-0.028839111328125,
-0.03692626953125,
-0.033447265625,
-0.0038509368896484375,
-0.04498291015625,
0.0174102783203125,
0.00007474422454833984,
0.0270538330078125,
0.0066070556640625,
-0.00016963481903076172,
-0.0185089111328125,
-0.0241546630859375,
-0.0411376953125,
-0.0268402099609375,
-0.03466796875,
0.034149169921875,
0.0011501312255859375,
0.004314422607421875,
0.003955841064453125,
0.03131103515625,
0.021636962890625,
-0.01279449462890625,
0.055206298828125,
-0.024261474609375,
-0.01934814453125,
0.0196685791015625,
-0.007537841796875,
-0.03350830078125,
-0.01177978515625,
0.0012874603271484375,
0.0121307373046875,
-0.0132293701171875,
0.012786865234375,
-0.0150299072265625,
0.003841400146484375,
-0.00714111328125,
-0.0032978057861328125,
0.0055084228515625,
0.01459503173828125,
0.00820159912109375,
-0.0021915435791015625,
-0.035186767578125,
-0.04400634765625,
0.0007777214050292969,
-0.060028076171875,
-0.01092529296875,
0.033599853515625,
-0.00677490234375,
-0.018035888671875,
0.00015997886657714844,
0.0029926300048828125,
0.004268646240234375,
0.0236053466796875,
-0.0191650390625,
0.05010986328125,
-0.0235137939453125,
-0.036102294921875,
-0.050262451171875,
-0.017791748046875,
-0.02606201171875,
-0.004184722900390625,
-0.007007598876953125,
0.0284881591796875,
0.021392822265625,
0.005413055419921875,
0.0103607177734375,
-0.013092041015625,
0.04351806640625,
-0.041351318359375,
0.002468109130859375,
-0.0145263671875,
-0.0296478271484375,
0.01206207275390625,
0.06317138671875,
-0.049224853515625,
-0.004421234130859375,
0.0343017578125,
0.0168914794921875,
-0.014068603515625,
0.005550384521484375,
-0.040252685546875,
-0.022308349609375,
-0.00688934326171875,
0.005367279052734375,
-0.0006055831909179688,
-0.032470703125,
-0.0241851806640625,
-0.01044464111328125,
-0.0184173583984375,
-0.00399017333984375,
0.047088623046875,
-0.04217529296875,
0.021636962890625,
0.0005025863647460938,
-0.00937652587890625,
-0.0179901123046875,
-0.035797119140625,
-0.0257720947265625,
-0.109130859375,
-0.0248565673828125,
-0.010589599609375,
0.09686279296875,
0.00336456298828125,
0.00021183490753173828,
-0.0267333984375,
0.059967041015625,
0.016387939453125,
-0.0292816162109375,
0.029052734375,
0.01464080810546875,
0.012969970703125,
-0.0008993148803710938,
0.00702667236328125,
-0.0247955322265625,
-0.0069580078125,
0.0100555419921875,
-0.057281494140625,
-0.01139068603515625,
-0.00872039794921875,
-0.0193939208984375,
0.057098388671875,
-0.04766845703125,
-0.054931640625,
-0.01474761962890625,
0.01800537109375,
0.0244293212890625,
0.0107879638671875,
-0.003643035888671875,
-0.0311431884765625,
-0.051910400390625,
0.0080718994140625,
-0.067626953125,
-0.0211181640625,
0.0261383056640625,
0.0748291015625,
0.03155517578125,
0.01190185546875,
0.0108795166015625,
-0.01446533203125,
0.042816162109375,
0.0379638671875,
0.017730712890625,
0.035247802734375,
-0.0225372314453125,
0.0077667236328125,
0.027984619140625,
-0.0166778564453125,
0.019378662109375,
0.03363037109375,
0.00269317626953125,
-0.033203125,
0.0217742919921875,
-0.0105438232421875,
-0.01393890380859375,
-0.0022335052490234375,
-0.00543212890625,
0.009765625,
0.019744873046875,
-0.007190704345703125,
-0.0161590576171875,
0.0133819580078125,
0.0117950439453125,
-0.0260162353515625,
0.012054443359375,
0.04095458984375,
-0.01116180419921875,
-0.029876708984375,
0.032958984375,
-0.047515869140625,
-0.00951385498046875,
-0.0181121826171875,
0.015625,
-0.044708251953125,
0.0188751220703125,
0.005054473876953125,
0.017578125,
-0.0102691650390625,
0.037139892578125,
-0.0059661865234375,
0.061981201171875,
0.05316162109375,
-0.0149688720703125,
0.01349639892578125,
0.0291748046875,
0.0195159912109375,
-0.0272674560546875,
0.05706787109375,
0.0513916015625,
0.0084991455078125,
-0.0015039443969726562,
-0.01800537109375,
0.0113067626953125,
0.0016069412231445312,
-0.03350830078125,
0.0289306640625,
0.0014848709106445312,
-0.01291656494140625,
-0.0024547576904296875,
-0.00004023313522338867,
0.01348876953125,
-0.02459716796875,
-0.003635406494140625,
0.01247406005859375,
0.02093505859375,
0.03912353515625,
0.009613037109375,
-0.01363372802734375,
0.0164794921875,
0.007358551025390625,
0.019287109375,
-0.0270538330078125,
0.007488250732421875,
0.0460205078125,
0.02685546875,
0.0211944580078125,
-0.018707275390625,
-0.00722503662109375,
-0.0106201171875,
0.00868988037109375,
0.0634765625,
-0.02862548828125,
-0.075927734375,
-0.0241241455078125,
-0.004817962646484375,
0.0335693359375,
-0.07330322265625,
0.01983642578125,
-0.0182037353515625,
0.0186920166015625,
0.007419586181640625,
-0.00031375885009765625,
-0.0224761962890625,
-0.00255584716796875,
0.005893707275390625,
0.045074462890625,
-0.0022220611572265625,
-0.006473541259765625,
-0.04046630859375,
-0.00974273681640625,
0.0010747909545898438,
-0.00594329833984375,
0.0166778564453125,
-0.02374267578125,
0.01003265380859375,
-0.0197296142578125,
0.0041656494140625,
-0.0162200927734375,
0.0235137939453125,
0.0298004150390625,
0.005214691162109375,
-0.034881591796875,
0.0001246929168701172,
-0.0430908203125,
-0.0225677490234375,
-0.0259552001953125,
-0.035491943359375,
-0.0316162109375,
-0.007610321044921875,
0.020965576171875,
0.0204010009765625,
-0.006992340087890625,
-0.040618896484375,
-0.055328369140625,
0.02215576171875,
0.05792236328125,
0.07373046875,
-0.022979736328125,
0.0204010009765625,
0.027496337890625,
0.0035266876220703125,
-0.0028533935546875,
-0.01457977294921875,
-0.005001068115234375,
-0.004245758056640625,
0.0019197463989257812,
-0.0255584716796875,
-0.0111083984375,
-0.007259368896484375,
-0.008331298828125,
-0.002994537353515625,
0.031524658203125,
-0.023590087890625,
0.028106689453125,
0.006046295166015625,
-0.007171630859375,
0.00023651123046875,
0.0135650634765625,
0.021636962890625,
0.04901123046875,
0.0296630859375,
-0.03173828125,
-0.0274658203125,
0.013458251953125,
0.015594482421875,
-0.0008206367492675781,
-0.024322509765625,
-0.00740814208984375,
0.0025997161865234375,
-0.08099365234375,
0.051727294921875,
0.064453125,
0.0175628662109375,
0.043701171875,
-0.0231475830078125,
0.01097869873046875,
0.0298309326171875,
0.01123809814453125,
-0.00899505615234375,
0.006153106689453125,
0.08685302734375,
0.0228424072265625,
-0.023468017578125,
0.0712890625,
-0.02947998046875,
0.011383056640625,
0.06011962890625,
0.0809326171875,
-0.056549072265625,
0.0013484954833984375,
0.0291900634765625,
-0.015777587890625,
0.006053924560546875,
-0.01678466796875,
-0.045135498046875,
-0.012939453125,
0.06768798828125,
-0.0218963623046875,
-0.032989501953125,
0.0218658447265625,
0.0304412841796875,
0.010528564453125,
0.0083160400390625,
0.08270263671875,
0.022064208984375,
0.0026493072509765625,
-0.039337158203125,
0.0179595947265625,
-0.002552032470703125,
-0.01361083984375,
0.016510009765625,
0.0396728515625,
-0.037750244140625,
-0.09454345703125,
-0.007106781005859375,
0.02423095703125,
-0.052947998046875,
0.047088623046875,
0.0038700103759765625,
0.003963470458984375,
-0.0166168212890625,
0.0136566162109375,
0.0215606689453125,
-0.051300048828125,
-0.0288238525390625,
0.03814697265625,
-0.00921630859375,
-0.007720947265625,
0.00817108154296875,
-0.030059814453125,
-0.0017499923706054688,
-0.02044677734375,
-0.022186279296875,
-0.0196990966796875,
0.0020904541015625,
0.1236572265625,
-0.051361083984375,
-0.01739501953125,
-0.0008382797241210938,
0.0224151611328125,
0.006893157958984375,
-0.048797607421875,
0.0189056396484375,
-0.1083984375,
-0.040557861328125,
-0.02105712890625,
-0.0306396484375,
-0.02923583984375,
-0.039794921875,
-0.0175323486328125,
0.112060546875,
-0.0352783203125,
-0.02862548828125,
0.03472900390625,
0.054351806640625,
-0.06805419921875,
0.01410675048828125,
-0.0226593017578125,
0.04302978515625,
-0.0295562744140625,
0.039947509765625,
-0.028533935546875,
0.001483917236328125,
0.0200042724609375,
0.0173187255859375,
0.061767578125,
0.015869140625,
0.016876220703125,
0.0026721954345703125,
0.00554656982421875,
-0.0033130645751953125,
-0.05572509765625,
0.0261077880859375,
-0.0306854248046875,
-0.01255035400390625,
-0.0275726318359375,
-0.035858154296875,
0.034698486328125,
-0.05487060546875,
-0.03955078125,
-0.014923095703125,
0.0026493072509765625,
0.018157958984375,
0.0197906494140625,
0.052398681640625,
0.03594970703125,
-0.006175994873046875,
-0.00597381591796875,
-0.03460693359375,
-0.01318359375,
0.0284423828125,
0.01146697998046875,
-0.004001617431640625,
0.040191650390625,
-0.0487060546875,
0.066162109375,
0.005802154541015625,
0.006359100341796875,
0.0113677978515625,
0.0238037109375,
0.032440185546875,
-0.02008056640625,
0.00080108642578125,
0.0209197998046875,
-0.0206451416015625,
0.00800323486328125,
0.040008544921875,
0.055755615234375,
0.0090179443359375,
-0.00455474853515625,
0.046539306640625,
0.0340576171875,
-0.013641357421875,
-0.01139068603515625,
0.009552001953125,
-0.0108184814453125,
-0.0159454345703125,
-0.0032024383544921875,
-0.0174407958984375,
-0.06414794921875,
-0.0206298828125,
-0.05010986328125,
-0.03155517578125,
0.023895263671875,
0.04241943359375,
-0.01184844970703125,
-0.024322509765625,
0.016082763671875,
-0.06158447265625,
-0.0506591796875,
0.01715087890625,
0.02606201171875,
0.06304931640625,
0.0222625732421875,
0.021881103515625,
-0.007049560546875,
-0.0221710205078125,
-0.02801513671875,
0.00421905517578125,
-0.0234527587890625,
0.04364013671875,
-0.050506591796875,
-0.0255584716796875,
0.0037059783935546875,
0.031829833984375,
-0.005290985107421875,
0.005207061767578125,
0.03857421875,
0.034698486328125,
-0.046630859375,
-0.0189666748046875,
0.017608642578125,
-0.03204345703125,
-0.016815185546875,
-0.050750732421875,
0.021209716796875,
0.024871826171875,
0.023681640625,
0.0058746337890625,
0.0130462646484375,
0.01296234130859375,
0.0017480850219726562,
-0.011016845703125,
0.0171966552734375,
0.006343841552734375,
0.0877685546875,
0.0012979507446289062,
-0.00403594970703125,
0.027008056640625,
-0.055084228515625,
-0.01497650146484375,
0.0132598876953125,
-0.06036376953125,
0.006946563720703125,
0.034698486328125,
-0.03656005859375,
0.013641357421875,
0.00704193115234375,
0.011138916015625,
-0.001850128173828125,
-0.033843994140625,
0.0224456787109375,
0.034698486328125,
0.01377105712890625,
0.02294921875,
-0.04534912109375,
-0.00026345252990722656,
0.0043487548828125,
-0.01113128662109375,
0.0081939697265625,
0.0218505859375,
0.04083251953125,
0.0164794921875,
-0.048828125,
0.0176239013671875,
-0.045166015625,
-0.037689208984375,
-0.00823211669921875,
0.0098876953125,
0.0088348388671875,
0.006435394287109375,
-0.07080078125,
0.06646728515625,
0.017974853515625,
0.005859375,
0.09967041015625,
-0.030059814453125,
-0.01971435546875,
-0.056915283203125,
-0.0184326171875,
-0.0245208740234375,
-0.05816650390625,
-0.0186767578125,
0.04364013671875,
-0.00978851318359375,
0.022247314453125,
-0.0219268798828125,
0.018707275390625,
-0.0081329345703125,
0.00806427001953125,
0.00850677490234375,
-0.01369476318359375,
0.00616455078125,
0.0181427001953125,
-0.02447509765625,
0.0101470947265625,
-0.0207977294921875,
-0.029327392578125,
0.0313720703125,
-0.016448974609375,
0.048004150390625,
-0.04534912109375,
0.056427001953125,
0.00817108154296875,
0.03436279296875,
0.033355712890625,
-0.043609619140625,
0.01497650146484375,
0.0270538330078125,
0.0039005279541015625,
0.01360321044921875,
0.030914306640625,
0.0031414031982421875,
-0.06292724609375,
-0.04022216796875,
0.021820068359375,
-0.068115234375,
0.017608642578125,
-0.035125732421875,
-0.002857208251953125,
0.053741455078125,
-0.0168304443359375,
-0.0528564453125,
0.0277862548828125,
-0.042510986328125,
0.07025146484375,
-0.03863525390625,
0.04046630859375,
-0.0205535888671875,
-0.03106689453125,
-0.07171630859375,
0.004657745361328125,
-0.043914794921875,
0.0022735595703125,
-0.022491455078125,
-0.0226898193359375,
-0.006153106689453125,
0.00279998779296875,
-0.0343017578125,
-0.039947509765625,
-0.0080108642578125,
-0.0092010498046875,
0.038818359375,
-0.02142333984375,
-0.0185546875,
0.0216064453125,
-0.01290130615234375,
-0.06658935546875,
-0.0185394287109375,
-0.0350341796875,
0.00431060791015625,
-0.035858154296875,
0.0003769397735595703,
-0.01153564453125,
-0.03668212890625,
-0.0312042236328125,
0.031585693359375,
-0.0008983612060546875,
-0.016357421875,
-0.0245513916015625,
-0.0025997161865234375,
-0.025604248046875,
0.0224151611328125,
0.01154327392578125,
-0.07867431640625,
-0.00019240379333496094,
0.048675537109375,
0.0105133056640625,
0.0305023193359375,
0.014862060546875,
0.0172882080078125,
-0.045684814453125,
-0.01093292236328125,
-0.0282440185546875,
-0.0001857280731201172,
-0.01534271240234375,
-0.0093994140625,
0.00449371337890625,
-0.0183258056640625,
-0.058013916015625,
-0.007671356201171875,
0.01209259033203125,
0.041748046875,
-0.0212249755859375,
-0.038360595703125,
-0.0299072265625,
0.005565643310546875,
0.06866455078125,
0.059539794921875,
0.025390625,
-0.056304931640625,
-0.0201568603515625,
-0.0226898193359375,
-0.02056884765625,
0.002773284912109375,
0.0140838623046875,
-0.050872802734375,
-0.005077362060546875,
0.01041412353515625,
0.0004863739013671875,
-0.02520751953125,
0.01035308837890625,
-0.0258331298828125,
-0.00484466552734375,
0.0106964111328125,
-0.00006628036499023438,
-0.0182952880859375,
-0.034210205078125,
-0.0005192756652832031,
0.004241943359375,
0.0127716064453125,
-0.0093536376953125,
0.024749755859375,
-0.0111541748046875,
0.0316162109375,
0.01061248779296875,
-0.0009775161743164062,
-0.044342041015625,
0.00019466876983642578,
0.005428314208984375,
0.048431396484375,
-0.0360107421875,
-0.0273590087890625,
-0.00617218017578125,
-0.0003733634948730469,
-0.0101470947265625,
-0.0103302001953125,
0.0229644775390625,
-0.0289764404296875,
-0.0207061767578125,
0.0662841796875,
-0.00855255126953125,
0.0220184326171875,
-0.011871337890625,
0.06085205078125,
0.0022754669189453125,
-0.025848388671875,
0.01551055908203125,
-0.03619384765625,
0.00909423828125,
-0.005588531494140625,
0.05145263671875,
-0.037200927734375,
0.031646728515625,
-0.0030422210693359375,
0.0230712890625,
0.0239105224609375
]
|
ba1270361753497f3fa01243f09f03b1811d324d | Wordpress Stackexchange
Q: Dynamically add styles to WP TinyMCE editor I want to add custom styles to Wordpress using dynamic arrays.
My question is how can I add the two arrays to the style_formats array within the 'my_mce_before_init_insert_formats' function dynamically?
I've tried using array_merge(), and a few other dynamic array techniques but it just resets the TinyMCE editor to its default settings or breaks it completely.
function my_mce_before_init_insert_formats( $init_array ) {
$style_formats = array(
array(
'title' => '.translation',
'block' => 'blockquote',
'classes' => 'translation',
'wrapper' => true,
),
//add arrays here
);
$init_array['style_formats'] = json_encode( $style_formats );
return $init_array;
}
//arrays to add
array(
'title' => '⇠.rtl',
'block' => 'blockquote',
'classes' => 'rtl',
'wrapper' => true,
),
array(
'title' => '.ltr⇢',
'block' => 'blockquote',
'classes' => 'ltr',
'wrapper' => true,
),
| Q: Dynamically add styles to WP TinyMCE editor I want to add custom styles to Wordpress using dynamic arrays.
My question is how can I add the two arrays to the style_formats array within the 'my_mce_before_init_insert_formats' function dynamically?
I've tried using array_merge(), and a few other dynamic array techniques but it just resets the TinyMCE editor to its default settings or breaks it completely.
function my_mce_before_init_insert_formats( $init_array ) {
$style_formats = array(
array(
'title' => '.translation',
'block' => 'blockquote',
'classes' => 'translation',
'wrapper' => true,
),
//add arrays here
);
$init_array['style_formats'] = json_encode( $style_formats );
return $init_array;
}
//arrays to add
array(
'title' => '⇠.rtl',
'block' => 'blockquote',
'classes' => 'rtl',
'wrapper' => true,
),
array(
'title' => '.ltr⇢',
'block' => 'blockquote',
'classes' => 'ltr',
'wrapper' => true,
),
| wordpress | {
"language": "en",
"length": 129,
"provenance": "stackexchange_00019.jsonl.gz:465664",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/227431"
} | [
0.0174560546875,
0.00832366943359375,
-0.058685302734375,
-0.03814697265625,
0.0096893310546875,
-0.039764404296875,
0.0301055908203125,
0.00936126708984375,
-0.045928955078125,
0.0321044921875,
0.022308349609375,
0.0302276611328125,
-0.01910400390625,
-0.02496337890625,
0.0380859375,
-0.0037689208984375,
0.0445556640625,
-0.0016546249389648438,
0.043792724609375,
-0.0016107559204101562,
-0.0211334228515625,
0.02923583984375,
0.035736083984375,
0.0260009765625,
0.013275146484375,
-0.006732940673828125,
0.04119873046875,
-0.021087646484375,
0.00989532470703125,
-0.00911712646484375,
0.01059722900390625,
0.0009369850158691406,
0.01021575927734375,
0.08184814453125,
-0.07647705078125,
0.058349609375,
0.041656494140625,
0.01061248779296875,
0.01346588134765625,
0.048553466796875,
0.0209808349609375,
-0.013580322265625,
0.0190887451171875,
0.0243682861328125,
-0.027618408203125,
-0.032562255859375,
0.04034423828125,
0.007488250732421875,
-0.00460052490234375,
-0.014251708984375,
-0.0017843246459960938,
0.004302978515625,
0.01512908935546875,
-0.0305328369140625,
0.0008931159973144531,
0.0134429931640625,
-0.051055908203125,
0.005741119384765625,
-0.006107330322265625,
0.05035400390625,
0.036041259765625,
0.0211944580078125,
-0.004375457763671875,
-0.0020542144775390625,
0.00962066650390625,
-0.003986358642578125,
-0.00011610984802246094,
0.017822265625,
0.0014715194702148438,
-0.00301361083984375,
0.0081329345703125,
-0.0159759521484375,
-0.0237884521484375,
-0.07183837890625,
0.0126800537109375,
0.07684326171875,
-0.0697021484375,
-0.04229736328125,
0.021514892578125,
0.0006704330444335938,
0.000004291534423828125,
-0.007781982421875,
-0.0007882118225097656,
-0.0509033203125,
0.03277587890625,
-0.0213470458984375,
-0.00833892822265625,
-0.0009832382202148438,
-0.01407623291015625,
-0.044281005859375,
-0.017059326171875,
-0.07391357421875,
-0.0382080078125,
0.0360107421875,
0.0163421630859375,
-0.033233642578125,
0.01287078857421875,
0.039154052734375,
-0.01494598388671875,
0.03173828125,
-0.019561767578125,
-0.04290771484375,
0.048248291015625,
-0.054229736328125,
0.00656890869140625,
-0.0306396484375,
-0.017364501953125,
0.043914794921875,
0.057830810546875,
0.04486083984375,
-0.009918212890625,
0.0306854248046875,
0.0085296630859375,
-0.017181396484375,
-0.00146484375,
-0.004146575927734375,
-0.0207366943359375,
0.053253173828125,
0.0036945343017578125,
0.0189056396484375,
-0.00714111328125,
0.0263214111328125,
0.0050048828125,
-0.0284271240234375,
-0.00914764404296875,
-0.01007080078125,
-0.006114959716796875,
-0.033477783203125,
0.00029087066650390625,
0.03448486328125,
-0.038238525390625,
0.0035247802734375,
0.052490234375,
0.03485107421875,
0.01428985595703125,
-0.0241546630859375,
0.04241943359375,
0.0065155029296875,
-0.01331329345703125,
-0.007076263427734375,
0.0285797119140625,
-0.0160675048828125,
-0.01165008544921875,
0.017181396484375,
-0.020416259765625,
0.0031642913818359375,
0.01451873779296875,
0.0277252197265625,
-0.020050048828125,
-0.0570068359375,
0.0386962890625,
-0.044921875,
0.0489501953125,
0.0027217864990234375,
-0.0265655517578125,
-0.0009622573852539062,
0.044952392578125,
-0.0283203125,
-0.0221099853515625,
-0.04742431640625,
-0.004810333251953125,
0.01210784912109375,
0.03350830078125,
-0.01242828369140625,
-0.01324462890625,
-0.0286407470703125,
-0.04193115234375,
0.0016851425170898438,
0.03472900390625,
0.049468994140625,
-0.0209197998046875,
-0.003337860107421875,
0.0660400390625,
0.0372314453125,
-0.00945281982421875,
0.026763916015625,
-0.013427734375,
0.030181884765625,
0.0193634033203125,
0.02410888671875,
-0.00013720989227294922,
-0.04669189453125,
0.054931640625,
-0.0167999267578125,
-0.0165557861328125,
-0.0204010009765625,
-0.004791259765625,
0.05633544921875,
0.0215911865234375,
0.042327880859375,
-0.060791015625,
-0.01490020751953125,
0.023895263671875,
-0.035858154296875,
0.00539398193359375,
-0.0046539306640625,
-0.032196044921875,
0.0098724365234375,
-0.00850677490234375,
-0.006793975830078125,
-0.004428863525390625,
-0.0142364501953125,
0.028106689453125,
-0.020263671875,
-0.033599853515625,
0.00827789306640625,
-0.007328033447265625,
0.030914306640625,
-0.037353515625,
-0.02630615234375,
-0.0007390975952148438,
-0.060028076171875,
0.01092529296875,
0.021575927734375,
-0.0116729736328125,
0.02874755859375,
0.007793426513671875,
0.0222015380859375,
0.006786346435546875,
0.016571044921875,
0.0310821533203125,
-0.015289306640625,
0.0292205810546875,
0.041748046875,
0.02783203125,
-0.04437255859375,
-0.0027313232421875,
-0.036102294921875,
0.0018863677978515625,
0.0101165771484375,
-0.05047607421875,
0.0079193115234375,
0.0048065185546875,
0.002685546875,
-0.034637451171875,
-0.0219268798828125,
-0.0450439453125,
-0.09686279296875,
0.0243072509765625,
0.07550048828125,
0.02880859375,
0.034759521484375,
0.00829315185546875,
0.03363037109375,
0.07818603515625,
0.003177642822265625,
0.00360870361328125,
0.003566741943359375,
0.008026123046875,
0.01971435546875,
0.0117340087890625,
-0.0209808349609375,
0.00795745849609375,
-0.058563232421875,
0.020233154296875,
0.0248260498046875,
-0.022125244140625,
0.00455474853515625,
0.0189361572265625,
-0.01265716552734375,
0.01215362548828125,
0.01476287841796875,
0.00983428955078125,
0.003955841064453125,
0.04815673828125,
0.0277557373046875,
0.02703857421875,
0.0260467529296875,
-0.050750732421875,
0.054718017578125,
0.01346588134765625,
-0.0380859375,
0.006092071533203125,
-0.004058837890625,
-0.0155792236328125,
0.036834716796875,
-0.033294677734375,
0.01505279541015625,
0.039764404296875,
0.007366180419921875,
-0.0299530029296875,
0.04217529296875,
-0.022491455078125,
-0.022369384765625,
-0.0286102294921875,
-0.027496337890625,
-0.0011987686157226562,
-0.021514892578125,
0.041778564453125,
0.005039215087890625,
0.0104827880859375,
0.037261962890625,
-0.01265716552734375,
0.04376220703125,
0.0018548965454101562,
-0.024322509765625,
0.03863525390625,
-0.0296173095703125,
0.0282135009765625,
-0.012603759765625,
0.0309600830078125,
0.0511474609375,
-0.0010461807250976562,
-0.0104827880859375,
-0.0021991729736328125,
0.007274627685546875,
0.001861572265625,
0.0166473388671875,
-0.0032405853271484375,
-0.05389404296875,
0.006679534912109375,
-0.0181884765625,
0.023162841796875,
0.010406494140625,
0.0276336669921875,
-0.005649566650390625,
-0.0004487037658691406,
0.03485107421875,
0.01006317138671875,
-0.0128936767578125,
0.0621337890625,
-0.056915283203125,
-0.004581451416015625,
-0.02117919921875,
-0.048858642578125,
-0.0299072265625,
0.0201263427734375,
-0.01255035400390625,
0.0113372802734375,
-0.01282501220703125,
0.0179443359375,
-0.00222015380859375,
-0.028839111328125,
-0.036865234375,
0.005779266357421875,
-0.01050567626953125,
0.016632080078125,
0.059539794921875,
0.017730712890625,
-0.031890869140625,
0.02569580078125,
-0.00247955322265625,
-0.015716552734375,
0.045684814453125,
0.01384735107421875,
-0.0041656494140625,
0.0158843994140625,
0.00466156005859375,
-0.00783538818359375,
0.0472412109375,
-0.05657958984375,
-0.022430419921875,
0.005046844482421875,
0.00951385498046875,
0.0197906494140625,
0.02545166015625,
0.01250457763671875,
0.0247802734375,
0.036163330078125,
-0.026519775390625,
-0.016448974609375,
0.0310516357421875,
-0.0054779052734375,
0.030914306640625,
-0.01512908935546875,
-0.0267791748046875,
0.00012671947479248047,
0.050323486328125,
-0.0438232421875,
-0.018585205078125,
0.039642333984375,
-0.048980712890625,
-0.0003161430358886719,
-0.02703857421875,
-0.039337158203125,
0.00244140625,
0.0037689208984375,
-0.021514892578125,
-0.0034637451171875,
-0.01076507568359375,
-0.019195556640625,
-0.0250701904296875,
-0.001667022705078125,
-0.0413818359375,
-0.022003173828125,
0.004573822021484375,
-0.039886474609375,
0.056732177734375,
-0.032196044921875,
0.0011539459228515625,
-0.004184722900390625,
0.06280517578125,
-0.024749755859375,
-0.01280975341796875,
0.0255584716796875,
0.0294342041015625,
-0.06927490234375,
-0.053314208984375,
-0.044891357421875,
-0.0056304931640625,
-0.0457763671875,
0.002838134765625,
-0.0288543701171875,
0.0018720626831054688,
-0.00850677490234375,
0.039459228515625,
-0.0197601318359375,
-0.046417236328125,
0.00991058349609375,
-0.0047454833984375,
-0.012664794921875,
0.0216522216796875,
-0.0287933349609375,
0.0248870849609375,
0.0017414093017578125,
-0.0303955078125,
-0.114990234375,
-0.0155029296875,
-0.037872314453125,
0.080810546875,
0.00922393798828125,
-0.0032062530517578125,
-0.0120086669921875,
0.059295654296875,
-0.0185394287109375,
-0.0126495361328125,
0.0328369140625,
0.057525634765625,
-0.037109375,
-0.053558349609375,
-0.003742218017578125,
-0.060150146484375,
0.01140594482421875,
0.0282135009765625,
-0.042083740234375,
0.04266357421875,
-0.0142364501953125,
-0.0165252685546875,
0.039031982421875,
-0.056976318359375,
-0.01068878173828125,
-0.009490966796875,
0.0038089752197265625,
0.03985595703125,
-0.00348663330078125,
-0.004901885986328125,
-0.03375244140625,
-0.0142822265625,
0.032073974609375,
-0.042938232421875,
-0.005901336669921875,
0.006168365478515625,
0.0836181640625,
0.016143798828125,
-0.01241302490234375,
-0.051910400390625,
-0.00800323486328125,
0.047027587890625,
-0.012725830078125,
0.0013914108276367188,
0.0038356781005859375,
-0.033294677734375,
0.00946807861328125,
0.0213775634765625,
0.00975799560546875,
-0.036346435546875,
0.08636474609375,
-0.0131988525390625,
-0.0100860595703125,
0.0191192626953125,
-0.0201416015625,
0.00225067138671875,
-0.0010585784912109375,
-0.00859832763671875,
0.0148162841796875,
0.036834716796875,
0.0191192626953125,
0.0090179443359375,
-0.02520751953125,
-0.03143310546875,
-0.01425933837890625,
0.00620269775390625,
0.035858154296875,
0.0300140380859375,
0.0279998779296875,
-0.005092620849609375,
-0.016357421875,
-0.0091705322265625,
-0.004863739013671875,
0.057861328125,
-0.0170135498046875,
0.035675048828125,
0.0151214599609375,
0.033599853515625,
0.001422882080078125,
0.033447265625,
0.0056915283203125,
0.025787353515625,
-0.00722503662109375,
-0.03472900390625,
-0.06292724609375,
0.0002658367156982422,
0.057952880859375,
-0.0109405517578125,
-0.01549530029296875,
0.00319671630859375,
0.01189422607421875,
-0.0110321044921875,
0.01361083984375,
-0.006893157958984375,
-0.004039764404296875,
-0.01239013671875,
0.03570556640625,
-0.00514984130859375,
0.0001996755599975586,
-0.016876220703125,
0.07781982421875,
0.023651123046875,
0.0215301513671875,
-0.0214080810546875,
0.01206207275390625,
0.032135009765625,
0.0352783203125,
0.0036563873291015625,
0.01224517822265625,
-0.01276397705078125,
0.0372314453125,
0.01537322998046875,
-0.0276947021484375,
0.009857177734375,
0.00018215179443359375,
0.037353515625,
-0.0048675537109375,
-0.032470703125,
0.0290374755859375,
-0.0419921875,
-0.0217132568359375,
-0.0300140380859375,
-0.0430908203125,
-0.029937744140625,
0.00933837890625,
0.0147857666015625,
-0.0080413818359375,
0.004390716552734375,
-0.018829345703125,
-0.0036106109619140625,
-0.052581787109375,
0.01018524169921875,
-0.0130615234375,
-0.00431060791015625,
-0.0063934326171875,
-0.0244903564453125,
-0.04522705078125,
-0.018951416015625,
0.00403594970703125,
-0.08734130859375,
-0.050811767578125,
0.0021610260009765625,
0.0010709762573242188,
-0.007778167724609375,
-0.0352783203125,
0.0262908935546875,
-0.01203155517578125,
-0.00026988983154296875,
-0.033203125,
0.0202178955078125,
0.00829315185546875,
0.01392364501953125,
0.0008411407470703125,
-0.01114654541015625,
-0.022705078125,
-0.0206146240234375,
-0.042999267578125,
-0.05657958984375,
-0.0235137939453125,
-0.007801055908203125,
0.0047760009765625,
0.0290985107421875,
0.008544921875,
0.01335906982421875,
-0.024444580078125,
0.00585174560546875,
0.004276275634765625,
0.031463623046875,
-0.0012006759643554688,
0.0285186767578125,
-0.00867462158203125,
0.06475830078125,
0.001392364501953125,
-0.0036640167236328125,
-0.025115966796875,
-0.0220184326171875,
0.003765106201171875,
-0.0187835693359375,
-0.006664276123046875,
-0.005405426025390625,
-0.00605010986328125,
0.00786590576171875,
0.046875,
-0.00133514404296875,
0.04595947265625,
-0.0228118896484375,
-0.0017595291137695312,
-0.0132598876953125,
0.0020046234130859375,
-0.03564453125,
0.020294189453125,
0.0244140625,
-0.00923919677734375,
0.0357666015625,
-0.026123046875,
0.0293731689453125,
0.00933074951171875,
-0.03515625,
0.031341552734375,
-0.00820159912109375,
-0.048095703125,
0.03302001953125,
0.0307464599609375,
0.014923095703125,
0.0267791748046875,
-0.007381439208984375,
0.005641937255859375,
-0.01483917236328125,
-0.00640869140625,
0.0225372314453125,
0.041595458984375,
0.049224853515625,
0.0029811859130859375,
0.025787353515625,
0.013427734375,
-0.006839752197265625,
0.0026988983154296875,
0.030364990234375,
0.043701171875,
-0.062347412109375,
-0.0053558349609375,
-0.01120758056640625,
-0.01328277587890625,
0.06561279296875,
-0.00882720947265625,
0.0004584789276123047,
-0.00411224365234375,
0.042510986328125,
-0.01215362548828125,
-0.005054473876953125,
0.0217437744140625,
-0.00458526611328125,
-0.0167694091796875,
-0.042999267578125,
0.002849578857421875,
0.0082244873046875,
-0.0210723876953125,
0.033599853515625,
0.0087890625,
0.0096282958984375,
0.0220947265625,
0.01448822021484375,
-0.05267333984375,
-0.0278778076171875,
-0.0330810546875,
-0.0640869140625,
-0.05859375,
-0.034912109375,
0.0340576171875,
0.0036449432373046875,
0.0205230712890625,
0.044097900390625,
-0.007328033447265625,
0.0211181640625,
0.00260162353515625,
0.0110931396484375,
0.01139068603515625,
-0.0284423828125,
0.0379638671875,
0.0196685791015625,
-0.017578125,
0.0302886962890625,
0.01351165771484375,
-0.0301971435546875,
0.01678466796875,
0.053802490234375,
-0.004608154296875,
-0.002780914306640625,
-0.0254058837890625,
0.0305328369140625,
0.01236724853515625,
0.0020046234130859375,
-0.043365478515625,
0.01041412353515625,
-0.10125732421875,
-0.054412841796875,
-0.0167999267578125,
-0.025238037109375,
0.0231781005859375,
-0.0419921875,
-0.0594482421875,
0.06915283203125,
0.00005924701690673828,
0.0203094482421875,
0.0239715576171875,
0.0250701904296875,
-0.058319091796875,
-0.01434326171875,
0.0237884521484375,
0.0007662773132324219,
-0.020660400390625,
-0.04583740234375,
-0.0174102783203125,
-0.0022640228271484375,
-0.01580810546875,
0.064697265625,
0.0091094970703125,
-0.006870269775390625,
0.00832366943359375,
0.016937255859375,
0.037933349609375,
0.033203125,
-0.007419586181640625,
-0.01031494140625,
-0.005207061767578125,
-0.042999267578125,
-0.000018894672393798828,
0.035003662109375,
0.027618408203125,
-0.01123046875,
-0.04034423828125,
0.003978729248046875,
-0.01198577880859375,
-0.0104522705078125,
0.03466796875,
-0.0293731689453125,
-0.00975799560546875,
-0.00554656982421875,
-0.00917816162109375,
-0.057891845703125,
-0.025726318359375,
0.0416259765625,
-0.0013761520385742188,
-0.0248260498046875,
-0.061309814453125,
-0.01407623291015625,
0.01233673095703125,
0.006591796875,
-0.01605224609375,
-0.00798797607421875,
-0.00679779052734375,
0.0152435302734375,
-0.0203094482421875,
-0.0275115966796875,
0.02520751953125,
0.01873779296875,
0.03839111328125,
0.007110595703125,
0.01154327392578125,
-0.03009033203125,
0.0081787109375,
0.0311431884765625,
0.040557861328125,
-0.039642333984375,
-0.0255584716796875,
0.0082855224609375,
0.01171112060546875,
-0.0069427490234375,
-0.0330810546875,
-0.027679443359375,
-0.04290771484375,
0.0160369873046875,
0.0113372802734375,
-0.0223846435546875,
-0.0187835693359375,
0.014862060546875,
0.0038394927978515625,
0.035003662109375,
0.0027294158935546875,
-0.0238037109375,
-0.06103515625,
-0.01442718505859375,
-0.003627777099609375,
0.08026123046875,
0.057220458984375,
0.053558349609375,
-0.01282501220703125,
-0.045166015625,
-0.0276947021484375,
0.02294921875,
0.023193359375,
0.0140228271484375,
0.004428863525390625,
0.0390625,
-0.00449371337890625,
0.0114288330078125,
0.0234832763671875,
0.039093017578125,
0.036712646484375,
0.0252532958984375,
0.0158843994140625,
0.0124359130859375,
0.0001614093780517578,
-0.0179290771484375,
-0.049163818359375,
-0.056610107421875,
-0.0168914794921875,
0.021820068359375,
-0.004360198974609375,
0.033233642578125,
-0.014312744140625,
0.028045654296875,
-0.004955291748046875,
0.00748443603515625,
0.0024738311767578125,
-0.015655517578125,
0.004817962646484375,
-0.0147705078125,
0.00835418701171875,
0.018280029296875,
-0.00856781005859375,
0.016387939453125,
-0.041595458984375,
-0.039276123046875,
0.0267791748046875,
0.0390625,
-0.0031642913818359375,
0.0225830078125,
-0.00787353515625,
-0.0276336669921875,
0.0030059814453125,
0.0132904052734375,
0.00409698486328125,
0.01532745361328125,
0.002956390380859375,
-0.00811004638671875,
-0.07861328125,
-0.03424072265625,
-0.03839111328125,
0.04498291015625,
-0.002376556396484375,
0.0855712890625,
-0.01496124267578125,
0.0151824951171875,
-0.0277252197265625,
0.005336761474609375,
0.029632568359375,
-0.016998291015625,
0.048309326171875,
0.0841064453125,
0.00008863210678100586,
-0.0638427734375,
0.006687164306640625,
0.020538330078125,
0.034393310546875,
-0.019195556640625,
-0.037750244140625,
0.0243072509765625,
0.025054931640625,
0.01532745361328125,
0.056610107421875,
-0.01413726806640625,
-0.037811279296875,
-0.05364990234375,
0.0015954971313476562,
0.01454925537109375,
0.03021240234375,
-0.006839752197265625,
0.0158843994140625,
0.038909912109375,
-0.019775390625,
0.05560302734375,
-0.03338623046875,
0.07000732421875,
0.032806396484375,
0.00405120849609375,
-0.055419921875,
-0.0014858245849609375,
-0.005573272705078125,
0.00423431396484375,
0.00666046142578125,
0.047332763671875,
0.008758544921875,
-0.022064208984375,
0.061767578125,
0.0736083984375,
0.08074951171875,
-0.0180206298828125,
0.03271484375,
0.055938720703125,
-0.0008463859558105469,
0.032928466796875,
0.00897216796875,
-0.037628173828125,
-0.0767822265625,
0.03289794921875,
0.0264434814453125,
-0.03228759765625,
0.0018491744995117188,
-0.08758544921875,
-0.00403594970703125,
0.0216217041015625,
-0.00439453125,
-0.036651611328125,
0.01348876953125,
-0.03424072265625,
0.038604736328125,
-0.0162200927734375,
-0.01690673828125,
0.0079498291015625,
0.043487548828125,
-0.0212860107421875,
-0.04925537109375,
-0.0235748291015625,
0.044952392578125,
-0.04547119140625,
0.01474761962890625,
0.033905029296875,
-0.007518768310546875,
0.0362548828125,
0.00690460205078125,
0.0204315185546875,
0.0494384765625,
-0.0853271484375,
-0.006389617919921875,
0.10455322265625,
-0.044158935546875,
-0.033172607421875,
-0.1190185546875,
-0.0236663818359375,
-0.088134765625,
0.02392578125,
0.05072021484375,
-0.0379638671875,
-0.01009368896484375,
-0.044525146484375,
-0.08331298828125,
0.043365478515625,
0.0174102783203125,
-0.035552978515625,
-0.044891357421875,
0.024688720703125,
-0.006069183349609375,
-0.021697998046875,
-0.0237884521484375,
0.03424072265625,
0.02685546875,
0.04266357421875,
0.00691986083984375,
0.0323486328125,
0.0145721435546875,
-0.0187835693359375,
-0.055999755859375,
-0.004749298095703125,
-0.01316070556640625,
0.02191162109375,
0.016326904296875,
-0.02874755859375,
0.04119873046875,
0.0305328369140625,
-0.03082275390625,
-0.033447265625,
0.00925445556640625,
-0.007080078125,
-0.0187530517578125,
-0.0222625732421875,
-0.04803466796875,
-0.005832672119140625,
0.118408203125,
0.0584716796875,
0.030670166015625,
-0.0484619140625,
0.03143310546875,
0.0189056396484375,
-0.05194091796875,
0.0139617919921875,
0.0281219482421875,
-0.03753662109375,
-0.00630950927734375,
0.0021762847900390625,
0.025909423828125,
-0.0005197525024414062,
-0.040313720703125,
-0.0119781494140625,
-0.0223236083984375,
-0.00981903076171875,
0.0157318115234375,
-0.0181427001953125,
0.038116455078125,
0.063232421875,
-0.0341796875,
-0.0044097900390625,
0.00748443603515625,
-0.00826263427734375,
0.033111572265625,
0.0312042236328125,
-0.05572509765625,
0.01041412353515625,
-0.01053619384765625,
0.00855255126953125,
-0.0158843994140625,
0.0120697021484375,
-0.0172271728515625,
0.04644775390625,
-0.034210205078125,
0.0007233619689941406,
0.00003415346145629883,
-0.01763916015625,
-0.00691986083984375,
0.046844482421875,
0.00994110107421875,
0.08380126953125,
-0.03369140625,
0.02313232421875,
-0.0361328125,
0.0137786865234375,
0.0033512115478515625,
0.0204315185546875,
0.0284576416015625,
0.0088653564453125,
0.015533447265625,
-0.004302978515625,
-0.032623291015625,
-0.0226287841796875,
-0.0155181884765625,
0.045806884765625,
-0.0123138427734375,
0.00394439697265625
]
|
f7714fd1f4530755ac46277fd5edd1ddc98406f3 | Wordpress Stackexchange
Q: $wpdb->delete column values IN ARRAY()? I am wondering if this is possible?
$wpdb->delete(
'table_name',
array('id' => array(1, 2, 3)),
array('%d')
);
So, in this situation, it should remove 3 rows at once, and call the database only 1 time. I have a lot of deletions that could be possible with my script and would rather it just perform the deletion once, instead of having to loop through all of the ids and do a $wpdb->delete on each one individually. Is this possible? Seems like it should be...
A: No, wpdb::delete does not handle anything other than WHERE field = X. You can just use the query method instead:
$ids = implode( ',', array_map( 'absint', $ids ) );
$wpdb->query( "DELETE FROM table_name WHERE ID IN($ids)" );
| Q: $wpdb->delete column values IN ARRAY()? I am wondering if this is possible?
$wpdb->delete(
'table_name',
array('id' => array(1, 2, 3)),
array('%d')
);
So, in this situation, it should remove 3 rows at once, and call the database only 1 time. I have a lot of deletions that could be possible with my script and would rather it just perform the deletion once, instead of having to loop through all of the ids and do a $wpdb->delete on each one individually. Is this possible? Seems like it should be...
A: No, wpdb::delete does not handle anything other than WHERE field = X. You can just use the query method instead:
$ids = implode( ',', array_map( 'absint', $ids ) );
$wpdb->query( "DELETE FROM table_name WHERE ID IN($ids)" );
| wordpress | {
"language": "en",
"length": 126,
"provenance": "stackexchange_00019.jsonl.gz:465668",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/227443"
} | [
0.0016393661499023438,
0.030059814453125,
-0.033782958984375,
0.0302734375,
0.039031982421875,
-0.03472900390625,
0.0755615234375,
-0.0275115966796875,
0.057281494140625,
0.018951416015625,
-0.08099365234375,
-0.01342010498046875,
-0.0006146430969238281,
0.0011157989501953125,
-0.038299560546875,
-0.039825439453125,
0.035003662109375,
-0.0202789306640625,
0.025421142578125,
0.011932373046875,
-0.00934600830078125,
0.033721923828125,
0.022216796875,
0.0255584716796875,
0.0174560546875,
-0.0023822784423828125,
0.008087158203125,
0.0005211830139160156,
0.0178680419921875,
-0.0228271484375,
0.0088958740234375,
0.0163726806640625,
-0.030975341796875,
0.034942626953125,
0.053741455078125,
0.017547607421875,
0.041656494140625,
0.0164794921875,
0.04644775390625,
0.01558685302734375,
0.0228729248046875,
-0.00939178466796875,
0.007843017578125,
0.01230621337890625,
-0.0207977294921875,
-0.012237548828125,
0.032989501953125,
-0.0007619857788085938,
0.0175933837890625,
0.0037479400634765625,
-0.0012502670288085938,
0.048553466796875,
0.00440216064453125,
-0.035400390625,
0.007251739501953125,
0.025665283203125,
-0.036834716796875,
0.006679534912109375,
0.03704833984375,
0.038238525390625,
-0.01061248779296875,
-0.0111083984375,
0.0036640167236328125,
-0.03497314453125,
0.0010023117065429688,
0.0225830078125,
0.032318115234375,
-0.0014543533325195312,
0.005817413330078125,
-0.011932373046875,
-0.002513885498046875,
-0.006748199462890625,
-0.01448822021484375,
-0.042877197265625,
-0.031585693359375,
0.03643798828125,
0.00860595703125,
-0.0195465087890625,
-0.008270263671875,
0.0035419464111328125,
-0.0219573974609375,
-0.00428009033203125,
-0.06060791015625,
-0.007389068603515625,
0.005809783935546875,
0.0269012451171875,
-0.02783203125,
-0.01018524169921875,
-0.0202789306640625,
-0.042572021484375,
-0.02008056640625,
-0.0487060546875,
-0.026763916015625,
0.007144927978515625,
0.0007948875427246094,
-0.0250396728515625,
-0.00742340087890625,
0.01180267333984375,
0.0004603862762451172,
-0.0008640289306640625,
-0.004634857177734375,
-0.033721923828125,
-0.03204345703125,
-0.0038509368896484375,
0.003772735595703125,
0.0033931732177734375,
0.0149993896484375,
0.007129669189453125,
0.01116180419921875,
0.02984619140625,
-0.02484130859375,
0.0023174285888671875,
0.0092620849609375,
-0.015594482421875,
-0.03179931640625,
-0.018768310546875,
-0.03369140625,
0.0008778572082519531,
0.00789642333984375,
-0.04339599609375,
-0.0310211181640625,
0.006282806396484375,
-0.07659912109375,
0.0033016204833984375,
0.0246124267578125,
-0.006763458251953125,
0.01336669921875,
0.046966552734375,
-0.0010137557983398438,
-0.0277252197265625,
-0.065185546875,
0.049957275390625,
0.1102294921875,
0.037628173828125,
0.037872314453125,
-0.008270263671875,
0.031463623046875,
-0.005825042724609375,
0.029327392578125,
-0.01045989990234375,
0.033111572265625,
-0.03192138671875,
-0.023773193359375,
0.018310546875,
0.01554107666015625,
0.00402069091796875,
0.01416778564453125,
0.0021915435791015625,
0.0112762451171875,
-0.005176544189453125,
-0.0254669189453125,
0.01441192626953125,
0.034759521484375,
0.0276641845703125,
0.003185272216796875,
-0.0255279541015625,
0.06402587890625,
-0.05499267578125,
-0.017730712890625,
-0.06634521484375,
0.01073455810546875,
-0.033935546875,
-0.035614013671875,
-0.050506591796875,
-0.08770751953125,
0.045135498046875,
-0.04010009765625,
-0.022552490234375,
0.034759521484375,
0.0217437744140625,
-0.016815185546875,
-0.036956787109375,
0.04052734375,
0.0404052734375,
-0.0140533447265625,
0.059814453125,
-0.01338958740234375,
-0.0217132568359375,
0.022369384765625,
-0.00276947021484375,
-0.0264739990234375,
-0.044403076171875,
-0.005279541015625,
0.01427459716796875,
-0.05548095703125,
0.0413818359375,
0.0049285888671875,
0.09295654296875,
0.024566650390625,
0.02459716796875,
-0.00044465065002441406,
-0.0105743408203125,
0.0110931396484375,
0.021331787109375,
-0.003665924072265625,
-0.0831298828125,
-0.01493072509765625,
-0.0289459228515625,
-0.01445770263671875,
0.004589080810546875,
0.034637451171875,
0.00441741943359375,
0.016998291015625,
-0.0099639892578125,
-0.059906005859375,
0.034210205078125,
-0.0216064453125,
0.042938232421875,
-0.06451416015625,
0.004131317138671875,
0.0357666015625,
0.01068115234375,
-0.041229248046875,
-0.005168914794921875,
-0.01239013671875,
-0.01033782958984375,
-0.01049041748046875,
0.0227813720703125,
-0.0004897117614746094,
0.01715087890625,
-0.0306854248046875,
-0.0272979736328125,
-0.0212860107421875,
-0.005908966064453125,
0.032928466796875,
-0.040374755859375,
0.0013437271118164062,
-0.0297698974609375,
0.05908203125,
-0.016937255859375,
0.0128173828125,
0.016510009765625,
0.0151519775390625,
0.044647216796875,
0.0022640228271484375,
-0.005886077880859375,
0.01314544677734375,
-0.09844970703125,
0.01474761962890625,
0.044586181640625,
0.0204620361328125,
-0.005435943603515625,
-0.0291595458984375,
-0.01458740234375,
0.01375579833984375,
-0.031646728515625,
-0.007465362548828125,
-0.0038814544677734375,
-0.00952911376953125,
0.022979736328125,
-0.0220947265625,
-0.0025920867919921875,
0.019866943359375,
-0.0341796875,
-0.006496429443359375,
0.044952392578125,
-0.025482177734375,
0.006282806396484375,
-0.0034332275390625,
0.0045623779296875,
-0.0246124267578125,
-0.0194091796875,
0.0279998779296875,
-0.0257568359375,
0.039764404296875,
-0.01404571533203125,
0.031707763671875,
0.0178985595703125,
-0.0159149169921875,
0.0108642578125,
0.004482269287109375,
-0.04296875,
0.00860595703125,
0.0166778564453125,
-0.07781982421875,
0.038726806640625,
-0.01520538330078125,
0.02862548828125,
0.01035308837890625,
-0.00982666015625,
0.01009368896484375,
0.056610107421875,
-0.0146331787109375,
-0.0230712890625,
-0.00778961181640625,
-0.004131317138671875,
-0.019256591796875,
-0.0031757354736328125,
-0.0253143310546875,
-0.002391815185546875,
0.02685546875,
0.04864501953125,
-0.0149688720703125,
0.018463134765625,
-0.0049896240234375,
0.01445770263671875,
0.04193115234375,
-0.0142822265625,
0.0177459716796875,
-0.019866943359375,
0.007598876953125,
0.05450439453125,
-0.0088653564453125,
-0.00843048095703125,
0.005176544189453125,
0.0184173583984375,
0.03411865234375,
-0.01873779296875,
-0.0210113525390625,
0.00661468505859375,
-0.050018310546875,
0.0173797607421875,
0.030914306640625,
0.08465576171875,
-0.0011758804321289062,
-0.047882080078125,
0.0177459716796875,
0.04754638671875,
-0.048675537109375,
-0.0921630859375,
0.0555419921875,
-0.0125732421875,
0.005298614501953125,
-0.03009033203125,
-0.019683837890625,
-0.00891876220703125,
-0.010009765625,
-0.00817108154296875,
0.01001739501953125,
0.0195465087890625,
0.0238494873046875,
0.0232086181640625,
-0.0294647216796875,
-0.01654052734375,
0.004024505615234375,
0.0205078125,
-0.0024871826171875,
0.0458984375,
-0.01276397705078125,
-0.052276611328125,
-0.00308990478515625,
-0.003116607666015625,
0.003528594970703125,
0.01458740234375,
0.04345703125,
-0.020751953125,
-0.035797119140625,
0.01302337646484375,
-0.0004944801330566406,
0.01505279541015625,
-0.034942626953125,
-0.0123138427734375,
0.00894927978515625,
0.032257080078125,
0.056854248046875,
-0.0408935546875,
-0.04058837890625,
0.0394287109375,
0.00457000732421875,
-0.042327880859375,
0.0011129379272460938,
-0.0164794921875,
-0.0220947265625,
-0.033111572265625,
0.0215606689453125,
0.004894256591796875,
-0.029327392578125,
0.00562286376953125,
0.052978515625,
0.0271759033203125,
-0.043304443359375,
0.01537322998046875,
0.03704833984375,
0.017913818359375,
0.06011962890625,
-0.023529052734375,
0.02264404296875,
-0.0308380126953125,
-0.02117919921875,
-0.0060882568359375,
-0.00908660888671875,
-0.017059326171875,
-0.0185089111328125,
-0.05157470703125,
0.0030765533447265625,
0.055633544921875,
0.01129913330078125,
0.022125244140625,
-0.00948333740234375,
-0.0302886962890625,
-0.000052988529205322266,
0.08087158203125,
-0.0258331298828125,
-0.02947998046875,
-0.028472900390625,
0.0308380126953125,
-0.0194854736328125,
-0.0594482421875,
0.01303863525390625,
-0.009368896484375,
-0.046295166015625,
0.027191162109375,
-0.00959014892578125,
-0.00390625,
-0.00817108154296875,
0.057586669921875,
-0.01312255859375,
-0.0307464599609375,
0.042083740234375,
-0.0526123046875,
0.00588226318359375,
0.024993896484375,
-0.007396697998046875,
-0.01244354248046875,
-0.0211334228515625,
-0.038330078125,
-0.07037353515625,
-0.01483917236328125,
-0.0105743408203125,
0.05914306640625,
0.0004761219024658203,
0.0257568359375,
0.00414276123046875,
0.06378173828125,
-0.02301025390625,
0.031341552734375,
-0.014495849609375,
0.033050537109375,
-0.0477294921875,
-0.00986480712890625,
0.007198333740234375,
-0.040985107421875,
-0.00904083251953125,
-0.0557861328125,
0.006366729736328125,
-0.0171661376953125,
-0.038543701171875,
0.020050048828125,
-0.043304443359375,
0.01348876953125,
0.014556884765625,
-0.026123046875,
-0.038604736328125,
0.042510986328125,
-0.051727294921875,
0.033111572265625,
-0.045654296875,
-0.031158447265625,
0.03668212890625,
0.0161285400390625,
-0.00482940673828125,
0.0175323486328125,
0.072509765625,
0.00257110595703125,
-0.042572021484375,
-0.1055908203125,
-0.00757598876953125,
0.0322265625,
-0.00737762451171875,
0.0323486328125,
0.0033588409423828125,
-0.0274200439453125,
0.0509033203125,
0.017181396484375,
-0.004772186279296875,
-0.01290130615234375,
0.047637939453125,
0.00901031494140625,
-0.00634765625,
0.0019855499267578125,
-0.0250701904296875,
0.01235198974609375,
0.043060302734375,
0.00687408447265625,
-0.01511383056640625,
-0.000629425048828125,
0.04345703125,
0.00943756103515625,
-0.032684326171875,
-0.0511474609375,
-0.0419921875,
0.010650634765625,
-0.0230712890625,
0.043731689453125,
-0.001407623291015625,
0.00904083251953125,
0.040679931640625,
0.03497314453125,
0.013275146484375,
-0.01560211181640625,
0.0257568359375,
-0.0228118896484375,
0.035736083984375,
-0.0147552490234375,
-0.0012102127075195312,
-0.023834228515625,
-0.01806640625,
0.051422119140625,
0.01131439208984375,
-0.0340576171875,
0.00982666015625,
-0.0243377685546875,
0.0108795166015625,
-0.0013818740844726562,
-0.027984619140625,
0.0272369384765625,
0.062255859375,
-0.00977325439453125,
0.0194854736328125,
-0.04443359375,
0.03375244140625,
-0.041595458984375,
0.032470703125,
0.013671875,
-0.00540924072265625,
0.0189208984375,
0.02880859375,
0.0081024169921875,
0.03204345703125,
-0.021240234375,
0.07843017578125,
0.054290771484375,
0.039581298828125,
0.0003962516784667969,
-0.018096923828125,
0.0030803680419921875,
0.0168914794921875,
-0.058837890625,
-0.041748046875,
-0.01148223876953125,
0.0279998779296875,
0.0399169921875,
0.0023288726806640625,
-0.017822265625,
0.01971435546875,
0.0006389617919921875,
0.003482818603515625,
0.0223541259765625,
-0.01165771484375,
-0.0577392578125,
-0.01107025146484375,
0.005863189697265625,
-0.0056304931640625,
-0.012725830078125,
0.021270751953125,
-0.02490234375,
-0.0178070068359375,
0.0113372802734375,
-0.01399993896484375,
0.046295166015625,
-0.048126220703125,
-0.06610107421875,
0.024444580078125,
-0.028106689453125,
-0.043182373046875,
-0.00952911376953125,
-0.0110931396484375,
-0.01953125,
0.0026645660400390625,
0.025482177734375,
-0.0076751708984375,
0.0416259765625,
-0.0282745361328125,
-0.0077362060546875,
0.0084991455078125,
-0.006168365478515625,
0.06060791015625,
0.04827880859375,
0.0039215087890625,
-0.0254364013671875,
-0.021820068359375,
-0.0129241943359375,
-0.000644683837890625,
-0.048095703125,
0.007083892822265625,
-0.004390716552734375,
-0.018280029296875,
0.0007462501525878906,
0.01338958740234375,
0.01338958740234375,
-0.00968170166015625,
0.01824951171875,
-0.018157958984375,
-0.038970947265625,
-0.01390838623046875,
0.0228118896484375,
0.0169219970703125,
-0.0057220458984375,
0.0197601318359375,
0.019866943359375,
0.01971435546875,
-0.0213470458984375,
0.04486083984375,
-0.01213836669921875,
-0.029022216796875,
-0.03485107421875,
-0.043487548828125,
-0.079833984375,
0.0033721923828125,
-0.0243682861328125,
0.0248870849609375,
-0.045379638671875,
-0.0265655517578125,
-0.02484130859375,
0.072998046875,
-0.0518798828125,
0.0306396484375,
-0.017059326171875,
-0.0109100341796875,
-0.0272369384765625,
-0.0374755859375,
0.02606201171875,
-0.016265869140625,
-0.01776123046875,
-0.021240234375,
0.016876220703125,
-0.0099945068359375,
0.036895751953125,
0.0283355712890625,
0.00621795654296875,
0.0382080078125,
-0.00623321533203125,
0.0161590576171875,
0.00548553466796875,
-0.014007568359375,
0.01357269287109375,
0.0268402099609375,
0.046051025390625,
-0.0142059326171875,
-0.0018863677978515625,
0.0198822021484375,
-0.0190277099609375,
0.023162841796875,
0.042266845703125,
0.06396484375,
-0.079833984375,
0.031524658203125,
0.011505126953125,
0.0045013427734375,
0.04425048828125,
-0.014984130859375,
-0.002956390380859375,
0.0115966796875,
-0.0100860595703125,
0.0212860107421875,
-0.045684814453125,
-0.01284027099609375,
0.03228759765625,
0.0285186767578125,
-0.030914306640625,
-0.0087890625,
-0.01322174072265625,
-0.0288848876953125,
-0.003078460693359375,
0.0209197998046875,
-0.0011186599731445312,
-0.0092926025390625,
0.017303466796875,
0.0219573974609375,
-0.004077911376953125,
-0.046630859375,
0.03363037109375,
-0.01140594482421875,
-0.0231170654296875,
0.004581451416015625,
-0.0038433074951171875,
-0.0167388916015625,
0.043243408203125,
-0.0149688720703125,
0.0019588470458984375,
0.0318603515625,
-0.06085205078125,
-0.09332275390625,
-0.0085296630859375,
0.0232391357421875,
0.0183868408203125,
-0.06402587890625,
0.03594970703125,
-0.0650634765625,
0.00577545166015625,
0.0014591217041015625,
0.0212860107421875,
0.047027587890625,
-0.0186004638671875,
-0.019134521484375,
0.0372314453125,
0.036865234375,
-0.011962890625,
-0.00726318359375,
0.0109100341796875,
-0.06121826171875,
-0.044464111328125,
-0.009490966796875,
-0.048431396484375,
0.0263214111328125,
-0.0079345703125,
-0.058319091796875,
0.065673828125,
0.0245513916015625,
-0.00969696044921875,
0.0131683349609375,
0.035430908203125,
-0.0396728515625,
-0.0033092498779296875,
-0.03851318359375,
0.006404876708984375,
0.00031280517578125,
0.01418304443359375,
-0.003536224365234375,
0.007537841796875,
0.0015630722045898438,
-0.0008525848388671875,
0.0465087890625,
-0.00862884521484375,
0.031524658203125,
-0.011322021484375,
0.04888916015625,
0.0687255859375,
-0.003528594970703125,
-0.0230712890625,
-0.001750946044921875,
0.016448974609375,
0.058380126953125,
-0.0360107421875,
0.0259246826171875,
0.0008220672607421875,
0.009063720703125,
-0.0005774497985839844,
0.00917816162109375,
0.03741455078125,
0.019378662109375,
0.0099639892578125,
0.032379150390625,
-0.021514892578125,
-0.01233673095703125,
-0.0709228515625,
0.01354217529296875,
0.0074005126953125,
0.0210418701171875,
-0.011444091796875,
-0.00958251953125,
-0.01529693603515625,
0.037841796875,
0.0160675048828125,
0.01959228515625,
0.07318115234375,
0.013702392578125,
0.047637939453125,
-0.0132598876953125,
0.01020050048828125,
-0.0259857177734375,
0.00678253173828125,
0.0728759765625,
0.04571533203125,
0.03497314453125,
-0.01458740234375,
0.020050048828125,
0.0116424560546875,
0.0728759765625,
-0.06689453125,
-0.0408935546875,
0.00455474853515625,
0.009124755859375,
0.032623291015625,
0.005077362060546875,
0.05267333984375,
0.00986480712890625,
0.046905517578125,
-0.0299530029296875,
-0.0096893310546875,
0.018310546875,
-0.002132415771484375,
0.000032007694244384766,
0.0384521484375,
-0.01064300537109375,
-0.0219573974609375,
-0.019622802734375,
0.004512786865234375,
0.0210418701171875,
0.0159149169921875,
0.0020160675048828125,
0.0220489501953125,
0.003437042236328125,
0.0043487548828125,
-0.005641937255859375,
0.044158935546875,
-0.0211639404296875,
0.008270263671875,
-0.06842041015625,
-0.07086181640625,
-0.0010633468627929688,
0.05474853515625,
0.00485992431640625,
0.033111572265625,
0.049560546875,
0.036773681640625,
-0.02899169921875,
-0.00785064697265625,
0.0296478271484375,
-0.03167724609375,
-0.059173583984375,
-0.01499176025390625,
-0.0231170654296875,
0.01271820068359375,
-0.005641937255859375,
0.01421356201171875,
0.048309326171875,
-0.0247650146484375,
-0.007320404052734375,
-0.02227783203125,
0.002620697021484375,
0.00104522705078125,
0.0546875,
-0.013458251953125,
-0.060272216796875,
0.0004451274871826172,
-0.05133056640625,
0.0218353271484375,
-0.0194091796875,
-0.005802154541015625,
-0.020050048828125,
0.0196380615234375,
-0.0282135009765625,
0.059967041015625,
0.0208587646484375,
-0.046295166015625,
-0.01461029052734375,
0.060638427734375,
0.00024306774139404297,
0.0062408447265625,
0.02490234375,
-0.005161285400390625,
-0.0275115966796875,
-0.007061004638671875,
0.01861572265625,
0.01568603515625,
0.00559234619140625,
0.03521728515625,
-0.003631591796875,
-0.003856658935546875,
-0.0122833251953125,
0.05670166015625,
-0.03875732421875,
-0.004825592041015625,
0.03887939453125,
0.0016193389892578125,
0.00732421875,
-0.02734375,
-0.004093170166015625,
0.01062774658203125,
0.03363037109375,
-0.02984619140625,
-0.0153656005859375,
-0.014923095703125,
0.03375244140625,
0.01297760009765625,
0.0477294921875,
-0.0014591217041015625,
-0.026947021484375,
-0.0338134765625,
0.0035800933837890625,
0.0478515625,
0.1080322265625,
0.033660888671875,
0.01175689697265625,
-0.00695037841796875,
-0.0311431884765625,
0.0089263916015625,
-0.0265045166015625,
0.016357421875,
0.021087646484375,
0.0180206298828125,
-0.0271148681640625,
0.01019287109375,
-0.004673004150390625,
-0.0165863037109375,
0.018707275390625,
0.0467529296875,
0.01558685302734375,
-0.005344390869140625,
-0.01580810546875,
0.0130767822265625,
0.033599853515625,
-0.0009851455688476562,
0.0194549560546875,
-0.007152557373046875,
-0.0041656494140625,
-0.00428009033203125,
0.0015611648559570312,
-0.0239715576171875,
0.003154754638671875,
-0.0260162353515625,
0.00655364990234375,
-0.012603759765625,
-0.05560302734375,
-0.0902099609375,
0.0008740425109863281,
0.0007381439208984375,
0.02117919921875,
-0.092529296875,
0.0765380859375,
0.0023403167724609375,
-0.016143798828125,
-0.01708984375,
0.007068634033203125,
0.004070281982421875,
0.0196075439453125,
-0.047271728515625,
-0.055419921875,
-0.00788116455078125,
0.05010986328125,
-0.030670166015625,
0.00316619873046875,
-0.0020694732666015625,
-0.033294677734375,
-0.0016603469848632812,
0.013458251953125,
0.026519775390625,
0.03192138671875,
0.058258056640625,
-0.02337646484375,
0.0202789306640625,
0.0007376670837402344,
0.00429534912109375,
-0.06463623046875,
-0.0194091796875,
-0.0389404296875,
0.01078033447265625,
0.002658843994140625,
0.0245819091796875,
0.03924560546875,
-0.03765869140625,
-0.10394287109375,
0.10260009765625,
-0.039215087890625,
-0.0284423828125,
0.01580810546875,
-0.0108489990234375,
0.0016641616821289062,
-0.0328369140625,
-0.0021877288818359375,
0.007137298583984375,
-0.016387939453125,
0.0009975433349609375,
0.003437042236328125,
0.041412353515625,
-0.0210723876953125,
0.0129852294921875,
-0.05926513671875,
0.0142669677734375,
-0.01438140869140625,
0.0190582275390625,
-0.0020122528076171875,
-0.007038116455078125,
0.059234619140625,
0.0543212890625,
-0.00399017333984375,
0.03533935546875,
0.019317626953125,
-0.03985595703125,
-0.01261138916015625,
-0.0218048095703125,
-0.0279083251953125,
0.0306396484375,
0.08563232421875,
0.06793212890625,
0.03070068359375,
-0.0677490234375,
-0.01471710205078125,
-0.020843505859375,
-0.003009796142578125,
-0.027435302734375,
0.0149078369140625,
-0.064697265625,
-0.033935546875,
0.0205841064453125,
-0.01800537109375,
-0.0177764892578125,
0.015838623046875,
-0.0240478515625,
0.0088348388671875,
0.0274200439453125,
-0.00986480712890625,
0.01265716552734375,
0.023773193359375,
0.01187896728515625,
-0.01311492919921875,
-0.0017986297607421875,
-0.051605224609375,
0.01406097412109375,
-0.0160675048828125,
-0.056243896484375,
-0.0246429443359375,
-0.046051025390625,
0.0064239501953125,
0.039703369140625,
-0.0229644775390625,
0.0242156982421875,
-0.033447265625,
-0.0032958984375,
-0.004032135009765625,
0.02349853515625,
0.005321502685546875,
0.03375244140625,
-0.01473236083984375,
0.00608062744140625,
0.004810333251953125,
0.011688232421875,
-0.005031585693359375,
0.0721435546875,
-0.008087158203125,
0.038421630859375,
0.0227203369140625,
-0.0071868896484375,
0.0538330078125,
-0.01541900634765625,
-0.01154327392578125,
-0.001209259033203125,
-0.0134429931640625,
-0.07196044921875,
0.031646728515625,
0.055938720703125,
0.025970458984375,
0.027374267578125
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.