|
|

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