|
|
楼主 |
发表于 2013-1-17 17:37:25
|
显示全部楼层
////////////////////////////////////////////////////////////////////////////////
9 F' Q$ h' m- ]& U! T5 J// Theme Option% h% G! j- F, {5 ] R5 i. }# T
////////////////////////////////////////////////////////////////////////////////) X3 L4 J7 U" H# ?' _6 E' I- q
% l" s' l9 B x
$themename = "Zenx";
/ j" y+ s* C ~9 y9 L+ x- y& g$shortname = str_replace(' ', '_', strtolower($themename));& U; H! [# X" a2 U5 o. a9 s/ C
' P. V) @; ^2 [$ s: ifunction get_theme_option($option)
# b* E6 b; @- `8 i{2 j0 Q# X4 ~! l% A) n1 m
global $shortname;
6 d' V6 N# k, W return stripslashes(get_option($shortname . '_' . $option));/ b, R7 w5 [& @! F+ W3 u
}
+ `. f( V/ c+ @; p, ]% Z3 \+ ^3 j D+ N% m
function get_theme_settings($option)
( t. |4 b7 ?* e% v; X; P' x{: a# \, n( q/ _# Y1 Z
return stripslashes(get_option($option));
: @1 r! {- _# g}1 Z; U2 |3 d$ U7 S. U) W
$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");
& d1 x! s2 B1 e% [$wp_getcat = array();; w& a& f9 e5 Z5 W! M- |
foreach ($wp_dropdown_rd_admin as $category_list) {
; y( J( T* Q9 B% m% h9 k' G g$wp_getcat[$category_list->term_id] = $category_list->name;
4 U& E8 ?+ @ T g# ^' R; s- r}
5 J/ [# K0 ?7 |$category_bulk_list = array_unshift($wp_getcat, "Choose a category:");
% h. P. [. I5 C; L$number_entries = array("Number of post:","1","2","3","4","5","6","7","8","9","10");2 r( O& |! t; I4 m* n) e
$crop_position = array("Choose Crop Position","middle","middleleft","middleright","topcenter","topleft","topright","bottomcenter","bottomleft","bottomright");
0 P8 F( b- q$ B6 ?/ H/ W* W4 z
6 @. ^( ^2 S: a- ^' |, v4 P3 ?4 Y$options = array (, e) p' J( }! l8 T5 g
; f& I4 V# v# u( N
- D; ?& C% j1 x& L array( "name" => "Blog Header Settings",
. h! M& U7 x( A- t! J "type" => "heading",4 F3 q u- ]# @' d) n/ d+ B; k
),) G. b% d; L* v ~: z$ T
6 f1 P; U2 J) O* w. H
array( "name" => "Use Custom Logo On The Blog Header?<br /><em>*Disable by default, Choose Yes to enable it.</em>",3 Q4 E- i- t: F3 E2 ^. ^: _
"id" => $shortname."_header_logo_activate",) Q2 }: J, W: W$ Y9 ~ I
"type" => "select",
* u% |$ ^7 i% f "std" => "No",
: a* [2 h/ h5 H "options" => array("No", "Yes")),, D6 h- F$ g0 |
8 H/ v7 g0 U" R% P- }, I
array( "name" => "Insert The Full URL Location Of Your Logo Here <br /><em>*leave blank if not use</em>",
" D F* |) T1 q8 j5 v "id" => $shortname."_logo_url",5 h5 H) y( a( V
"type" => "text",- C$ [" m9 d4 W" i* m" f
"box" => "social",
+ V: I+ Q' i+ i' `! |: L "std" => "",0 w! T/ d$ ~/ a- C' {
),
! h$ ~0 O! } Y3 O% `1 w2 j5 [ / i8 A* ^! i l1 i; ~8 B
array( "name" => "Insert Header Banner HTML Code (Header)5 i( R- k) P$ L7 I* d8 r; T, q9 @* i
<br /><em>*Recommended Size 468 x 60</em>2 m& ]* g. H& \0 L/ e6 a/ T7 |
<br /><em>*leave blank if not use</em>",
4 I/ b* ]6 \8 O% w "id" => $shortname."_header_banner",3 U) X* ?& m0 ?# w( R8 E
"type" => "textarea",- }* z" k( a+ L- t
"std" => "",
8 q$ q7 r) w0 k ),
3 W! b: {+ t6 ?2 Q7 a/ A
( w6 k0 y& A% R3 e array( "name" => "</div></div>",% i$ l) j# P. u4 \+ `
"type" => "close",; O$ k6 f% x% r4 l, \0 }. d; v
),* D8 e/ z. |, J6 o+ \4 f
6 d2 v# a) t- j! L1 X/ z" g' o, N4 i7 A, g9 z; N
array( "name" => "Header Navigation Settings", ?. ~& E5 y8 E0 r& |8 ^" [
"type" => "heading",
4 {4 L0 w6 e; ~1 L: a# _% b" I ),/ @" n# X5 @* H% q
% n7 c+ D$ ?4 } array( "name" => "Insert Page ID To Exclude On Header Navigation<br />
6 ^; _. z9 G5 i8 T3 g% \" M <em>i.e ../wp-admin/page.php?action=edit&post=<span class=\"redbold\">123</span></em><br />
6 g1 B2 x j4 n6 j V <em>*Enter the page post ID number only</em><br />
$ ]7 S1 f) d* @& H4 @. D7 l <em>*separate by comma</em><br />8 a/ X& l$ x) a
<em>*Exclude pages which you don't want to show on the header navigation</em>",: g' w; B+ G9 p5 H& e% B3 z3 Q
"id" => $shortname."_header_page_navigation",
2 I+ o' |1 k+ u8 z+ c; o# B "type" => "text",8 u) k( Z x, J, E0 v
"std" => "",/ s" B X: k5 n$ h6 B) H: X& O
),3 d* }3 ~8 U! u4 L) a
* q) `. _# X. X: [4 H1 B
array( "name" => "</div></div>",& Q5 S0 T0 T, s4 a
"type" => "close",- f" ]3 {6 J( N2 ?8 r5 m/ o
),
* ]9 a8 `/ n) x( T- R3 z ! B: L) |1 ^# Z3 m8 m0 r& `6 W+ {( g
. {4 \$ w. l5 P$ L9 p array( "name" => "Post Auto Thumbnails Settings",) t+ ?8 ]1 `- J' j) B* u2 B! f
"type" => "heading",
% H6 \7 i2 h) l) f ),
0 K& O" b' T' U
! h g* w- V. ^& @0 h array( "name" => "Use <strong>Timthumb Script</strong> For Auto Thumbnails?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
& B& Z& P. N6 t/ Z( E "id" => $shortname."_timthumb_activate",
~5 W6 o2 B. S" t: f% b0 s "type" => "select",/ ^1 {. F. V1 L Q/ k8 Q
"std" => "No",4 z8 I2 \: p) `7 X9 I& x6 {' x( m
"options" => array("No", "Yes")),
4 ~7 D9 \' L1 I# `4 c
9 f' `4 T& u# P/ g2 i! p3 l array( "name" => "If Timthumb is enabled, Please choose its cropping method",
( o# i" b6 M9 s "id" => $shortname."_timthumb_cropping",
" Z9 v0 I4 j6 y( x- _ "type" => "select",
, Y9 G2 g2 a+ B: }, h8 \ "std" => "",
( x( W1 c% |( J4 a "options" => $crop_position),
' l/ G3 }4 H$ E/ p0 N
* \( }/ e' C8 j1 A( U array( "name" => "Insert Width Of Thumbnail Image<br />
5 e0 \* Y8 n$ ?: w; J1 J4 M. h <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />
" @7 `* t' P7 Y0 l) c" q$ T$ O, W <em>*Leave Blank To Use Default: 250</em><br />",
! `) J: _& v7 L0 x9 t5 ^* S1 Q "id" => $shortname."_thumb_width",' L ]; C2 I' V) k$ |- Z0 M
"type" => "text",1 J0 U. y1 a( U* G4 C `) i
"std" => "",
: g; k; s9 ^; D1 k7 V8 c& A) l ),
8 z5 B2 l* s, C7 e3 V0 @
' H6 c* V/ A8 R- g3 m array( "name" => "Insert Height Of Thumbnail Image<br />/ A Q- V, Z2 m, r( U$ j4 g+ u
<em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />, _2 I1 U) k- U x! `
<em>*Leave Blank To Use Default: 200</em><br />",
0 Y8 k& c! S3 G) p7 u# J. o5 w, v; Z "id" => $shortname."_thumb_height",! p. B0 P$ W- V8 g+ w
"type" => "text",
- y. x: C, I# K! X E "std" => "",- M0 ?3 Q& J& w& r* S# R9 k2 {% R
),% L1 ?. o: _ e/ w4 _ m6 z% E7 P' }; m
8 B4 X* F7 d9 i! [5 X M3 [
array( "name" => "</div></div>",
' w0 l& A+ U" X$ t9 e1 ~, A9 [2 q K "type" => "close",# h, s% v# z- v' ]% b8 p) a* @
),7 ~# Y/ a+ i2 ]5 J* \! A
2 K+ B' X, z) p; n' s. \+ v4 F9 Q array( "name" => "Featured Content Slider Settings",
4 E) M% X7 q1 N, |& Y9 P& Q# E "type" => "heading",
7 C. F- ^% d* Z3 z ),, \0 U" E0 \% Q% h/ ~; I# m
' g% X% \; P: R J0 N% b! D array( "name" => "Enable <strong>Featured Content Slider</strong> On Homepage?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
; u- B+ X3 ?/ p "id" => $shortname."_featured_activate",, o) t6 f, M" T, i3 ^3 X3 w; |
"type" => "select",* b/ R7 d9 i$ u
"std" => "No",
6 m+ |' \7 ^" q& k "options" => array("No", "Yes")),# Z7 w5 P \# M
& R4 k' Q% k! F8 r# c4 e2 A
( M: O0 [5 K7 h" |1 R# B8 J
array( "name" => "Choose Which <strong>Category</strong> To Put On The Featured Slider?",8 S* _) u) i8 b2 Y, D
"id" => $shortname."_featured_category",$ w& k" n& e$ E- I. N! M# T: c
"type" => "select",
# K. O2 c* b$ O% m2 S, w "std" => "Choose a category:",- z1 w1 o c/ E3 S8 X; h
"options" => $wp_getcat),/ N" f% h! G7 ~; G
. c, \: E2 o# ?9 m1 N: \9 y s) }
array( "name" => "Choose How Many <strong>Post</strong> To Show On The Featured Slider?",, D( G7 Y# J K+ C
"id" => $shortname."_featured_number",% N7 P4 A# ]0 i; h) Z- |/ s
"type" => "select",% Z& y0 b* u% J# L A
"std" => "Number of post:",0 P7 K& }7 T: X' u1 U: r2 A
"options" => $number_entries),
% p6 x7 p& G# L6 x v: W5 m+ M, n0 B4 [$ `3 q6 }
array( "name" => "</div></div>",
7 q0 T7 S8 P. x1 U7 x$ j "type" => "close",
0 p+ ?0 M4 d5 A6 [3 ~+ Y/ ~1 j ),
: \% i2 r. H e w7 z! ~4 k5 s& O0 n
$ z7 x v- j7 C4 p array( "name" => "Featured Category Settings",
1 e6 M2 _: n: C "type" => "heading",) W/ N0 l7 E3 P( \( o( S
),8 i8 v ^, S6 u' B
$ A& d/ K2 D# b2 p# F+ y array( "name" => "Enable <strong>Featured Category Showcase On Sidebar</strong>?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
/ U F' }( n; t& t1 O/ } "id" => $shortname."_featured_category_activate",
* A* M5 w) ]5 k/ { "type" => "select",5 C5 e) l, h9 n/ J" x3 I& e: H$ g& @
"std" => "No",% a: F7 B- ?8 Q) I2 }
"options" => array("No", "Yes")),. R. A$ |( T- `1 w
9 F0 A; w: O7 N1 X2 X& [7 x1 O array( "name" => "Choose Category To Feature On 1st Block?<br /><em>*Leave it as default if not use.</em>",
* @4 L9 {8 z' z7 K "id" => $shortname."_featured_category_id1",$ k- v% _# Z& V n( V- {- }/ s
"type" => "select",
* t' K2 `0 M. G4 F) |2 o "std" => "Choose a category:",
% R6 T. _. e/ E i "options" => $wp_getcat),
9 l( C: k& Z; |) o
( n6 ]3 R$ b) r+ V1 n array( "name" => "Choose How Many <strong>Post</strong> To Display On 1st Block?<br /><em>*Leave it as default if not use.</em>",
. E2 J1 F, j/ ]: \' a "id" => $shortname."_featured_number1",$ x/ R* \* X* J: l. C
"type" => "select",. [9 d6 `2 |6 V+ C
"std" => "Number of post:",
' e3 O Z1 e% K6 | "options" => $number_entries),7 y+ z4 k# s# L: Z
$ g6 ~( w! k# \4 b1 s
array( "name" => "Choose Category To Feature On 2nd Block?<br /><em>*Leave it as default if not use.</em>",# v3 M7 M8 @; N5 g S" J5 s
"id" => $shortname."_featured_category_id2",
0 f# m% K/ C% C s+ M "type" => "select",' B* V) v% y4 _0 A4 x8 m5 q% I
"std" => "Choose a category:",* v% j: i9 x. S/ Z2 i2 Z
"options" => $wp_getcat),
) l3 z6 ] G% j4 ^) ^, r" Y0 z
6 D+ ?/ w8 n0 l/ |9 t; T0 M array( "name" => "Choose How Many <strong>Post</strong> To Display On 2nd Block?<br /><em>*Leave it as default if not use.</em>",
7 V/ {% W) s- v# z5 }5 M% | "id" => $shortname."_featured_number2",% S4 @7 C' ~' A& A3 q6 ]7 o) t
"type" => "select",( h* R6 c; ]! e0 V: R
"std" => "Number of post:",
7 @+ K( ~, P* G, `& `! E "options" => $number_entries),
0 Y2 A# l: z% l2 G. p& P8 W 6 @0 r* e& z7 h7 K; {
/ @3 v/ r1 e8 ?
array( "name" => "Choose Category To Feature On 3rd Block?<br /><em>*Leave it as default if not use.</em>",+ Z( l# |. p; a( n |5 O
"id" => $shortname."_featured_category_id3",
# g$ ?0 J! c1 W% l, `( } "type" => "select",5 j( k$ p1 j8 K9 N" v' K- ]/ n
"std" => "Choose a category:",7 _, \) l( U& M3 @
"options" => $wp_getcat),
* @5 ]7 u8 x6 r 7 }6 V1 @9 C4 O) A' o0 M* r
array( "name" => "Choose How Many <strong>Post</strong> To Display On 3rd Block?<br /><em>*Leave it as default if not use.</em>",7 Z( ]" P* i5 K& r" q4 W
"id" => $shortname."_featured_number3",% s7 z5 X- C8 G1 Q( O: o
"type" => "select",
& `- y# j0 v h6 x8 T/ X; T8 a Q "std" => "Number of post:",4 B" ~# h- a% `! d$ q; e
"options" => $number_entries),& p3 w8 x& k, _! `. [% c; B4 i8 Z
2 {0 Y1 ~, a% a+ ^! n; [3 |1 ?. b
% Q2 T+ Y+ ]* }( L0 ^7 w3 { array( "name" => "</div></div>",
) h% H5 _! B1 x% t# C+ B "type" => "close",4 L) j- C+ s. b0 }# M; E* Y
),
- w% ]5 s& ^$ N5 |0 O5 P& \
! g# ]# h8 R( |2 f0 l7 D7 R: [! c# Z: ?; a& ?$ S! r9 |' R
array( "name" => "Google Adsense & Analytics Settings",
7 i. W1 m9 e0 L9 I* q# e7 z5 y$ ]9 A "type" => "heading",& r% F9 c5 Q1 B( t* q
),8 q! G4 J d3 k, ~$ |
/ b, ~! S$ c" ~& X
array( "name" => "Enable Google Adsense Loops Within Posts<br /><em>*default are disable, you can activate it by choosing enable</em>",4 t* t" V0 X; L# l
"id" => $shortname."_adsense_loop_activate",
; d9 Z; s y7 I3 k+ b2 Q* { "type" => "select",' o# k: O! z% I/ g4 H& @3 z
"std" => "Disable",
& ^. F% o# \# h( x8 s. T "options" => array("Disable", "Enable")),8 G2 ~/ E3 n5 @' h% a: K t
' l; M( H Z. N" Y, p array( "name" => "Insert Google Adsense Code For Loops Here<br />
0 K" m3 U; y. H% d <em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
1 U u; M0 q& Q2 k6 ~ K* X "id" => $shortname."_adsense_loop",, [# Z) _ @0 b' _# Q- g9 `
"type" => "textarea",
7 D" f M, V/ v; C# }& K/ q A( _ "std" => "",
" F3 B' o, T2 W$ [$ m ),7 P9 q" k; m$ l! Y& x: u
7 D. q u4 P$ A" z1 Y1 T array( "name" => "Enable Google Adsense On Single Page<br /><em>*default are disable, you can activate it by choosing enable</em>",; f: L# E6 I! n k2 W
"id" => $shortname."_adsense_single_activate",
3 V. A& I+ e" I# k& e. g "type" => "select",
n$ r& L, i) p0 X: B "std" => "Disable"," ^7 b W6 N3 q
"options" => array("Disable", "Enable")),
" O+ n5 Z6 z, [! P& e: m% R0 m6 b& ~0 v
array( "name" => "Insert Google Adsense Code For Single Page Here<br />
- m4 g' M/ z' ]" e <em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
6 h) X% v: n2 _6 b5 L6 u k" O, m "id" => $shortname."_adsense_single",
3 T8 ^& g, ~, c D, f, B# Y: L- h "type" => "textarea",: r5 V2 |5 u6 W+ n7 b, a+ w# X
"std" => "",
% Q. _' y! J0 i1 r2 Z8 V; a ),! }$ c' B8 }* N
. n) m8 w, m: S! j7 R* f2 C, x. z2 k) S
array( "name" => "Insert Google Analytics code <br /><em>*optional - leave it blank if not using</em>",
4 r5 t% z U) N; \ V2 {5 } "id" => $shortname."_google_analytics",
R+ P5 b( r. o$ `" M; Q$ Y "type" => "textarea",, i# Z: n: l3 @1 i3 P) W
"std" => "",4 i, A: P, o, Y0 s' [$ \/ l
),
2 D) {. m. ]& ]% Q/ Z* L, X- F7 W
array( "name" => "</div></div>",
% ^5 @, J' P% q% B "type" => "close",0 H# u5 u6 E) m3 F5 d4 M' \
),1 e1 M- H* W: P
; R9 ?$ {) Z: z5 w, R# }4 L
?$ a x7 a+ C& x/ H
array( "name" => "AddThis Social Bookmarking Settings",3 O; C6 |1 V+ K& b D) K9 `* D! T; m
"type" => "heading",; e2 J$ f3 v. B2 j+ D
),0 \9 L1 [+ z9 O2 M+ J) o
' S: i+ J* [* \- a. T2 V/ U
array( "name" => "Insert you AddThis ID here (Only For Tracking Purpose) <br /><em>*leave blank if not necessary</em>- ?. S' a4 k8 P% t( q5 l2 [
<br /><em>*Get a Free AddThis ID <a href=\"http://www.addthis.com\" target=\"_blank\">here</a> if you don't have one</em>",
% w0 Q, b P) R3 j$ x# p "id" => $shortname."_addthis"," N: L4 \( ^, F! J$ I& B/ D9 y; A
"type" => "text",7 T' F, q1 I6 P B( E M
"box" => "social",
+ ]$ q: V6 L1 u- W7 E$ l% y "std" => "",/ h1 O3 J3 @/ b: _) O4 W; B
),
\; N9 C( m; z: U# |" N* O D& Q
s$ T- _: I" t4 d( A3 Y# ` array( "name" => "</div></div>",
8 \& t# d3 d* I4 g* i8 l "type" => "close",' ~8 p3 Z, `4 Y# d; M
),
* c' I0 C: a7 W H/ |
I K% T, i8 t1 Q6 B E 5 A9 K, M0 X# _. x( [
' r' h; _$ y" C0 K
array( "name" => "YouTube Video Settings",$ o; K( A7 G# i2 o
"type" => "heading",! B( f% v9 c) P# `& M1 r: G* D
),# u3 M' u8 U2 f. Q" C% ~2 q: N
' U7 U2 V% ?; p _; h: Y5 f+ \ Y- a
array( "name" => "Enable <strong>YouTube Video</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
# Y% [! b8 I6 p "id" => $shortname."_emvideo_activate",; @0 r& ~( j7 Z
"type" => "select",4 ?8 N Q# Z* ?
"std" => "No",
; A& k6 P- T) M8 h% ~' i "options" => array("No", "Yes")),
e) ~- O& n, N7 s) g2 K+ H
1 q$ w3 \3 [5 z4 p' y 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>",: b% r% }* o. [3 f! b1 U' a
"id" => $shortname."_emvideo",, O# M" L7 f) P8 k: V6 c' G
"std" => ""," C5 G# V# O+ b& q% s5 w
"type" => "text"),4 J2 n: q( X* |( Y
7 ^$ O6 l! |5 T V. N& S array( "name" => "</div></div>",+ Y$ d6 Y# d/ p* y. g C) z
"type" => "close",
/ p2 I7 m! w& O1 R% W ),
9 X, |0 e, H! f0 r' E5 w3 a H; n 6 {# `8 m# T" y+ q/ h. \. V5 T: r/ S( D
array( "name" => "Twitter Settings",- b! W: R( y: e% H
"type" => "heading",
: l$ a( m6 y* c8 S# ~$ K* F5 N# o. @ ),
6 X1 G! P4 ~+ \! ?. ?2 G! ]
# g4 ^% {- b; B& ^0 s1 c4 O4 A# m! H array( "name" => "Enable <strong>Twitter</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",. K+ e `4 f# E2 S0 ^! b! R y
"id" => $shortname."_twitter_activate",
! D) N* D$ m. Y! s' Q "type" => "select",+ x1 u' J0 H# c% B( ^& l3 e
"std" => "No",, M* ]+ \/ U3 @
"options" => array("No", "Yes")),* v6 Q. q& c* }, G: }, ]. n
7 }/ f; w) R2 X( I, F, r4 o+ n array( "name" => "Insert Your Twitter ID here
, j/ S& G" }+ r. u# C <br /><em>*leave blank if not necessary</em>
" Z, z1 p8 m6 q# T' S8 _5 D <br /><em>*Register Twitter for free <a href=\"http://www.twitter.com\" target=\"_blank\">here</a> if you don't have one</em>",) k9 W+ v' O' F
"id" => $shortname."_twitter", \" `- X* ~9 {0 _
"type" => "text",5 s+ B9 D) {8 Z( |
"box" => "social"," h- ^. P$ c+ j$ |% V- K
"std" => "",
. ~) J; X" ~2 b3 t ),6 h; ^7 b- O0 B+ R* ~9 y7 e0 l A ^
' o9 u& M$ x& g0 D- Z; s) `
array( "name" => "Enter Twitter Feed Count here
7 \+ ?& t8 f/ ]7 D5 C8 z. r <br /><em>*leave blank if not necessary</em>+ i) j5 O b% s: }# M! |! a5 z
<br /><em>*Enter How Many Twitter Feed To Display</em>",9 S& j" Z: G, o' ?0 R
"id" => $shortname."_twitter_count",
7 ^. C6 E9 y4 R "type" => "text",; @' ~6 u8 ^% M; e& ^6 d2 b& u
"box" => "social",1 g# Y2 F. J: q; {
"std" => ""," j) y5 R4 _( C* M
),) M+ R1 X. B' X4 W* ?
0 r9 x- o0 G. @% r
array( "name" => "</div></div>",
; G) s( r# [6 F "type" => "close",
9 X) ^7 z3 s) t5 c& H6 E: ? ),
5 \7 o, Y4 x8 L7 |$ Y; O9 ~ ; {4 L6 v/ U& _- |2 y
0 v/ z% F0 Q& X1 s1 L$ v/ A
array( "name" => "125 x 125 Banners Advertisement Settings",# u1 f9 q, e: H, q
"type" => "heading",
& \: a( K5 a' P6 F" K# | ),: x/ W0 W) t5 i) r" @% m; k. G5 S
* |! |; \# Z8 k& V5 q4 G array( "name" => "Enable <strong>125 x 125 Banners</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",* H5 B9 I! e, f9 ^
"id" => $shortname."_sponsor_activate",
/ `* l" |! [! j" n "type" => "select",; `3 @4 u) u3 R- k/ Q. `/ i7 b
"std" => "No",
5 X" Q" e' }) X) f d) j" S# U- w "options" => array("No", "Yes")),
% p, N3 s& m+ Y: ?# }
, \& l7 G1 h+ A T h$ K5 @9 M/ n& X1 A$ r3 |/ W; H7 }( ?3 D% y
array( "name" => "Insert Sponsor Banner One HTML Code<br /><em>*leave blank if not use</em>",: m3 v" H$ i% ^
"id" => $shortname."_sponsor_banner_one",
/ k( a- ]+ x* i8 I+ ^. N "type" => "textarea",% [3 [8 v' g* \+ u6 x
"std" => "",$ k3 T: X8 D( D" m
),
6 e( H2 p% L( f2 K# M- v b3 b) v @& E e% _7 s* \/ p* i. G7 ^4 r
array( "name" => "Insert Sponsor Banner Two HTML Code<br /><em>*leave blank if not use</em>",, L4 t) C5 y! f
"id" => $shortname."_sponsor_banner_two",
% i8 C7 V7 ]/ c% e/ D; s/ _( t "type" => "textarea",+ k( {8 ^" V- k4 A
"std" => "",
- |: m9 J4 x1 g, p/ Q: H ),# N" }1 Y4 C& w2 a
, l& P. N- V- K, R7 L( r3 N
array( "name" => "Insert Sponsor Banner Three HTML Code<br /><em>*leave blank if not use</em>",
! W' Y) ], b; i$ u "id" => $shortname."_sponsor_banner_three",
+ s( _4 j6 w9 O1 M "type" => "textarea",! H* B; z6 F# S" A$ M/ [
"std" => "",( f2 J3 y/ ?. d% u* v
),
, h/ o; u& R% I) I& D6 u6 a
. O* V5 Z+ |7 _" C" A1 v$ M3 @( P4 S% R array( "name" => "Insert Sponsor Banner Four HTML Code<br /><em>*leave blank if not use</em>",& x" n7 P t9 d9 P0 w
"id" => $shortname."_sponsor_banner_four",
8 f9 R( U/ I% r/ n( Z6 [ "type" => "textarea",
) x% z" U0 n! ]! P. L "std" => "",
5 u" r2 i. I3 a ),
2 b6 Y' ^) ^; Q' t* @5 x7 w3 g0 T
4 l; m$ \, @* F0 o; A array( "name" => "Insert Sponsor Banner Five HTML Code<br /><em>*leave blank if not use</em>",3 H/ i# ~3 I6 x' p, [
"id" => $shortname."_sponsor_banner_five",! x' g" v0 A% b
"type" => "textarea",
f0 [: L1 N- _# u# _0 H9 [" d1 X "std" => "",1 f5 W9 j0 Q" p' S
),
0 W) c2 h- y; i9 ^& K1 [5 z
# n. @2 \8 _$ N3 d: s+ ? array( "name" => "Insert Sponsor Banner Six HTML Code<br /><em>*leave blank if not use</em>",
7 d# j! O( ^6 f7 V "id" => $shortname."_sponsor_banner_six",
# _ w& e' P5 d "type" => "textarea",. a( }1 D, L4 ?
"std" => "",$ |, }& b/ O1 q4 }8 o) y
),2 Y' K# b) @, g) W' p
N5 Z" W* \9 ^5 j( g
array( "name" => "</div></div>",
2 t# q' L9 o" k) a" T* @5 b "type" => "close",
2 ^& o+ n; `% L( }7 w- r ),
1 j+ c9 i0 W4 j+ o1 A/ v7 B; L* |8 H: ~2 t. N7 {# Q
# o. [/ m5 k, n# t2 _" w) ]) A3 n# I/ L: @6 f2 Y# y5 G( H* Z- o) G
);4 K# U) p! U1 d0 `
- a* y; i; b, d; r, W r7 _( U, X
function mytheme_admin_panel(){ if ((function_exists("check_theme_footer") || function_exists("check_theme_header"))) {
3 r7 {; O6 k- g4 G: n: S
9 L4 C: p" x& Q% s) b( Z5 ~8 t' Techo "<div id=\"admin-options\"> ";
3 U k& ?$ H) R6 t9 V! s) i
* t) n/ W% m2 U+ K2 d1 Aglobal $themename, $shortname, $options;* l7 ?) p& K0 V, f9 D: L% j
if ( $_REQUEST['saved'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings saved.</strong></div>';4 k/ v; m% A) z: h
if ( $_REQUEST['reset'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings reset.</strong></div>';' S) ?/ |1 t! f: B& ~
?>
( f: ~: z% U: J0 s7 \( ]& v0 T
( I; Z d# _% E3 q1 M3 G# D& S<h4><?php echo "$themename"; ?> Theme Options</h4>
* ]3 [9 E5 e8 B3 K2 u& v/ a
( V6 v; _& |$ @, o7 T. Q K2 N<div class="annouce">- o8 C0 ^6 H; d0 _, n4 M/ w; k6 x
<h1>Thank You Using Our <?php echo "$themename"; ?> WordPress Theme</h1>
$ c, J; A$ y3 u) W<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>8 L1 W4 ^4 @) d9 F; G9 f
</div>: A% f+ v) C) @! Y
/ `9 F2 y" s1 P7 ^6 I# _: q<form action="" method="post">/ o% o% E8 a6 f8 d7 ]; m: P9 ~
& v* F+ d5 ], A5 B% d
<?php foreach ($options as $value) { ?>
: ~% r, o% ]4 W% K: N. T' B
" j* ~( f& ~( l4 f& r1 ?2 N; R<?php switch ( $value['type'] ) { case 'heading': ?>2 }8 P6 x0 r) p8 g
; f1 Z: i' Z- X<div class="get-option">/ T- }2 n) \6 v0 I' C
$ _0 o: r$ x$ L! c' r; ~
<h2><?php echo $value['name']; ?></h2>3 T" I8 k; [ t4 |
8 Y W$ B7 ?7 \9 q
<div class="option-save">$ e* |9 D) \, V6 V: r+ Q0 A5 J
' ]" J* r8 Z" N1 }<?php; v' z2 {8 t) a* s; x8 N' S6 B3 H4 [
break;3 x9 L0 d* W* n9 e
case 'text':
& i2 t( O& L% Z( r; A1 T?>
7 T) ^) _1 r2 Y
% r7 s; I, t+ Z: e! ?<div class="description"><?php echo $value['name']; ?></div>2 d8 D/ ~! }0 s7 @
<p><input name="<?php echo $value['id']; ?>" class="myfield" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if (. {& X8 R4 i" z2 v/ d. v) F
, T6 o d$ }" K' ^get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></p>
9 \! I: I. \7 P" G+ a ~' {) `" P# ^3 r
<?php
" F3 J* Q" @' \/ Cbreak;
6 k, u& D/ a# W1 a$ O. e% P( wcase 'select':
|# ^0 Z) U6 ~( {0 l?>
; z9 h- g6 }4 G
! g: H p2 C) O<div class="description"><?php echo $value['name']; ?></div>8 N u2 u6 t H o7 i4 I# q* t
<p><select name="<?php echo $value['id']; ?>" class="myselect" id="<?php echo $value['id']; ?>">+ d$ u2 K5 g9 |* G! @9 v- r) G
<?php foreach ($value['options'] as $option) { ?>
# {3 @/ Z! I! o0 w) h<option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option>7 w- O& [6 Q* m2 _
<?php } ?>
+ V6 P. D6 t( H; k, O</select>
, ^2 g8 }' H" N% C/ O$ N3 r</p>
) Q7 v K; u% m* h- f; |) m) K2 M% @% @
<?php
- n: A" ^' H! K3 I# a* [break;3 l" V6 a5 d# p& `1 J
case 'textarea':
8 v2 t- l0 y1 s: } _$valuex = $value['id'];
( ~* J) w G* N8 f+ R- ]2 E$valuey = stripslashes($valuex);7 y6 f% k7 ?/ J7 Y
$video_code = get_settings($valuey);3 U F) k% O2 X4 |
?>& Q. |/ _; O: ^9 T8 H7 e& ?( y
' ], L& d& {7 p4 ?1 `2 O% Z<div class="description"><?php echo $value['name']; ?></div>- Q$ d0 v+ v& [% o) `' N
<p><textarea name="<?php echo $valuey; ?>" class="mytext" cols="40%" rows="8" /><?php if ( get_settings($valuey) != "") { echo stripslashes($video_code); }
! {4 l( \" N. t& A
1 w% o( T. ]4 J9 M$ U. }else { echo $value['std']; } ?></textarea></p>0 d9 q2 f$ f' o7 B) U( \8 [
2 q7 p2 q2 n' o( d" m2 G4 J<?php2 X* o* i( j; q6 M$ f: d, E" Z
break;! d7 W" o: _" b* b$ o, u9 P @
case 'close':
. r! `# b8 n4 i; R* }" T( I?>
; J3 J6 B/ D1 k8 l8 _, ?* Y$ W
8 H# Z$ R/ x! S; c- x<div class="clearfix"></div>7 x5 v% h" b" o' ]0 G- y% h6 f
</div><!-- OPTION SAVE END -->
2 J- \1 X( F2 s+ z8 a0 P+ l3 i/ X) s* v4 L; K# ]
<div class="clearfix"></div>
& z0 n9 u' x- c# o0 u</div><!-- GET OPTION END -->
( i# ^, M: P+ O5 L, j( m5 z5 L# |2 D3 m& I! j% D
<?php
( ^% h* d: Q- \3 `* ]+ ebreak;
9 k$ D' ^6 I3 D% udefault;. r: C' m8 B* N& t3 S* a9 G
?>
7 Q+ C- i' ~5 u) e" A7 [9 X5 l, L$ |/ S& c
[+ d( t6 L4 T" ?3 f% a% T<?php2 D' G8 C4 W$ o- D1 p
break; } ?>
6 @, _; e+ T* G0 V& s6 e) L# u2 m, P5 \8 Z
<?php } ?>
! V% N! [9 i! l9 G1 T+ ^2 t7 u: L, s; f$ |3 b
<p class="save-p">$ J6 H3 g1 q; m
<input name="save" type="submit" class="sbutton" value="Save Options" />
* _; m6 [! W% c! _* M W<input type="hidden" name="action" value="save" />
2 D) S. E( }: s. g4 |</p>
% f+ f. W$ l; U( _4 e5 E</form>; |" Z& j# r2 ?; E/ q
' j) H0 z g. ?2 I" V3 I<form method="post">
7 h9 }, m' \* d) \1 W<p class="save-p">& @5 p0 [* g3 j( r0 G5 ]
<input name="reset" type="submit" class="sbutton" value="Reset Options" />' ^5 [( W0 m! w t6 l% b; n
<input type="hidden" name="action" value="reset" />- ^; G& D3 A: p: ]. P6 y
</p>7 l7 \, f' i6 Z& C
</form>, B3 ]3 J: N9 [+ z! @6 G( {
3 l( J7 k' k: m- B& _5 _; R9 l</div><!-- ADMIN OPTIONS END -->, X' ?; Q5 ] R' O5 }/ N
% j5 ?' D. w r C
<?php } else { echo ("Well, You Done It..You Just Modified Some Codes!"); } }
6 O% u" V) o; k7 [0 p! A: @% R6 L+ @& c. u9 K; o
function mytheme_admin_register() {
% r) K1 d: @% N! Y$ tglobal $themename, $shortname, $options;8 \ i. Y3 B3 @" ^0 h1 I$ N
if ( $_GET['page'] == basename(__FILE__) ) {5 d. ?2 ]* W9 M: J" W3 f, m; c. g4 ~
if ( 'save' == $_REQUEST['action'] ) {
! Z! d) K' x% A8 Oforeach ($options as $value) {8 }* e) Y/ b! |1 h& C2 ?) \
update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }
. ?6 N# j O+ X3 H# J! n' {* F6 Eforeach ($options as $value) {7 t) e0 ?. w) O
if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }6 Y0 d9 |" ^/ p* S
header("Location: themes.php?page=functions.php&saved=true");" I1 B( c2 a$ l6 }
die;
/ @. I3 u) r5 M" e$ }! m} else if( 'reset' == $_REQUEST['action'] ) {
) b8 O! K1 U" E! n# e% mforeach ($options as $value) {6 q) U9 u' B/ v: N) S
delete_option( $value['id'] ); }
" M( Q v+ B" f7 @8 }header("Location: themes.php?page=functions.php&reset=true");1 |% a0 R$ M# a4 D) J0 W: c3 g
die;% n" H$ {6 A( y, v
}
; |5 }6 F5 l* c' D* ?% ]}% U5 C, d6 L! W
add_theme_page($themename." Options", "Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin_panel');6 z1 ] m. k" X: M: M- F/ w1 U
}
* ^1 o6 @. L7 \9 @$ h V S, M! ?+ e, p
function mytheme_admin_head() { ?>- a& [/ h3 R: H; {) F
<link href="<?php bloginfo('template_directory'); ?>/css/admin-panel.css" rel="stylesheet" type="text/css" />
( Z+ |4 m+ S* l& D2 U7 J# G4 y$ O; h% e<?php }
4 A. u- k2 y& H0 l {5 f |
|