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