|
|

楼主 |
发表于 2013-1-17 17:37:25
|
显示全部楼层
////////////////////////////////////////////////////////////////////////////////& Z: P: b4 i% w# G4 c: f$ e9 }$ S
// Theme Option3 g" a2 v- Z v8 l
////////////////////////////////////////////////////////////////////////////////
7 \7 l! S9 W3 I0 R. O3 O' O; W5 ^ n. l9 m% j g
$themename = "Zenx";
1 W6 V- h0 Z) O& u$ m, x1 B$shortname = str_replace(' ', '_', strtolower($themename));
7 m4 Z2 i3 j: J2 O" h& l
$ M I2 d6 I, K; d/ F' h( xfunction get_theme_option($option)
9 v# `3 }% Y8 z% f( k1 v* ^/ \+ { k{
: F+ c6 h, z: _) y. f8 A4 Z3 c global $shortname;
4 e1 o4 L3 V/ v% T6 P& R return stripslashes(get_option($shortname . '_' . $option));
* E: @0 \9 o5 ?}
, U g) q Q; b: q1 F/ i; _$ q: v: L2 I
function get_theme_settings($option)" v2 [" `; \8 G/ P* t
{$ G) u# F4 O: R+ |9 |! x
return stripslashes(get_option($option));
' a- m6 A8 l- G* Y7 y}4 }* b8 P" o# k; \, @
$wp_dropdown_rd_admin = $wpdb->get_results("SELECT $wpdb->term_taxonomy.term_id,name,description,count FROM $wpdb->term_taxonomy LEFT JOIN $wpdb->terms ON $wpdb->term_taxonomy.term_id = $wpdb->terms.term_id WHERE parent > -1 AND taxonomy = 'category' AND count != '0' GROUP BY $wpdb->terms.name ORDER by $wpdb->terms.name ASC");
; Z% H2 P0 I1 K r% P+ Q* u$wp_getcat = array();" G& t e L( B0 P
foreach ($wp_dropdown_rd_admin as $category_list) {
% h7 o4 l. f% A: q7 d, B5 @7 [0 N2 Y$wp_getcat[$category_list->term_id] = $category_list->name;
; C3 ?+ w: k( p$ t6 E# }* e7 k6 W}; l6 @9 T1 d: k! H
$category_bulk_list = array_unshift($wp_getcat, "Choose a category:");
- W5 r! j. M( t6 P; y5 D* j# f0 z$number_entries = array("Number of post:","1","2","3","4","5","6","7","8","9","10");% E" [5 A6 y7 M/ P4 Q
$crop_position = array("Choose Crop Position","middle","middleleft","middleright","topcenter","topleft","topright","bottomcenter","bottomleft","bottomright");6 O# j- h; F) [6 Y( i1 f
# i6 e j) e, n1 B9 y$options = array (
; [& C- r4 Z! T* Q) Q! `7 Y" M- u
- s) m- H5 p) e' n$ ]+ x7 c" r/ _) l: L$ [
array( "name" => "Blog Header Settings",( r# M( A2 s9 Q$ A5 Y; E5 [
"type" => "heading",/ o, w: d- q M1 {# g }
),
7 v$ p. t5 H2 [& S: x- z1 F. U" w# _4 \' S# W
array( "name" => "Use Custom Logo On The Blog Header?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
4 C( I5 s. a4 l5 @: B% O; k- D7 H "id" => $shortname."_header_logo_activate",
% u. z8 W6 L6 q, _6 M' j- A "type" => "select",9 e: ]& p3 d7 T3 }( A
"std" => "No",3 y1 Q5 S, t3 ~' k9 E4 _3 B$ V
"options" => array("No", "Yes")),3 T6 t7 E5 j$ K" S
. I! e9 J1 X5 k7 p1 e array( "name" => "Insert The Full URL Location Of Your Logo Here <br /><em>*leave blank if not use</em>", ~; e, k @0 d* ]' n% P1 D
"id" => $shortname."_logo_url",
% |! w4 j5 A7 x% v% d# K" _ "type" => "text",8 Q; f+ `- Z" j+ P+ u& ^" T3 |
"box" => "social",; e+ C7 x5 k$ n
"std" => "",
5 ~# ]5 n9 v/ ]& ]$ c' z* O ),
' @, ~ Q {* s. n- G% s6 w : d+ o5 n0 s' Z* v- Y7 R" `9 ?
array( "name" => "Insert Header Banner HTML Code (Header)
. C D: d$ n9 V8 c1 \7 \ <br /><em>*Recommended Size 468 x 60</em>8 \6 W) A! ? B4 O0 R- n) Z1 G4 I4 _
<br /><em>*leave blank if not use</em>",
! m" h. T- e' z, U6 B "id" => $shortname."_header_banner",0 q! O7 m/ K1 N T5 n' P
"type" => "textarea",
0 ]5 d! P0 {% x9 y4 a "std" => "",& j7 T5 I; K) L3 k
),; y9 |' o/ N& g
2 N. S% `3 s, e% C# x
array( "name" => "</div></div>",
9 g) n* U2 h: b' ?0 [9 l "type" => "close"," Z* z3 I U$ j' Y3 ?6 ]
),
/ J6 v. x; ]2 w+ G$ \9 D5 z" B% M/ n8 b) L" l0 t+ w+ u6 D
0 X( L7 u; A) m% A+ V0 Q; U; S( M array( "name" => "Header Navigation Settings",
6 l; B' a9 G( _& i$ _( C0 E1 n "type" => "heading",- c) R5 a, ^3 O, \& z u( g
),
0 S- b! n0 T5 @9 ?1 b: y+ _ d6 b
array( "name" => "Insert Page ID To Exclude On Header Navigation<br />2 [6 ?) m& K# \) {
<em>i.e ../wp-admin/page.php?action=edit&post=<span class=\"redbold\">123</span></em><br />1 ` u7 Q/ x2 w3 @+ L- e
<em>*Enter the page post ID number only</em><br />
, q" S, a7 N1 a+ _6 J7 s: e0 \ <em>*separate by comma</em><br />
$ p4 @/ r+ f0 ?9 ^7 q7 L1 f4 a# ~ <em>*Exclude pages which you don't want to show on the header navigation</em>",
( o, D- L" U$ I; _) T1 [$ A" l* I( ` "id" => $shortname."_header_page_navigation",' P. A P: S* l4 O% H k2 X
"type" => "text",+ `2 a. [& P# |% Q; q$ m) }
"std" => "",
# M$ ~$ a' N; x' D ),
; O/ d) o c( y, G( J7 S- d. ?* q4 s7 f/ T" o {
array( "name" => "</div></div>",. H7 ~1 Z3 Y7 p: Q% ?' d
"type" => "close",$ I, O) i' N8 x6 u( T8 s) f' G
),; Q# S4 i1 s2 Q/ L5 Q
; t- h- b5 r5 y3 H6 o
# I$ g2 t! d7 W0 W! M array( "name" => "Post Auto Thumbnails Settings",
5 J* s' r& B" e% a) X; b2 g "type" => "heading",& W+ z3 }( _* {
),! S3 T# D& f# m( W. N$ t
& T3 u2 ]- R9 Y# O, D9 k5 v
array( "name" => "Use <strong>Timthumb Script</strong> For Auto Thumbnails?<br /><em>*Disable by default, Choose Yes to enable it.</em>",1 u2 n0 v# A+ \6 ~) E# q
"id" => $shortname."_timthumb_activate",
( }8 x# \3 D1 F1 ^" t# {* a "type" => "select",
& _" C* ^- Y7 m w+ V7 @( o "std" => "No",' u% z7 R. o/ K3 G O& H
"options" => array("No", "Yes")),' D1 }! m& I3 c% b9 T& j$ |
2 H1 q4 w% Q, r6 f7 F) m# ] array( "name" => "If Timthumb is enabled, Please choose its cropping method",
9 O+ ^% p5 b0 W* m& C5 a "id" => $shortname."_timthumb_cropping",1 t4 Y- _# Z7 n1 a% l# ^/ V+ V+ g
"type" => "select",7 V s2 i* j6 @! m3 Z
"std" => "",
0 z& f" s* b& O. v! n' N "options" => $crop_position),( a& j1 p/ w: R& A7 O
" g# V/ O! e0 J
array( "name" => "Insert Width Of Thumbnail Image<br />
9 M/ A+ B; x, p6 p <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />
3 Q, J# N2 w0 O! {% F- { <em>*Leave Blank To Use Default: 250</em><br />",0 r3 R6 O% c! z, f- ~% g
"id" => $shortname."_thumb_width",, ]$ ^* L1 s3 j: x4 ?1 ]& t" O/ {
"type" => "text",1 n: S8 e+ L3 Z8 f
"std" => "",/ w# v( z, F3 F( s: r% L' P
),7 | |6 r# A* ~) }
- E6 _$ E6 t- ]; f
array( "name" => "Insert Height Of Thumbnail Image<br />4 p7 Z; x0 E/ K/ Q# v; d9 @/ M
<em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />
& R [8 q% n) ^# J2 a" f: A/ M <em>*Leave Blank To Use Default: 200</em><br />",
5 {0 t& j. @. m5 S0 C "id" => $shortname."_thumb_height",
) r" C I, x) U. c8 U5 ?" E "type" => "text",
. Q5 X" F; ~& K/ z0 k "std" => "",
' P" \/ P3 s2 } ),
& e+ L" |4 `7 U; l, p/ d. D% U' ]0 q8 q9 L% F$ B1 k3 D- Z+ F
array( "name" => "</div></div>",
' r$ r r: q9 G S8 R/ s- W "type" => "close",2 t6 D: ?4 Q- i
),
3 L9 L. B2 ^( [0 q6 S' C, U* j- b& J6 Z! F. l6 {% |+ f0 }' ?
array( "name" => "Featured Content Slider Settings",! x9 S! V4 _& s1 p/ G4 f
"type" => "heading",
3 k9 B7 o/ U; H% k, E) s; ^# ~ ),
% F& K1 D/ m* J+ ~. I) J, ^1 ]+ S" r+ C& N4 g0 ?3 q5 m# V
array( "name" => "Enable <strong>Featured Content Slider</strong> On Homepage?<br /><em>*Disable by default, Choose Yes to enable it.</em>",# d) e+ W1 B) M# O
"id" => $shortname."_featured_activate",
& `( d1 c0 P2 W. n; K+ [ "type" => "select",' w9 s& V9 @$ n8 y) o0 i, W
"std" => "No",
% S a# z- Q" j "options" => array("No", "Yes")),* \! {3 y4 y% H0 \2 H0 ^2 T
' M" V0 e; S& T$ {) u
2 F/ |0 q& d1 E7 C( K3 F5 N9 n
array( "name" => "Choose Which <strong>Category</strong> To Put On The Featured Slider?",
8 ~, ^. M& k+ A' h5 r% [7 B8 H "id" => $shortname."_featured_category",
0 b ]8 K& J- ~ "type" => "select",& T) R7 V6 f6 M: a3 `
"std" => "Choose a category:",
) } O8 q8 `' y" m, ]3 `' { "options" => $wp_getcat),
+ q' X9 Y$ ^# i% g, e6 U( t+ \3 T
array( "name" => "Choose How Many <strong>Post</strong> To Show On The Featured Slider?",
4 @" L3 A ]; b: _4 l# d "id" => $shortname."_featured_number",' g7 N& }5 ]2 K1 a
"type" => "select",1 |% c$ J) r0 L* k8 H
"std" => "Number of post:",; a# d" u- Y/ U+ q6 Y( V* V
"options" => $number_entries),
* V$ X* N d' _. [8 \, U
* d9 Z1 l7 |! y: F' c& V4 r array( "name" => "</div></div>",& ~ G9 I" ?8 N3 K; I, ~
"type" => "close",
3 F7 ]; m& h. m6 f0 }' H8 a$ f3 ~ ),
( q0 u/ ?" ?& l s" G3 u $ O5 s% t" N; ~! e8 R9 D
array( "name" => "Featured Category Settings",$ q, u( B: |) V* v
"type" => "heading",
& o! B3 g- e4 _$ d" T ),! P* p5 V# m1 r8 N' V/ H g. p5 j2 B
+ Y& Z* E. q2 q1 w* p array( "name" => "Enable <strong>Featured Category Showcase On Sidebar</strong>?<br /><em>*Disable by default, Choose Yes to enable it.</em>",1 D: ?+ y! n: s. m) b2 ]
"id" => $shortname."_featured_category_activate",
: ]* q8 R' H8 p% w" ~& r1 T "type" => "select",
" l( L1 U( }0 R "std" => "No",' N' o- i# R( U/ Z/ a% @/ h
"options" => array("No", "Yes")),
1 G5 F6 h l8 y# B1 Y 1 T$ ? _8 f# I1 H
array( "name" => "Choose Category To Feature On 1st Block?<br /><em>*Leave it as default if not use.</em>",, M9 j! k1 j0 C$ U: [. z a8 m
"id" => $shortname."_featured_category_id1",
( q5 t/ | m3 ` "type" => "select",
# O" n, W2 c7 o% A& N" c "std" => "Choose a category:",
?7 w! ~% D4 B3 W6 }& K( t" V "options" => $wp_getcat),3 q4 O- z/ O6 ~; ~
: I7 r5 E4 H, c8 k array( "name" => "Choose How Many <strong>Post</strong> To Display On 1st Block?<br /><em>*Leave it as default if not use.</em>",4 E) t" ~. m% R o i3 A, g
"id" => $shortname."_featured_number1",/ z3 c! S4 B/ F2 t! ^7 V" C( [
"type" => "select",
+ X% U a9 t/ n) Y- G" v "std" => "Number of post:",
/ m7 j1 `3 U( ?+ t, g "options" => $number_entries),* O% y4 U# N7 ^
; p a: ^+ C1 \; h+ g9 H" v4 }/ J u
array( "name" => "Choose Category To Feature On 2nd Block?<br /><em>*Leave it as default if not use.</em>"," E! \, p& v2 Z& f$ `; X
"id" => $shortname."_featured_category_id2",
( v! J, `* O- ^1 R "type" => "select",: y! I N' c, d* v! A' S" w) x
"std" => "Choose a category:",6 G+ m. h% ^2 ?" A7 V; `2 A2 f
"options" => $wp_getcat),
% Q W2 S" I3 l% J. R2 e8 g* F# z4 B 8 r7 ?3 ]) n6 w8 U) R7 s( u( z
array( "name" => "Choose How Many <strong>Post</strong> To Display On 2nd Block?<br /><em>*Leave it as default if not use.</em>",2 X9 C% D/ B& K
"id" => $shortname."_featured_number2",
. v) e% E3 N ]+ X& f+ G, n "type" => "select",
5 o' ]' |2 V3 F/ a+ y" W: G# {0 v, } "std" => "Number of post:",8 w( ^* W1 o/ A4 p" W! F
"options" => $number_entries),0 C; c( G6 p9 Z$ _) Q) I4 f/ B3 ?! \
. t, U& G: D+ l. E " l# e. z! X- G) m$ a# C5 N @
array( "name" => "Choose Category To Feature On 3rd Block?<br /><em>*Leave it as default if not use.</em>",% E9 |- K3 B! K+ m7 ^4 U
"id" => $shortname."_featured_category_id3",
* s# @" R: t9 |, h2 A, C! z "type" => "select"," u! T% O( U+ N: f* ~
"std" => "Choose a category:",
/ a5 R( B" `. x "options" => $wp_getcat),+ F3 c; J0 a ]
3 ]0 c! Q$ Z7 v" R5 @- w) R" { array( "name" => "Choose How Many <strong>Post</strong> To Display On 3rd Block?<br /><em>*Leave it as default if not use.</em>",0 P$ t2 W. j8 @) m5 Z; e2 x# ~
"id" => $shortname."_featured_number3",7 e. f7 A, u8 p. s) K5 L6 \
"type" => "select",. v& l2 q' ^- { o
"std" => "Number of post:"," ?1 O0 ^" G$ ]3 ]. ?
"options" => $number_entries),
1 B; \& k, i3 i0 y* @; \3 @
! e- g1 [) z% }" R5 A5 a4 K( k$ `5 J
array( "name" => "</div></div>", a3 @! [# Z ?, E, W' o
"type" => "close",1 g& Y n6 u \- I- t' d: w( l8 N2 w
),: x' R1 K6 G. ?
% Q' U2 _5 n2 O) T
5 j! o. v* V0 Z; v2 H( j8 \
array( "name" => "Google Adsense & Analytics Settings",
$ r* I2 K! P, c# a# l. e "type" => "heading",/ V7 V3 O: p% P4 e
),
; ~8 z! W/ k, u7 W! e# g
7 `6 d& b/ }% ]1 W: U array( "name" => "Enable Google Adsense Loops Within Posts<br /><em>*default are disable, you can activate it by choosing enable</em>",
' _- O. f% o8 K3 v/ r "id" => $shortname."_adsense_loop_activate",
7 H* s7 H k. R; E* X* m' s "type" => "select",
( _5 A/ u9 H; _& p "std" => "Disable",9 z; E% w3 V$ z- @1 b- F6 w. H
"options" => array("Disable", "Enable")),
" a, ^6 Q" ?% r" I- k* D( E5 ?3 e% j" V5 ^8 Z
array( "name" => "Insert Google Adsense Code For Loops Here<br />
, x: _; Y2 H' q <em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
" W; \, y1 o! } "id" => $shortname."_adsense_loop",
4 B. D/ i' c4 j& c7 ?8 V "type" => "textarea",
5 I; m4 F) @& T( j% \" { "std" => "",
. Y( r. i, ^! e( Q, s/ q& J. R/ H6 X" ? ),5 W- a. i0 j# c6 ]4 L, g; _0 u# E
+ e! }% g* ?& q# C
array( "name" => "Enable Google Adsense On Single Page<br /><em>*default are disable, you can activate it by choosing enable</em>",
- \- L2 }5 T7 k- }& {) I "id" => $shortname."_adsense_single_activate",1 S3 {6 J% p. B% E
"type" => "select",3 L% }2 c% T J; r2 l0 I% k! t% Z! m
"std" => "Disable",6 C0 ?. ?; j) X* ]$ s
"options" => array("Disable", "Enable")),
# M" q! c3 k$ Y) E
) I8 U5 a4 q, k3 @0 H$ ` array( "name" => "Insert Google Adsense Code For Single Page Here<br />
; S; c5 c/ O* q( o M9 Y6 A <em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",0 h; S) a4 V J3 U- S/ u
"id" => $shortname."_adsense_single",
+ N1 R; h) j( L5 E$ {1 r "type" => "textarea",
n, ~7 h: a, _. L( ^ "std" => "",8 j2 _$ J a$ S: O9 ^, ?+ [
),1 j" n1 M- F; h7 t
" C% m1 G9 d/ g
/ r5 u x% S' H# ~2 {( u array( "name" => "Insert Google Analytics code <br /><em>*optional - leave it blank if not using</em>",
! j6 g- V5 _2 f' q( l& T2 g$ X "id" => $shortname."_google_analytics",
5 ` L/ M1 J7 r( k, `4 g4 D" \9 t "type" => "textarea",
+ A) ~3 P) ^% I$ b "std" => "",
* T, p# A$ {1 | ),) `; s1 l& N& S* c$ j
. m; d, f7 e% L% \+ o* d' I array( "name" => "</div></div>",; B7 \" U1 J5 f; C( i; ~! q' P
"type" => "close"," P0 N- b6 n+ j" G; ]9 p
),+ ~: V# s. t) C% k) F: t
9 s2 L$ D7 |+ F! \# w/ X
+ Z0 U9 x8 |' _ K7 b) }+ e array( "name" => "AddThis Social Bookmarking Settings",
$ b0 z$ v' G8 Y "type" => "heading",
, \1 z( I6 ?0 f4 p# {) x, v' l: ? ),
' A c, Z, q+ m% c3 m3 \+ b; [4 ?! A. J3 M
array( "name" => "Insert you AddThis ID here (Only For Tracking Purpose) <br /><em>*leave blank if not necessary</em>
0 }% t: o5 w. V; X* y <br /><em>*Get a Free AddThis ID <a href=\"http://www.addthis.com\" target=\"_blank\">here</a> if you don't have one</em>",3 `! \. K; G* i+ ^: ^8 D: A
"id" => $shortname."_addthis",
5 f- G9 y1 m$ {0 Z1 u. L "type" => "text"," |9 Z' K9 N) ~: p. I; l
"box" => "social",
: I) q2 S9 h- ~2 ]8 z, O! o "std" => "",
( d8 ?8 b. ]: m/ \# I5 e9 Y% S1 V ),
2 n% A7 y$ L. R- _% s# [
9 H5 a4 c/ w5 {0 M: S) | array( "name" => "</div></div>",: ^3 D: G0 I$ V. D/ S2 a
"type" => "close",
7 |+ k) \+ g( ]. B. \: R ),
5 `7 I/ T: G! f + x* {$ O8 c" s' H/ \7 x
. K, T+ d& d1 f% o8 _( U
3 E' E8 Z& Z5 q9 h7 k. t array( "name" => "YouTube Video Settings",! }8 H; o1 {# c" O& y
"type" => "heading",
: Q1 C3 W& g+ l ),0 h5 e! x6 q! r! d* b' _* o
) Q+ o2 a+ V- t9 y) Z- H
array( "name" => "Enable <strong>YouTube Video</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",1 T( X! Q; _% b9 {' e; x
"id" => $shortname."_emvideo_activate",0 C3 m2 t: V1 ]. F5 [/ @$ A, x
"type" => "select",
# w8 _& E' s% o3 e2 I "std" => "No",: y0 [& }0 K/ D! Q
"options" => array("No", "Yes")),( Z/ D+ P$ W! ^$ r
$ O3 `: n/ c/ }8 b
array( "name" => "Insert YouTube Video Unique Code<br /><em>*You can find videos to embed on <a href=\"http://www.youtube.com\" target=\"_blank\">YouTube</a> site.</em><br /><em>i.e. Youtube - http://www.youtube.com/watch?v=<span class=\"redbold\">Hr0Wv5DJhuk</span></em><br /><em>*Only Insert The Red Bolded Code Inside Below Setting Box.</em>",' {; G3 k0 ~ J! c- e! f
"id" => $shortname."_emvideo",# n+ U! ?. z+ ^6 C1 W
"std" => "",* e" O7 i- t( V- [
"type" => "text"),9 B7 Z; b0 L+ ^' ]
8 G4 C0 Z$ B4 r1 T. U. l& t. J1 _( } array( "name" => "</div></div>",# U8 T2 D* {' v0 c, m
"type" => "close",
# r9 Y/ V+ P! Q ]) I$ Z) }/ ~$ x ),2 [% i3 g& n* a: W
# [8 I# Q4 g: B
array( "name" => "Twitter Settings",
# C3 u8 E `4 D- b0 R "type" => "heading",0 w6 E. [3 ~, _+ V5 e+ L! I; g
),
7 ^4 Z1 T, g( G7 ~ G, O- h7 d1 o' U- p e' a7 `; f; {! _
array( "name" => "Enable <strong>Twitter</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>", k: O/ H' `) G8 E5 x5 G! Q
"id" => $shortname."_twitter_activate",
6 f7 R8 Y. X5 V; }7 C3 Z$ o7 l! C "type" => "select",( s8 G5 w- F7 q) c
"std" => "No",
0 O7 ? H4 {+ \$ x" c8 x "options" => array("No", "Yes")),1 U1 S( a- ?( k; u
% F$ z& j" c# n. N$ I& y6 U% Z
array( "name" => "Insert Your Twitter ID here4 H) w# G1 P2 o) v
<br /><em>*leave blank if not necessary</em>
4 h b( v5 ?6 e <br /><em>*Register Twitter for free <a href=\"http://www.twitter.com\" target=\"_blank\">here</a> if you don't have one</em>",
0 }, F* l( `1 t# _5 ~ "id" => $shortname."_twitter",6 D9 @+ b/ b3 A3 s4 e- p
"type" => "text",
0 {4 D+ x% z2 ?* x5 h" c3 [% c "box" => "social",' | }/ g7 t# [3 N2 {0 B j! t5 g) U( }
"std" => "",
1 E" k3 C [% ^7 b ),
+ V1 L8 [* h2 Y! }, T. W3 \* O. k; N' a3 r* N; F- b
array( "name" => "Enter Twitter Feed Count here. o) y2 F/ A% ]8 }
<br /><em>*leave blank if not necessary</em>
9 x5 B2 J1 Y- P/ H <br /><em>*Enter How Many Twitter Feed To Display</em>",4 _" W4 a: b, V2 q7 b; Z X
"id" => $shortname."_twitter_count",
3 h6 Z; K! m) n, ^. C5 N' | "type" => "text",
* b' F8 m) |# m' |6 \7 P "box" => "social",
6 O0 Y! \9 u$ Y5 B "std" => "",
: y. J8 N$ J+ ?4 X5 Y/ [ ),
& L8 J8 c6 ?% e# u% k
9 B* S' b" U/ x9 _3 E array( "name" => "</div></div>",
4 x, R+ D. ~8 r. C1 a5 \ "type" => "close",
& T0 v5 c7 i9 q/ w6 h7 l; k" A ),
9 D" o$ g7 p% c$ }9 d* e/ I
2 T! k6 E* K: q8 C
9 C& q9 W( R/ W7 E+ {) ? array( "name" => "125 x 125 Banners Advertisement Settings",
% G/ u. @# f u9 T! E) o* k "type" => "heading",
8 ]8 T) U7 e# t# w+ L ),
6 ?/ ]( o- O8 m" H @- i$ b
/ n- m9 z. f7 g! w array( "name" => "Enable <strong>125 x 125 Banners</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",6 A6 Q0 }; n& a, _5 k4 x/ |8 l- ?
"id" => $shortname."_sponsor_activate",
6 ~* t) B$ U" C6 m/ r8 @) m( l "type" => "select",! O0 c( l: E. G
"std" => "No",' B+ V+ v1 w" [+ y$ f3 k9 X4 d9 v
"options" => array("No", "Yes")),$ `& ^: U% `' h% k) b) ~
$ G" Q- z" ]) C% ?8 \9 I O
- P* x8 P7 t4 Q3 y array( "name" => "Insert Sponsor Banner One HTML Code<br /><em>*leave blank if not use</em>",) C6 C& _) W5 S$ z7 [/ ^
"id" => $shortname."_sponsor_banner_one",
3 Z1 G. s' ]( U+ p "type" => "textarea",2 l$ c1 ~; u" I& b# M5 {' d
"std" => "",6 h# ?% ?) a3 t( W
),
5 _$ p& Y6 p6 G) U e
8 h' q+ `; Y( g x1 X array( "name" => "Insert Sponsor Banner Two HTML Code<br /><em>*leave blank if not use</em>",5 M* n& R4 n: |' g" Q
"id" => $shortname."_sponsor_banner_two",# L2 g: B( Y' i* m3 D! E
"type" => "textarea",# r8 J/ V( E. p7 ~+ V+ S
"std" => "",
/ Y: w5 C2 t' j ),
8 q+ c2 t* g0 h+ G
/ c' J9 Q7 A0 P. C5 U1 ` array( "name" => "Insert Sponsor Banner Three HTML Code<br /><em>*leave blank if not use</em>",6 d3 [+ `5 |! s9 ^! b$ Q% l& W7 w8 f
"id" => $shortname."_sponsor_banner_three",
+ M+ R* Q1 N' u, w8 E "type" => "textarea",& \' y9 l4 l1 r% S* g
"std" => "",7 H# r1 P$ N+ v0 M
),; j2 b5 z$ R5 [! }* s* q3 d, g
, b2 E4 I& _; ~
array( "name" => "Insert Sponsor Banner Four HTML Code<br /><em>*leave blank if not use</em>",4 c8 x# i! J _ ]0 Z
"id" => $shortname."_sponsor_banner_four",. y& }: ^; B' J* X* g# r
"type" => "textarea",
" v1 W* t2 w6 M5 H, E) ` "std" => "",$ B5 d- p4 V- b# |7 v- m
),) s/ k6 |: ]5 f
" V6 O# r" \7 x' v
array( "name" => "Insert Sponsor Banner Five HTML Code<br /><em>*leave blank if not use</em>",
3 P, W6 `9 w2 X "id" => $shortname."_sponsor_banner_five",
! J! S& I- W5 J# c& s* S! G "type" => "textarea",3 C7 d& j9 `3 s! C
"std" => "",7 L8 ^2 Z& P3 R# W2 g: `/ b
),
! z) V, S1 `" w2 f: k
5 O$ j: |( t) H- C4 R% v* \/ | array( "name" => "Insert Sponsor Banner Six HTML Code<br /><em>*leave blank if not use</em>",8 `; i b& N3 G4 q: a. r# K8 n
"id" => $shortname."_sponsor_banner_six",. X5 @) ?- B, n
"type" => "textarea",4 a7 G# F) L# k) o$ j
"std" => "",' S% ^2 E- Y. e- X8 C: ~. ?
),# @; L- T1 J* Y4 K
; E0 ^" I) ]# B; L
array( "name" => "</div></div>",( M" n: E2 \9 W$ K+ `9 @8 u2 I `
"type" => "close",4 q9 ]' `& \8 T0 d
),. Y4 G& n. }4 Z# u/ V
. a+ H) U. C# U7 C# g
( ] `# `& ]6 x$ \, F" q' x7 V& B- ~- ~; J b, F5 B
);
# c' G" K( H. ^0 F6 j) F
) V. q; Y& ]) X4 ]* rfunction mytheme_admin_panel(){ if ((function_exists("check_theme_footer") || function_exists("check_theme_header"))) {1 O5 g ~1 p$ n
, d+ d7 `( ?& z+ Z3 ]echo "<div id=\"admin-options\"> ";
& d Y' _8 _( J6 Y$ D+ l8 B, J9 N& s* n ^( k
global $themename, $shortname, $options;9 x8 T: `8 l) `) i
if ( $_REQUEST['saved'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings saved.</strong></div>';
) k7 [+ y6 {6 J2 aif ( $_REQUEST['reset'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings reset.</strong></div>';" A9 D8 Q' g0 z8 y( L. z [
?>
3 g8 a/ `9 m/ I* R1 ^ K8 G, h9 I& e. U. ~, X, b
<h4><?php echo "$themename"; ?> Theme Options</h4>3 f# ?7 g$ [* X: {6 x' u* p* J
& V5 G; T1 y: S; V1 N<div class="annouce">
: Z1 ^! M( l/ B* ? U# v, {% m<h1>Thank You Using Our <?php echo "$themename"; ?> WordPress Theme</h1>
% o! k6 W6 q6 u) S" L- f7 \<p>Don't Forget to <a href="http://feedburner.google.com/fb/a/mailverify?uri=MagPress&loc=en_US" title="MagPress Newsletter" target="_blank" rel="nofollow"><b>Subscribe Our Free NewsLetter</b></a> In Order To Receive Theme's Updates and Fixes.</p>
9 v* X) F, t4 U# Y</div>6 B8 c% n; u/ m1 s9 E1 H# f
2 n V, Q$ b+ H* y# ]& L4 n
<form action="" method="post">
- M @' i" ^/ I3 {8 t4 c0 O% C O e
<?php foreach ($options as $value) { ?>- X9 W! B1 _7 F8 M0 D" \. `
5 P' {9 X+ B1 Q5 W. R<?php switch ( $value['type'] ) { case 'heading': ?>" w- F' M1 z( J2 n! Z
% }) N* H' L7 u: @( m+ p<div class="get-option"># U% t, I6 _# q) M" Q
2 i1 o) u! B6 u& K<h2><?php echo $value['name']; ?></h2>
, B0 n2 C* T* G3 u0 {6 h
* K* ]) Y' x" ]0 s, s9 p" X z, f<div class="option-save">3 H+ o9 q) x: l# J
$ K2 O; d2 M' n/ J- Q7 f. E
<?php1 M) _1 P. A. b3 u' Z
break;
/ P+ k2 |# a( B0 Tcase 'text':
- t2 M. p1 y8 K6 I3 H?>, c, A7 s* b% l! z4 ~
/ \* S7 J) V% H<div class="description"><?php echo $value['name']; ?></div>5 [+ l! R ~/ m$ [9 ^
<p><input name="<?php echo $value['id']; ?>" class="myfield" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if (
1 Z- {. V9 b( R3 E% d c5 V# P; K" t2 C/ X0 y% k
get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></p>! J' V1 K% u3 q& F& W0 Q/ u
. h' I) b* [+ ~1 W<?php) U+ }8 U( \, V$ ]0 @- ]" f
break;1 V4 L5 z6 Z. |) i+ m* [
case 'select':# }! U0 M. S' `
?>6 Q8 E) `2 U, I
# |- f5 X, o, x4 B* X5 l5 \3 A% J
<div class="description"><?php echo $value['name']; ?></div>
/ W( Z# v. ]( w: @) Z* C<p><select name="<?php echo $value['id']; ?>" class="myselect" id="<?php echo $value['id']; ?>">! @( v7 l. X% N/ s+ G
<?php foreach ($value['options'] as $option) { ?>' s: v7 |" L) W, z2 h
<option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option>
4 \- ~2 W$ |- x4 x" I2 @<?php } ?>: d" [: p+ v* r& a m# T8 |& e1 U) ?
</select>, j! K* k F& z7 M
</p>
8 W/ l& o9 A4 F4 L& p
: V6 N8 P1 X: J# V& x<?php
& P, c+ e; }" E% Q# |/ l# w' Rbreak;* P5 I; C- W. A7 j i5 q
case 'textarea':
7 t4 r q! d% Y/ l$ T$valuex = $value['id'];
6 {# T( d& U; Q+ i5 c9 @0 t$valuey = stripslashes($valuex);
2 g0 w D; q+ [# H9 X8 [8 c$video_code = get_settings($valuey);
1 m- f8 \. W# w6 ]! r# D?>
$ B9 n f }8 T% }2 P$ v. Q
8 X( K- D, L/ s$ y<div class="description"><?php echo $value['name']; ?></div>
6 ?* X2 k7 P8 H) n4 P. Y1 R8 w) ?<p><textarea name="<?php echo $valuey; ?>" class="mytext" cols="40%" rows="8" /><?php if ( get_settings($valuey) != "") { echo stripslashes($video_code); }
. M( ~& t8 W. j6 n- D) g
0 A9 {+ P3 v; S+ Belse { echo $value['std']; } ?></textarea></p>; o& v T( p1 F8 @
$ O' V6 b# ~2 N, e7 j8 K<?php8 n# A( h9 z# K: N, ^$ k; H i: e
break;- T* S, Z$ R* W% {
case 'close':# _8 o* C# t9 T, u, h8 S4 v0 q
?> n4 q* u1 r/ g* `
8 i- Y# q' q+ J( T4 Q) F, [
<div class="clearfix"></div>
1 ]& F* Y0 n2 q" L. Z5 u</div><!-- OPTION SAVE END -->
# o9 s4 T4 {2 _# F9 f
! N! o0 i6 k+ u$ d$ U% Z<div class="clearfix"></div>
0 T! _/ R, r6 v# E: L) p' u</div><!-- GET OPTION END -->; m: }7 ~. w4 B" M3 R7 b, ~# R
( k& c7 o3 G- b( p! r7 {" F<?php Y- L) L! X( f8 W: `* V0 B
break;1 K: y8 a" ^- {- w: D3 O$ P4 d
default;
8 A( b* j5 Z/ g: s1 o+ [+ ]4 {?> R, `4 T8 t% X9 d
4 ]- l a8 s4 O+ s, A, L1 B' c5 S
<?php
9 }* }/ r: s, h' S t5 k3 q+ B9 Xbreak; } ?>; S' [& V6 X X+ x) F3 @
7 \6 z( D0 I; \4 s, G! J1 V. |<?php } ?>. J/ d! J4 ^+ O
- l' @2 k. M" j3 l' c# r7 q. ?
<p class="save-p">
) N4 h, E$ R3 l6 R<input name="save" type="submit" class="sbutton" value="Save Options" />
! g Q/ \+ g9 u<input type="hidden" name="action" value="save" />
# u5 ~% T- `6 q, h! r</p>
' ~) [% X! w# K4 e' Q$ D& U</form>
- b! n5 S3 o. H* j5 ]! x) ?- H7 r* D
<form method="post">
" r0 A4 Y6 e4 [$ K<p class="save-p">
( z8 P: M6 l' @7 i( x' k<input name="reset" type="submit" class="sbutton" value="Reset Options" />
" O) {2 Y$ I9 b/ D<input type="hidden" name="action" value="reset" />
. Q" J, Q2 _% H8 o6 L</p>
$ ^3 h8 [$ E3 m' c# I</form>
) [* S* b. [+ T' |3 W8 ~9 \5 s! k! b+ O! a4 B1 U
</div><!-- ADMIN OPTIONS END -->: }6 C9 C7 j! Q* _4 w' x( q
1 O6 R% S; A2 x* h8 @5 m! V0 F& t
<?php } else { echo ("Well, You Done It..You Just Modified Some Codes!"); } }
& q# r! [$ @3 H4 }7 M( `) S8 R
' G2 o2 s. u5 z& a# vfunction mytheme_admin_register() {% m6 l' q( q' }+ }, B% E
global $themename, $shortname, $options;+ r9 |( B+ y/ B
if ( $_GET['page'] == basename(__FILE__) ) {
! M% P8 |. O, g9 `$ Fif ( 'save' == $_REQUEST['action'] ) {
1 B7 n0 q: s* K( {( @4 Vforeach ($options as $value) {
8 W, ?/ X( C6 r* Xupdate_option( $value['id'], $_REQUEST[ $value['id'] ] ); }
6 o5 H3 s/ [+ Fforeach ($options as $value) {
# Z# R+ E+ e4 T8 b Oif( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }& @* n+ U7 f9 A; m* b! V3 H6 s+ T
header("Location: themes.php?page=functions.php&saved=true");
4 n# m2 y4 |" I! a) \die;! A% X+ V2 C$ M0 b" X9 E
} else if( 'reset' == $_REQUEST['action'] ) {
! ]7 r3 v: T/ R" }foreach ($options as $value) {
8 p# D6 `) M+ O+ K- D' X- k# {delete_option( $value['id'] ); }6 e- F) X6 F# o/ ^& c
header("Location: themes.php?page=functions.php&reset=true");6 ]) f& G- i2 o/ W% Y' R7 P
die;
0 Z8 B' ^# A" \0 c& h; F6 P/ J}
, E, x" D* A, i. y}
% y" g) F: k& l9 r4 `5 Eadd_theme_page($themename." Options", "Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin_panel');8 W5 N5 w0 @ P( M
}
' {4 o( t, S( |8 E' w, j6 E
2 g# x @. ^/ k5 _- {6 ufunction mytheme_admin_head() { ?># J! {4 q% L- ?' s
<link href="<?php bloginfo('template_directory'); ?>/css/admin-panel.css" rel="stylesheet" type="text/css" /> z4 u U( j8 ^2 \) v2 E
<?php }& g+ G5 U& S2 Y9 v2 T% N p/ g) e
|
|